@robert-stackflow/oneui 0.6.46 → 0.6.47

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.6.47
2
+
3
+ - Segmented 的服务端首屏按 aria-pressed 显示选中背景,不再等客户端测量后才出现;测量完成后无缝接回滑动指示器。合并重复的控件样式规则。
4
+
1
5
  ## 0.6.46
2
6
 
3
7
  - TableOfContents 修复快速滚动跨过多个标题、或处在长章节之间时高亮停留旧章节的问题;滚动事件按动画帧合并,与章节观察器共用同步逻辑。
@@ -6,9 +6,11 @@
6
6
  align-self: flex-start;
7
7
  gap: 3px;
8
8
  padding: 3px;
9
- background: var(--soft);
9
+ max-width: 100%;
10
+ overflow: auto;
11
+ background: var(--segment-background);
10
12
  border: 1px solid var(--line);
11
- border-radius: calc(var(--radius) - 2px);
13
+ border-radius: var(--segment-radius);
12
14
  }
13
15
  .count {
14
16
  font-size: 0.85em;
@@ -24,11 +26,14 @@
24
26
  height: var(--segment-height, 0px);
25
27
  transform: translate(var(--segment-x, 0px), var(--segment-y, 0px));
26
28
  border-radius: calc(var(--radius) - 5px);
27
- background: var(--surface);
28
- box-shadow: 0 1px 3px #0000000d;
29
29
  pointer-events: none;
30
30
  z-index: 0;
31
31
  }
32
+ .indicator,
33
+ .segmented:not([data-ready="true"]) button[aria-pressed="true"] {
34
+ background: var(--surface);
35
+ box-shadow: 0 1px 3px #0000000d;
36
+ }
32
37
  .segmented[data-ready="true"] .indicator {
33
38
  transition:
34
39
  transform var(--motion-segment) var(--ease),
@@ -42,38 +47,25 @@
42
47
  align-items: center;
43
48
  justify-content: center;
44
49
  gap: 6px;
45
- min-height: 26px;
50
+ min-height: var(--segment-height-min);
46
51
  border: 0;
47
52
  padding: 4px 12px;
48
53
  border-radius: calc(var(--radius) - 5px);
49
54
  background: transparent;
50
55
  color: var(--muted);
51
- font-size: 12px;
56
+ font-size: var(--field-font-size);
57
+ white-space: nowrap;
58
+ cursor: pointer;
52
59
  transition:
53
60
  color var(--motion-hover) var(--ease),
54
61
  scale var(--motion-press) var(--ease);
55
62
  }
56
63
  .segmented button[aria-pressed="true"] {
57
- color: var(--fg);
64
+ color: var(--segment-selected-color);
58
65
  }
59
66
  .segmented button:active:not(:disabled) {
60
67
  scale: 0.97;
61
68
  }
62
- .segmented {
63
- max-width: 100%;
64
- overflow: auto;
65
- border-radius: var(--segment-radius);
66
- background: var(--segment-background);
67
- }
68
- .segmented button {
69
- min-height: var(--segment-height-min);
70
- font-size: var(--field-font-size);
71
- white-space: nowrap;
72
- cursor: pointer;
73
- }
74
- .segmented button[aria-pressed="true"] {
75
- color: var(--segment-selected-color);
76
- }
77
69
  .segmented button:disabled {
78
70
  opacity: 0.45;
79
71
  cursor: not-allowed;
@@ -86,5 +78,11 @@
86
78
  outline-offset: -2px;
87
79
  }
88
80
 
89
- .segmented[data-full-width] { width: 100%; align-self: stretch; }
90
- .segmented[data-full-width] button { flex: 1; min-width: 0; }
81
+ .segmented[data-full-width] {
82
+ width: 100%;
83
+ align-self: stretch;
84
+ }
85
+ .segmented[data-full-width] button {
86
+ flex: 1;
87
+ min-width: 0;
88
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robert-stackflow/oneui",
3
- "version": "0.6.46",
3
+ "version": "0.6.47",
4
4
  "description": "OneUI React components, application shell and portable visual themes",
5
5
  "type": "module",
6
6
  "sideEffects": [