@unif/react-native-ui 0.2.0 → 0.2.11

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.
Files changed (139) hide show
  1. package/lib/commonjs/action-sheet/style/index.js.map +1 -1
  2. package/lib/commonjs/avatar/index.js.map +1 -1
  3. package/lib/commonjs/chip/index.js +2 -7
  4. package/lib/commonjs/chip/index.js.map +1 -1
  5. package/lib/commonjs/chip/style/index.js +5 -0
  6. package/lib/commonjs/chip/style/index.js.map +1 -1
  7. package/lib/commonjs/index.js.map +1 -1
  8. package/lib/commonjs/input/index.js.map +1 -1
  9. package/lib/commonjs/list-item/index.js.map +1 -1
  10. package/lib/commonjs/menu/index.js +3 -5
  11. package/lib/commonjs/menu/index.js.map +1 -1
  12. package/lib/commonjs/popover/index.js.map +1 -1
  13. package/lib/commonjs/popover/style/index.js +3 -3
  14. package/lib/commonjs/popover/style/index.js.map +1 -1
  15. package/lib/commonjs/space/index.js.map +1 -1
  16. package/lib/commonjs/text/index.js.map +1 -1
  17. package/lib/commonjs/wave-animation/index.js.map +1 -1
  18. package/lib/module/action-sheet/style/index.js.map +1 -1
  19. package/lib/module/avatar/index.js.map +1 -1
  20. package/lib/module/chip/index.js +2 -7
  21. package/lib/module/chip/index.js.map +1 -1
  22. package/lib/module/chip/style/index.js +5 -0
  23. package/lib/module/chip/style/index.js.map +1 -1
  24. package/lib/module/index.js.map +1 -1
  25. package/lib/module/input/index.js.map +1 -1
  26. package/lib/module/list-item/index.js.map +1 -1
  27. package/lib/module/menu/index.js +3 -5
  28. package/lib/module/menu/index.js.map +1 -1
  29. package/lib/module/popover/index.js.map +1 -1
  30. package/lib/module/popover/style/index.js +3 -3
  31. package/lib/module/popover/style/index.js.map +1 -1
  32. package/lib/module/space/index.js.map +1 -1
  33. package/lib/module/text/index.js.map +1 -1
  34. package/lib/module/wave-animation/index.js.map +1 -1
  35. package/lib/typescript/commonjs/docs-src/components/ExpoSnack.d.ts +11 -0
  36. package/lib/typescript/commonjs/docs-src/components/ExpoSnack.d.ts.map +1 -0
  37. package/lib/typescript/commonjs/docusaurus.config.d.ts +4 -0
  38. package/lib/typescript/commonjs/docusaurus.config.d.ts.map +1 -0
  39. package/lib/typescript/commonjs/sidebars.d.ts +4 -0
  40. package/lib/typescript/commonjs/sidebars.d.ts.map +1 -0
  41. package/lib/typescript/commonjs/src/action-sheet/style/index.d.ts.map +1 -1
  42. package/lib/typescript/commonjs/src/avatar/index.d.ts.map +1 -1
  43. package/lib/typescript/commonjs/src/chip/index.d.ts.map +1 -1
  44. package/lib/typescript/commonjs/src/chip/style/index.d.ts +1 -0
  45. package/lib/typescript/commonjs/src/chip/style/index.d.ts.map +1 -1
  46. package/lib/typescript/commonjs/src/index.d.ts +1 -1
  47. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  48. package/lib/typescript/commonjs/src/input/index.d.ts.map +1 -1
  49. package/lib/typescript/commonjs/src/list-item/index.d.ts.map +1 -1
  50. package/lib/typescript/commonjs/src/menu/index.d.ts.map +1 -1
  51. package/lib/typescript/commonjs/src/popover/index.d.ts.map +1 -1
  52. package/lib/typescript/commonjs/src/space/index.d.ts.map +1 -1
  53. package/lib/typescript/commonjs/src/text/index.d.ts.map +1 -1
  54. package/lib/typescript/commonjs/src/wave-animation/index.d.ts.map +1 -1
  55. package/lib/typescript/module/docs-src/components/ExpoSnack.d.ts +11 -0
  56. package/lib/typescript/module/docs-src/components/ExpoSnack.d.ts.map +1 -0
  57. package/lib/typescript/module/docusaurus.config.d.ts +4 -0
  58. package/lib/typescript/module/docusaurus.config.d.ts.map +1 -0
  59. package/lib/typescript/module/sidebars.d.ts +4 -0
  60. package/lib/typescript/module/sidebars.d.ts.map +1 -0
  61. package/lib/typescript/module/src/action-sheet/style/index.d.ts.map +1 -1
  62. package/lib/typescript/module/src/avatar/index.d.ts.map +1 -1
  63. package/lib/typescript/module/src/chip/index.d.ts.map +1 -1
  64. package/lib/typescript/module/src/chip/style/index.d.ts +1 -0
  65. package/lib/typescript/module/src/chip/style/index.d.ts.map +1 -1
  66. package/lib/typescript/module/src/index.d.ts +1 -1
  67. package/lib/typescript/module/src/index.d.ts.map +1 -1
  68. package/lib/typescript/module/src/input/index.d.ts.map +1 -1
  69. package/lib/typescript/module/src/list-item/index.d.ts.map +1 -1
  70. package/lib/typescript/module/src/menu/index.d.ts.map +1 -1
  71. package/lib/typescript/module/src/popover/index.d.ts.map +1 -1
  72. package/lib/typescript/module/src/space/index.d.ts.map +1 -1
  73. package/lib/typescript/module/src/text/index.d.ts.map +1 -1
  74. package/lib/typescript/module/src/wave-animation/index.d.ts.map +1 -1
  75. package/package.json +16 -2
  76. package/src/action-sheet/index.tsx +1 -1
  77. package/src/action-sheet/style/index.tsx +1 -3
  78. package/src/avatar/index.tsx +5 -2
  79. package/src/button/index.tsx +2 -2
  80. package/src/button/style/index.tsx +1 -1
  81. package/src/chip/index.tsx +12 -4
  82. package/src/chip/style/index.tsx +7 -1
  83. package/src/index.tsx +4 -1
  84. package/src/input/index.tsx +59 -54
  85. package/src/list-item/index.tsx +3 -4
  86. package/src/menu/index.tsx +1 -4
  87. package/src/popover/index.tsx +6 -7
  88. package/src/popover/style/index.tsx +3 -3
  89. package/src/space/index.tsx +1 -3
  90. package/src/text/index.tsx +6 -1
  91. package/src/wave-animation/index.tsx +7 -4
  92. package/lib/commonjs/action-sheet/index.md +0 -69
  93. package/lib/commonjs/avatar/index.md +0 -51
  94. package/lib/commonjs/button/index.md +0 -90
  95. package/lib/commonjs/center/index.md +0 -28
  96. package/lib/commonjs/chip/index.md +0 -60
  97. package/lib/commonjs/column/index.md +0 -34
  98. package/lib/commonjs/divider/index.md +0 -44
  99. package/lib/commonjs/hooks/index.md +0 -71
  100. package/lib/commonjs/input/index.md +0 -73
  101. package/lib/commonjs/list-item/index.md +0 -101
  102. package/lib/commonjs/popover/index.md +0 -57
  103. package/lib/commonjs/row/index.md +0 -46
  104. package/lib/commonjs/space/index.md +0 -31
  105. package/lib/commonjs/text/index.md +0 -63
  106. package/lib/commonjs/touchable/index.md +0 -42
  107. package/lib/commonjs/wave-animation/index.md +0 -50
  108. package/lib/module/action-sheet/index.md +0 -69
  109. package/lib/module/avatar/index.md +0 -51
  110. package/lib/module/button/index.md +0 -90
  111. package/lib/module/center/index.md +0 -28
  112. package/lib/module/chip/index.md +0 -60
  113. package/lib/module/column/index.md +0 -34
  114. package/lib/module/divider/index.md +0 -44
  115. package/lib/module/hooks/index.md +0 -71
  116. package/lib/module/input/index.md +0 -73
  117. package/lib/module/list-item/index.md +0 -101
  118. package/lib/module/popover/index.md +0 -57
  119. package/lib/module/row/index.md +0 -46
  120. package/lib/module/space/index.md +0 -31
  121. package/lib/module/text/index.md +0 -63
  122. package/lib/module/touchable/index.md +0 -42
  123. package/lib/module/wave-animation/index.md +0 -50
  124. package/src/action-sheet/index.md +0 -69
  125. package/src/avatar/index.md +0 -51
  126. package/src/button/index.md +0 -90
  127. package/src/center/index.md +0 -28
  128. package/src/chip/index.md +0 -60
  129. package/src/column/index.md +0 -34
  130. package/src/divider/index.md +0 -44
  131. package/src/hooks/index.md +0 -71
  132. package/src/input/index.md +0 -73
  133. package/src/list-item/index.md +0 -101
  134. package/src/popover/index.md +0 -57
  135. package/src/row/index.md +0 -46
  136. package/src/space/index.md +0 -31
  137. package/src/text/index.md +0 -63
  138. package/src/touchable/index.md +0 -42
  139. package/src/wave-animation/index.md +0 -50
