@webority/theme 0.6.4 → 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/theme",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
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": {
package/scss/_tokens.scss CHANGED
@@ -70,6 +70,10 @@
70
70
  // rows, so they must line up — they were 46.8px and 45px, which reads as a
71
71
  // misalignment on every filter bar. 44px is also the WCAG touch-target floor.
72
72
  --wui-control-height: 44px;
73
+ // Optional size steps (sm/lg) for dense toolbars / marketing-scale fields. md is the
74
+ // default above; a control opts into a step with .input-sm / .input-lg.
75
+ --wui-control-height-sm: 36px;
76
+ --wui-control-height-lg: 52px;
73
77
 
74
78
  // Scrollbar thumb — one quiet grey-blue at three interaction strengths.
75
79
  --wui-scrollbar: rgba(145, 158, 171, 0.45);
@@ -193,6 +193,18 @@
193
193
  box-shadow 0.12s;
194
194
  font-family: inherit;
195
195
  }
196
+ // Size steps — sm/lg opt out of the shared 44px control height for dense toolbars or
197
+ // marketing-scale fields. md is the base rule above; AppInput adds .input-sm / .input-lg.
198
+ .input-sm {
199
+ height: var(--wui-control-height-sm);
200
+ padding: 6px 10px;
201
+ font-size: 13px;
202
+ }
203
+ .input-lg {
204
+ height: var(--wui-control-height-lg);
205
+ padding: 14px 16px;
206
+ font-size: 16px;
207
+ }
196
208
  .textarea {
197
209
  height: auto;
198
210
  min-height: 120px;
@@ -200,6 +212,13 @@
200
212
  line-height: 1.5;
201
213
  resize: vertical;
202
214
  }
215
+ // Auto-grow — JS drives the height to fit the content (Razor: data-app-autosize wired in
216
+ // webority-ui.js; React: the autoGrow prop). The manual grabber and the scrollbar are off
217
+ // so they can't fight the measured height.
218
+ .textarea.autosize {
219
+ resize: none;
220
+ overflow: hidden;
221
+ }
203
222
  .input:hover:not(:focus):not(:disabled),
204
223
  .select:hover:not(:focus):not(:disabled),
205
224
  .textarea:hover:not(:focus):not(:disabled) {
@@ -496,12 +515,57 @@ textarea.textarea:focus {
496
515
  background: transparent;
497
516
  }
498
517
 
518
+ // Clearable ✕ — a trailing reset button, placed inside .input-wrap / .input-icon. It only
519
+ // renders while the field has a value; .has-clear reserves the room so text never sits under it.
520
+ .input.has-clear {
521
+ padding-right: 40px;
522
+ }
523
+ .input-clear {
524
+ position: absolute;
525
+ right: 8px;
526
+ top: 50%;
527
+ transform: translateY(-50%);
528
+ display: grid;
529
+ place-items: center;
530
+ width: 28px;
531
+ height: 28px;
532
+ padding: 0;
533
+ border: none;
534
+ border-radius: 50%;
535
+ background: transparent;
536
+ color: var(--color-text-subtle);
537
+ cursor: pointer;
538
+ transition:
539
+ color 0.12s ease,
540
+ background 0.12s ease;
541
+ animation: wui-clear-in 0.12s var(--wui-ease-ui);
542
+ }
543
+ .input-clear:hover {
544
+ color: var(--color-text);
545
+ background: var(--wui-bg-muted);
546
+ }
547
+ @keyframes wui-clear-in {
548
+ from { opacity: 0; transform: translateY(-50%) scale(0.72); }
549
+ to { opacity: 1; transform: translateY(-50%) scale(1); }
550
+ }
551
+
499
552
  .hint,
500
553
  .field-hint {
501
554
  margin-top: 2px;
502
555
  font-size: 12px;
503
556
  color: var(--color-text-subtle);
504
557
  }
558
+ // Character counter — a right-aligned count under the field; turns danger at the limit.
559
+ .field-count {
560
+ margin-top: 2px;
561
+ font-size: 12px;
562
+ line-height: normal;
563
+ text-align: right;
564
+ color: var(--color-text-subtle);
565
+ }
566
+ .field-count.at-limit {
567
+ color: var(--color-danger-text);
568
+ }
505
569
  .label {
506
570
  display: block;
507
571
  font-size: 14px;
@@ -572,17 +572,30 @@
572
572
  // Table extras — a sortable header and numeric cells. These sit AFTER the
573
573
  // .table-ledger rules above on purpose: they are opt-in additions on top of
574
574
  // whichever table variant is in use, not part of the base a variant overrides.
575
+ // NEVER give a <th> a display that is not a table display.
576
+ //
577
+ // This carried `display: flex`, which takes the cell OUT of the table's layout entirely: it
578
+ // stops being a column, so every sortable header left the header row and stacked at its own
579
+ // y-position. Measured on a consumer's page, a sortable table's headers sat at three
580
+ // different y-values against the neighbouring non-sortable table's one, and the header box
581
+ // grew from 42px to 126px. It shipped in 0.6.4.
582
+ //
583
+ // Nothing else was wrong — background, colour, padding, borders, font, tracking, radii all
584
+ // resolved correctly. One declaration disintegrated the row, and only for tables that
585
+ // actually have a sortable column, which is why half a product's screens looked fine.
586
+ //
587
+ // The alignment it was buying is done on the icon instead, which is an inline box inside a
588
+ // normal cell and cannot disturb the table.
575
589
  .table th.sortable {
576
- display: flex;
577
- align-items: center;
578
- gap: 6px;
579
590
  cursor: pointer;
580
591
  user-select: none;
581
592
  }
582
593
  .table th.sortable .sort-icon {
583
594
  // Reserved space so the header does not jump width when the arrow appears.
595
+ display: inline-block;
596
+ vertical-align: middle;
584
597
  width: 12px;
585
- flex: none;
598
+ margin-left: 6px;
586
599
  color: var(--color-text-subtle);
587
600
  opacity: 0;
588
601
  transition: opacity 0.12s ease;