@orbit-work/ui 0.1.0 → 0.1.1

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.
@@ -7853,20 +7853,31 @@
7853
7853
  cursor: default;
7854
7854
  opacity: 1;
7855
7855
  }
7856
- .owuser-update span {
7857
- white-space: nowrap;
7856
+ .owuser-update-ic {
7857
+ position: relative;
7858
+ display: inline-flex;
7859
+ width: 14px;
7860
+ height: 14px;
7861
+ }
7862
+ .owuser-update-ic svg {
7863
+ width: 14px;
7864
+ height: 14px;
7858
7865
  }
7859
7866
  .owuser-update em {
7860
- font: 400 var(--ow-fs-caption)/1 var(--ow-font-sans);
7867
+ font: 400 var(--ow-fs-caption)/1 var(--ow-font-mono);
7861
7868
  font-style: normal;
7869
+ font-variant-numeric: tabular-nums;
7862
7870
  color: var(--ow-text-3);
7863
7871
  }
7864
7872
  .owuser-update-dot {
7873
+ position: absolute;
7874
+ top: -2px;
7875
+ right: -4px;
7865
7876
  width: 5px;
7866
7877
  height: 5px;
7867
- flex: 0 0 auto;
7868
7878
  border-radius: 50%;
7869
7879
  background: var(--ow-accent);
7880
+ box-shadow: 0 0 0 1.5px var(--ow-bg);
7870
7881
  }
7871
7882
  .owuser-update.error .owuser-update-dot {
7872
7883
  background: var(--ow-error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbit-work/ui",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Orbitwork Design System — React components with light/dark theme support.",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -780,6 +780,19 @@ export const Help = (p: IconProps) => (
780
780
  />
781
781
  </svg>
782
782
  )
783
+ /** 通知铃(基形 lucide:bell)。规格:ow/components/icons/BeaconIcons 九枚以外沿用 Lucide 清单+§7 参数。 */
784
+ export const Bell = (p: IconProps) => (
785
+ <svg viewBox="0 0 24 24" fill="none" {...p}>
786
+ <path
787
+ d="M6 9a6 6 0 1 1 12 0c0 5.25 2 7.5 2 7.5H4S6 14.25 6 9"
788
+ stroke="currentColor"
789
+ strokeWidth="1.75"
790
+ strokeLinecap="round"
791
+ strokeLinejoin="round"
792
+ />
793
+ <path d="M10.35 20.4a1.9 1.9 0 0 0 3.3 0" stroke="currentColor" strokeWidth="1.75" strokeLinecap="round" />
794
+ </svg>
795
+ )
783
796
  /** 信标族 schedule(基形 lucide:timer;指针末端→卫星珠=.dot,弧的末端=此刻)。规格:ow/components/icons/BeaconIcons。 */
784
797
  export const Clock = (p: IconProps) => (
785
798
  <svg viewBox="0 0 24 24" fill="none" {...p}>
@@ -1272,6 +1285,7 @@ export const Icons = {
1272
1285
  Archive,
1273
1286
  Logout,
1274
1287
  Help,
1288
+ Bell,
1275
1289
  Skill,
1276
1290
  Sparkle,
1277
1291
  Clock,
@@ -193,7 +193,7 @@ test("V1 遗留 .thread-menu 已随 MenuSurface 迁移删除(全仓零引用
193
193
  assert.doesNotMatch(source, /thread-menu/)
194
194
  })
195
195
 
196
- test("更新胶囊是状态点+文字而非实心按钮:焦点环走 focus-ring,无实底(§2/§6)", () => {
196
+ test("更新入口是图标+角标小圆点而非实心按钮:焦点环走 focus-ring,无实底(§2/§6)", () => {
197
197
  assert.match(styles, /\.owuser-update:focus-visible \{[^}]*var\(--ow-focus-ring\)/)
198
198
  assert.doesNotMatch(styles, /\.owuser-update:focus-visible \{[^}]*var\(--ow-primary\)/)
199
199
  assert.match(styles, /\.owuser-update:active:not\(:disabled\)/)
@@ -201,7 +201,7 @@ test("更新胶囊是状态点+文字而非实心按钮:焦点环走 focus-r
201
201
  assert.match(styles, /\.owuser-update-dot \{[^}]*background: var\(--ow-accent\)/)
202
202
  assert.match(styles, /\.owuser-update:hover:not\(:disabled\) \{[^}]*var\(--ow-accent\)/)
203
203
  assert.match(styles, /\.owuser-update\.error \.owuser-update-dot \{[^}]*var\(--ow-error\)/)
204
- // 层级错开:胶囊文字 caption/12px,不与账户名(fs-ui/13px)同档抢眼
204
+ // 层级错开:读数/辅助文字 caption 档,不与账户名(fs-ui/13px)同档抢眼
205
205
  assert.match(styles, /\.owuser-update \{[^}]*font: 400 var\(--ow-fs-caption\)\/1 var\(--ow-font-sans\)/)
206
206
  // ready 态不翻成主色实心按钮;呼吸动画已退役——点静止,全链路零 animation
207
207
  assert.doesNotMatch(styles, /\.owuser-update\.ready \{[^}]*background/)
@@ -13,6 +13,7 @@ import {
13
13
  ChevDown,
14
14
  ChevRight,
15
15
  Clock,
16
+ Download,
16
17
  Edit,
17
18
  Folder,
18
19
  Grid,
@@ -838,12 +839,12 @@ function SidebarUpdateButton({
838
839
  onClick,
839
840
  }: { update: DesktopSidebarUpdate; onClick: () => void }): React.ReactElement {
840
841
  const percent = Math.round(Math.max(0, Math.min(100, update.percent ?? 0)))
841
- /* 胶囊不是实心按钮:状态点 + 按态换字,状态说明走 title(与账户菜单「检查更新」行
842
- 同一份 updateRowText)。下载完(ready)点它的动作是重启安装,字还写「更新」会把
843
- 用户骗去等一个不会来的「更新中」——ready 直书「重启安装」;其余态「更新」不变。
844
- 下载中附百分比,点按行为由宿主按态分发。 */
842
+ /* 图标 + 角标小圆点:信息级提示,hover 才上色。ready 态图标换成 Refresh(动作是
843
+ 重启安装),与 available 的 Download 形成形状双编码,不靠颜色区分两个可点态;
844
+ 状态说明走 title(与账户菜单「检查更新」行同一份 updateRowText)。下载中禁用并
845
+ 附百分比读数(读数用墨不用黄),点按行为由宿主按态分发。 */
845
846
  const { title } = updateRowText(update)
846
- const label = update.state === "ready" ? "重启安装" : "更新"
847
+ const StateIcon = update.state === "ready" ? Refresh : Download
847
848
  return (
848
849
  <button
849
850
  type="button"
@@ -856,8 +857,10 @@ function SidebarUpdateButton({
856
857
  onClick()
857
858
  }}
858
859
  >
859
- <i className="owuser-update-dot" aria-hidden="true" />
860
- <span>{label}</span>
860
+ <span className="owuser-update-ic">
861
+ <StateIcon />
862
+ {update.state !== "downloading" && <i className="owuser-update-dot" aria-hidden="true" />}
863
+ </span>
861
864
  {update.state === "downloading" && <em>{percent}%</em>}
862
865
  </button>
863
866
  )