package/src/text/index.md DELETED
@@ -1,63 +0,0 @@
1
- # Text 语义化文字
2
-
3
- 通过 `variant` 驱动排版样式。继承 RN `Text`,支持嵌套。
4
-
5
- ## 何时使用
6
-
7
- - 替代直接写 `fontSize` + `fontWeight` + `color` 的 `<Text>` 组合
8
- - 需要统一排版规范时
9
-
10
- ## 代码演示
11
-
12
- ```tsx
13
- // 基础用法
14
- <Text variant="title">标题文字</Text>
15
- <Text variant="caption" secondary>辅助说明</Text>
16
-
17
- // 颜色与字重
18
- <Text variant="caption" primary weight="bold">¥88.00</Text>
19
-
20
- // 嵌套 Text
21
- <Text variant="body" numberOfLines={1}>
22
- <Text primary weight="semibold">新 </Text>
23
- {productName}
24
- </Text>
25
- ```
26
-
27
- ## API
28
-
29
- | 属性 | 说明 | 类型 | 默认值 |
30
- |------|------|------|--------|
31
- | variant | 排版变体 | `'title'` \| `'heading'` \| `'body'` \| `'caption'` \| `'micro'` | `'body'` |
32
- | secondary | 次要色(colorTextSecondary) | `boolean` | `false` |
33
- | primary | 主题色(colorPrimary) | `boolean` | `false` |
34
- | color | 自定义颜色 | `string` | - |
35
- | weight | 字重 | `'medium'` \| `'semibold'` \| `'bold'` | - |
36
-
37
- > 继承所有 RN `TextProps`(`numberOfLines`、`ellipsizeMode`、`onPress`、`style` 等)
38
-
39
- ## Variant 规格
40
-
41
- | variant | fontSize | lineHeight | fontWeight | 场景 |
42
- |---------|----------|------------|------------|------|
43
- | title | 20 | 26 | 600 | 页面标题、问候语 |
44
- | heading | 16 | 22 | 600 | 弹窗标题、区块标题 |
45
- | body | 15 | 22 | 正常 | 默认正文 |
46
- | caption | 13 | 18 | 正常 | 信息行、标签 |
47
- | micro | 12 | 18 | 正常 | 地址、规格、描述 |
48
-
49
- ## Weight 映射
50
-
51
- | weight | fontWeight | 场景 |
52
- |--------|----------|------|
53
- | medium | 500 | 产品名、模型名 |
54
- | semibold | 600 | 标题、按钮文字、客户名 |
55
- | bold | 700 | 价格金额 |
56
-
57
- ## 样式优先级
58
-
59
- ```
60
- VARIANT_MAP → secondary/primary → color → weight → style
61
- ```
62
-
63
- 后传入的属性覆盖先传入的,`style` prop 拥有最高优先级。
@@ -1,42 +0,0 @@
1
- # Touchable 统一触摸反馈
2
-
3
- 基于 `Pressable`,统一替代 `TouchableOpacity`。按下时降低透明度,支持自定义 `activeOpacity`。
4
-
5
- ## 何时使用
6
-
7
- - 替代所有 `TouchableOpacity` 的场景
8
- - 需要可点击区域(非按钮语义)时
9
-
10
- ## 代码演示
11
-
12
- ```tsx
13
- // 基础用法
14
- <Touchable onPress={handlePress}>
15
- <Row gap={10}>
16
- <Icon name="settings" />
17
- <Text>设置</Text>
18
- </Row>
19
- </Touchable>
20
-
21
- // 自定义按下透明度
22
- <Touchable onPress={handlePress} activeOpacity={0.5}>
23
- <Text>更明显的按下效果</Text>
24
- </Touchable>
25
-
26
- // 长按
27
- <Touchable onPress={handlePress} onLongPress={handleLongPress}>
28
- <Text>支持长按</Text>
29
- </Touchable>
30
- ```
31
-
32
- ## API
33
-
34
- | 属性 | 说明 | 类型 | 默认值 |
35
- |------|------|------|--------|
36
- | onPress | 点击回调 | `() => void` | - |
37
- | onLongPress | 长按回调 | `() => void` | - |
38
- | disabled | 禁用状态 | `boolean` | `false` |
39
- | activeOpacity | 按下态透明度 | `number` | `0.7` |
40
- | testID | 测试标识 | `string` | - |
41
-
42
- > 继承所有 RN `ViewProps`
@@ -1,50 +0,0 @@
1
- ---
2
- title: WaveAnimation
3
- nav:
4
- title: 组件
5
- order: 1
6
- group:
7
- title: 原子
8
- order: 1
9
- ---
10
-
11
- # WaveAnimation 声波动画
12
-
13
- 柱状声波动画,适用于语音录制等场景的视觉反馈。
14
-
15
- ## 何时使用
16
-
17
- - 语音录制时展示声波效果
18
- - 需要节奏性动画反馈时
19
-
20
- ## 代码演示
21
-
22
- ```tsx
23
- import { WaveAnimation } from '@unif/react-native-ui';
24
-
25
- // 基本用法
26
- <WaveAnimation active={isRecording} />
27
-
28
- // 自定义参数
29
- <WaveAnimation
30
- active={true}
31
- color="#EB6E00"
32
- barCount={5}
33
- barWidth={4}
34
- minHeight={4}
35
- maxHeight={24}
36
- />
37
- ```
38
-
39
- ## API
40
-
41
- | 属性 | 说明 | 类型 | 默认值 |
42
- | --------- | ------------ | ---------- | ----------- |
43
- | active | 控制动画启停 | `boolean` | - |
44
- | color | 柱体颜色 | `string` | `'#FFFFFF'` |
45
- | barCount | 柱数 | `number` | `4` |
46
- | barWidth | 柱宽 | `number` | `3` |
47
- | minHeight | 最小高度 | `number` | `6` |
48
- | maxHeight | 最大高度 | `number` | `20` |
49
- | style | 容器样式 | `ViewStyle`| - |
50
- | testID | 测试标识 | `string` | - |