@surflane/ui 0.10.1 → 0.11.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.
@@ -50,13 +50,20 @@
50
50
  .surf-date-group:hover {
51
51
  border-color: var(--surf-status-danger-fg);
52
52
  }
53
- :is(.surf-date-picker, .surf-time-field)[data-disabled] {
54
- opacity: var(--surf-control-disabled-opacity);
55
- }
53
+ /* Disabled fades the field, as in every other field: the label and the reason
54
+ beside it stay readable. */
56
55
  :is(.surf-date-picker, .surf-time-field)[data-disabled] .surf-date-group {
56
+ opacity: var(--surf-control-disabled-opacity);
57
57
  cursor: not-allowed;
58
58
  background: var(--surf-control-disabled-background);
59
59
  }
60
+ /* Read-only shows a value, not a box to type in: it sits on the surface plane
61
+ without the field's border, as text fields do. */
62
+ :is(.surf-date-picker, .surf-time-field)[data-readonly]:not([data-invalid])
63
+ .surf-date-group:not([data-focus-within], :focus-within) {
64
+ border-color: transparent;
65
+ background: var(--surf-surface);
66
+ }
60
67
  .surf-date-input {
61
68
  display: flex;
62
69
  align-items: center;
@@ -62,6 +62,13 @@
62
62
  cursor: not-allowed;
63
63
  background: var(--surf-control-disabled-background);
64
64
  }
65
+ /* Read-only shows a value, not a box to type in: the value sits on the surface
66
+ plane without the field's border. Its text stays at full ink, apart from a
67
+ disabled field, and focus still rings it, so the value stays copyable. */
68
+ .surf-input[readonly]:not(:focus, [aria-invalid='true']) {
69
+ border-color: transparent;
70
+ background: var(--surf-surface);
71
+ }
65
72
  /* An invalid field keeps its edge while hovered; hover still tints the fill. */
66
73
  .surf-input[aria-invalid='true'],
67
74
  .surf-input[aria-invalid='true']:hover,
@@ -24,6 +24,15 @@
24
24
  border-color: var(--surf-control-hover-border);
25
25
  background: var(--surf-control-hover-background);
26
26
  }
27
+ /* Read-only shows a value on the surface plane, without the field's border, as
28
+ text fields do. */
29
+ :is(.surf-combobox-group, .surf-number-group)[data-readonly]:not(
30
+ :focus-within,
31
+ [data-invalid]
32
+ ) {
33
+ border-color: transparent;
34
+ background: var(--surf-surface);
35
+ }
27
36
  .surf-combobox-group:focus-within,
28
37
  .surf-number-group:focus-within {
29
38
  border-color: var(--surf-control-focus);
@@ -29,12 +29,15 @@
29
29
  font-variant-numeric: tabular-nums;
30
30
  caret-color: var(--surf-control-focus);
31
31
  }
32
+ /* A short dash, as a code is written elsewhere (481-920): muted ink, weaker than
33
+ the digits and the boxes but plainly there. */
32
34
  .surf-otp-separator {
33
35
  flex: none;
34
- width: var(--surf-space-2);
35
- height: 0;
36
+ width: var(--surf-space-3);
37
+ height: 2px;
36
38
  border: 0;
37
- border-top: 1px solid var(--surf-line);
39
+ border-radius: var(--surf-radius-full);
40
+ background: var(--surf-ink-muted);
38
41
  }
39
42
  @media (max-width: 760px) {
40
43
  .surf-otp-field,
@@ -56,7 +59,7 @@
56
59
  border-color: LinkText;
57
60
  }
58
61
  .surf-otp-separator {
59
- border-color: CanvasText;
62
+ background: CanvasText;
60
63
  }
61
64
  }
62
65
  }
@@ -38,12 +38,14 @@
38
38
  }
39
39
  .surf-slider-track {
40
40
  width: 100%;
41
- height: 6px;
41
+ height: var(--surf-size-slider-track-default);
42
42
  border-radius: var(--surf-radius-full);
43
43
  background: var(--surf-slider-track);
44
44
  }
45
+ /* The pair Progress uses: a brand-mark fill on the surface track, 3:1 against both
46
+ the track and the sheet in either theme. */
45
47
  .surf-slider-indicator {
46
- background: var(--surf-brand);
48
+ background: var(--surf-brand-mark);
47
49
  border-radius: inherit;
48
50
  }
49
51
  .surf-slider-thumb {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@surflane/ui",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "description": "Surflane React components built on Base UI, with data, chart, code and Markdown components.",
5
5
  "keywords": [
6
6
  "design-system",
@@ -406,8 +406,8 @@
406
406
  "@base-ui/react": "^1.9.0",
407
407
  "@headless-tree/core": "^1.8.0",
408
408
  "@headless-tree/react": "^1.8.0",
409
- "@surflane/css": "^0.10.1",
410
- "@surflane/design-tokens": "^0.10.1",
409
+ "@surflane/css": "^0.11.0",
410
+ "@surflane/design-tokens": "^0.11.0",
411
411
  "@tanstack/react-virtual": "^3.14.21",
412
412
  "react": "^19.0.0",
413
413
  "react-aria-components": "^1.22.1",