@unif/react-native-design 0.4.37 → 0.5.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.
package/README.md CHANGED
@@ -5,7 +5,10 @@
5
5
  [![License](https://img.shields.io/npm/l/@unif/react-native-design.svg?color=blue)](LICENSE)
6
6
  [![Docs](https://img.shields.io/badge/docs-unif--design.github.io-orange.svg)](https://unif-design.github.io/react-native-design/)
7
7
 
8
- Unif 设计系统 —— theme + icons + utils + components,面向 React Native 0.85 新架构(Fabric + concurrent React)
8
+ Unif 设计系统:theme(设计令牌)+ 组件 + 图标 + utils,面向 RN 0.85 新架构(Fabric + concurrent React)。所有 Unif 应用与端能力包的 UI 基座。
9
+
10
+ > 📖 **完整文档**(快速开始 · 组件 · 设计令牌 · 设计原则):
11
+ > **https://unif-design.github.io/react-native-design/**
9
12
 
10
13
  ## 安装
11
14
 
@@ -13,93 +16,21 @@ Unif 设计系统 —— theme + icons + utils + components,面向 React Native
13
16
  yarn add @unif/react-native-design
14
17
  ```
15
18
 
16
- 需要在宿主工程提前安装的 peer dependencies:
17
-
18
- ```sh
19
- yarn add react-native-svg react-native-gesture-handler react-native-reanimated \
20
- react-native-worklets react-native-safe-area-context \
21
- react-native-reanimated-carousel @gorhom/bottom-sheet @sbaiahmed1/react-native-blur
22
- ```
19
+ 需要一组 peer(`react-native-svg` / `react-native-gesture-handler` / `react-native-reanimated` / `react-native-worklets` / `react-native-safe-area-context` / `react-native-reanimated-carousel` / `@gorhom/bottom-sheet` / `@sbaiahmed1/react-native-blur`)+ 根挂 `ThemeProvider`,详见[文档站 · 快速开始](https://unif-design.github.io/react-native-design/docs/getting-started)。
23
20
 
24
21
  ## 用法
25
22
 
26
- 在 app 根附近挂一次 `ThemeProvider`,并按需挂载命令式 host:
27
-
28
- ```tsx
29
- import { ThemeProvider, ToastHost, ConfirmHost } from '@unif/react-native-design';
30
-
31
- export function App() {
32
- return (
33
- <ThemeProvider>
34
- {/* ...你的导航 / 屏幕... */}
35
- <ToastHost />
36
- <ConfirmHost />
37
- </ThemeProvider>
38
- );
39
- }
40
- ```
41
-
42
- 组件内通过 `useThemedStyles` 拿当前主题的 `StyleSheet`:
43
-
44
23
  ```tsx
45
- import { Button, useThemedStyles, type ColorTokens } from '@unif/react-native-design';
46
- import { View } from 'react-native';
24
+ import { Button, useColors, useThemedStyles } from '@unif/react-native-design';
47
25
 
48
- // makeStyles 必须定义在模块顶层,不要写在组件里 inline
49
- const makeStyles = (c: ColorTokens) => ({
50
- wrap: { padding: 16, backgroundColor: c.surface },
51
- });
52
-
53
- export function Demo() {
54
- const styles = useThemedStyles(makeStyles);
55
- return (
56
- <View style={styles.wrap}>
57
- <Button label="保存" onPress={() => {}} />
58
- </View>
59
- );
26
+ function MyScreen() {
27
+ const c = useColors();
28
+ return <Button label="提交" onPress={() => {}} />;
60
29
  }
61
30
  ```
62
31
 
63
- 命令式 API:
64
-
65
- ```tsx
66
- import { toast, confirm } from '@unif/react-native-design';
67
-
68
- toast.success('已保存');
69
-
70
- const ok = await confirm({
71
- title: '确认注销账号?',
72
- message: '注销后数据无法恢复',
73
- destructive: true,
74
- });
75
- ```
76
-
77
- ## 包结构
78
-
79
- - **theme** —— `ThemeProvider` / `useTheme` / `useColors` / `useShadow` / `useThemedStyles`,以及 color / shadow / type / space / radius / icon / control / motion 等 token,`r` / `rf` 尺寸 & 字号缩放
80
- - **icons** —— `IconName` 联合类型 + `ICONS` 数据(用 `<Icon name="..." />` 渲染)
81
- - **components/ui** —— 原子组件:Button、Card、Cell、NavBar、BottomSheet、Toast、Confirm、Input、Search、Tabs、Switch 等约 37 个
82
- - **components/business** —— 通用业务复合组件:AvatarWithRing、Decorations、GlassStats、VersionPill(耦合 navigation / store 的组件留在消费者仓库)
83
- - **utils** —— `createLogger(scope)` 日志器、`childTestID` 列表型组件 testID 拼接助手
84
-
85
- ## Example
86
-
87
- `example/` 是接通本库的 RN 宿主应用:
88
-
89
- ```sh
90
- yarn
91
- yarn example start # metro
92
- yarn example ios # 或 yarn example android
93
- ```
94
-
95
- 源码改动会通过 Metro monorepo 配置直接热更新,不需要重新构建原生。
96
-
97
- ## 贡献
98
-
99
- - [开发流程](CONTRIBUTING.md#development-workflow)
100
- - [提交 PR](CONTRIBUTING.md#sending-a-pull-request)
101
- - [行为准则](CODE_OF_CONDUCT.md)
32
+ 组件 API、token 调色板、暗色适配、设计原则 —— 见[文档站](https://unif-design.github.io/react-native-design/)。
102
33
 
103
- ## License
34
+ ## 许可
104
35
 
105
36
  MIT
package/docs-home.css ADDED
@@ -0,0 +1,980 @@
1
+ /* ═══════════════════════════════════════════════════════════════
2
+ * docs-home.css — @unif/react-native-design
3
+ * 5-site shared homepage styles: design tokens + all .hp-* / .pt-* rules.
4
+ * Scoped under .unif-home to avoid polluting Docusaurus document pages
5
+ * or overriding --ifm-* variables.
6
+ *
7
+ * Usage (in your site's CSS):
8
+ * @import "@unif/react-native-design/docs-home.css";
9
+ * ═══════════════════════════════════════════════════════════════ */
10
+
11
+ /* ─────────────────────────────────────────────────────────────
12
+ * 1. DESIGN TOKENS — scoped to .unif-home (light defaults)
13
+ * Source: tokens.css :root block
14
+ * ───────────────────────────────────────────────────────────── */
15
+
16
+ .unif-home {
17
+ /* ===== Brand ===== */
18
+ --primary: #EB6E00;
19
+ --primary-pressed: #D06200;
20
+ --primary-container: #FFF5EB;
21
+ --primary-container-subtle:#FFF8F0;
22
+ --on-primary: #FFFFFF;
23
+ --on-primary-muted: rgba(255,255,255,0.85);
24
+
25
+ /* Brand gradient — only for logo bubble + drawer header */
26
+ --brand-gradient: linear-gradient(135deg, #EB6E00 0%, #E96C00 100%);
27
+ --brand-gradient-soft: linear-gradient(135deg, #FFC18A 0%, #EF8B33 100%);
28
+
29
+ /* ===== Semantic ===== */
30
+ --success: #52C41A;
31
+ --success-container: #F0FFF0;
32
+ --on-success: #FFFFFF;
33
+ --error: #F4511E;
34
+ --error-container: #FFF5F5;
35
+ --on-error: #FFFFFF;
36
+ --info: #3775F6;
37
+ --info-container: #F0F5FF;
38
+ --on-info: #FFFFFF;
39
+
40
+ /* ===== Surface (5 layers) ===== */
41
+ --background: #F5F5F5;
42
+ --surface: #FFFFFF;
43
+ --surface-container: #F5F5F5;
44
+ --surface-container-high: #F0F0F0;
45
+ --surface-container-highest:#E0E0E0;
46
+
47
+ /* ===== Foreground (3 levels) ===== */
48
+ --foreground: #333333;
49
+ --foreground-muted: #666666;
50
+ --foreground-subtle: #999999;
51
+ --on-surface: #333333;
52
+ --on-surface-muted: #666666;
53
+
54
+ /* ===== Outline (3 levels) ===== */
55
+ --outline: #EDEDED;
56
+ --outline-variant: #E8E8E8;
57
+ --outline-faint: #F5F5F5;
58
+
59
+ /* ===== Inverse ===== */
60
+ --inverse-surface: #1C1C1E;
61
+ --inverse-on-surface: #FFFFFF;
62
+
63
+ /* ===== Misc ===== */
64
+ --scrim: rgba(0,0,0,0.5);
65
+
66
+ /* ===== Shadow (light) ===== */
67
+ --shadow-card: 0 1px 4px rgba(0,0,0,0.08);
68
+ --shadow-pop: 0 4px 12px rgba(235,110,0,0.18);
69
+ --shadow-none: none;
70
+
71
+ /* ===== Type ===== */
72
+ --font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
73
+ "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
74
+ Helvetica, Arial, sans-serif;
75
+ --font-mono: "SF Mono", Menlo, Monaco, Consolas,
76
+ "Liberation Mono", monospace;
77
+
78
+ /* Type scale (px) */
79
+ --t-display: 22px;
80
+ --t-h1: 18px;
81
+ --t-h2: 17px;
82
+ --t-h3: 15px;
83
+ --t-body: 15px;
84
+ --t-sm: 14px;
85
+ --t-xs: 13px;
86
+ --t-2xs: 12px;
87
+ --t-micro: 11px;
88
+
89
+ /* Line height */
90
+ --lh-tight: 1.25;
91
+ --lh-body: 1.45;
92
+
93
+ /* Weight */
94
+ --fw-regular: 400;
95
+ --fw-medium: 500;
96
+ --fw-semi: 600;
97
+ --fw-bold: 700;
98
+ --fw-heavy: 800;
99
+
100
+ /* ===== Spacing (4px base) ===== */
101
+ --space-px: 1px;
102
+ --space-1: 4px;
103
+ --space-2: 6px;
104
+ --space-3: 8px;
105
+ --space-4: 10px;
106
+ --space-5: 12px;
107
+ --space-6: 14px;
108
+ --space-7: 16px;
109
+ --space-8: 20px;
110
+ --space-9: 24px;
111
+ --space-10: 32px;
112
+
113
+ /* ===== Radii ===== */
114
+ --radius-sm: 6px;
115
+ --radius-md: 8px;
116
+ --radius-lg: 10px;
117
+ --radius-xl: 12px;
118
+ --radius-2xl: 14px;
119
+ --radius-3xl: 18px;
120
+ --radius-pill: 999px;
121
+
122
+ /* ===== Control heights ===== */
123
+ --dim-control-sm: 28px;
124
+ --dim-control-md: 36px;
125
+ --dim-control-lg: 44px;
126
+ --dim-hit-target: 44px;
127
+ --dim-navbar-h: 44px;
128
+ --dim-tabbar-h: 50px;
129
+ --dim-send-btn: 32px;
130
+
131
+ /* Avatar sizes */
132
+ --dim-avatar-xs: 18px;
133
+ --dim-avatar-sm: 28px;
134
+ --dim-avatar-md: 32px;
135
+ --dim-avatar-lg: 40px;
136
+ --dim-avatar-xl: 56px;
137
+
138
+ /* ===== Motion ===== */
139
+ --motion-fast: 150ms;
140
+ --motion-base: 200ms;
141
+ --motion-slow: 300ms;
142
+ --motion-pulse: 1600ms;
143
+ --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
144
+ --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
145
+ }
146
+
147
+ /* ─────────────────────────────────────────────────────────────
148
+ * 2. DARK TOKENS — Docusaurus data-theme attribute
149
+ * ───────────────────────────────────────────────────────────── */
150
+
151
+ [data-theme="dark"] .unif-home,
152
+ .theme-dark .unif-home {
153
+ /* Brand stays orange (4.36:1 on #0A0A0A passes WCAG AA) */
154
+ --primary: #EB6E00;
155
+ --primary-pressed: #D06200;
156
+ --primary-container: #3D1F00;
157
+ --primary-container-subtle:#2A1500;
158
+
159
+ --success: #52C41A;
160
+ --success-container: #0E2810;
161
+ --error: #FF6B40;
162
+ --error-container: #2A1010;
163
+ --info: #5A91FF;
164
+ --info-container: #0F1A33;
165
+
166
+ /* iOS HIG dark — pure black bg, layered greys */
167
+ --background: #0A0A0A;
168
+ --surface: #1C1C1E;
169
+ --surface-container: #2C2C2E;
170
+ --surface-container-high: #3A3A3C;
171
+ --surface-container-highest:#48484A;
172
+
173
+ --foreground: #FFFFFF;
174
+ --foreground-muted: rgba(235,235,245,0.6);
175
+ --foreground-subtle: rgba(235,235,245,0.3);
176
+ --on-surface: #FFFFFF;
177
+ --on-surface-muted: rgba(235,235,245,0.6);
178
+
179
+ --outline: #3A3A3C;
180
+ --outline-variant: #48484A;
181
+ --outline-faint: rgba(84,84,88,0.65);
182
+
183
+ --inverse-surface: #FFFFFF;
184
+ --inverse-on-surface: #000000;
185
+
186
+ --scrim: rgba(0,0,0,0.7);
187
+
188
+ /* Layered surface replaces shadows in dark mode */
189
+ --shadow-card: none;
190
+ --shadow-pop: none;
191
+ }
192
+
193
+ /* ─────────────────────────────────────────────────────────────
194
+ * 3. DARK TOKENS — OS preference fallback (no explicit data-theme)
195
+ * ───────────────────────────────────────────────────────────── */
196
+
197
+ @media (prefers-color-scheme: dark) {
198
+ .unif-home:not([data-theme="light"]) {
199
+ --primary-container: #3D1F00;
200
+ --primary-container-subtle:#2A1500;
201
+ --error: #FF6B40;
202
+ --error-container: #2A1010;
203
+ --success-container: #0E2810;
204
+ --info: #5A91FF;
205
+ --info-container: #0F1A33;
206
+
207
+ --background: #0A0A0A;
208
+ --surface: #1C1C1E;
209
+ --surface-container: #2C2C2E;
210
+ --surface-container-high: #3A3A3C;
211
+ --surface-container-highest:#48484A;
212
+
213
+ --foreground: #FFFFFF;
214
+ --foreground-muted: rgba(235,235,245,0.6);
215
+ --foreground-subtle: rgba(235,235,245,0.3);
216
+ --on-surface: #FFFFFF;
217
+ --on-surface-muted: rgba(235,235,245,0.6);
218
+
219
+ --outline: #3A3A3C;
220
+ --outline-variant: #48484A;
221
+ --outline-faint: rgba(84,84,88,0.65);
222
+
223
+ --inverse-surface: #FFFFFF;
224
+ --inverse-on-surface: #000000;
225
+ --scrim: rgba(0,0,0,0.7);
226
+
227
+ --shadow-card: none;
228
+ --shadow-pop: none;
229
+ }
230
+ }
231
+
232
+ /* ─────────────────────────────────────────────────────────────
233
+ * 4. SCOPED TYPOGRAPHY HELPERS
234
+ * (tokens.css global h1/h2/h3/p/.display etc. — re-scoped here
235
+ * so they only apply inside .unif-home pages, not doc pages)
236
+ * ───────────────────────────────────────────────────────────── */
237
+
238
+ .unif-home {
239
+ font-family: var(--font-family);
240
+ font-size: var(--t-body);
241
+ line-height: var(--lh-body);
242
+ color: var(--foreground);
243
+ background: var(--background);
244
+ -webkit-font-smoothing: antialiased;
245
+ -moz-osx-font-smoothing: grayscale;
246
+ }
247
+
248
+ .unif-home .display { font-size: var(--t-display); font-weight: var(--fw-bold); line-height: var(--lh-tight); }
249
+ .unif-home .sm { font-size: var(--t-sm); }
250
+ .unif-home .xs { font-size: var(--t-xs); color: var(--foreground-muted); }
251
+ .unif-home .xxs { font-size: var(--t-2xs); color: var(--foreground-subtle); }
252
+ .unif-home .micro { font-size: var(--t-micro); color: var(--foreground-subtle); }
253
+ .unif-home code,
254
+ .unif-home .mono { font-family: var(--font-mono); }
255
+
256
+ /* ─────────────────────────────────────────────────────────────
257
+ * 5. HOME PAGE CHROME — .hp root + universal resets
258
+ * ───────────────────────────────────────────────────────────── */
259
+
260
+ .unif-home .hp {
261
+ width: 100%;
262
+ height: 100%;
263
+ background: var(--background);
264
+ color: var(--foreground);
265
+ font-family: var(--font-family);
266
+ -webkit-font-smoothing: antialiased;
267
+ position: relative;
268
+ overflow: hidden;
269
+ display: flex;
270
+ flex-direction: column;
271
+ }
272
+ .unif-home .hp * { box-sizing: border-box; }
273
+ .unif-home .hp a { text-decoration: none; color: inherit; }
274
+ /* Docusaurus 全局 a/a:hover 兜底:首页所有链接永不被加下划线(颜色由各元素显式 hover 规则控制,这里只去下划线,不碰 color 以免覆盖按钮文字色) */
275
+ .unif-home a,
276
+ .unif-home a:hover { text-decoration: none; }
277
+
278
+ /* ─────────────────────────────────────────────────────────────
279
+ * 6. NAV BAR
280
+ * ───────────────────────────────────────────────────────────── */
281
+
282
+ .hp-nav {
283
+ height: 64px;
284
+ flex: 0 0 64px;
285
+ display: flex;
286
+ align-items: center;
287
+ gap: var(--space-8);
288
+ padding: 0 40px;
289
+ border-bottom: 1px solid var(--outline);
290
+ background: var(--surface);
291
+ }
292
+ .hp-brand { display: flex; align-items: center; gap: 10px; }
293
+ .hp-mark {
294
+ width: 30px; height: 30px; border-radius: 8px;
295
+ background: var(--brand-gradient);
296
+ color: #fff;
297
+ display: flex; align-items: center; justify-content: center;
298
+ box-shadow: 0 1px 3px rgba(235,110,0,.35);
299
+ }
300
+ .hp-brand-name { font-size: 16px; font-weight: var(--fw-bold); letter-spacing: -.01em; }
301
+ .hp-nav-links { display: flex; align-items: center; gap: var(--space-7); margin-left: var(--space-4); }
302
+ .hp-nav-link {
303
+ font-size: 14px; font-weight: var(--fw-medium); color: var(--foreground-muted);
304
+ display: inline-flex; align-items: center; gap: 6px;
305
+ transition: color var(--motion-fast) var(--ease-out);
306
+ }
307
+ .hp-nav-link:hover { color: var(--foreground); }
308
+ .hp-nav-right { margin-left: auto; display: flex; align-items: center; gap: var(--space-3); }
309
+ .hp-icon-btn {
310
+ width: 36px; height: 36px; border-radius: var(--radius-md);
311
+ border: none; background: transparent; color: var(--foreground-muted);
312
+ display: flex; align-items: center; justify-content: center; cursor: pointer;
313
+ transition: background var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out);
314
+ }
315
+ .hp-icon-btn:hover { background: var(--surface-container-high); color: var(--foreground); }
316
+ .hp-nav-divider { width: 1px; height: 20px; background: var(--outline); }
317
+ .hp-ver {
318
+ display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
319
+ border-radius: var(--radius-pill); border: 1px solid var(--outline-variant);
320
+ background: var(--surface-container); color: var(--foreground-muted);
321
+ font-family: var(--font-mono); font-size: 12px; font-weight: var(--fw-medium);
322
+ letter-spacing: .01em; transition: color var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out);
323
+ }
324
+ .hp-ver:hover { color: var(--primary); border-color: var(--primary); }
325
+
326
+ /* ─────────────────────────────────────────────────────────────
327
+ * 7. GENERIC BUTTONS
328
+ * ───────────────────────────────────────────────────────────── */
329
+
330
+ .hp-btn {
331
+ display: inline-flex; align-items: center; justify-content: center; gap: 8px;
332
+ height: 46px; padding: 0 22px; border-radius: var(--radius-md);
333
+ font-size: 15px; font-weight: var(--fw-semi); font-family: var(--font-family);
334
+ border: 1px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none;
335
+ transition: background var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out), opacity var(--motion-fast) var(--ease-out);
336
+ }
337
+ .hp-btn-primary { background: var(--primary); color: var(--on-primary); }
338
+ .hp-btn-primary:hover { background: var(--primary-pressed); color: var(--on-primary); text-decoration: none; }
339
+ .hp-btn-primary .hp-arrow { transition: transform var(--motion-base) var(--ease-out); }
340
+ .hp-btn-primary:hover .hp-arrow { transform: translateX(3px); }
341
+ .hp-btn-outline { background: var(--surface); color: var(--foreground); border-color: var(--outline-variant); }
342
+ .hp-btn-outline:hover { border-color: var(--foreground-subtle); color: var(--foreground); text-decoration: none; }
343
+
344
+ /* ─────────────────────────────────────────────────────────────
345
+ * 8. HERO — shared layout
346
+ * ───────────────────────────────────────────────────────────── */
347
+
348
+ .hp-scroll { flex: 1 1 auto; overflow: hidden; }
349
+ .hp-hero { padding: 64px 40px 56px; }
350
+ .hp-eyebrow {
351
+ font-family: var(--font-mono); font-size: 12px; font-weight: var(--fw-semi);
352
+ letter-spacing: .14em; text-transform: uppercase; color: var(--primary);
353
+ display: inline-flex; align-items: center; gap: 8px;
354
+ }
355
+ .hp-eyebrow::before {
356
+ content: ""; width: 18px; height: 1.5px; background: var(--primary); border-radius: 1px;
357
+ }
358
+ .hp-title {
359
+ font-size: 54px; line-height: 1.08; font-weight: var(--fw-heavy);
360
+ letter-spacing: -.025em; margin: 18px 0 0;
361
+ }
362
+ .hp-title .accent { color: var(--primary); }
363
+ .hp-tagline {
364
+ font-size: 18px; line-height: 1.55; color: var(--foreground-muted);
365
+ max-width: 560px; margin: 20px 0 0;
366
+ }
367
+ .hp-cta-row { display: flex; align-items: center; gap: 12px; margin-top: 30px; }
368
+
369
+ /* ─────────────────────────────────────────────────────────────
370
+ * 9. INSTALL COMMAND BLOCK
371
+ * ───────────────────────────────────────────────────────────── */
372
+
373
+ .hp-install {
374
+ display: inline-flex; align-items: center; gap: 10px; margin-top: 22px;
375
+ height: 44px; padding: 0 6px 0 16px; border-radius: var(--radius-md);
376
+ background: var(--surface); border: 1px solid var(--outline-variant);
377
+ font-family: var(--font-mono); font-size: 13.5px; color: var(--foreground);
378
+ box-shadow: var(--shadow-card);
379
+ }
380
+ .hp-install .dollar { color: var(--foreground-subtle); }
381
+ .hp-install .pkg { color: var(--foreground); }
382
+ .hp-install-copy {
383
+ width: 32px; height: 32px; border-radius: var(--radius-sm); border: none;
384
+ background: var(--surface-container-high); color: var(--foreground-muted);
385
+ display: flex; align-items: center; justify-content: center; cursor: pointer;
386
+ transition: background var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out);
387
+ }
388
+ .hp-install-copy:hover { background: var(--primary-container); color: var(--primary); }
389
+ .hp-install-copy.copied { color: var(--success); }
390
+
391
+ /* ─────────────────────────────────────────────────────────────
392
+ * 10. HERO SPLIT LAYOUT (Hero B + C)
393
+ * ───────────────────────────────────────────────────────────── */
394
+
395
+ .hp-hero-split { display: grid; grid-template-columns: 1fr 460px; gap: 56px; align-items: center; }
396
+ .hp-hero-copy { min-width: 0; }
397
+
398
+ /* meta chips under tagline */
399
+ .hp-meta-row { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
400
+ .hp-chip {
401
+ display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
402
+ border-radius: var(--radius-pill); background: var(--surface-container);
403
+ border: 1px solid var(--outline); font-size: 12.5px; font-weight: var(--fw-medium);
404
+ color: var(--foreground-muted);
405
+ }
406
+ .hp-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
407
+
408
+ /* ─────────────────────────────────────────────────────────────
409
+ * 11. PHONE MOCKUP — base + notch + screen (shared by vf + scan + share + gal)
410
+ * ───────────────────────────────────────────────────────────── */
411
+
412
+ .hp-phone {
413
+ width: 300px; height: 600px; border-radius: 44px; margin: 0 auto;
414
+ background: #0A0A0A; padding: 10px;
415
+ box-shadow: 0 24px 60px rgba(0,0,0,.28), 0 0 0 1px rgba(0,0,0,.06);
416
+ position: relative;
417
+ }
418
+ /* dark: locked design — phone shell is always dark hardware */
419
+ .theme-dark .hp-phone { box-shadow: 0 24px 60px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.06); }
420
+ [data-theme="dark"] .hp-phone { box-shadow: 0 24px 60px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.06); }
421
+ .hp-screen {
422
+ width: 100%; height: 100%; border-radius: 36px; overflow: hidden;
423
+ background: #15171A; position: relative; display: flex; flex-direction: column;
424
+ }
425
+ .hp-notch {
426
+ position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
427
+ width: 96px; height: 26px; border-radius: 999px; background: #000; z-index: 5;
428
+ }
429
+
430
+ /* ─────────────────────────────────────────────────────────────
431
+ * 12. CAMERA VIEWFINDER SCREEN — .hp-vf-*
432
+ * Device screen 1: Camera / react-native-camera / portal camera site
433
+ * ───────────────────────────────────────────────────────────── */
434
+
435
+ .hp-vf-top {
436
+ display: flex; align-items: center; justify-content: space-between;
437
+ padding: 18px 20px 0; color: rgba(255,255,255,.85);
438
+ }
439
+ .hp-vf-flash {
440
+ font-size: 11px; font-weight: 600; letter-spacing: .08em;
441
+ color: var(--primary); border: 1px solid rgba(235,110,0,.5); border-radius: 999px;
442
+ padding: 3px 9px;
443
+ }
444
+ .hp-vf-time { font-size: 12px; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.6); }
445
+ .hp-vf-frame { flex: 1; position: relative; margin: 16px; }
446
+ .hp-corner { position: absolute; width: 26px; height: 26px; border: 2px solid rgba(255,255,255,.7); }
447
+ .hp-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; border-radius: 8px 0 0 0; }
448
+ .hp-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; border-radius: 0 8px 0 0; }
449
+ .hp-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; border-radius: 0 0 0 8px; }
450
+ .hp-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; border-radius: 0 0 8px 0; }
451
+ .hp-reticle {
452
+ position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
453
+ width: 58px; height: 58px; border: 1.5px solid var(--primary); border-radius: 6px;
454
+ }
455
+ .hp-reticle::after {
456
+ content: ""; position: absolute; inset: -7px; border: 1px dashed rgba(235,110,0,.4); border-radius: 10px;
457
+ }
458
+ .hp-watermark {
459
+ position: absolute; left: 4px; bottom: 6px; font-family: var(--font-mono);
460
+ color: rgba(255,255,255,.92); text-shadow: 0 1px 2px rgba(0,0,0,.6); line-height: 1.35;
461
+ }
462
+ .hp-watermark .wm-1 { font-size: 12px; font-weight: 700; }
463
+ .hp-watermark .wm-2 { font-size: 10px; opacity: .8; }
464
+ .hp-vf-modes { display: flex; justify-content: center; gap: 22px; padding: 6px 0 14px; }
465
+ .hp-vf-mode {
466
+ font-size: 12px; font-weight: 600; color: rgba(255,255,255,.5);
467
+ letter-spacing: .04em; position: relative;
468
+ }
469
+ .hp-vf-mode.active { color: var(--primary); }
470
+ .hp-vf-mode.active::after {
471
+ content: ""; position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%);
472
+ width: 4px; height: 4px; border-radius: 50%; background: var(--primary);
473
+ }
474
+ .hp-vf-bar { display: flex; align-items: center; justify-content: space-between; padding: 0 30px 26px; }
475
+ .hp-vf-thumb {
476
+ width: 40px; height: 40px; border-radius: 10px;
477
+ background: #2C2C2E; border: 1px solid rgba(255,255,255,.12);
478
+ }
479
+ .hp-shutter {
480
+ width: 64px; height: 64px; border-radius: 50%;
481
+ border: 4px solid rgba(255,255,255,.9);
482
+ display: flex; align-items: center; justify-content: center;
483
+ }
484
+ .hp-shutter span { width: 48px; height: 48px; border-radius: 50%; background: #fff; }
485
+ .hp-vf-flip {
486
+ width: 40px; height: 40px; border-radius: 50%;
487
+ background: rgba(255,255,255,.12); color: #fff;
488
+ display: flex; align-items: center; justify-content: center;
489
+ }
490
+
491
+ /* ─────────────────────────────────────────────────────────────
492
+ * 13. SCANNER SCREEN — .hp-scan-* + .hp-scene*
493
+ * Device screen 2: HMS Scan / QR code scanner
494
+ * ───────────────────────────────────────────────────────────── */
495
+
496
+ .hp-scan { position: absolute; inset: 0; }
497
+ .hp-scene { position: absolute; inset: 0; overflow: hidden; background: #0c0b0a; }
498
+ .hp-scene-base {
499
+ position: absolute; inset: 0;
500
+ background: radial-gradient(120% 80% at 50% 38%, #2a2520 0%, #15120f 52%, #090807 100%);
501
+ }
502
+ .hp-scene-shelf {
503
+ position: absolute; left: 0; right: 0; top: 62%; height: 2px;
504
+ background: rgba(255,236,210,.10); filter: blur(1px);
505
+ }
506
+ .hp-scene-vignette {
507
+ position: absolute; inset: 0;
508
+ background: radial-gradient(130% 100% at 50% 45%, transparent 45%, rgba(0,0,0,.55) 100%);
509
+ }
510
+ .hp-scan-content { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; }
511
+ .hp-scan-top {
512
+ display: flex; align-items: center; justify-content: space-between;
513
+ padding: 22px 16px 8px;
514
+ }
515
+ .hp-scan-title {
516
+ color: #fff; font-size: 16px; font-weight: 600;
517
+ text-shadow: 0 1px 6px rgba(0,0,0,.5);
518
+ }
519
+ .hp-scan-disc {
520
+ width: 38px; height: 38px; border-radius: 999px;
521
+ display: flex; align-items: center; justify-content: center;
522
+ background: rgba(20,18,16,.42); border: .5px solid rgba(255,255,255,.16); color: #fff;
523
+ backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
524
+ }
525
+ .hp-scan-disc.lg { width: 50px; height: 50px; background: rgba(28,26,24,.5); }
526
+ .hp-scan-stage {
527
+ flex: 1; display: flex; flex-direction: column;
528
+ align-items: center; justify-content: center; gap: 18px; padding-bottom: 30px;
529
+ }
530
+ .hp-scan-frame {
531
+ width: 176px; height: 176px; position: relative;
532
+ box-shadow: 0 0 0 100vmax rgba(0,0,0,.40); border-radius: 4px;
533
+ }
534
+ .hp-scan-frame .hp-corner { width: 30px; height: 30px; border-color: var(--primary); border-width: 3px; }
535
+ .hp-scan-laser {
536
+ position: absolute; left: 8px; right: 8px; top: 16%; height: 2px; border-radius: 2px;
537
+ background: linear-gradient(90deg, transparent, var(--primary), transparent);
538
+ box-shadow: 0 0 12px 2px rgba(235,110,0,.7);
539
+ }
540
+ @media (prefers-reduced-motion: no-preference) {
541
+ .hp-scan-laser { animation: hp-scanline 2.4s var(--ease-in-out) infinite; }
542
+ }
543
+ @keyframes hp-scanline { 0%, 100% { top: 12%; } 50% { top: 88%; } }
544
+ .hp-scan-hint {
545
+ color: rgba(255,255,255,.86); font-size: 13px; font-weight: 500;
546
+ text-shadow: 0 1px 6px rgba(0,0,0,.55);
547
+ }
548
+ .hp-scan-tools { display: flex; justify-content: center; gap: 40px; padding-bottom: 30px; }
549
+ .hp-scan-act {
550
+ display: flex; flex-direction: column; align-items: center; gap: 7px;
551
+ color: rgba(255,255,255,.82); font-size: 12px; font-weight: 500;
552
+ text-shadow: 0 1px 4px rgba(0,0,0,.4);
553
+ }
554
+ .hp-scan-confirm {
555
+ position: absolute; left: 16px; right: 16px; bottom: 104px; z-index: 4;
556
+ display: flex; align-items: center; gap: 11px;
557
+ background: rgba(20,18,16,.86); border: .5px solid rgba(255,255,255,.16);
558
+ border-radius: var(--radius-xl); padding: 11px 13px;
559
+ box-shadow: 0 8px 24px rgba(0,0,0,.45);
560
+ backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
561
+ }
562
+ .hp-scan-ok {
563
+ width: 30px; height: 30px; border-radius: 50%; background: var(--success); color: #fff;
564
+ display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
565
+ }
566
+ .hp-scan-result { flex: 1; min-width: 0; }
567
+ .hp-scan-result .r1 { font-size: 12.5px; font-weight: 600; color: #fff; }
568
+ .hp-scan-result .r2 {
569
+ font-family: var(--font-mono); font-size: 11px;
570
+ color: rgba(235,235,245,.6); margin-top: 1px;
571
+ }
572
+ .hp-scan-go {
573
+ width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff;
574
+ display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
575
+ }
576
+
577
+ /* ─────────────────────────────────────────────────────────────
578
+ * 14. SHARE SCREEN — .hp-share-* + .hp-sheet*
579
+ * Device screen 3: Umeng share sheet
580
+ * ───────────────────────────────────────────────────────────── */
581
+
582
+ .hp-share { position: absolute; inset: 0; background: #f0eee9; }
583
+ .theme-dark .hp-share { background: #1c1c1e; }
584
+ [data-theme="dark"] .hp-share { background: #1c1c1e; }
585
+ .hp-share-bg { position: absolute; inset: 0; padding-top: 8px; }
586
+ .hp-sb-nav {
587
+ display: flex; align-items: center; justify-content: space-between;
588
+ padding: 26px 18px 14px; font-size: 15px; font-weight: 700; color: #1a1a1a;
589
+ }
590
+ .theme-dark .hp-sb-nav { color: #fff; }
591
+ [data-theme="dark"] .hp-sb-nav { color: #fff; }
592
+ .hp-sb-share {
593
+ width: 32px; height: 32px; border-radius: 50%;
594
+ background: var(--primary); color: #fff;
595
+ display: flex; align-items: center; justify-content: center;
596
+ }
597
+ .hp-sb-card {
598
+ margin: 0 16px; background: #fff; border-radius: 18px;
599
+ padding: 16px; box-shadow: 0 2px 10px rgba(0,0,0,.05);
600
+ }
601
+ .theme-dark .hp-sb-card { background: #2c2c2e; }
602
+ [data-theme="dark"] .hp-sb-card { background: #2c2c2e; }
603
+ .hp-sb-eyebrow { font-size: 11px; font-weight: 700; color: var(--primary); letter-spacing: .04em; }
604
+ .hp-sb-title { font-size: 17px; font-weight: 700; color: #1a1a1a; margin: 8px 0 14px; }
605
+ .theme-dark .hp-sb-title { color: #fff; }
606
+ [data-theme="dark"] .hp-sb-title { color: #fff; }
607
+ .hp-sb-line { height: 9px; border-radius: 5px; background: rgba(0,0,0,.07); margin-bottom: 8px; }
608
+ .theme-dark .hp-sb-line { background: rgba(255,255,255,.1); }
609
+ [data-theme="dark"] .hp-sb-line { background: rgba(255,255,255,.1); }
610
+ .hp-sb-line.short { width: 62%; }
611
+ .hp-share-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.32); }
612
+ .hp-sheet {
613
+ position: absolute; left: 0; right: 0; bottom: 0; background: #fff;
614
+ border-radius: 22px 22px 0 0;
615
+ padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
616
+ box-shadow: 0 -8px 30px rgba(0,0,0,.18);
617
+ }
618
+ .theme-dark .hp-sheet { background: #2c2c2e; }
619
+ [data-theme="dark"] .hp-sheet { background: #2c2c2e; }
620
+ .hp-sheet-grab {
621
+ display: block; width: 36px; height: 4px; border-radius: 2px;
622
+ background: rgba(0,0,0,.18); margin: 4px auto 10px;
623
+ }
624
+ .theme-dark .hp-sheet-grab { background: rgba(255,255,255,.25); }
625
+ [data-theme="dark"] .hp-sheet-grab { background: rgba(255,255,255,.25); }
626
+ .hp-sheet-head {
627
+ display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 12px;
628
+ }
629
+ .hp-sheet-title { font-size: 15px; font-weight: 700; color: #1a1a1a; }
630
+ .theme-dark .hp-sheet-title { color: #fff; }
631
+ [data-theme="dark"] .hp-sheet-title { color: #fff; }
632
+ .hp-sheet-x {
633
+ width: 26px; height: 26px; border-radius: 50%;
634
+ background: rgba(0,0,0,.06); color: #888;
635
+ display: flex; align-items: center; justify-content: center;
636
+ }
637
+ .theme-dark .hp-sheet-x { background: rgba(255,255,255,.1); color: #aaa; }
638
+ [data-theme="dark"] .hp-sheet-x { background: rgba(255,255,255,.1); color: #aaa; }
639
+ .hp-sheet-list { background: rgba(0,0,0,.02); border-radius: 14px; overflow: hidden; }
640
+ .theme-dark .hp-sheet-list { background: rgba(255,255,255,.04); }
641
+ [data-theme="dark"] .hp-sheet-list { background: rgba(255,255,255,.04); }
642
+ .hp-sheet-cell { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: #999; }
643
+ .hp-sheet-cell + .hp-sheet-cell { border-top: 1px solid rgba(0,0,0,.06); }
644
+ .theme-dark .hp-sheet-cell + .hp-sheet-cell { border-color: rgba(255,255,255,.07); }
645
+ [data-theme="dark"] .hp-sheet-cell + .hp-sheet-cell { border-color: rgba(255,255,255,.07); }
646
+ .hp-sheet-body { flex: 1; min-width: 0; }
647
+ .hp-sheet-body .t { font-size: 14px; font-weight: 600; color: #1a1a1a; }
648
+ .theme-dark .hp-sheet-body .t { color: #fff; }
649
+ [data-theme="dark"] .hp-sheet-body .t { color: #fff; }
650
+ .hp-sheet-body .s { font-size: 11.5px; color: #999; margin-top: 1px; }
651
+ .hp-sheet-cancel {
652
+ margin-top: 12px; height: 46px; border-radius: 13px;
653
+ background: rgba(0,0,0,.05); color: #1a1a1a;
654
+ font-size: 15px; font-weight: 600;
655
+ display: flex; align-items: center; justify-content: center;
656
+ }
657
+ .theme-dark .hp-sheet-cancel { background: rgba(255,255,255,.08); color: #fff; }
658
+ [data-theme="dark"] .hp-sheet-cancel { background: rgba(255,255,255,.08); color: #fff; }
659
+
660
+ /* ─────────────────────────────────────────────────────────────
661
+ * 15. GALLERY SCREEN — .hp-gal-*
662
+ * Device screen 4: Design system / component gallery
663
+ * ───────────────────────────────────────────────────────────── */
664
+
665
+ .hp-gal { position: absolute; inset: 0; background: #f0eee9; display: flex; flex-direction: column; }
666
+ .theme-dark .hp-gal { background: #1c1c1e; }
667
+ [data-theme="dark"] .hp-gal { background: #1c1c1e; }
668
+ .hp-gal-nav { padding: 30px 18px 12px; font-size: 17px; font-weight: 700; color: #1a1a1a; }
669
+ .theme-dark .hp-gal-nav { color: #fff; }
670
+ [data-theme="dark"] .hp-gal-nav { color: #fff; }
671
+ .hp-gal-body { flex: 1; overflow: hidden; padding: 4px 16px; }
672
+ .hp-gal-label {
673
+ font-size: 11px; font-weight: 700; letter-spacing: .08em;
674
+ text-transform: uppercase; color: #aaa; margin: 14px 0 9px;
675
+ }
676
+ .hp-gal-btns { display: flex; gap: 10px; }
677
+ .hp-gal-btn {
678
+ flex: 1; height: 42px; border-radius: 11px;
679
+ display: flex; align-items: center; justify-content: center;
680
+ font-size: 14px; font-weight: 600;
681
+ }
682
+ .hp-gal-btn.primary { background: var(--primary); color: #fff; }
683
+ .hp-gal-btn.ghost { background: transparent; border: 1.5px solid rgba(0,0,0,.14); color: #1a1a1a; }
684
+ .theme-dark .hp-gal-btn.ghost { border-color: rgba(255,255,255,.2); color: #fff; }
685
+ [data-theme="dark"] .hp-gal-btn.ghost { border-color: rgba(255,255,255,.2); color: #fff; }
686
+ .hp-gal-tags { display: flex; gap: 8px; }
687
+ .hp-gal-tag {
688
+ height: 26px; padding: 0 12px; border-radius: 999px;
689
+ display: inline-flex; align-items: center;
690
+ font-size: 12px; font-weight: 600; background: rgba(0,0,0,.06); color: #555;
691
+ }
692
+ .theme-dark .hp-gal-tag { background: rgba(255,255,255,.1); color: #ccc; }
693
+ [data-theme="dark"] .hp-gal-tag { background: rgba(255,255,255,.1); color: #ccc; }
694
+ .hp-gal-tag.green { background: rgba(31,138,91,.14); color: #1f8a5b; }
695
+ .hp-gal-tag.orange { background: var(--primary-container); color: var(--primary); }
696
+ .hp-gal-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
697
+ .theme-dark .hp-gal-card { background: #2c2c2e; }
698
+ [data-theme="dark"] .hp-gal-card { background: #2c2c2e; }
699
+ .hp-gal-cell { display: flex; align-items: center; gap: 12px; padding: 13px 15px; color: #bbb; }
700
+ .hp-gal-cell + .hp-gal-cell { border-top: 1px solid rgba(0,0,0,.06); }
701
+ .theme-dark .hp-gal-cell + .hp-gal-cell { border-color: rgba(255,255,255,.07); }
702
+ [data-theme="dark"] .hp-gal-cell + .hp-gal-cell { border-color: rgba(255,255,255,.07); }
703
+ .hp-gal-ic {
704
+ width: 34px; height: 34px; border-radius: 9px;
705
+ background: var(--primary-container); color: var(--primary);
706
+ display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
707
+ }
708
+ .hp-gal-ct { flex: 1; min-width: 0; }
709
+ .hp-gal-ct .t { font-size: 14px; font-weight: 600; color: #1a1a1a; }
710
+ .theme-dark .hp-gal-ct .t { color: #fff; }
711
+ [data-theme="dark"] .hp-gal-ct .t { color: #fff; }
712
+ .hp-gal-ct .s { font-size: 11.5px; color: #999; margin-top: 1px; }
713
+ .hp-gal-sw {
714
+ width: 42px; height: 25px; border-radius: 999px;
715
+ background: var(--primary); position: relative; flex: 0 0 auto;
716
+ }
717
+ .hp-gal-sw span {
718
+ position: absolute; top: 2.5px; right: 2.5px;
719
+ width: 20px; height: 20px; border-radius: 50%;
720
+ background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
721
+ }
722
+
723
+ /* ─────────────────────────────────────────────────────────────
724
+ * 16. CODE WINDOW — .hp-code + syntax tokens
725
+ * ───────────────────────────────────────────────────────────── */
726
+
727
+ .hp-code {
728
+ border-radius: var(--radius-xl); overflow: hidden; background: var(--surface);
729
+ border: 1px solid var(--outline-variant); box-shadow: 0 12px 40px rgba(0,0,0,.12);
730
+ }
731
+ .theme-dark .hp-code { box-shadow: 0 12px 40px rgba(0,0,0,.5); }
732
+ [data-theme="dark"] .hp-code { box-shadow: 0 12px 40px rgba(0,0,0,.5); }
733
+ .hp-code-bar {
734
+ display: flex; align-items: center; gap: 8px; padding: 0 16px; height: 42px;
735
+ border-bottom: 1px solid var(--outline); background: var(--surface-container);
736
+ }
737
+ .hp-code-dots { display: flex; gap: 6px; }
738
+ .hp-code-dots i {
739
+ width: 11px; height: 11px; border-radius: 50%;
740
+ background: var(--surface-container-highest); display: block;
741
+ }
742
+ .hp-code-file { font-family: var(--font-mono); font-size: 12px; color: var(--foreground-subtle); margin-left: 6px; }
743
+ .hp-code-tag {
744
+ margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--primary);
745
+ background: var(--primary-container); padding: 3px 9px; border-radius: var(--radius-pill); font-weight: 600;
746
+ }
747
+ .hp-code-body {
748
+ padding: 20px 22px; font-family: var(--font-mono); font-size: 12.5px;
749
+ line-height: 1.85; overflow: auto;
750
+ }
751
+ .hp-code-body pre { margin: 0; }
752
+ .hp-code-body .ln {
753
+ color: var(--foreground-subtle); display: inline-block; width: 22px;
754
+ user-select: none; opacity: .55;
755
+ }
756
+ .tok-kw { color: var(--primary); }
757
+ .tok-fn { color: var(--foreground); font-weight: 600; }
758
+ .tok-str { color: var(--success); }
759
+ .tok-dim { color: var(--foreground-subtle); }
760
+ .tok-id { color: var(--foreground); }
761
+
762
+ /* highlighted line + compact variant */
763
+ .hp-cl { display: block; border-radius: 4px; margin: 0 -8px; padding: 0 8px; }
764
+ .hp-cl.hl { background: var(--primary-container); box-shadow: inset 2px 0 0 var(--primary); }
765
+ .hp-code.compact .hp-code-body { font-size: 11.5px; line-height: 1.8; padding: 16px 18px; }
766
+ .hp-code.compact .hp-code-body .ln { width: 18px; }
767
+
768
+ /* ─────────────────────────────────────────────────────────────
769
+ * 17. COMPOSED HERO (Hero D) — code window + scaled viewfinder
770
+ * ───────────────────────────────────────────────────────────── */
771
+
772
+ .hp-hero-final { grid-template-columns: minmax(0, 1fr) 580px; gap: 44px; }
773
+ .hp-combo { position: relative; height: 540px; }
774
+ .hp-combo-code { position: absolute; top: 0; left: 0; width: 540px; z-index: 1; }
775
+ .hp-combo-phone { position: absolute; right: 0; bottom: 0; z-index: 3; transform: scale(.68); transform-origin: bottom right; }
776
+ .hp-combo-badge {
777
+ position: absolute; top: 92px; right: 18px; z-index: 4; white-space: nowrap;
778
+ display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 13px;
779
+ border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--outline-variant);
780
+ font-size: 12.5px; font-weight: var(--fw-semi); color: var(--foreground);
781
+ box-shadow: var(--shadow-card);
782
+ }
783
+ .theme-dark .hp-combo-badge { box-shadow: 0 6px 18px rgba(0,0,0,.5); }
784
+ [data-theme="dark"] .hp-combo-badge { box-shadow: 0 6px 18px rgba(0,0,0,.5); }
785
+ .hp-combo-badge .dot {
786
+ width: 7px; height: 7px; border-radius: 50%; background: var(--primary);
787
+ box-shadow: 0 0 0 3px var(--primary-container);
788
+ }
789
+
790
+ /* ─────────────────────────────────────────────────────────────
791
+ * 18. FEATURES GRID
792
+ * ───────────────────────────────────────────────────────────── */
793
+
794
+ .hp-features { padding: 8px 40px 56px; }
795
+ .hp-sec-label {
796
+ font-size: 13px; font-weight: var(--fw-semi); color: var(--foreground-subtle);
797
+ letter-spacing: .02em; margin-bottom: 18px; display: flex; align-items: center; gap: 10px;
798
+ }
799
+ .hp-sec-label::after { content: ""; flex: 1; height: 1px; background: var(--outline); }
800
+ .hp-feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
801
+ .hp-feature {
802
+ background: var(--surface); border-radius: var(--radius-xl); padding: 22px 20px 24px;
803
+ box-shadow: var(--shadow-card); border: 1px solid var(--outline-faint);
804
+ transition: transform var(--motion-base) var(--ease-out), box-shadow var(--motion-base) var(--ease-out);
805
+ }
806
+ .theme-dark .hp-feature { border-color: var(--outline); }
807
+ [data-theme="dark"] .hp-feature { border-color: var(--outline); }
808
+ .hp-feature:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
809
+ .theme-dark .hp-feature:hover { box-shadow: none; border-color: var(--primary); }
810
+ [data-theme="dark"] .hp-feature:hover { box-shadow: none; border-color: var(--primary); }
811
+ .hp-feat-icon {
812
+ width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--primary-container);
813
+ color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
814
+ }
815
+ .hp-feat-title { font-size: 16px; font-weight: var(--fw-semi); margin: 0 0 8px; }
816
+ .hp-feat-desc { font-size: 13.5px; line-height: 1.55; color: var(--foreground-muted); margin: 0; text-wrap: pretty; }
817
+
818
+ /* ─────────────────────────────────────────────────────────────
819
+ * 19. FOOTER
820
+ * ───────────────────────────────────────────────────────────── */
821
+
822
+ .hp-footer { flex: 0 0 auto; border-top: 1px solid var(--outline); background: var(--surface); padding: 32px 40px 22px; }
823
+ .hp-footer-top { display: flex; justify-content: space-between; gap: 40px; }
824
+ .hp-footer-brand { max-width: 280px; }
825
+ .hp-footer-tag { font-size: 13px; color: var(--foreground-muted); line-height: 1.5; margin-top: 12px; }
826
+ .hp-footer-cols { display: flex; gap: 64px; }
827
+ .hp-footer-col h4 {
828
+ font-size: 12px; font-weight: var(--fw-semi); color: var(--foreground);
829
+ margin: 0 0 12px; letter-spacing: .02em;
830
+ }
831
+ .hp-footer-col a {
832
+ display: flex; align-items: center; gap: 6px; font-size: 13.5px;
833
+ color: var(--foreground-muted); padding: 4px 0;
834
+ transition: color var(--motion-fast) var(--ease-out);
835
+ }
836
+ .hp-footer-col a:hover { color: var(--primary); }
837
+ .hp-footer-bottom {
838
+ display: flex; justify-content: space-between; align-items: center;
839
+ margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--outline-faint);
840
+ font-size: 12.5px; color: var(--foreground-subtle); font-family: var(--font-mono);
841
+ }
842
+
843
+ /* ─────────────────────────────────────────────────────────────
844
+ * 20. PAGE MODE (full-viewport, scrolling) — .hp--page modifier
845
+ * ───────────────────────────────────────────────────────────── */
846
+
847
+ .hp--page { height: auto; min-height: 100vh; overflow: visible; }
848
+ .hp--page .hp-scroll { overflow: visible; flex: 0 0 auto; }
849
+ .hp--page .hp-nav { position: sticky; top: 0; z-index: 30; }
850
+ /* centre content within a 1240px column, 40px min gutters */
851
+ .hp--page .hp-nav,
852
+ .hp--page .hp-hero,
853
+ .hp--page .hp-features,
854
+ .hp--page .hp-footer {
855
+ padding-left: max(40px, calc((100% - 1240px) / 2));
856
+ padding-right: max(40px, calc((100% - 1240px) / 2));
857
+ }
858
+ .hp--page .hp-hero { padding-top: 84px; padding-bottom: 72px; }
859
+ .hp--page .hp-features { padding-bottom: 80px; }
860
+ .hp--page .hp-footer { padding-top: 40px; padding-bottom: 28px; }
861
+
862
+ /* ─────────────────────────────────────────────────────────────
863
+ * 21. PORTAL LANDING — .pt-* + .portal + .hub-*
864
+ * Used by unif.design hub page
865
+ * ───────────────────────────────────────────────────────────── */
866
+
867
+ .portal { background: var(--background); }
868
+ .hub-nav-tag {
869
+ font-family: var(--font-mono); font-size: 11px; font-weight: 600;
870
+ color: var(--foreground-subtle); border: 1px solid var(--outline);
871
+ border-radius: var(--radius-pill); padding: 2px 9px; margin-left: 4px;
872
+ }
873
+ .hub-ver {
874
+ font-family: var(--font-mono); font-size: 12px; color: var(--foreground-subtle);
875
+ border: 1px solid var(--outline-variant); border-radius: var(--radius-pill); padding: 3px 10px;
876
+ }
877
+ .hub-arrow { color: var(--primary); display: flex; transition: transform var(--motion-base) var(--ease-out); }
878
+
879
+ .pt-hero { text-align: center; padding: 80px 40px 40px; max-width: 820px; margin: 0 auto; }
880
+ .pt-hero .hp-eyebrow { justify-content: center; }
881
+ .pt-hero .hp-eyebrow::before { display: none; }
882
+ .pt-title {
883
+ font-size: 52px; line-height: 1.1; font-weight: var(--fw-heavy);
884
+ letter-spacing: -.025em; margin: 16px 0 0;
885
+ }
886
+ .pt-title .accent { color: var(--primary); }
887
+ .pt-tagline {
888
+ font-size: 17px; line-height: 1.6; color: var(--foreground-muted);
889
+ margin: 18px auto 0; max-width: 620px; text-wrap: pretty;
890
+ }
891
+ .pt-search {
892
+ display: inline-flex; align-items: center; gap: 10px; margin: 28px auto 0;
893
+ height: 46px; padding: 0 8px 0 16px; border-radius: var(--radius-pill);
894
+ background: var(--surface); border: 1px solid var(--outline-variant);
895
+ color: var(--foreground-subtle); font-size: 14.5px; box-shadow: var(--shadow-card);
896
+ cursor: text; min-width: 320px; justify-content: flex-start;
897
+ }
898
+ .pt-search kbd {
899
+ margin-left: auto; font-family: var(--font-mono); font-size: 11px;
900
+ color: var(--foreground-subtle); background: var(--surface-container-high);
901
+ border-radius: var(--radius-sm); padding: 3px 7px;
902
+ }
903
+ .pt-stats {
904
+ display: flex; align-items: center; justify-content: center; gap: 14px;
905
+ margin-top: 26px; font-size: 14px; color: var(--foreground-muted);
906
+ }
907
+ .pt-stats b { color: var(--foreground); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
908
+ .pt-stats i { color: var(--outline-variant); font-style: normal; }
909
+
910
+ .pt-section { max-width: 1000px; margin: 0 auto; padding: 12px 40px 8px; width: 100%; }
911
+ .pt-section .hp-sec-label { max-width: none; }
912
+ .pt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding-bottom: 28px; }
913
+ .pt-card {
914
+ display: flex; flex-direction: column; background: var(--surface);
915
+ border: 1px solid var(--outline-faint); border-radius: var(--radius-xl);
916
+ padding: 22px; box-shadow: var(--shadow-card);
917
+ transition: transform var(--motion-base) var(--ease-out), box-shadow var(--motion-base) var(--ease-out), border-color var(--motion-base) var(--ease-out);
918
+ }
919
+ .theme-dark .pt-card { border-color: var(--outline); }
920
+ [data-theme="dark"] .pt-card { border-color: var(--outline); }
921
+ .pt-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,.1); border-color: var(--primary); }
922
+ .theme-dark .pt-card:hover { box-shadow: none; }
923
+ [data-theme="dark"] .pt-card:hover { box-shadow: none; }
924
+ .pt-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
925
+ .pt-card-head .hp-mark { width: 40px; height: 40px; border-radius: 11px; }
926
+ .pt-card-name { font-size: 19px; font-weight: var(--fw-bold); margin: 0 0 5px; letter-spacing: -.01em; }
927
+ .pt-card-pkg { font-family: var(--font-mono); font-size: 12.5px; color: var(--primary); }
928
+ .pt-card-desc { font-size: 13.5px; line-height: 1.55; color: var(--foreground-muted); margin: 11px 0 0; text-wrap: pretty; flex: 1; }
929
+ .pt-card-foot {
930
+ display: flex; align-items: center; justify-content: space-between;
931
+ margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--outline-faint);
932
+ font-size: 14px; font-weight: var(--fw-semi); color: var(--foreground);
933
+ }
934
+ .theme-dark .pt-card-foot { border-color: var(--outline); }
935
+ [data-theme="dark"] .pt-card-foot { border-color: var(--outline); }
936
+ .pt-card:hover .hub-arrow { transform: translateX(4px); }
937
+
938
+ .pt-doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 40px; }
939
+ .pt-doc {
940
+ display: flex; align-items: flex-start; gap: 13px; background: var(--surface);
941
+ border: 1px solid var(--outline-faint); border-radius: var(--radius-xl);
942
+ padding: 18px; box-shadow: var(--shadow-card);
943
+ transition: border-color var(--motion-base) var(--ease-out), transform var(--motion-base) var(--ease-out);
944
+ }
945
+ .theme-dark .pt-doc { border-color: var(--outline); }
946
+ [data-theme="dark"] .pt-doc { border-color: var(--outline); }
947
+ .pt-doc:hover { border-color: var(--primary); transform: translateY(-2px); }
948
+ .pt-doc-ic {
949
+ width: 40px; height: 40px; border-radius: 11px;
950
+ background: var(--primary-container); color: var(--primary);
951
+ display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
952
+ }
953
+ .pt-doc-body { flex: 1; min-width: 0; }
954
+ .pt-doc-top { display: flex; align-items: baseline; gap: 8px; }
955
+ .pt-doc-title { font-size: 15.5px; font-weight: var(--fw-bold); }
956
+ .pt-doc-meta { font-family: var(--font-mono); font-size: 11px; color: var(--foreground-subtle); }
957
+ .pt-doc-desc { font-size: 12.5px; line-height: 1.5; color: var(--foreground-muted); margin: 6px 0 0; text-wrap: pretty; }
958
+ .pt-doc-go {
959
+ color: var(--foreground-subtle); flex: 0 0 auto; margin-top: 2px;
960
+ transition: color var(--motion-base) var(--ease-out);
961
+ }
962
+ .pt-doc:hover .pt-doc-go { color: var(--primary); }
963
+
964
+ .portal .hp-footer { padding-top: 36px; padding-bottom: 28px; margin-top: 8px; }
965
+
966
+ /* ─────────────────────────────────────────────────────────────
967
+ * 22. RESPONSIVE BREAKPOINTS
968
+ * ───────────────────────────────────────────────────────────── */
969
+
970
+ @media (max-width: 940px) {
971
+ .hp-hero-split,
972
+ .hp-hero-final { grid-template-columns: 1fr; gap: 48px; }
973
+ .hp--page .hp-feature-grid { grid-template-columns: repeat(2, 1fr); }
974
+ .hp--page .hp-combo { margin: 0 auto; }
975
+ }
976
+
977
+ @media (max-width: 760px) {
978
+ .pt-grid { grid-template-columns: 1fr; }
979
+ .pt-doc-grid { grid-template-columns: 1fr; }
980
+ }
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ // @unif/react-native-design 公共入口:theme(设计令牌)/ icons / utils / 组件(ui · business)。
4
+ // 文档站共享首页样式以 `./docs-home.css` 子路径导出(供各 Docusaurus 文档站 import,见 package.json#exports)。
3
5
  export * from "./theme/index.js";
4
6
  export * from "./icons/index.js";
5
7
  export * from "./utils/testID/index.js";
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,cAAc,kBAAS;AACvB,cAAc,kBAAS;AACvB,cAAc,yBAAgB;AAC9B,cAAc,yBAAgB;AAC9B,cAAc,0BAAiB;AAC/B,cAAc,gCAAuB","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA;AACA;AACA,cAAc,kBAAS;AACvB,cAAc,kBAAS;AACvB,cAAc,yBAAgB;AAC9B,cAAc,yBAAgB;AAC9B,cAAc,0BAAiB;AAC/B,cAAc,gCAAuB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAEA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unif/react-native-design",
3
- "version": "0.4.37",
3
+ "version": "0.5.0",
4
4
  "description": "Unif 设计系统:theme + icons + utils + components",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -10,11 +10,13 @@
10
10
  "types": "./lib/typescript/src/index.d.ts",
11
11
  "default": "./lib/module/index.js"
12
12
  },
13
- "./package.json": "./package.json"
13
+ "./package.json": "./package.json",
14
+ "./docs-home.css": "./docs-home.css"
14
15
  },
15
16
  "files": [
16
17
  "src",
17
18
  "lib",
19
+ "docs-home.css",
18
20
  "android",
19
21
  "ios",
20
22
  "cpp",
package/src/index.tsx CHANGED
@@ -1,3 +1,5 @@
1
+ // @unif/react-native-design 公共入口:theme(设计令牌)/ icons / utils / 组件(ui · business)。
2
+ // 文档站共享首页样式以 `./docs-home.css` 子路径导出(供各 Docusaurus 文档站 import,见 package.json#exports)。
1
3
  export * from './theme';
2
4
  export * from './icons';
3
5
  export * from './utils/testID';