@robert-stackflow/oneui 0.6.55 → 0.6.56

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.56
2
+
3
+ - 窄屏和触屏灯箱隐藏前后箭头;宽屏箭头以整个视窗为定位基准,切换不同高度的图注时保持位置。
4
+
1
5
  ## 0.6.55
2
6
 
3
7
  - ContributionCalendar 新增 `labels`,应用可传入日历名称、空状态、图例与贡献计数格式。月份、星期和日期继续按 `locale` 格式化。
package/README.md CHANGED
@@ -338,7 +338,7 @@ Menu 支持 iconOnly:`<Menu iconOnly label="更多操作" items={items} />`
338
338
 
339
339
  `Lightbox` is a controlled image viewer: pass `open`, `items`, `index`, `onIndexChange` and `onClose`. Each item has a stable `id`, `src`, `alt` and optional `caption`, `thumbnailSrc`, `width` and `height`. The optional `sourceElement(item)` resolves the original image for Hero motion; `onLocate(item)` runs after exit and scroll unlocking. Supply `labels` for localization. Provide valid `width` and `height` for an aspect-correct loading skeleton fitted to the canvas; images without known dimensions use a compact loading indicator.
340
340
 
341
- The viewer uses an opaque black canvas with light controls in both color modes. Opening focuses the header so keyboard navigation starts inside the dialog. Mouse users have previous and next buttons. On touch, the image follows horizontal swipes and the thumbnail strip provides direct navigation. Arrow keys, Escape, zoom, pinch, pan, captions and image retry work across layouts. A single image hides navigation. Only adjacent full images are preloaded. Native modal isolation and the shared focus lifecycle restore focus to the opener. Keep the component mounted through exit and retain the selected index.
341
+ The viewer uses an opaque black canvas with light controls in both color modes. Opening focuses the header so keyboard navigation starts inside the dialog. Wide mouse layouts offer previous and next buttons anchored to the viewer, independent of caption height. Narrow and touch layouts use the thumbnail strip for direct navigation. On touch, the image follows horizontal swipes. Arrow keys, Escape, zoom, pinch, pan, captions and image retry work across layouts. A single image hides navigation. Only adjacent full images are preloaded. Native modal isolation and the shared focus lifecycle restore focus to the opener. Keep the component mounted through exit and retain the selected index.
342
342
 
343
343
  Image changes retain the existing outgoing image for a directional fade/slide, without remounting it for the animation. Thumbnail selection uses a moving outline and a separate keyboard focus ring. Shared modal scroll locking preserves classic scrollbar space, nested lock ownership and original document styles.
344
344
 
@@ -55,7 +55,6 @@
55
55
  }
56
56
  .canvas {
57
57
  flex: 1;
58
- position: relative;
59
58
  min-height: 0;
60
59
  display: flex;
61
60
  justify-content: center;
@@ -96,16 +95,17 @@
96
95
  .previous,
97
96
  .next {
98
97
  position: absolute;
99
- top: calc(50% - 20px);
98
+ top: 50%;
99
+ translate: 0 -50%;
100
100
  z-index: 1;
101
101
  border-radius: 50%;
102
102
  background: color-mix(in srgb, var(--surface) 90%, transparent);
103
103
  }
104
104
  .previous {
105
- left: 0;
105
+ left: max(16px, env(safe-area-inset-left));
106
106
  }
107
107
  .next {
108
- right: 0;
108
+ right: max(16px, env(safe-area-inset-right));
109
109
  }
110
110
  .feedback {
111
111
  position: absolute;
@@ -203,7 +203,7 @@
203
203
  clip-path: inset(50%);
204
204
  white-space: nowrap;
205
205
  }
206
- @media (min-width: 640px) and (pointer: fine) {
206
+ @media (width > 760px) and (pointer: fine) {
207
207
  .canvas:has(.next) .stage {
208
208
  margin-inline: 48px;
209
209
  }
@@ -231,6 +231,8 @@
231
231
  width: 44px;
232
232
  height: 44px;
233
233
  }
234
+ }
235
+ @media (width <= 760px), (pointer: coarse) {
234
236
  .canvas :is(.previous, .next) {
235
237
  display: none;
236
238
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robert-stackflow/oneui",
3
- "version": "0.6.55",
3
+ "version": "0.6.56",
4
4
  "description": "OneUI React components, application shell and portable visual themes",
5
5
  "type": "module",
6
6
  "sideEffects": [