@unif/react-native-design 0.13.0 → 0.14.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/lib/module/components/ui/Segmented/Segmented.js +14 -6
- package/lib/module/components/ui/Segmented/Segmented.js.map +1 -1
- package/lib/module/components/ui/Segmented/styles.js +34 -7
- package/lib/module/components/ui/Segmented/styles.js.map +1 -1
- package/lib/typescript/src/components/business/AvatarWithRing/styles.d.ts +5 -5
- package/lib/typescript/src/components/business/AvatarWithRing/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Input/Input.d.ts +6 -6
- package/lib/typescript/src/components/ui/Search/Search.d.ts +3 -3
- package/lib/typescript/src/components/ui/Segmented/Segmented.d.ts +4 -2
- package/lib/typescript/src/components/ui/Segmented/Segmented.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Segmented/index.d.ts +1 -1
- package/lib/typescript/src/components/ui/Segmented/index.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Segmented/styles.d.ts +13 -5
- package/lib/typescript/src/components/ui/Segmented/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Segmented/types.d.ts +14 -0
- package/lib/typescript/src/components/ui/Segmented/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/TextField/TextFieldBase.d.ts +6 -6
- package/lib/typescript/src/components/ui/Textarea/Textarea.d.ts +6 -6
- package/lib/typescript/src/components/ui/index.d.ts +1 -1
- package/lib/typescript/src/components/ui/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/ui/Segmented/Segmented.tsx +13 -10
- package/src/components/ui/Segmented/index.ts +1 -1
- package/src/components/ui/Segmented/styles.ts +27 -7
- package/src/components/ui/Segmented/types.ts +16 -0
- package/src/components/ui/index.ts +1 -1
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
4
4
|
import { Text, View } from 'react-native';
|
|
5
5
|
import { Pressable } from 'react-native-gesture-handler';
|
|
6
6
|
import { fw, useTheme, useThemedStyles } from "../../../theme/index.js";
|
|
7
7
|
import { childTestID } from "../../../utils/testID/index.js";
|
|
8
|
-
import { makeStyles } from "./styles.js";
|
|
8
|
+
import { makeStyles, sizingFor } from "./styles.js";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
/**
|
|
11
|
-
* 局部分段控件 ——
|
|
11
|
+
* 局部分段控件 —— pill 在 track 上,激活项是亮色 thumb。
|
|
12
12
|
*
|
|
13
13
|
* **active thumb 必须比 track 亮一档** —— shadow 只在亮色态显示,
|
|
14
14
|
* 暗色态由 surface 明度差表达层级。
|
|
15
|
+
*
|
|
16
|
+
* `size`:默认 `'md'`(44pt 触控达标);`'sm'` 紧凑(28pt)给模型下拉等局促位用。
|
|
15
17
|
*/
|
|
16
18
|
export function Segmented({
|
|
17
19
|
value,
|
|
18
20
|
onChange,
|
|
19
21
|
items,
|
|
22
|
+
size = 'md',
|
|
20
23
|
disabled = false,
|
|
21
24
|
testID
|
|
22
25
|
}) {
|
|
@@ -26,6 +29,7 @@ export function Segmented({
|
|
|
26
29
|
shadow
|
|
27
30
|
} = useTheme();
|
|
28
31
|
const styles = useThemedStyles(makeStyles);
|
|
32
|
+
const sizing = useMemo(() => sizingFor(size), [size]);
|
|
29
33
|
const activeBg = scheme === 'dark' ? c.surfaceContainerHighest : c.surface;
|
|
30
34
|
const activeShadow = scheme === 'dark' ? null : shadow.subtle;
|
|
31
35
|
return (
|
|
@@ -52,16 +56,20 @@ export function Segmented({
|
|
|
52
56
|
testID: itemTestID,
|
|
53
57
|
style: ({
|
|
54
58
|
pressed
|
|
55
|
-
}) => [styles.segItem,
|
|
59
|
+
}) => [styles.segItem, {
|
|
60
|
+
minHeight: sizing.minHeight,
|
|
61
|
+
paddingHorizontal: sizing.px
|
|
62
|
+
}, on && {
|
|
56
63
|
backgroundColor: activeBg
|
|
57
64
|
}, on && activeShadow, {
|
|
58
65
|
opacity: pressed ? 0.85 : 1
|
|
59
66
|
}],
|
|
60
67
|
children: /*#__PURE__*/_jsx(Text, {
|
|
61
|
-
style:
|
|
68
|
+
style: {
|
|
69
|
+
fontSize: sizing.fs,
|
|
62
70
|
color: on ? c.foreground : c.foregroundSubtle,
|
|
63
71
|
fontWeight: on ? fw.semi : fw.medium
|
|
64
|
-
}
|
|
72
|
+
},
|
|
65
73
|
numberOfLines: 1,
|
|
66
74
|
children: it.label
|
|
67
75
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","Pressable","fw","useTheme","useThemedStyles","childTestID","makeStyles","jsx","_jsx","Segmented","value","onChange","items","disabled","testID","colors","c","scheme","shadow","styles","activeBg","surfaceContainerHighest","surface","activeShadow","subtle","style","seg","accessibilityRole","children","map","it","on","id","itemTestID","itemDisabled","onPress","accessibilityState","selected","accessibilityLabel","label","pressed","segItem","backgroundColor","opacity","
|
|
1
|
+
{"version":3,"names":["React","useMemo","Text","View","Pressable","fw","useTheme","useThemedStyles","childTestID","makeStyles","sizingFor","jsx","_jsx","Segmented","value","onChange","items","size","disabled","testID","colors","c","scheme","shadow","styles","sizing","activeBg","surfaceContainerHighest","surface","activeShadow","subtle","style","seg","accessibilityRole","children","map","it","on","id","itemTestID","itemDisabled","onPress","accessibilityState","selected","accessibilityLabel","label","pressed","segItem","minHeight","paddingHorizontal","px","backgroundColor","opacity","fontSize","fs","color","foreground","foregroundSubtle","fontWeight","semi","medium","numberOfLines"],"sourceRoot":"../../../../../src","sources":["components/ui/Segmented/Segmented.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,8BAA8B;AACxD,SAASC,EAAE,EAAEC,QAAQ,EAAEC,eAAe,QAAQ,yBAAgB;AAC9D,SAASC,WAAW,QAAQ,gCAAuB;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CAACqB,EAAE,CAACE,EAAE,CAAE;UAChDpB,QAAQ,EAAEsB,YAAa;UACvBP,iBAAiB,EAAC,KAAK;UACvBS,kBAAkB,EAAE;YAAEC,QAAQ,EAAEN,EAAE;YAAEnB,QAAQ,EAAEsB;UAAa,CAAE;UAC7DI,kBAAkB,EAAER,EAAE,CAACS,KAAM;UAC7B1B,MAAM,EAAEoB,UAAW;UACnBR,KAAK,EAAEA,CAAC;YAAEe;UAAQ,CAAC,KAAK,CACtBtB,MAAM,CAACuB,OAAO,EACd;YAAEC,SAAS,EAAEvB,MAAM,CAACuB,SAAS;YAAEC,iBAAiB,EAAExB,MAAM,CAACyB;UAAG,CAAC,EAC7Db,EAAE,IAAI;YAAEc,eAAe,EAAEzB;UAAS,CAAC,EACnCW,EAAE,IAAIR,YAAY,EAClB;YAAEuB,OAAO,EAAEN,OAAO,GAAG,IAAI,GAAG;UAAE,CAAC,CAC/B;UAAAZ,QAAA,eAEFtB,IAAA,CAACV,IAAI;YACH6B,KAAK,EAAE;cACLsB,QAAQ,EAAE5B,MAAM,CAAC6B,EAAE;cACnBC,KAAK,EAAElB,EAAE,GAAGhB,CAAC,CAACmC,UAAU,GAAGnC,CAAC,CAACoC,gBAAgB;cAC7CC,UAAU,EAAErB,EAAE,GAAGhC,EAAE,CAACsD,IAAI,GAAGtD,EAAE,CAACuD;YAChC,CAAE;YACFC,aAAa,EAAE,CAAE;YAAA3B,QAAA,EAEhBE,EAAE,CAACS;UAAK,CACL;QAAC,GAxBFT,EAAE,CAACE,EAyBC,CAAC;MAEhB,CAAC;IAAC,CACE;EAAC;AAEX","ignoreList":[]}
|
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import { StyleSheet } from 'react-native';
|
|
4
4
|
import { fixed, r, radius, space, type as t } from "../../../theme/index.js";
|
|
5
|
+
/** sm 紧凑高 —— 取 control.sm 的设计基准值 28,但**物理常量、不缩放**
|
|
6
|
+
* (与 md 的 fixed.hitTarget 同基准)。
|
|
7
|
+
* 为何不直接用 scaled `control.sm`:大屏 `r(28)` 会涨过 md 的 44(size 语义反转,
|
|
8
|
+
* sm 反而比 md 高)。固定 28:各屏恒 < 44、与 md 维持稳定比例。 */
|
|
9
|
+
const SM_MIN_HEIGHT = 28;
|
|
10
|
+
|
|
11
|
+
/** Segmented 静态 base —— track chrome 与 item 居中/圆角(size-invariant)。
|
|
12
|
+
* 随 size 变化的 minHeight / paddingHorizontal / fontSize 由 sizingFor(size) 注入。 */
|
|
5
13
|
export const makeStyles = c => StyleSheet.create({
|
|
6
14
|
seg: {
|
|
7
15
|
flexDirection: 'row',
|
|
@@ -11,16 +19,35 @@ export const makeStyles = c => StyleSheet.create({
|
|
|
11
19
|
alignSelf: 'flex-start'
|
|
12
20
|
},
|
|
13
21
|
segItem: {
|
|
14
|
-
// [M-7] Segmented item 高原为 control.sm≈28pt < 44pt;
|
|
15
|
-
// hitSlop 不越父 seg 容器边界 → 改用 minHeight 直接对齐 fixed.hitTarget(44pt)
|
|
16
|
-
minHeight: fixed.hitTarget,
|
|
17
|
-
paddingHorizontal: space[7],
|
|
18
22
|
alignItems: 'center',
|
|
19
23
|
justifyContent: 'center',
|
|
20
24
|
borderRadius: radius.sm
|
|
21
|
-
},
|
|
22
|
-
segLabel: {
|
|
23
|
-
fontSize: t.xs
|
|
24
25
|
}
|
|
25
26
|
});
|
|
27
|
+
|
|
28
|
+
/** Segmented 尺寸推导:2 档 size → { minHeight, px, fs }。
|
|
29
|
+
* 新增 size 在 types.ts 扩 union + 这里加 case(与 Button.sizingFor 同范式)。
|
|
30
|
+
*
|
|
31
|
+
* [M-7] 触控目标:item 嵌在 seg track 内,hitSlop 不越父 track 边界
|
|
32
|
+
* (≠ Button/Chip 能向外补 hitSlop)→ 只能靠 item minHeight 自撑高 track。
|
|
33
|
+
* - md(默认):minHeight = fixed.hitTarget(44pt 物理常量),触控达标,行为同改前。
|
|
34
|
+
* - sm(紧凑):minHeight = SM_MIN_HEIGHT(28pt 物理常量),为模型下拉等局促位主动小一号,
|
|
35
|
+
* 接受 sub-44pt 触控(调用方按场景 opt-in);a11y role/state 不变。
|
|
36
|
+
* px / fs 走 scaled token(space/type),与 md 同基准 → sm 恒小于 md。 */
|
|
37
|
+
export function sizingFor(size) {
|
|
38
|
+
switch (size) {
|
|
39
|
+
case 'sm':
|
|
40
|
+
return {
|
|
41
|
+
minHeight: SM_MIN_HEIGHT,
|
|
42
|
+
px: space['5'],
|
|
43
|
+
fs: t.xxs
|
|
44
|
+
};
|
|
45
|
+
case 'md':
|
|
46
|
+
return {
|
|
47
|
+
minHeight: fixed.hitTarget,
|
|
48
|
+
px: space['7'],
|
|
49
|
+
fs: t.xs
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
26
53
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","fixed","r","radius","space","type","t","makeStyles","c","create","seg","flexDirection","backgroundColor","surfaceContainerHigh","borderRadius","md","padding","alignSelf","segItem","
|
|
1
|
+
{"version":3,"names":["StyleSheet","fixed","r","radius","space","type","t","SM_MIN_HEIGHT","makeStyles","c","create","seg","flexDirection","backgroundColor","surfaceContainerHigh","borderRadius","md","padding","alignSelf","segItem","alignItems","justifyContent","sm","sizingFor","size","minHeight","px","fs","xxs","hitTarget","xs"],"sourceRoot":"../../../../../src","sources":["components/ui/Segmented/styles.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,SAASC,KAAK,EAAEC,CAAC,EAAEC,MAAM,EAAEC,KAAK,EAAEC,IAAI,IAAIC,CAAC,QAAQ,yBAAgB;AAGnE;AACA;AACA;AACA;AACA,MAAMC,aAAa,GAAG,EAAE;;AAExB;AACA;AACA,OAAO,MAAMC,UAAU,GAAIC,CAAc,IACvCT,UAAU,CAACU,MAAM,CAAC;EAChBC,GAAG,EAAE;IACHC,aAAa,EAAE,KAAK;IACpBC,eAAe,EAAEJ,CAAC,CAACK,oBAAoB;IACvCC,YAAY,EAAEZ,MAAM,CAACa,EAAE;IACvBC,OAAO,EAAEf,CAAC,CAAC,CAAC,CAAC;IACbgB,SAAS,EAAE;EACb,CAAC;EACDC,OAAO,EAAE;IACPC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBN,YAAY,EAAEZ,MAAM,CAACmB;EACvB;AACF,CAAC,CAAC;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CAACC,IAAmB,EAAmB;EAC9D,QAAQA,IAAI;IACV,KAAK,IAAI;MACP,OAAO;QAAEC,SAAS,EAAElB,aAAa;QAAEmB,EAAE,EAAEtB,KAAK,CAAC,GAAG,CAAC;QAAEuB,EAAE,EAAErB,CAAC,CAACsB;MAAI,CAAC;IAChE,KAAK,IAAI;MACP,OAAO;QAAEH,SAAS,EAAExB,KAAK,CAAC4B,SAAS;QAAEH,EAAE,EAAEtB,KAAK,CAAC,GAAG,CAAC;QAAEuB,EAAE,EAAErB,CAAC,CAACwB;MAAG,CAAC;EACnE;AACF","ignoreList":[]}
|
|
@@ -27,12 +27,7 @@ export declare const makeAvatarStyles: (size: number, ringColor: string, shadowS
|
|
|
27
27
|
shell: {
|
|
28
28
|
alignItems: "center";
|
|
29
29
|
justifyContent: "center";
|
|
30
|
-
top?: import("react-native").DimensionValue;
|
|
31
|
-
bottom?: import("react-native").DimensionValue;
|
|
32
30
|
filter?: ReadonlyArray<import("react-native").FilterFunction> | string;
|
|
33
|
-
opacity?: number;
|
|
34
|
-
width: import("react-native").DimensionValue;
|
|
35
|
-
height: import("react-native").DimensionValue;
|
|
36
31
|
shadowColor?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheetTypes").____ColorValue_Internal;
|
|
37
32
|
shadowOffset?: Readonly<{
|
|
38
33
|
width?: number;
|
|
@@ -104,6 +99,7 @@ export declare const makeAvatarStyles: (size: number, ringColor: string, shadowS
|
|
|
104
99
|
borderRightWidth?: number;
|
|
105
100
|
borderStartWidth?: number;
|
|
106
101
|
borderTopWidth?: number;
|
|
102
|
+
opacity?: number;
|
|
107
103
|
outlineColor?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheetTypes").____ColorValue_Internal;
|
|
108
104
|
outlineOffset?: number;
|
|
109
105
|
outlineStyle?: "solid" | "dotted" | "dashed";
|
|
@@ -119,10 +115,14 @@ export declare const makeAvatarStyles: (size: number, ringColor: string, shadowS
|
|
|
119
115
|
experimental_backgroundRepeat?: ReadonlyArray<import("react-native/types_generated/Libraries/StyleSheet/StyleSheetTypes").BackgroundRepeatValue> | string;
|
|
120
116
|
isolation?: "auto" | "isolate";
|
|
121
117
|
display?: "none" | "flex" | "contents";
|
|
118
|
+
width: import("react-native").DimensionValue;
|
|
119
|
+
height: import("react-native").DimensionValue;
|
|
120
|
+
bottom?: import("react-native").DimensionValue;
|
|
122
121
|
end?: import("react-native").DimensionValue;
|
|
123
122
|
left?: import("react-native").DimensionValue;
|
|
124
123
|
right?: import("react-native").DimensionValue;
|
|
125
124
|
start?: import("react-native").DimensionValue;
|
|
125
|
+
top?: import("react-native").DimensionValue;
|
|
126
126
|
inset?: import("react-native").DimensionValue;
|
|
127
127
|
insetBlock?: import("react-native").DimensionValue;
|
|
128
128
|
insetBlockEnd?: import("react-native").DimensionValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/business/AvatarWithRing/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAS,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAKzD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,gBAAgB,GAC3B,MAAM,MAAM,EACZ,WAAW,MAAM,EACjB,aAAa,SAAS,EACtB,GAAG,WAAW
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/business/AvatarWithRing/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAS,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAKzD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,gBAAgB,GAC3B,MAAM,MAAM,EACZ,WAAW,MAAM,EACjB,aAAa,SAAS,EACtB,GAAG,WAAW;;;;;;;;;;;qBAkDu9tB,CAAC;sBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAD5/tB,CAAC"}
|
|
@@ -136,7 +136,7 @@ export declare const Input: import("react").ForwardRefExoticComponent<Omit<Reado
|
|
|
136
136
|
pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined;
|
|
137
137
|
removeClippedSubviews?: boolean | undefined;
|
|
138
138
|
experimental_accessibilityOrder?: Array<string> | undefined;
|
|
139
|
-
}>, never>>, "style" | "experimental_accessibilityOrder">, "value" | "textAlign" | "style" | "onBlur" | "onFocus" | "lineBreakStrategyIOS" | "selectionColor" | "textBreakStrategy" | "allowFontScaling" | "maxFontSizeMultiplier" | "numberOfLines" | "
|
|
139
|
+
}>, never>>, "style" | "experimental_accessibilityOrder">, "value" | "textAlign" | "onChange" | "style" | "onBlur" | "onFocus" | "onPress" | "lineBreakStrategyIOS" | "selectionColor" | "textBreakStrategy" | "allowFontScaling" | "maxFontSizeMultiplier" | "numberOfLines" | "onPressIn" | "onPressOut" | "disableKeyboardShortcuts" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "inputAccessoryViewID" | "inputAccessoryViewButtonLabel" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "scrollEnabled" | "spellCheck" | "textContentType" | "lineBreakModeIOS" | "smartInsertDelete" | "cursorColor" | "selectionHandleColor" | "disableFullscreenUI" | "importantForAutofill" | "inlineImageLeft" | "inlineImagePadding" | "returnKeyLabel" | "rows" | "showSoftInputOnFocus" | "underlineColorAndroid" | "experimental_acceptDragAndDropTypes" | "autoCapitalize" | "autoComplete" | "autoCorrect" | "autoFocus" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "forwardedRef" | "enterKeyHint" | "inputMode" | "keyboardType" | "maxLength" | "multiline" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onKeyPress" | "onSelectionChange" | "onSubmitEditing" | "onScroll" | "placeholder" | "placeholderTextColor" | "readOnly" | "returnKeyType" | "secureTextEntry" | "selection" | "selectTextOnFocus" | "blurOnSubmit" | "submitBehavior"> & Omit<Readonly<{
|
|
140
140
|
disableKeyboardShortcuts?: boolean | undefined;
|
|
141
141
|
clearButtonMode?: ("never" | "while-editing" | "unless-editing" | "always") | undefined;
|
|
142
142
|
clearTextOnFocus?: boolean | undefined;
|
|
@@ -153,7 +153,7 @@ export declare const Input: import("react").ForwardRefExoticComponent<Omit<Reado
|
|
|
153
153
|
lineBreakStrategyIOS?: ("none" | "standard" | "hangul-word" | "push-out") | undefined;
|
|
154
154
|
lineBreakModeIOS?: ("wordWrapping" | "char" | "clip" | "head" | "middle" | "tail") | undefined;
|
|
155
155
|
smartInsertDelete?: boolean | undefined;
|
|
156
|
-
}>, "value" | "textAlign" | "style" | "onBlur" | "onFocus" | "selectionColor" | "textBreakStrategy" | "allowFontScaling" | "maxFontSizeMultiplier" | "numberOfLines" | "
|
|
156
|
+
}>, "value" | "textAlign" | "onChange" | "style" | "onBlur" | "onFocus" | "onPress" | "selectionColor" | "textBreakStrategy" | "allowFontScaling" | "maxFontSizeMultiplier" | "numberOfLines" | "onPressIn" | "onPressOut" | "cursorColor" | "selectionHandleColor" | "disableFullscreenUI" | "importantForAutofill" | "inlineImageLeft" | "inlineImagePadding" | "returnKeyLabel" | "rows" | "showSoftInputOnFocus" | "underlineColorAndroid" | "experimental_acceptDragAndDropTypes" | "autoCapitalize" | "autoComplete" | "autoCorrect" | "autoFocus" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "forwardedRef" | "enterKeyHint" | "inputMode" | "keyboardType" | "maxLength" | "multiline" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onKeyPress" | "onSelectionChange" | "onSubmitEditing" | "onScroll" | "placeholder" | "placeholderTextColor" | "readOnly" | "returnKeyType" | "secureTextEntry" | "selection" | "selectTextOnFocus" | "blurOnSubmit" | "submitBehavior"> & Omit<Readonly<{
|
|
157
157
|
cursorColor?: import("react-native").ColorValue | undefined;
|
|
158
158
|
selectionHandleColor?: import("react-native").ColorValue | undefined;
|
|
159
159
|
disableFullscreenUI?: boolean | undefined;
|
|
@@ -166,7 +166,7 @@ export declare const Input: import("react").ForwardRefExoticComponent<Omit<Reado
|
|
|
166
166
|
showSoftInputOnFocus?: boolean | undefined;
|
|
167
167
|
textBreakStrategy?: ("simple" | "highQuality" | "balanced") | undefined;
|
|
168
168
|
underlineColorAndroid?: import("react-native").ColorValue | undefined;
|
|
169
|
-
}>, "value" | "textAlign" | "style" | "onBlur" | "onFocus" | "
|
|
169
|
+
}>, "value" | "textAlign" | "onChange" | "style" | "onBlur" | "onFocus" | "onPress" | "selectionColor" | "allowFontScaling" | "maxFontSizeMultiplier" | "onPressIn" | "onPressOut" | "experimental_acceptDragAndDropTypes" | "autoCapitalize" | "autoComplete" | "autoCorrect" | "autoFocus" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "forwardedRef" | "enterKeyHint" | "inputMode" | "keyboardType" | "maxLength" | "multiline" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onKeyPress" | "onSelectionChange" | "onSubmitEditing" | "onScroll" | "placeholder" | "placeholderTextColor" | "readOnly" | "returnKeyType" | "secureTextEntry" | "selection" | "selectTextOnFocus" | "blurOnSubmit" | "submitBehavior"> & Omit<Readonly<{
|
|
170
170
|
experimental_acceptDragAndDropTypes?: ReadonlyArray<string> | undefined;
|
|
171
171
|
autoCapitalize?: import("react-native").AutoCapitalize | undefined;
|
|
172
172
|
autoComplete?: ("additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | "cc-exp-day" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "cc-name" | "cc-given-name" | "cc-middle-name" | "cc-family-name" | "cc-type" | "country" | "current-password" | "email" | "family-name" | "gender" | "given-name" | "honorific-prefix" | "honorific-suffix" | "name" | "name-family" | "name-given" | "name-middle" | "name-middle-initial" | "name-prefix" | "name-suffix" | "new-password" | "nickname" | "one-time-code" | "organization" | "organization-title" | "password" | "password-new" | "postal-address" | "postal-address-country" | "postal-address-extended" | "postal-address-extended-postal-code" | "postal-address-locality" | "postal-address-region" | "postal-code" | "street-address" | "sms-otp" | "tel" | "tel-country-code" | "tel-national" | "tel-device" | "url" | "username" | "username-new" | "off") | undefined;
|
|
@@ -295,7 +295,7 @@ export declare const Input: import("react").ForwardRefExoticComponent<Omit<Reado
|
|
|
295
295
|
rowGap?: number | string;
|
|
296
296
|
columnGap?: number | string;
|
|
297
297
|
gap?: number | string;
|
|
298
|
-
}>, "filter" | "
|
|
298
|
+
}>, "filter" | "shadowColor" | "shadowOffset" | "shadowOpacity" | "shadowRadius" | "transform" | "transformOrigin" | "backfaceVisibility" | "backgroundColor" | "borderColor" | "borderCurve" | "borderBottomColor" | "borderEndColor" | "borderLeftColor" | "borderRightColor" | "borderStartColor" | "borderTopColor" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockStartColor" | "borderRadius" | "borderBottomEndRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStartRadius" | "borderEndEndRadius" | "borderEndStartRadius" | "borderStartEndRadius" | "borderStartStartRadius" | "borderTopEndRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStartRadius" | "borderStyle" | "borderWidth" | "borderBottomWidth" | "borderEndWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStartWidth" | "borderTopWidth" | "opacity" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "elevation" | "pointerEvents" | "cursor" | "boxShadow" | "mixBlendMode" | "experimental_backgroundImage" | "experimental_backgroundSize" | "experimental_backgroundPosition" | "experimental_backgroundRepeat" | "isolation"> & Omit<Readonly<Omit<Readonly<{
|
|
299
299
|
shadowColor?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheetTypes").____ColorValue_Internal;
|
|
300
300
|
shadowOffset?: Readonly<{
|
|
301
301
|
width?: number;
|
|
@@ -303,7 +303,7 @@ export declare const Input: import("react").ForwardRefExoticComponent<Omit<Reado
|
|
|
303
303
|
}>;
|
|
304
304
|
shadowOpacity?: number;
|
|
305
305
|
shadowRadius?: number;
|
|
306
|
-
}>, never> & Omit<Readonly<{}>, never>>, "filter" | "
|
|
306
|
+
}>, never> & Omit<Readonly<{}>, never>>, "filter" | "transform" | "transformOrigin" | "backfaceVisibility" | "backgroundColor" | "borderColor" | "borderCurve" | "borderBottomColor" | "borderEndColor" | "borderLeftColor" | "borderRightColor" | "borderStartColor" | "borderTopColor" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockStartColor" | "borderRadius" | "borderBottomEndRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStartRadius" | "borderEndEndRadius" | "borderEndStartRadius" | "borderStartEndRadius" | "borderStartStartRadius" | "borderTopEndRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStartRadius" | "borderStyle" | "borderWidth" | "borderBottomWidth" | "borderEndWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStartWidth" | "borderTopWidth" | "opacity" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "elevation" | "pointerEvents" | "cursor" | "boxShadow" | "mixBlendMode" | "experimental_backgroundImage" | "experimental_backgroundSize" | "experimental_backgroundPosition" | "experimental_backgroundRepeat" | "isolation"> & Omit<Readonly<{
|
|
307
307
|
transform?: ReadonlyArray<Readonly<import("react-native/types_generated/Libraries/StyleSheet/private/_TransformStyle").MaximumOneOf<import("react-native/types_generated/Libraries/StyleSheet/private/_TransformStyle").MergeUnion<{
|
|
308
308
|
readonly perspective: number | import("react-native/types_generated/Libraries/Animated/AnimatedExports").Node;
|
|
309
309
|
} | {
|
|
@@ -334,7 +334,7 @@ export declare const Input: import("react").ForwardRefExoticComponent<Omit<Reado
|
|
|
334
334
|
readonly matrix: ReadonlyArray<number | import("react-native/types_generated/Libraries/Animated/AnimatedExports").Node> | import("react-native/types_generated/Libraries/Animated/AnimatedExports").Node;
|
|
335
335
|
}>>>> | string;
|
|
336
336
|
transformOrigin?: [string | number, string | number, string | number] | string;
|
|
337
|
-
}>, "filter" | "
|
|
337
|
+
}>, "filter" | "backfaceVisibility" | "backgroundColor" | "borderColor" | "borderCurve" | "borderBottomColor" | "borderEndColor" | "borderLeftColor" | "borderRightColor" | "borderStartColor" | "borderTopColor" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockStartColor" | "borderRadius" | "borderBottomEndRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStartRadius" | "borderEndEndRadius" | "borderEndStartRadius" | "borderStartEndRadius" | "borderStartStartRadius" | "borderTopEndRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStartRadius" | "borderStyle" | "borderWidth" | "borderBottomWidth" | "borderEndWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStartWidth" | "borderTopWidth" | "opacity" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "elevation" | "pointerEvents" | "cursor" | "boxShadow" | "mixBlendMode" | "experimental_backgroundImage" | "experimental_backgroundSize" | "experimental_backgroundPosition" | "experimental_backgroundRepeat" | "isolation"> & Omit<Readonly<{
|
|
338
338
|
backfaceVisibility?: "visible" | "hidden";
|
|
339
339
|
backgroundColor?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheetTypes").____ColorValue_Internal;
|
|
340
340
|
borderColor?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheetTypes").____ColorValue_Internal;
|
|
@@ -133,7 +133,7 @@ export declare const Search: React.ForwardRefExoticComponent<Omit<Readonly<Omit<
|
|
|
133
133
|
pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined;
|
|
134
134
|
removeClippedSubviews?: boolean | undefined;
|
|
135
135
|
experimental_accessibilityOrder?: Array<string> | undefined;
|
|
136
|
-
}>, never>>, "style" | "experimental_accessibilityOrder">, "value" | "textAlign" | "style" | "onBlur" | "onFocus" | "lineBreakStrategyIOS" | "selectionColor" | "textBreakStrategy" | "allowFontScaling" | "maxFontSizeMultiplier" | "numberOfLines" | "
|
|
136
|
+
}>, never>>, "style" | "experimental_accessibilityOrder">, "value" | "textAlign" | "onChange" | "style" | "onBlur" | "onFocus" | "onPress" | "lineBreakStrategyIOS" | "selectionColor" | "textBreakStrategy" | "allowFontScaling" | "maxFontSizeMultiplier" | "numberOfLines" | "onPressIn" | "onPressOut" | "disableKeyboardShortcuts" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "inputAccessoryViewID" | "inputAccessoryViewButtonLabel" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "scrollEnabled" | "spellCheck" | "textContentType" | "lineBreakModeIOS" | "smartInsertDelete" | "cursorColor" | "selectionHandleColor" | "disableFullscreenUI" | "importantForAutofill" | "inlineImageLeft" | "inlineImagePadding" | "returnKeyLabel" | "rows" | "showSoftInputOnFocus" | "underlineColorAndroid" | "experimental_acceptDragAndDropTypes" | "autoCapitalize" | "autoComplete" | "autoCorrect" | "autoFocus" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "forwardedRef" | "enterKeyHint" | "inputMode" | "keyboardType" | "maxLength" | "multiline" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onKeyPress" | "onSelectionChange" | "onSubmitEditing" | "onScroll" | "placeholder" | "placeholderTextColor" | "readOnly" | "returnKeyType" | "secureTextEntry" | "selection" | "selectTextOnFocus" | "blurOnSubmit" | "submitBehavior"> & Omit<Readonly<{
|
|
137
137
|
disableKeyboardShortcuts?: boolean | undefined;
|
|
138
138
|
clearButtonMode?: ("never" | "while-editing" | "unless-editing" | "always") | undefined;
|
|
139
139
|
clearTextOnFocus?: boolean | undefined;
|
|
@@ -150,7 +150,7 @@ export declare const Search: React.ForwardRefExoticComponent<Omit<Readonly<Omit<
|
|
|
150
150
|
lineBreakStrategyIOS?: ("none" | "standard" | "hangul-word" | "push-out") | undefined;
|
|
151
151
|
lineBreakModeIOS?: ("wordWrapping" | "char" | "clip" | "head" | "middle" | "tail") | undefined;
|
|
152
152
|
smartInsertDelete?: boolean | undefined;
|
|
153
|
-
}>, "value" | "textAlign" | "style" | "onBlur" | "onFocus" | "selectionColor" | "textBreakStrategy" | "allowFontScaling" | "maxFontSizeMultiplier" | "numberOfLines" | "
|
|
153
|
+
}>, "value" | "textAlign" | "onChange" | "style" | "onBlur" | "onFocus" | "onPress" | "selectionColor" | "textBreakStrategy" | "allowFontScaling" | "maxFontSizeMultiplier" | "numberOfLines" | "onPressIn" | "onPressOut" | "cursorColor" | "selectionHandleColor" | "disableFullscreenUI" | "importantForAutofill" | "inlineImageLeft" | "inlineImagePadding" | "returnKeyLabel" | "rows" | "showSoftInputOnFocus" | "underlineColorAndroid" | "experimental_acceptDragAndDropTypes" | "autoCapitalize" | "autoComplete" | "autoCorrect" | "autoFocus" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "forwardedRef" | "enterKeyHint" | "inputMode" | "keyboardType" | "maxLength" | "multiline" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onKeyPress" | "onSelectionChange" | "onSubmitEditing" | "onScroll" | "placeholder" | "placeholderTextColor" | "readOnly" | "returnKeyType" | "secureTextEntry" | "selection" | "selectTextOnFocus" | "blurOnSubmit" | "submitBehavior"> & Omit<Readonly<{
|
|
154
154
|
cursorColor?: import("react-native").ColorValue | undefined;
|
|
155
155
|
selectionHandleColor?: import("react-native").ColorValue | undefined;
|
|
156
156
|
disableFullscreenUI?: boolean | undefined;
|
|
@@ -163,7 +163,7 @@ export declare const Search: React.ForwardRefExoticComponent<Omit<Readonly<Omit<
|
|
|
163
163
|
showSoftInputOnFocus?: boolean | undefined;
|
|
164
164
|
textBreakStrategy?: ("simple" | "highQuality" | "balanced") | undefined;
|
|
165
165
|
underlineColorAndroid?: import("react-native").ColorValue | undefined;
|
|
166
|
-
}>, "value" | "textAlign" | "style" | "onBlur" | "onFocus" | "
|
|
166
|
+
}>, "value" | "textAlign" | "onChange" | "style" | "onBlur" | "onFocus" | "onPress" | "selectionColor" | "allowFontScaling" | "maxFontSizeMultiplier" | "onPressIn" | "onPressOut" | "experimental_acceptDragAndDropTypes" | "autoCapitalize" | "autoComplete" | "autoCorrect" | "autoFocus" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "forwardedRef" | "enterKeyHint" | "inputMode" | "keyboardType" | "maxLength" | "multiline" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onKeyPress" | "onSelectionChange" | "onSubmitEditing" | "onScroll" | "placeholder" | "placeholderTextColor" | "readOnly" | "returnKeyType" | "secureTextEntry" | "selection" | "selectTextOnFocus" | "blurOnSubmit" | "submitBehavior"> & Omit<Readonly<{
|
|
167
167
|
experimental_acceptDragAndDropTypes?: ReadonlyArray<string> | undefined;
|
|
168
168
|
autoCapitalize?: import("react-native").AutoCapitalize | undefined;
|
|
169
169
|
autoComplete?: ("additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | "cc-exp-day" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "cc-name" | "cc-given-name" | "cc-middle-name" | "cc-family-name" | "cc-type" | "country" | "current-password" | "email" | "family-name" | "gender" | "given-name" | "honorific-prefix" | "honorific-suffix" | "name" | "name-family" | "name-given" | "name-middle" | "name-middle-initial" | "name-prefix" | "name-suffix" | "new-password" | "nickname" | "one-time-code" | "organization" | "organization-title" | "password" | "password-new" | "postal-address" | "postal-address-country" | "postal-address-extended" | "postal-address-extended-postal-code" | "postal-address-locality" | "postal-address-region" | "postal-code" | "street-address" | "sms-otp" | "tel" | "tel-country-code" | "tel-national" | "tel-device" | "url" | "username" | "username-new" | "off") | undefined;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SegmentedProps } from './types';
|
|
3
3
|
/**
|
|
4
|
-
* 局部分段控件 ——
|
|
4
|
+
* 局部分段控件 —— pill 在 track 上,激活项是亮色 thumb。
|
|
5
5
|
*
|
|
6
6
|
* **active thumb 必须比 track 亮一档** —— shadow 只在亮色态显示,
|
|
7
7
|
* 暗色态由 surface 明度差表达层级。
|
|
8
|
+
*
|
|
9
|
+
* `size`:默认 `'md'`(44pt 触控达标);`'sm'` 紧凑(28pt)给模型下拉等局促位用。
|
|
8
10
|
*/
|
|
9
|
-
export declare function Segmented({ value, onChange, items, disabled, testID, }: SegmentedProps): React.JSX.Element;
|
|
11
|
+
export declare function Segmented({ value, onChange, items, size, disabled, testID, }: SegmentedProps): React.JSX.Element;
|
|
10
12
|
//# sourceMappingURL=Segmented.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Segmented.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Segmented/Segmented.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Segmented.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Segmented/Segmented.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAMvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,KAAK,EACL,IAAW,EACX,QAAgB,EAChB,MAAM,GACP,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA+CpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Segmented/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Segmented/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { ColorTokens } from '../../../theme';
|
|
2
|
+
import type { SegmentedSize, SegmentedSizing } from './types';
|
|
3
|
+
/** Segmented 静态 base —— track chrome 与 item 居中/圆角(size-invariant)。
|
|
4
|
+
* 随 size 变化的 minHeight / paddingHorizontal / fontSize 由 sizingFor(size) 注入。 */
|
|
2
5
|
export declare const makeStyles: (c: ColorTokens) => Readonly<{
|
|
3
6
|
seg: {
|
|
4
7
|
flexDirection: "row";
|
|
@@ -8,14 +11,19 @@ export declare const makeStyles: (c: ColorTokens) => Readonly<{
|
|
|
8
11
|
alignSelf: "flex-start";
|
|
9
12
|
};
|
|
10
13
|
segItem: {
|
|
11
|
-
minHeight: 44;
|
|
12
|
-
paddingHorizontal: number;
|
|
13
14
|
alignItems: "center";
|
|
14
15
|
justifyContent: "center";
|
|
15
16
|
borderRadius: number;
|
|
16
17
|
};
|
|
17
|
-
segLabel: {
|
|
18
|
-
fontSize: number;
|
|
19
|
-
};
|
|
20
18
|
}>;
|
|
19
|
+
/** Segmented 尺寸推导:2 档 size → { minHeight, px, fs }。
|
|
20
|
+
* 新增 size 在 types.ts 扩 union + 这里加 case(与 Button.sizingFor 同范式)。
|
|
21
|
+
*
|
|
22
|
+
* [M-7] 触控目标:item 嵌在 seg track 内,hitSlop 不越父 track 边界
|
|
23
|
+
* (≠ Button/Chip 能向外补 hitSlop)→ 只能靠 item minHeight 自撑高 track。
|
|
24
|
+
* - md(默认):minHeight = fixed.hitTarget(44pt 物理常量),触控达标,行为同改前。
|
|
25
|
+
* - sm(紧凑):minHeight = SM_MIN_HEIGHT(28pt 物理常量),为模型下拉等局促位主动小一号,
|
|
26
|
+
* 接受 sub-44pt 触控(调用方按场景 opt-in);a11y role/state 不变。
|
|
27
|
+
* px / fs 走 scaled token(space/type),与 md 同基准 → sm 恒小于 md。 */
|
|
28
|
+
export declare function sizingFor(size: SegmentedSize): SegmentedSizing;
|
|
21
29
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Segmented/styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Segmented/styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAQ9D;gFACgF;AAChF,eAAO,MAAM,UAAU,GAAI,GAAG,WAAW;;;;;;;;;;;;;EAcrC,CAAC;AAEL;;;;;;;;+DAQ+D;AAC/D,wBAAgB,SAAS,CAAC,IAAI,EAAE,aAAa,GAAG,eAAe,CAO9D"}
|
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
import type { TabItem } from '../Tabs';
|
|
2
|
+
/** Segmented 尺寸:`md`=默认(达标 44pt 触控) / `sm`=紧凑(28pt,模型下拉等局促位)。 */
|
|
3
|
+
export type SegmentedSize = 'sm' | 'md';
|
|
2
4
|
/** Segmented 与 Tabs 共用 item 形状;命名独立以表达控件意图差异。 */
|
|
3
5
|
export type SegmentedProps = {
|
|
4
6
|
value: string;
|
|
5
7
|
onChange: (id: string) => void;
|
|
6
8
|
items: TabItem[];
|
|
9
|
+
/** 尺寸,默认 `'md'`。`'sm'` 给模型下拉等局促位用——更小,触控 < 44pt(见 styles.sizingFor) */
|
|
10
|
+
size?: SegmentedSize;
|
|
7
11
|
/** [L-82] 整体禁用 —— 所有 item 不可点击,a11y state 同步 */
|
|
8
12
|
disabled?: boolean;
|
|
9
13
|
/** 容器 testID;item testID 自动派生为 `${testID}-${id}` */
|
|
10
14
|
testID?: string;
|
|
11
15
|
};
|
|
16
|
+
/** sizingFor(size) 的返回:Segmented item 随 size 变化的 3 个量。
|
|
17
|
+
* 形状只取 Segmented 实际可变的维度(圆角固定 radius.sm、item 间无 gap,故无 br/gap)。 */
|
|
18
|
+
export type SegmentedSizing = {
|
|
19
|
+
/** item 最小高度(撑起 track 高度;也是触控目标——见 sizingFor 的 [M-7] 注释) */
|
|
20
|
+
minHeight: number;
|
|
21
|
+
/** item 水平 padding */
|
|
22
|
+
px: number;
|
|
23
|
+
/** label 字号 */
|
|
24
|
+
fs: number;
|
|
25
|
+
};
|
|
12
26
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Segmented/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,iDAAiD;AACjD,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Segmented/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,iEAAiE;AACjE,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,CAAC;AAExC,iDAAiD;AACjD,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,uEAAuE;IACvE,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;oEACoE;AACpE,MAAM,MAAM,eAAe,GAAG;IAC5B,4DAA4D;IAC5D,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,eAAe;IACf,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC"}
|
|
@@ -144,7 +144,7 @@ export declare const TextFieldBase: React.ForwardRefExoticComponent<Readonly<Omi
|
|
|
144
144
|
pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined;
|
|
145
145
|
removeClippedSubviews?: boolean | undefined;
|
|
146
146
|
experimental_accessibilityOrder?: Array<string> | undefined;
|
|
147
|
-
}>, never>>, "style" | "experimental_accessibilityOrder">, "value" | "textAlign" | "style" | "onBlur" | "onFocus" | "lineBreakStrategyIOS" | "selectionColor" | "textBreakStrategy" | "allowFontScaling" | "maxFontSizeMultiplier" | "numberOfLines" | "
|
|
147
|
+
}>, never>>, "style" | "experimental_accessibilityOrder">, "value" | "textAlign" | "onChange" | "style" | "onBlur" | "onFocus" | "onPress" | "lineBreakStrategyIOS" | "selectionColor" | "textBreakStrategy" | "allowFontScaling" | "maxFontSizeMultiplier" | "numberOfLines" | "onPressIn" | "onPressOut" | "disableKeyboardShortcuts" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "inputAccessoryViewID" | "inputAccessoryViewButtonLabel" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "scrollEnabled" | "spellCheck" | "textContentType" | "lineBreakModeIOS" | "smartInsertDelete" | "cursorColor" | "selectionHandleColor" | "disableFullscreenUI" | "importantForAutofill" | "inlineImageLeft" | "inlineImagePadding" | "returnKeyLabel" | "rows" | "showSoftInputOnFocus" | "underlineColorAndroid" | "experimental_acceptDragAndDropTypes" | "autoCapitalize" | "autoComplete" | "autoCorrect" | "autoFocus" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "forwardedRef" | "enterKeyHint" | "inputMode" | "keyboardType" | "maxLength" | "multiline" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onKeyPress" | "onSelectionChange" | "onSubmitEditing" | "onScroll" | "placeholder" | "placeholderTextColor" | "readOnly" | "returnKeyType" | "secureTextEntry" | "selection" | "selectTextOnFocus" | "blurOnSubmit" | "submitBehavior"> & Omit<Readonly<{
|
|
148
148
|
disableKeyboardShortcuts?: boolean | undefined;
|
|
149
149
|
clearButtonMode?: ("never" | "while-editing" | "unless-editing" | "always") | undefined;
|
|
150
150
|
clearTextOnFocus?: boolean | undefined;
|
|
@@ -161,7 +161,7 @@ export declare const TextFieldBase: React.ForwardRefExoticComponent<Readonly<Omi
|
|
|
161
161
|
lineBreakStrategyIOS?: ("none" | "standard" | "hangul-word" | "push-out") | undefined;
|
|
162
162
|
lineBreakModeIOS?: ("wordWrapping" | "char" | "clip" | "head" | "middle" | "tail") | undefined;
|
|
163
163
|
smartInsertDelete?: boolean | undefined;
|
|
164
|
-
}>, "value" | "textAlign" | "style" | "onBlur" | "onFocus" | "selectionColor" | "textBreakStrategy" | "allowFontScaling" | "maxFontSizeMultiplier" | "numberOfLines" | "
|
|
164
|
+
}>, "value" | "textAlign" | "onChange" | "style" | "onBlur" | "onFocus" | "onPress" | "selectionColor" | "textBreakStrategy" | "allowFontScaling" | "maxFontSizeMultiplier" | "numberOfLines" | "onPressIn" | "onPressOut" | "cursorColor" | "selectionHandleColor" | "disableFullscreenUI" | "importantForAutofill" | "inlineImageLeft" | "inlineImagePadding" | "returnKeyLabel" | "rows" | "showSoftInputOnFocus" | "underlineColorAndroid" | "experimental_acceptDragAndDropTypes" | "autoCapitalize" | "autoComplete" | "autoCorrect" | "autoFocus" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "forwardedRef" | "enterKeyHint" | "inputMode" | "keyboardType" | "maxLength" | "multiline" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onKeyPress" | "onSelectionChange" | "onSubmitEditing" | "onScroll" | "placeholder" | "placeholderTextColor" | "readOnly" | "returnKeyType" | "secureTextEntry" | "selection" | "selectTextOnFocus" | "blurOnSubmit" | "submitBehavior"> & Omit<Readonly<{
|
|
165
165
|
cursorColor?: import("react-native").ColorValue | undefined;
|
|
166
166
|
selectionHandleColor?: import("react-native").ColorValue | undefined;
|
|
167
167
|
disableFullscreenUI?: boolean | undefined;
|
|
@@ -174,7 +174,7 @@ export declare const TextFieldBase: React.ForwardRefExoticComponent<Readonly<Omi
|
|
|
174
174
|
showSoftInputOnFocus?: boolean | undefined;
|
|
175
175
|
textBreakStrategy?: ("simple" | "highQuality" | "balanced") | undefined;
|
|
176
176
|
underlineColorAndroid?: import("react-native").ColorValue | undefined;
|
|
177
|
-
}>, "value" | "textAlign" | "style" | "onBlur" | "onFocus" | "
|
|
177
|
+
}>, "value" | "textAlign" | "onChange" | "style" | "onBlur" | "onFocus" | "onPress" | "selectionColor" | "allowFontScaling" | "maxFontSizeMultiplier" | "onPressIn" | "onPressOut" | "experimental_acceptDragAndDropTypes" | "autoCapitalize" | "autoComplete" | "autoCorrect" | "autoFocus" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "forwardedRef" | "enterKeyHint" | "inputMode" | "keyboardType" | "maxLength" | "multiline" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onKeyPress" | "onSelectionChange" | "onSubmitEditing" | "onScroll" | "placeholder" | "placeholderTextColor" | "readOnly" | "returnKeyType" | "secureTextEntry" | "selection" | "selectTextOnFocus" | "blurOnSubmit" | "submitBehavior"> & Omit<Readonly<{
|
|
178
178
|
experimental_acceptDragAndDropTypes?: ReadonlyArray<string> | undefined;
|
|
179
179
|
autoCapitalize?: import("react-native").AutoCapitalize | undefined;
|
|
180
180
|
autoComplete?: ("additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | "cc-exp-day" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "cc-name" | "cc-given-name" | "cc-middle-name" | "cc-family-name" | "cc-type" | "country" | "current-password" | "email" | "family-name" | "gender" | "given-name" | "honorific-prefix" | "honorific-suffix" | "name" | "name-family" | "name-given" | "name-middle" | "name-middle-initial" | "name-prefix" | "name-suffix" | "new-password" | "nickname" | "one-time-code" | "organization" | "organization-title" | "password" | "password-new" | "postal-address" | "postal-address-country" | "postal-address-extended" | "postal-address-extended-postal-code" | "postal-address-locality" | "postal-address-region" | "postal-code" | "street-address" | "sms-otp" | "tel" | "tel-country-code" | "tel-national" | "tel-device" | "url" | "username" | "username-new" | "off") | undefined;
|
|
@@ -307,7 +307,7 @@ export declare const TextFieldBase: React.ForwardRefExoticComponent<Readonly<Omi
|
|
|
307
307
|
rowGap?: number | string;
|
|
308
308
|
columnGap?: number | string;
|
|
309
309
|
gap?: number | string;
|
|
310
|
-
}>, "filter" | "
|
|
310
|
+
}>, "filter" | "shadowColor" | "shadowOffset" | "shadowOpacity" | "shadowRadius" | "transform" | "transformOrigin" | "backfaceVisibility" | "backgroundColor" | "borderColor" | "borderCurve" | "borderBottomColor" | "borderEndColor" | "borderLeftColor" | "borderRightColor" | "borderStartColor" | "borderTopColor" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockStartColor" | "borderRadius" | "borderBottomEndRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStartRadius" | "borderEndEndRadius" | "borderEndStartRadius" | "borderStartEndRadius" | "borderStartStartRadius" | "borderTopEndRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStartRadius" | "borderStyle" | "borderWidth" | "borderBottomWidth" | "borderEndWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStartWidth" | "borderTopWidth" | "opacity" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "elevation" | "pointerEvents" | "cursor" | "boxShadow" | "mixBlendMode" | "experimental_backgroundImage" | "experimental_backgroundSize" | "experimental_backgroundPosition" | "experimental_backgroundRepeat" | "isolation"> & Omit<Readonly<Omit<Readonly<{
|
|
311
311
|
shadowColor?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheetTypes").____ColorValue_Internal;
|
|
312
312
|
shadowOffset?: Readonly<{
|
|
313
313
|
width?: number;
|
|
@@ -315,7 +315,7 @@ export declare const TextFieldBase: React.ForwardRefExoticComponent<Readonly<Omi
|
|
|
315
315
|
}>;
|
|
316
316
|
shadowOpacity?: number;
|
|
317
317
|
shadowRadius?: number;
|
|
318
|
-
}>, never> & Omit<Readonly<{}>, never>>, "filter" | "
|
|
318
|
+
}>, never> & Omit<Readonly<{}>, never>>, "filter" | "transform" | "transformOrigin" | "backfaceVisibility" | "backgroundColor" | "borderColor" | "borderCurve" | "borderBottomColor" | "borderEndColor" | "borderLeftColor" | "borderRightColor" | "borderStartColor" | "borderTopColor" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockStartColor" | "borderRadius" | "borderBottomEndRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStartRadius" | "borderEndEndRadius" | "borderEndStartRadius" | "borderStartEndRadius" | "borderStartStartRadius" | "borderTopEndRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStartRadius" | "borderStyle" | "borderWidth" | "borderBottomWidth" | "borderEndWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStartWidth" | "borderTopWidth" | "opacity" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "elevation" | "pointerEvents" | "cursor" | "boxShadow" | "mixBlendMode" | "experimental_backgroundImage" | "experimental_backgroundSize" | "experimental_backgroundPosition" | "experimental_backgroundRepeat" | "isolation"> & Omit<Readonly<{
|
|
319
319
|
transform?: ReadonlyArray<Readonly<import("react-native/types_generated/Libraries/StyleSheet/private/_TransformStyle").MaximumOneOf<import("react-native/types_generated/Libraries/StyleSheet/private/_TransformStyle").MergeUnion<{
|
|
320
320
|
readonly perspective: number | import("react-native/types_generated/Libraries/Animated/AnimatedExports").Node;
|
|
321
321
|
} | {
|
|
@@ -346,7 +346,7 @@ export declare const TextFieldBase: React.ForwardRefExoticComponent<Readonly<Omi
|
|
|
346
346
|
readonly matrix: ReadonlyArray<number | import("react-native/types_generated/Libraries/Animated/AnimatedExports").Node> | import("react-native/types_generated/Libraries/Animated/AnimatedExports").Node;
|
|
347
347
|
}>>>> | string;
|
|
348
348
|
transformOrigin?: [string | number, string | number, string | number] | string;
|
|
349
|
-
}>, "filter" | "
|
|
349
|
+
}>, "filter" | "backfaceVisibility" | "backgroundColor" | "borderColor" | "borderCurve" | "borderBottomColor" | "borderEndColor" | "borderLeftColor" | "borderRightColor" | "borderStartColor" | "borderTopColor" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockStartColor" | "borderRadius" | "borderBottomEndRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStartRadius" | "borderEndEndRadius" | "borderEndStartRadius" | "borderStartEndRadius" | "borderStartStartRadius" | "borderTopEndRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStartRadius" | "borderStyle" | "borderWidth" | "borderBottomWidth" | "borderEndWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStartWidth" | "borderTopWidth" | "opacity" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "elevation" | "pointerEvents" | "cursor" | "boxShadow" | "mixBlendMode" | "experimental_backgroundImage" | "experimental_backgroundSize" | "experimental_backgroundPosition" | "experimental_backgroundRepeat" | "isolation"> & Omit<Readonly<{
|
|
350
350
|
backfaceVisibility?: "visible" | "hidden";
|
|
351
351
|
backgroundColor?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheetTypes").____ColorValue_Internal;
|
|
352
352
|
borderColor?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheetTypes").____ColorValue_Internal;
|
|
@@ -138,7 +138,7 @@ export declare const Textarea: import("react").ForwardRefExoticComponent<Omit<Re
|
|
|
138
138
|
pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined;
|
|
139
139
|
removeClippedSubviews?: boolean | undefined;
|
|
140
140
|
experimental_accessibilityOrder?: Array<string> | undefined;
|
|
141
|
-
}>, never>>, "style" | "experimental_accessibilityOrder">, "value" | "textAlign" | "style" | "onBlur" | "onFocus" | "lineBreakStrategyIOS" | "selectionColor" | "textBreakStrategy" | "allowFontScaling" | "maxFontSizeMultiplier" | "numberOfLines" | "
|
|
141
|
+
}>, never>>, "style" | "experimental_accessibilityOrder">, "value" | "textAlign" | "onChange" | "style" | "onBlur" | "onFocus" | "onPress" | "lineBreakStrategyIOS" | "selectionColor" | "textBreakStrategy" | "allowFontScaling" | "maxFontSizeMultiplier" | "numberOfLines" | "onPressIn" | "onPressOut" | "disableKeyboardShortcuts" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "inputAccessoryViewID" | "inputAccessoryViewButtonLabel" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "scrollEnabled" | "spellCheck" | "textContentType" | "lineBreakModeIOS" | "smartInsertDelete" | "cursorColor" | "selectionHandleColor" | "disableFullscreenUI" | "importantForAutofill" | "inlineImageLeft" | "inlineImagePadding" | "returnKeyLabel" | "rows" | "showSoftInputOnFocus" | "underlineColorAndroid" | "experimental_acceptDragAndDropTypes" | "autoCapitalize" | "autoComplete" | "autoCorrect" | "autoFocus" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "forwardedRef" | "enterKeyHint" | "inputMode" | "keyboardType" | "maxLength" | "multiline" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onKeyPress" | "onSelectionChange" | "onSubmitEditing" | "onScroll" | "placeholder" | "placeholderTextColor" | "readOnly" | "returnKeyType" | "secureTextEntry" | "selection" | "selectTextOnFocus" | "blurOnSubmit" | "submitBehavior"> & Omit<Readonly<{
|
|
142
142
|
disableKeyboardShortcuts?: boolean | undefined;
|
|
143
143
|
clearButtonMode?: ("never" | "while-editing" | "unless-editing" | "always") | undefined;
|
|
144
144
|
clearTextOnFocus?: boolean | undefined;
|
|
@@ -155,7 +155,7 @@ export declare const Textarea: import("react").ForwardRefExoticComponent<Omit<Re
|
|
|
155
155
|
lineBreakStrategyIOS?: ("none" | "standard" | "hangul-word" | "push-out") | undefined;
|
|
156
156
|
lineBreakModeIOS?: ("wordWrapping" | "char" | "clip" | "head" | "middle" | "tail") | undefined;
|
|
157
157
|
smartInsertDelete?: boolean | undefined;
|
|
158
|
-
}>, "value" | "textAlign" | "style" | "onBlur" | "onFocus" | "selectionColor" | "textBreakStrategy" | "allowFontScaling" | "maxFontSizeMultiplier" | "numberOfLines" | "
|
|
158
|
+
}>, "value" | "textAlign" | "onChange" | "style" | "onBlur" | "onFocus" | "onPress" | "selectionColor" | "textBreakStrategy" | "allowFontScaling" | "maxFontSizeMultiplier" | "numberOfLines" | "onPressIn" | "onPressOut" | "cursorColor" | "selectionHandleColor" | "disableFullscreenUI" | "importantForAutofill" | "inlineImageLeft" | "inlineImagePadding" | "returnKeyLabel" | "rows" | "showSoftInputOnFocus" | "underlineColorAndroid" | "experimental_acceptDragAndDropTypes" | "autoCapitalize" | "autoComplete" | "autoCorrect" | "autoFocus" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "forwardedRef" | "enterKeyHint" | "inputMode" | "keyboardType" | "maxLength" | "multiline" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onKeyPress" | "onSelectionChange" | "onSubmitEditing" | "onScroll" | "placeholder" | "placeholderTextColor" | "readOnly" | "returnKeyType" | "secureTextEntry" | "selection" | "selectTextOnFocus" | "blurOnSubmit" | "submitBehavior"> & Omit<Readonly<{
|
|
159
159
|
cursorColor?: import("react-native").ColorValue | undefined;
|
|
160
160
|
selectionHandleColor?: import("react-native").ColorValue | undefined;
|
|
161
161
|
disableFullscreenUI?: boolean | undefined;
|
|
@@ -168,7 +168,7 @@ export declare const Textarea: import("react").ForwardRefExoticComponent<Omit<Re
|
|
|
168
168
|
showSoftInputOnFocus?: boolean | undefined;
|
|
169
169
|
textBreakStrategy?: ("simple" | "highQuality" | "balanced") | undefined;
|
|
170
170
|
underlineColorAndroid?: import("react-native").ColorValue | undefined;
|
|
171
|
-
}>, "value" | "textAlign" | "style" | "onBlur" | "onFocus" | "
|
|
171
|
+
}>, "value" | "textAlign" | "onChange" | "style" | "onBlur" | "onFocus" | "onPress" | "selectionColor" | "allowFontScaling" | "maxFontSizeMultiplier" | "onPressIn" | "onPressOut" | "experimental_acceptDragAndDropTypes" | "autoCapitalize" | "autoComplete" | "autoCorrect" | "autoFocus" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "forwardedRef" | "enterKeyHint" | "inputMode" | "keyboardType" | "maxLength" | "multiline" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onKeyPress" | "onSelectionChange" | "onSubmitEditing" | "onScroll" | "placeholder" | "placeholderTextColor" | "readOnly" | "returnKeyType" | "secureTextEntry" | "selection" | "selectTextOnFocus" | "blurOnSubmit" | "submitBehavior"> & Omit<Readonly<{
|
|
172
172
|
experimental_acceptDragAndDropTypes?: ReadonlyArray<string> | undefined;
|
|
173
173
|
autoCapitalize?: import("react-native").AutoCapitalize | undefined;
|
|
174
174
|
autoComplete?: ("additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | "cc-exp-day" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "cc-name" | "cc-given-name" | "cc-middle-name" | "cc-family-name" | "cc-type" | "country" | "current-password" | "email" | "family-name" | "gender" | "given-name" | "honorific-prefix" | "honorific-suffix" | "name" | "name-family" | "name-given" | "name-middle" | "name-middle-initial" | "name-prefix" | "name-suffix" | "new-password" | "nickname" | "one-time-code" | "organization" | "organization-title" | "password" | "password-new" | "postal-address" | "postal-address-country" | "postal-address-extended" | "postal-address-extended-postal-code" | "postal-address-locality" | "postal-address-region" | "postal-code" | "street-address" | "sms-otp" | "tel" | "tel-country-code" | "tel-national" | "tel-device" | "url" | "username" | "username-new" | "off") | undefined;
|
|
@@ -298,7 +298,7 @@ export declare const Textarea: import("react").ForwardRefExoticComponent<Omit<Re
|
|
|
298
298
|
rowGap?: number | string;
|
|
299
299
|
columnGap?: number | string;
|
|
300
300
|
gap?: number | string;
|
|
301
|
-
}>, "filter" | "
|
|
301
|
+
}>, "filter" | "shadowColor" | "shadowOffset" | "shadowOpacity" | "shadowRadius" | "transform" | "transformOrigin" | "backfaceVisibility" | "backgroundColor" | "borderColor" | "borderCurve" | "borderBottomColor" | "borderEndColor" | "borderLeftColor" | "borderRightColor" | "borderStartColor" | "borderTopColor" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockStartColor" | "borderRadius" | "borderBottomEndRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStartRadius" | "borderEndEndRadius" | "borderEndStartRadius" | "borderStartEndRadius" | "borderStartStartRadius" | "borderTopEndRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStartRadius" | "borderStyle" | "borderWidth" | "borderBottomWidth" | "borderEndWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStartWidth" | "borderTopWidth" | "opacity" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "elevation" | "pointerEvents" | "cursor" | "boxShadow" | "mixBlendMode" | "experimental_backgroundImage" | "experimental_backgroundSize" | "experimental_backgroundPosition" | "experimental_backgroundRepeat" | "isolation"> & Omit<Readonly<Omit<Readonly<{
|
|
302
302
|
shadowColor?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheetTypes").____ColorValue_Internal;
|
|
303
303
|
shadowOffset?: Readonly<{
|
|
304
304
|
width?: number;
|
|
@@ -306,7 +306,7 @@ export declare const Textarea: import("react").ForwardRefExoticComponent<Omit<Re
|
|
|
306
306
|
}>;
|
|
307
307
|
shadowOpacity?: number;
|
|
308
308
|
shadowRadius?: number;
|
|
309
|
-
}>, never> & Omit<Readonly<{}>, never>>, "filter" | "
|
|
309
|
+
}>, never> & Omit<Readonly<{}>, never>>, "filter" | "transform" | "transformOrigin" | "backfaceVisibility" | "backgroundColor" | "borderColor" | "borderCurve" | "borderBottomColor" | "borderEndColor" | "borderLeftColor" | "borderRightColor" | "borderStartColor" | "borderTopColor" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockStartColor" | "borderRadius" | "borderBottomEndRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStartRadius" | "borderEndEndRadius" | "borderEndStartRadius" | "borderStartEndRadius" | "borderStartStartRadius" | "borderTopEndRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStartRadius" | "borderStyle" | "borderWidth" | "borderBottomWidth" | "borderEndWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStartWidth" | "borderTopWidth" | "opacity" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "elevation" | "pointerEvents" | "cursor" | "boxShadow" | "mixBlendMode" | "experimental_backgroundImage" | "experimental_backgroundSize" | "experimental_backgroundPosition" | "experimental_backgroundRepeat" | "isolation"> & Omit<Readonly<{
|
|
310
310
|
transform?: ReadonlyArray<Readonly<import("react-native/types_generated/Libraries/StyleSheet/private/_TransformStyle").MaximumOneOf<import("react-native/types_generated/Libraries/StyleSheet/private/_TransformStyle").MergeUnion<{
|
|
311
311
|
readonly perspective: number | import("react-native/types_generated/Libraries/Animated/AnimatedExports").Node;
|
|
312
312
|
} | {
|
|
@@ -337,7 +337,7 @@ export declare const Textarea: import("react").ForwardRefExoticComponent<Omit<Re
|
|
|
337
337
|
readonly matrix: ReadonlyArray<number | import("react-native/types_generated/Libraries/Animated/AnimatedExports").Node> | import("react-native/types_generated/Libraries/Animated/AnimatedExports").Node;
|
|
338
338
|
}>>>> | string;
|
|
339
339
|
transformOrigin?: [string | number, string | number, string | number] | string;
|
|
340
|
-
}>, "filter" | "
|
|
340
|
+
}>, "filter" | "backfaceVisibility" | "backgroundColor" | "borderColor" | "borderCurve" | "borderBottomColor" | "borderEndColor" | "borderLeftColor" | "borderRightColor" | "borderStartColor" | "borderTopColor" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockStartColor" | "borderRadius" | "borderBottomEndRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStartRadius" | "borderEndEndRadius" | "borderEndStartRadius" | "borderStartEndRadius" | "borderStartStartRadius" | "borderTopEndRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStartRadius" | "borderStyle" | "borderWidth" | "borderBottomWidth" | "borderEndWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStartWidth" | "borderTopWidth" | "opacity" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "elevation" | "pointerEvents" | "cursor" | "boxShadow" | "mixBlendMode" | "experimental_backgroundImage" | "experimental_backgroundSize" | "experimental_backgroundPosition" | "experimental_backgroundRepeat" | "isolation"> & Omit<Readonly<{
|
|
341
341
|
backfaceVisibility?: "visible" | "hidden";
|
|
342
342
|
backgroundColor?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheetTypes").____ColorValue_Internal;
|
|
343
343
|
borderColor?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheetTypes").____ColorValue_Internal;
|
|
@@ -49,7 +49,7 @@ export type { SearchProps } from './Search';
|
|
|
49
49
|
export { Skeleton } from './Skeleton';
|
|
50
50
|
export type { SkeletonProps, SkeletonShape } from './Skeleton';
|
|
51
51
|
export { Segmented } from './Segmented';
|
|
52
|
-
export type { SegmentedProps } from './Segmented';
|
|
52
|
+
export type { SegmentedProps, SegmentedSize } from './Segmented';
|
|
53
53
|
export { Spinner } from './Spinner';
|
|
54
54
|
export type { SpinnerProps } from './Spinner';
|
|
55
55
|
export { StatusDot } from './StatusDot';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACpC,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnD,OA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T,aAAa,GACd,MAAM,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import { Text, View } from 'react-native';
|
|
3
3
|
import { Pressable } from 'react-native-gesture-handler';
|
|
4
4
|
import { fw, useTheme, useThemedStyles } from '../../../theme';
|
|
5
5
|
import { childTestID } from '../../../utils/testID';
|
|
6
|
-
import { makeStyles } from './styles';
|
|
6
|
+
import { makeStyles, sizingFor } from './styles';
|
|
7
7
|
import type { SegmentedProps } from './types';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* 局部分段控件 ——
|
|
10
|
+
* 局部分段控件 —— pill 在 track 上,激活项是亮色 thumb。
|
|
11
11
|
*
|
|
12
12
|
* **active thumb 必须比 track 亮一档** —— shadow 只在亮色态显示,
|
|
13
13
|
* 暗色态由 surface 明度差表达层级。
|
|
14
|
+
*
|
|
15
|
+
* `size`:默认 `'md'`(44pt 触控达标);`'sm'` 紧凑(28pt)给模型下拉等局促位用。
|
|
14
16
|
*/
|
|
15
17
|
export function Segmented({
|
|
16
18
|
value,
|
|
17
19
|
onChange,
|
|
18
20
|
items,
|
|
21
|
+
size = 'md',
|
|
19
22
|
disabled = false,
|
|
20
23
|
testID,
|
|
21
24
|
}: SegmentedProps): React.JSX.Element {
|
|
22
25
|
const { colors: c, scheme, shadow } = useTheme();
|
|
23
26
|
const styles = useThemedStyles(makeStyles);
|
|
27
|
+
const sizing = useMemo(() => sizingFor(size), [size]);
|
|
24
28
|
const activeBg = scheme === 'dark' ? c.surfaceContainerHighest : c.surface;
|
|
25
29
|
const activeShadow = scheme === 'dark' ? null : shadow.subtle;
|
|
26
30
|
|
|
@@ -43,19 +47,18 @@ export function Segmented({
|
|
|
43
47
|
testID={itemTestID}
|
|
44
48
|
style={({ pressed }) => [
|
|
45
49
|
styles.segItem,
|
|
50
|
+
{ minHeight: sizing.minHeight, paddingHorizontal: sizing.px },
|
|
46
51
|
on && { backgroundColor: activeBg },
|
|
47
52
|
on && activeShadow,
|
|
48
53
|
{ opacity: pressed ? 0.85 : 1 },
|
|
49
54
|
]}
|
|
50
55
|
>
|
|
51
56
|
<Text
|
|
52
|
-
style={
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
]}
|
|
57
|
+
style={{
|
|
58
|
+
fontSize: sizing.fs,
|
|
59
|
+
color: on ? c.foreground : c.foregroundSubtle,
|
|
60
|
+
fontWeight: on ? fw.semi : fw.medium,
|
|
61
|
+
}}
|
|
59
62
|
numberOfLines={1}
|
|
60
63
|
>
|
|
61
64
|
{it.label}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Segmented } from './Segmented';
|
|
2
|
-
export type { SegmentedProps } from './types';
|
|
2
|
+
export type { SegmentedProps, SegmentedSize } from './types';
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
2
|
import type { ColorTokens } from '../../../theme';
|
|
3
3
|
import { fixed, r, radius, space, type as t } from '../../../theme';
|
|
4
|
+
import type { SegmentedSize, SegmentedSizing } from './types';
|
|
4
5
|
|
|
6
|
+
/** sm 紧凑高 —— 取 control.sm 的设计基准值 28,但**物理常量、不缩放**
|
|
7
|
+
* (与 md 的 fixed.hitTarget 同基准)。
|
|
8
|
+
* 为何不直接用 scaled `control.sm`:大屏 `r(28)` 会涨过 md 的 44(size 语义反转,
|
|
9
|
+
* sm 反而比 md 高)。固定 28:各屏恒 < 44、与 md 维持稳定比例。 */
|
|
10
|
+
const SM_MIN_HEIGHT = 28;
|
|
11
|
+
|
|
12
|
+
/** Segmented 静态 base —— track chrome 与 item 居中/圆角(size-invariant)。
|
|
13
|
+
* 随 size 变化的 minHeight / paddingHorizontal / fontSize 由 sizingFor(size) 注入。 */
|
|
5
14
|
export const makeStyles = (c: ColorTokens) =>
|
|
6
15
|
StyleSheet.create({
|
|
7
16
|
seg: {
|
|
@@ -12,15 +21,26 @@ export const makeStyles = (c: ColorTokens) =>
|
|
|
12
21
|
alignSelf: 'flex-start',
|
|
13
22
|
},
|
|
14
23
|
segItem: {
|
|
15
|
-
// [M-7] Segmented item 高原为 control.sm≈28pt < 44pt;
|
|
16
|
-
// hitSlop 不越父 seg 容器边界 → 改用 minHeight 直接对齐 fixed.hitTarget(44pt)
|
|
17
|
-
minHeight: fixed.hitTarget,
|
|
18
|
-
paddingHorizontal: space[7],
|
|
19
24
|
alignItems: 'center',
|
|
20
25
|
justifyContent: 'center',
|
|
21
26
|
borderRadius: radius.sm,
|
|
22
27
|
},
|
|
23
|
-
segLabel: {
|
|
24
|
-
fontSize: t.xs,
|
|
25
|
-
},
|
|
26
28
|
});
|
|
29
|
+
|
|
30
|
+
/** Segmented 尺寸推导:2 档 size → { minHeight, px, fs }。
|
|
31
|
+
* 新增 size 在 types.ts 扩 union + 这里加 case(与 Button.sizingFor 同范式)。
|
|
32
|
+
*
|
|
33
|
+
* [M-7] 触控目标:item 嵌在 seg track 内,hitSlop 不越父 track 边界
|
|
34
|
+
* (≠ Button/Chip 能向外补 hitSlop)→ 只能靠 item minHeight 自撑高 track。
|
|
35
|
+
* - md(默认):minHeight = fixed.hitTarget(44pt 物理常量),触控达标,行为同改前。
|
|
36
|
+
* - sm(紧凑):minHeight = SM_MIN_HEIGHT(28pt 物理常量),为模型下拉等局促位主动小一号,
|
|
37
|
+
* 接受 sub-44pt 触控(调用方按场景 opt-in);a11y role/state 不变。
|
|
38
|
+
* px / fs 走 scaled token(space/type),与 md 同基准 → sm 恒小于 md。 */
|
|
39
|
+
export function sizingFor(size: SegmentedSize): SegmentedSizing {
|
|
40
|
+
switch (size) {
|
|
41
|
+
case 'sm':
|
|
42
|
+
return { minHeight: SM_MIN_HEIGHT, px: space['5'], fs: t.xxs };
|
|
43
|
+
case 'md':
|
|
44
|
+
return { minHeight: fixed.hitTarget, px: space['7'], fs: t.xs };
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
import type { TabItem } from '../Tabs';
|
|
2
2
|
|
|
3
|
+
/** Segmented 尺寸:`md`=默认(达标 44pt 触控) / `sm`=紧凑(28pt,模型下拉等局促位)。 */
|
|
4
|
+
export type SegmentedSize = 'sm' | 'md';
|
|
5
|
+
|
|
3
6
|
/** Segmented 与 Tabs 共用 item 形状;命名独立以表达控件意图差异。 */
|
|
4
7
|
export type SegmentedProps = {
|
|
5
8
|
value: string;
|
|
6
9
|
onChange: (id: string) => void;
|
|
7
10
|
items: TabItem[];
|
|
11
|
+
/** 尺寸,默认 `'md'`。`'sm'` 给模型下拉等局促位用——更小,触控 < 44pt(见 styles.sizingFor) */
|
|
12
|
+
size?: SegmentedSize;
|
|
8
13
|
/** [L-82] 整体禁用 —— 所有 item 不可点击,a11y state 同步 */
|
|
9
14
|
disabled?: boolean;
|
|
10
15
|
/** 容器 testID;item testID 自动派生为 `${testID}-${id}` */
|
|
11
16
|
testID?: string;
|
|
12
17
|
};
|
|
18
|
+
|
|
19
|
+
/** sizingFor(size) 的返回:Segmented item 随 size 变化的 3 个量。
|
|
20
|
+
* 形状只取 Segmented 实际可变的维度(圆角固定 radius.sm、item 间无 gap,故无 br/gap)。 */
|
|
21
|
+
export type SegmentedSizing = {
|
|
22
|
+
/** item 最小高度(撑起 track 高度;也是触控目标——见 sizingFor 的 [M-7] 注释) */
|
|
23
|
+
minHeight: number;
|
|
24
|
+
/** item 水平 padding */
|
|
25
|
+
px: number;
|
|
26
|
+
/** label 字号 */
|
|
27
|
+
fs: number;
|
|
28
|
+
};
|
|
@@ -49,7 +49,7 @@ export type { SearchProps } from './Search';
|
|
|
49
49
|
export { Skeleton } from './Skeleton';
|
|
50
50
|
export type { SkeletonProps, SkeletonShape } from './Skeleton';
|
|
51
51
|
export { Segmented } from './Segmented';
|
|
52
|
-
export type { SegmentedProps } from './Segmented';
|
|
52
|
+
export type { SegmentedProps, SegmentedSize } from './Segmented';
|
|
53
53
|
export { Spinner } from './Spinner';
|
|
54
54
|
export type { SpinnerProps } from './Spinner';
|
|
55
55
|
export { StatusDot } from './StatusDot';
|