@webority/theme 0.73.1 → 0.75.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/theme",
3
- "version": "0.73.1",
3
+ "version": "0.75.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": {
@@ -70,9 +70,14 @@
70
70
  row-gap: 2px;
71
71
  }
72
72
  .form-check > .field-hint,
73
- .form-check > .field-error {
73
+ .form-check > .field-error,
74
+ .form-check > .wui-field-message {
74
75
  grid-column: 2;
75
76
  }
77
+ // Clears the underline of a link in the label (it hangs 3px under the text) by 4px more.
78
+ .form-check > .wui-field-message {
79
+ margin-top: 5px;
80
+ }
76
81
 
77
82
  // AppRadioGroup: options in a column, or a wrapping row with `inline`.
78
83
  .wui-radio-group {
@@ -527,6 +532,66 @@ textarea.form-control.autosize {
527
532
  margin-top: -2px;
528
533
  }
529
534
 
535
+ // The message line under a field: the hint and the error share one grid cell, so the error takes
536
+ // the hint's place instead of adding a line. Inside a form an empty line still keeps its height, so
537
+ // showing an error never moves the form; elsewhere (toolbars, filter bars, inline edits) an empty
538
+ // line takes no space. The library's compact containers never reserve it, since a Razor filter bar is a
539
+ // GET form. .wui-form-compact on any container opts a form out.
540
+ .wui-field-message {
541
+ display: grid;
542
+ margin-top: -2px;
543
+ font-size: 12px;
544
+ line-height: 16px;
545
+ }
546
+ .wui-field-message:empty {
547
+ display: none;
548
+ }
549
+ form .wui-field-message:empty {
550
+ display: grid;
551
+ min-height: 16px;
552
+ }
553
+ :is(.wui-form-compact, .wui-filter-bar, .wui-filter-popover, .wui-table-toolbar, .wui-inline-edit) .wui-field-message:empty {
554
+ display: none;
555
+ }
556
+ .wui-field-message > .field-hint,
557
+ .wui-field-message > .field-error {
558
+ grid-area: 1 / 1;
559
+ margin-top: 0;
560
+ line-height: inherit;
561
+ transition:
562
+ opacity 150ms ease,
563
+ transform 150ms ease,
564
+ visibility 0s;
565
+ }
566
+ .wui-field-message > .field-error:not(:empty) {
567
+ animation: wui-field-message-in 150ms ease both;
568
+ }
569
+ // A cleared error fades out with its text still in place (React keeps it for the fade).
570
+ .wui-field-message > .field-error.wui-leaving {
571
+ opacity: 0;
572
+ transform: translateY(-2px);
573
+ }
574
+ .wui-field-message:has(> .field-error:not(:empty):not(.wui-leaving)) > .field-hint {
575
+ opacity: 0;
576
+ visibility: hidden;
577
+ transition:
578
+ opacity 150ms ease,
579
+ visibility 0s linear 150ms;
580
+ }
581
+ @keyframes wui-field-message-in {
582
+ from {
583
+ opacity: 0;
584
+ transform: translateY(-2px);
585
+ }
586
+ }
587
+ @media (prefers-reduced-motion: reduce) {
588
+ .wui-field-message > .field-hint,
589
+ .wui-field-message > .field-error {
590
+ transition: none;
591
+ animation: none;
592
+ }
593
+ }
594
+
530
595
  // Native select with a rounded squircle, custom chevron, off-surface fill.
531
596
  .select {
532
597
  appearance: none;
@@ -1114,7 +1179,8 @@ wui-select[compact] {
1114
1179
  .field > .datepicker,
1115
1180
  .field > .file-input,
1116
1181
  .field > .file-preview,
1117
- .field > .field-error {
1182
+ .field > .field-error,
1183
+ .field > .wui-field-message {
1118
1184
  align-self: stretch;
1119
1185
  }
1120
1186
  // A file picker fills its column by default (align-self:stretch fills the field on the cross
@@ -103,8 +103,10 @@
103
103
  min-width: 0;
104
104
  font-weight: 500;
105
105
  }
106
+ // !important: a consumer's footer is often a Bootstrap display utility (.d-flex is display:flex !important),
107
+ // which would otherwise keep Cancel and Submit showing beside the discard question.
106
108
  .wui-drawer-discarding > :not(.wui-drawer-discard) {
107
- display: none;
109
+ display: none !important;
108
110
  }
109
111
 
110
112
  // Side drawer: from md up.
@@ -17,18 +17,6 @@ html.wui-theme-switching::view-transition-new(root) {
17
17
  // flashes in full for the frame or two between the snapshot and the animation start.
18
18
  clip-path: inset(50%);
19
19
  }
20
- // The pressed control carries its own view-transition-name for the switch (the engine sets it),
21
- // so it is rendered as its own live layer above the sweep: no old image, no cross-fade, just
22
- // the control as it now is, with its ring sliding or its glyph swapped the moment it is pressed.
23
- html.wui-theme-switching::view-transition-group(wui-theme-toggle),
24
- html.wui-theme-switching::view-transition-new(wui-theme-toggle) {
25
- animation: none;
26
- }
27
- html.wui-theme-switching::view-transition-old(wui-theme-toggle) {
28
- animation: none;
29
- opacity: 0;
30
- }
31
-
32
20
  // The new page is rendered live under the moving clip, so anything still changing on it repaints
33
21
  // the whole page every frame. A theme flip starts a colour transition on hundreds of elements at
34
22
  // once (Bootstrap's buttons, inputs and links all transition color and background), which is