react-native-system-ui 1.0.0 → 1.0.2
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 +3 -3
- package/dist/cjs/components/action-sheet/ActionSheet.js +51 -53
- package/dist/cjs/components/area/Area.js +22 -22
- package/dist/cjs/components/avatar/Avatar.js +23 -23
- package/dist/cjs/components/badge/Badge.js +56 -61
- package/dist/cjs/components/button/Button.js +87 -92
- package/dist/cjs/components/button/ButtonGroup.js +4 -4
- package/dist/cjs/components/calendar/Calendar.js +28 -28
- package/dist/cjs/components/cascader/Cascader.js +206 -212
- package/dist/cjs/components/cell/Cell.js +54 -51
- package/dist/cjs/components/cell/CellGroup.js +26 -25
- package/dist/cjs/components/checkbox/Checkbox.js +1 -0
- package/dist/cjs/components/checkbox/CheckboxGroup.js +20 -19
- package/dist/cjs/components/circle/Circle.js +66 -54
- package/dist/cjs/components/collapse/Collapse.js +18 -18
- package/dist/cjs/components/config-provider/ConfigProvider.js +5 -5
- package/dist/cjs/components/count-down/CountDown.js +17 -17
- package/dist/cjs/components/datetime-picker/DatetimePicker.js +34 -35
- package/dist/cjs/components/dialog/Dialog.js +16 -10
- package/dist/cjs/components/dialog/imperative.js +8 -14
- package/dist/cjs/components/dialog/tokens.js +1 -0
- package/dist/cjs/components/divider/Divider.js +48 -51
- package/dist/cjs/components/empty/Empty.js +30 -25
- package/dist/cjs/components/error-boundary/ErrorBoundary.js +3 -2
- package/dist/cjs/components/flex/Flex.js +27 -27
- package/dist/cjs/components/flex/FlexItem.js +1 -0
- package/dist/cjs/components/form/Form.js +94 -93
- package/dist/cjs/components/form/FormItem.js +60 -54
- package/dist/cjs/components/form/FormList.js +35 -35
- package/dist/cjs/components/grid/Grid.js +48 -48
- package/dist/cjs/components/grid/GridItem.js +9 -2
- package/dist/cjs/components/image/Image.js +25 -24
- package/dist/cjs/components/image/tokens.js +3 -1
- package/dist/cjs/components/image-preview/ImagePreview.js +38 -28
- package/dist/cjs/components/image-preview/tokens.js +3 -1
- package/dist/cjs/components/input/Input.js +16 -19
- package/dist/cjs/components/loading/Loading.js +27 -27
- package/dist/cjs/components/nav-bar/NavBar.js +21 -18
- package/dist/cjs/components/nav-bar/tokens.js +3 -1
- package/dist/cjs/components/notice-bar/NoticeBar.js +7 -3
- package/dist/cjs/components/notice-bar/tokens.js +3 -1
- package/dist/cjs/components/notify/Notify.js +2 -1
- package/dist/cjs/components/notify/imperative.js +17 -17
- package/dist/cjs/components/notify/tokens.js +1 -0
- package/dist/cjs/components/number-keyboard/NumberKeyboard.js +217 -201
- package/dist/cjs/components/number-keyboard/tokens.js +7 -1
- package/dist/cjs/components/overlay/Overlay.js +15 -15
- package/dist/cjs/components/password-input/PasswordInput.js +49 -49
- package/dist/cjs/components/picker/Picker.js +50 -58
- package/dist/cjs/components/popup/Popup.js +10 -10
- package/dist/cjs/components/popup/tokens.js +1 -0
- package/dist/cjs/components/portal/Portal.js +3 -4
- package/dist/cjs/components/progress/Progress.js +94 -95
- package/dist/cjs/components/progress/tokens.js +1 -0
- package/dist/cjs/components/radio/Radio.js +67 -63
- package/dist/cjs/components/radio/RadioGroup.js +6 -6
- package/dist/cjs/components/safe-area-view/SafeAreaView.js +7 -7
- package/dist/cjs/components/search/Search.js +28 -28
- package/dist/cjs/components/selector/Selector.js +19 -26
- package/dist/cjs/components/share-sheet/ShareSheet.js +8 -2
- package/dist/cjs/components/share-sheet/tokens.js +3 -1
- package/dist/cjs/components/sidebar/Sidebar.js +22 -16
- package/dist/cjs/components/sidebar/SidebarItem.js +9 -8
- package/dist/cjs/components/sidebar/tokens.js +3 -1
- package/dist/cjs/components/skeleton/Skeleton.js +43 -42
- package/dist/cjs/components/slider/Slider.js +1 -1
- package/dist/cjs/components/space/Space.js +45 -41
- package/dist/cjs/components/space/tokens.js +7 -1
- package/dist/cjs/components/stepper/Stepper.js +17 -15
- package/dist/cjs/components/stepper/tokens.js +1 -0
- package/dist/cjs/components/swiper/Swiper.js +10 -7
- package/dist/cjs/components/swiper/SwiperPagIndicator.js +3 -2
- package/dist/cjs/components/switch/Switch.js +23 -23
- package/dist/cjs/components/tabbar/Tabbar.js +26 -26
- package/dist/cjs/components/tabbar/TabbarItem.js +6 -0
- package/dist/cjs/components/tabs/Tabs.js +143 -153
- package/dist/cjs/components/tabs/tokens.js +3 -1
- package/dist/cjs/components/tag/Tag.js +38 -38
- package/dist/cjs/components/toast/Toast.js +7 -3
- package/dist/cjs/components/toast/tokens.js +1 -0
- package/dist/cjs/components/typography/Typography.js +23 -21
- package/dist/cjs/components/water-mark/WaterMark.js +65 -65
- package/dist/cjs/design-system/Text.js +38 -0
- package/dist/cjs/design-system/createComponentTokensHook.js +2 -2
- package/dist/cjs/design-system/index.js +7 -0
- package/dist/cjs/design-system/mergeTokensOverride.js +1 -4
- package/dist/cjs/hooks/useControllableValue.js +11 -11
- package/dist/cjs/hooks/useCountDown.js +18 -18
- package/dist/cjs/platform/measure.js +4 -2
- package/dist/cjs/utils/color.js +2 -7
- package/dist/cjs/utils/compare.js +3 -3
- package/dist/cjs/utils/date.js +2 -2
- package/dist/cjs/utils/deepMerge.js +5 -5
- package/dist/cjs/utils/hairline.js +1 -0
- package/dist/cjs/utils/render.js +2 -8
- package/dist/cjs/utils/validate.js +2 -4
- package/dist/es/components/action-sheet/ActionSheet.js +51 -53
- package/dist/es/components/area/Area.js +22 -22
- package/dist/es/components/avatar/Avatar.js +23 -23
- package/dist/es/components/badge/Badge.js +56 -61
- package/dist/es/components/button/Button.js +87 -92
- package/dist/es/components/button/ButtonGroup.js +4 -4
- package/dist/es/components/calendar/Calendar.js +28 -28
- package/dist/es/components/cascader/Cascader.js +206 -212
- package/dist/es/components/cell/Cell.js +55 -52
- package/dist/es/components/cell/CellGroup.js +26 -25
- package/dist/es/components/checkbox/Checkbox.js +1 -0
- package/dist/es/components/checkbox/CheckboxGroup.js +20 -19
- package/dist/es/components/circle/Circle.js +66 -54
- package/dist/es/components/collapse/Collapse.js +18 -18
- package/dist/es/components/config-provider/ConfigProvider.js +5 -5
- package/dist/es/components/count-down/CountDown.js +17 -17
- package/dist/es/components/datetime-picker/DatetimePicker.js +34 -35
- package/dist/es/components/dialog/Dialog.js +16 -10
- package/dist/es/components/dialog/imperative.js +8 -14
- package/dist/es/components/dialog/tokens.js +1 -0
- package/dist/es/components/divider/Divider.js +48 -51
- package/dist/es/components/empty/Empty.js +30 -25
- package/dist/es/components/error-boundary/ErrorBoundary.js +3 -2
- package/dist/es/components/flex/Flex.js +27 -27
- package/dist/es/components/flex/FlexItem.js +1 -0
- package/dist/es/components/form/Form.js +95 -94
- package/dist/es/components/form/FormItem.js +60 -54
- package/dist/es/components/form/FormList.js +35 -35
- package/dist/es/components/grid/Grid.js +48 -48
- package/dist/es/components/grid/GridItem.js +10 -3
- package/dist/es/components/image/Image.js +25 -24
- package/dist/es/components/image/tokens.js +3 -1
- package/dist/es/components/image-preview/ImagePreview.js +39 -29
- package/dist/es/components/image-preview/tokens.js +3 -1
- package/dist/es/components/input/Input.js +16 -19
- package/dist/es/components/loading/Loading.js +27 -27
- package/dist/es/components/nav-bar/NavBar.js +21 -18
- package/dist/es/components/nav-bar/tokens.js +3 -1
- package/dist/es/components/notice-bar/NoticeBar.js +7 -3
- package/dist/es/components/notice-bar/tokens.js +3 -1
- package/dist/es/components/notify/Notify.js +2 -1
- package/dist/es/components/notify/imperative.js +17 -17
- package/dist/es/components/notify/tokens.js +1 -0
- package/dist/es/components/number-keyboard/NumberKeyboard.js +217 -201
- package/dist/es/components/number-keyboard/tokens.js +7 -1
- package/dist/es/components/overlay/Overlay.js +15 -15
- package/dist/es/components/password-input/PasswordInput.js +49 -49
- package/dist/es/components/picker/Picker.js +50 -58
- package/dist/es/components/popup/Popup.js +10 -10
- package/dist/es/components/popup/tokens.js +1 -0
- package/dist/es/components/portal/Portal.js +3 -4
- package/dist/es/components/progress/Progress.js +94 -95
- package/dist/es/components/progress/tokens.js +1 -0
- package/dist/es/components/radio/Radio.js +67 -63
- package/dist/es/components/radio/RadioGroup.js +6 -6
- package/dist/es/components/safe-area-view/SafeAreaView.js +7 -7
- package/dist/es/components/search/Search.js +28 -28
- package/dist/es/components/selector/Selector.js +19 -26
- package/dist/es/components/share-sheet/ShareSheet.js +8 -2
- package/dist/es/components/share-sheet/tokens.js +3 -1
- package/dist/es/components/sidebar/Sidebar.js +22 -16
- package/dist/es/components/sidebar/SidebarItem.js +9 -8
- package/dist/es/components/sidebar/tokens.js +3 -1
- package/dist/es/components/skeleton/Skeleton.js +43 -42
- package/dist/es/components/slider/Slider.js +3 -3
- package/dist/es/components/space/Space.js +45 -41
- package/dist/es/components/space/tokens.js +7 -1
- package/dist/es/components/stepper/Stepper.js +17 -15
- package/dist/es/components/stepper/tokens.js +1 -0
- package/dist/es/components/swiper/Swiper.js +11 -8
- package/dist/es/components/swiper/SwiperPagIndicator.js +3 -2
- package/dist/es/components/switch/Switch.js +23 -23
- package/dist/es/components/tabbar/Tabbar.js +26 -26
- package/dist/es/components/tabbar/TabbarItem.js +6 -0
- package/dist/es/components/tabs/Tabs.js +144 -154
- package/dist/es/components/tabs/tokens.js +3 -1
- package/dist/es/components/tag/Tag.js +38 -38
- package/dist/es/components/toast/Toast.js +7 -3
- package/dist/es/components/toast/tokens.js +1 -0
- package/dist/es/components/typography/Typography.js +23 -21
- package/dist/es/components/water-mark/WaterMark.js +65 -65
- package/dist/es/design-system/Text.js +19 -0
- package/dist/es/design-system/createComponentTokensHook.js +2 -2
- package/dist/es/design-system/index.js +1 -0
- package/dist/es/design-system/mergeTokensOverride.js +1 -4
- package/dist/es/hooks/useControllableValue.js +11 -11
- package/dist/es/hooks/useCountDown.js +18 -18
- package/dist/es/platform/measure.js +4 -2
- package/dist/es/utils/color.js +1 -4
- package/dist/es/utils/compare.js +3 -3
- package/dist/es/utils/date.js +2 -2
- package/dist/es/utils/deepMerge.js +5 -5
- package/dist/es/utils/hairline.js +1 -0
- package/dist/es/utils/render.js +1 -1
- package/dist/es/utils/validate.js +1 -2
- package/dist/types/components/dialog/tokens.d.ts +1 -0
- package/dist/types/components/image-preview/tokens.d.ts +1 -0
- package/dist/types/components/nav-bar/tokens.d.ts +1 -1
- package/dist/types/components/notice-bar/tokens.d.ts +1 -0
- package/dist/types/components/number-keyboard/tokens.d.ts +5 -0
- package/dist/types/components/picker/Picker.d.ts +1 -1
- package/dist/types/components/popup/tokens.d.ts +1 -0
- package/dist/types/components/share-sheet/tokens.d.ts +1 -0
- package/dist/types/components/stepper/tokens.d.ts +1 -0
- package/dist/types/components/tabs/tokens.d.ts +1 -0
- package/dist/types/components/toast/tokens.d.ts +1 -0
- package/dist/types/design-system/Text.d.ts +3 -0
- package/dist/types/design-system/index.d.ts +1 -0
- package/dist/types/hooks/useCountDown.d.ts +1 -1
- package/dist/types/utils/color.d.ts +0 -2
- package/dist/types/utils/date.d.ts +1 -1
- package/dist/types/utils/render.d.ts +1 -1
- package/dist/types/utils/validate.d.ts +0 -1
- package/package.json +17 -3
|
@@ -41,7 +41,7 @@ const SearchComponent = (props, ref) => {
|
|
|
41
41
|
action,
|
|
42
42
|
actionText,
|
|
43
43
|
showAction = false,
|
|
44
|
-
shape:
|
|
44
|
+
shape: shapeP,
|
|
45
45
|
background,
|
|
46
46
|
style: containerStyle,
|
|
47
47
|
fieldStyle,
|
|
@@ -62,12 +62,12 @@ const SearchComponent = (props, ref) => {
|
|
|
62
62
|
...restFieldProps
|
|
63
63
|
} = props;
|
|
64
64
|
const tokens = (0, _tokens.useSearchTokens)(tokensOverride);
|
|
65
|
-
const shape =
|
|
65
|
+
const shape = shapeP ?? tokens.defaults.shape;
|
|
66
66
|
const [value, triggerChange] = (0, _hooks.useControllableValue)(props, {
|
|
67
67
|
defaultValue: ''
|
|
68
68
|
});
|
|
69
69
|
const inputValue = value ?? '';
|
|
70
|
-
const
|
|
70
|
+
const rInputAlign = align ?? inputAlign;
|
|
71
71
|
const onChangeTextRef = (0, _react().useRef)(onChangeText),
|
|
72
72
|
onCancelRef = (0, _react().useRef)(onCancel),
|
|
73
73
|
onSearchRef = (0, _react().useRef)(onSearch),
|
|
@@ -90,17 +90,17 @@ const SearchComponent = (props, ref) => {
|
|
|
90
90
|
onSearchRef.current?.(inputValueRef.current);
|
|
91
91
|
onSubmitEditingRef.current?.(event);
|
|
92
92
|
}, []);
|
|
93
|
-
const
|
|
94
|
-
const
|
|
93
|
+
const rBg = background ?? tokens.colors.background;
|
|
94
|
+
const rLeftIcon = leftIcon ?? /*#__PURE__*/_react().default.createElement(_reactNativeSystemIcon().Search, {
|
|
95
95
|
size: tokens.icon.size,
|
|
96
96
|
fill: tokens.colors.icon,
|
|
97
97
|
color: tokens.colors.icon
|
|
98
98
|
});
|
|
99
|
-
const
|
|
100
|
-
const
|
|
101
|
-
const
|
|
102
|
-
const
|
|
103
|
-
const
|
|
99
|
+
const rClearTrigger = clearTrigger ?? tokens.defaults.clearTrigger;
|
|
100
|
+
const rReturnKey = returnKeyType ?? 'search';
|
|
101
|
+
const showAct = !!action || showAction;
|
|
102
|
+
const customActTxt = /*#__PURE__*/_react().default.isValidElement(actionText);
|
|
103
|
+
const renderCancelAct = showAct && !action && !customActTxt;
|
|
104
104
|
const radius = shape === 'round' ? tokens.radius.round : tokens.radius.square;
|
|
105
105
|
const inputRef = (0, _react().useRef)(null);
|
|
106
106
|
(0, _react().useImperativeHandle)(ref, () => ({
|
|
@@ -108,26 +108,26 @@ const SearchComponent = (props, ref) => {
|
|
|
108
108
|
blur: () => inputRef.current?.blur(),
|
|
109
109
|
clear: () => handleChange('')
|
|
110
110
|
}), [handleChange]);
|
|
111
|
-
const
|
|
112
|
-
disabled: !
|
|
111
|
+
const cancelActPress = (0, _hooks.useAriaPress)({
|
|
112
|
+
disabled: !renderCancelAct,
|
|
113
113
|
onPress: handleCancel,
|
|
114
114
|
extraProps: {
|
|
115
115
|
accessibilityRole: 'button',
|
|
116
116
|
testID: 'rnsu-search-action'
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
|
-
const
|
|
119
|
+
const ctrStyles = [S.ctr, {
|
|
120
120
|
paddingHorizontal: tokens.spacing.paddingHorizontal,
|
|
121
121
|
paddingVertical: tokens.spacing.paddingVertical,
|
|
122
|
-
backgroundColor:
|
|
122
|
+
backgroundColor: rBg
|
|
123
123
|
}, containerStyle];
|
|
124
|
-
const
|
|
124
|
+
const cntStyles = [S.cnt, {
|
|
125
125
|
borderRadius: radius,
|
|
126
126
|
paddingHorizontal: tokens.spacing.contentPaddingHorizontal,
|
|
127
127
|
paddingVertical: tokens.spacing.contentPaddingVertical,
|
|
128
128
|
backgroundColor: tokens.colors.contentBackground
|
|
129
129
|
}];
|
|
130
|
-
const
|
|
130
|
+
const labelEl = !label ? null : (0, _validate.isText)(label) ? /*#__PURE__*/_react().default.createElement(_reactNative().Text, {
|
|
131
131
|
style: {
|
|
132
132
|
marginRight: tokens.spacing.labelGap,
|
|
133
133
|
color: tokens.colors.label,
|
|
@@ -139,20 +139,20 @@ const SearchComponent = (props, ref) => {
|
|
|
139
139
|
marginRight: tokens.spacing.labelGap
|
|
140
140
|
}
|
|
141
141
|
}, label);
|
|
142
|
-
const
|
|
142
|
+
const actEl = action ? /*#__PURE__*/_react().default.createElement(_reactNative().View, {
|
|
143
143
|
style: [S.act, {
|
|
144
144
|
marginLeft: tokens.spacing.actionGap
|
|
145
145
|
}]
|
|
146
|
-
}, action) : !
|
|
146
|
+
}, action) : !showAct ? null : customActTxt ? /*#__PURE__*/_react().default.createElement(_reactNative().View, {
|
|
147
147
|
style: [S.act, {
|
|
148
148
|
marginLeft: tokens.spacing.actionGap
|
|
149
149
|
}]
|
|
150
150
|
}, actionText) : /*#__PURE__*/_react().default.createElement(_reactNative().Pressable, _extends({
|
|
151
151
|
style: [S.act, {
|
|
152
152
|
marginLeft: tokens.spacing.actionGap,
|
|
153
|
-
opacity:
|
|
153
|
+
opacity: cancelActPress.states.pressed ? tokens.opacity.actionPressed : 1
|
|
154
154
|
}]
|
|
155
|
-
},
|
|
155
|
+
}, cancelActPress.interactionProps), /*#__PURE__*/_react().default.createElement(_reactNative().Text, {
|
|
156
156
|
style: {
|
|
157
157
|
color: tokens.colors.action,
|
|
158
158
|
fontSize: tokens.typography.action,
|
|
@@ -160,10 +160,10 @@ const SearchComponent = (props, ref) => {
|
|
|
160
160
|
}
|
|
161
161
|
}, actionText ?? locale.cancel));
|
|
162
162
|
return /*#__PURE__*/_react().default.createElement(_reactNative().View, {
|
|
163
|
-
style:
|
|
163
|
+
style: ctrStyles
|
|
164
164
|
}, /*#__PURE__*/_react().default.createElement(_reactNative().View, {
|
|
165
|
-
style:
|
|
166
|
-
},
|
|
165
|
+
style: cntStyles
|
|
166
|
+
}, labelEl, /*#__PURE__*/_react().default.createElement(_reactNative().View, {
|
|
167
167
|
style: S.field
|
|
168
168
|
}, /*#__PURE__*/_react().default.createElement(_field.default, _extends({
|
|
169
169
|
ref: inputRef,
|
|
@@ -171,12 +171,12 @@ const SearchComponent = (props, ref) => {
|
|
|
171
171
|
value: inputValue,
|
|
172
172
|
onChangeText: handleChange,
|
|
173
173
|
clearable: clearable,
|
|
174
|
-
clearTrigger:
|
|
175
|
-
leftIcon:
|
|
174
|
+
clearTrigger: rClearTrigger,
|
|
175
|
+
leftIcon: rLeftIcon,
|
|
176
176
|
rightIcon: rightIcon,
|
|
177
177
|
center: !errorMessage,
|
|
178
178
|
errorMessage: errorMessage,
|
|
179
|
-
inputAlign:
|
|
179
|
+
inputAlign: rInputAlign,
|
|
180
180
|
border: false,
|
|
181
181
|
style: [{
|
|
182
182
|
paddingHorizontal: tokens.spacing.none,
|
|
@@ -189,8 +189,8 @@ const SearchComponent = (props, ref) => {
|
|
|
189
189
|
paddingVertical: tokens.spacing.none
|
|
190
190
|
}, inputStyle],
|
|
191
191
|
onSubmitEditing: handleSubmit,
|
|
192
|
-
returnKeyType:
|
|
193
|
-
}, restFieldProps)))),
|
|
192
|
+
returnKeyType: rReturnKey
|
|
193
|
+
}, restFieldProps)))), actEl);
|
|
194
194
|
};
|
|
195
195
|
const SearchForwardRef = /*#__PURE__*/_react().default.forwardRef(SearchComponent);
|
|
196
196
|
SearchForwardRef.displayName = 'Search';
|
|
@@ -122,10 +122,10 @@ const SelectorImpl = props => {
|
|
|
122
122
|
const {
|
|
123
123
|
tokensOverride,
|
|
124
124
|
options,
|
|
125
|
-
columns:
|
|
126
|
-
multiple:
|
|
127
|
-
showCheckMark:
|
|
128
|
-
disabled:
|
|
125
|
+
columns: colP,
|
|
126
|
+
multiple: multP,
|
|
127
|
+
showCheckMark: showChkP,
|
|
128
|
+
disabled: disP,
|
|
129
129
|
onChange,
|
|
130
130
|
itemStyle,
|
|
131
131
|
labelStyle,
|
|
@@ -134,37 +134,30 @@ const SelectorImpl = props => {
|
|
|
134
134
|
...rest
|
|
135
135
|
} = props;
|
|
136
136
|
const tokens = (0, _tokens.useSelectorTokens)(tokensOverride);
|
|
137
|
-
const columns =
|
|
138
|
-
const multiple =
|
|
139
|
-
const showCheckMark =
|
|
140
|
-
const disabled = Boolean(
|
|
137
|
+
const columns = colP ?? tokens.defaults.columns ?? 1;
|
|
138
|
+
const multiple = multP ?? tokens.defaults.multiple;
|
|
139
|
+
const showCheckMark = showChkP ?? tokens.defaults.showCheckMark;
|
|
140
|
+
const disabled = Boolean(disP ?? tokens.defaults.disabled);
|
|
141
141
|
const [value = [], triggerChange] = (0, _hooks.useControllableValue)(props, {
|
|
142
142
|
defaultValue: []
|
|
143
143
|
});
|
|
144
|
-
const
|
|
145
|
-
const
|
|
146
|
-
for (const
|
|
147
|
-
return
|
|
144
|
+
const optionsByVal = (0, _react().useMemo)(() => {
|
|
145
|
+
const m = new Map();
|
|
146
|
+
for (const o of options) m.set(o.value, o);
|
|
147
|
+
return m;
|
|
148
148
|
}, [options]);
|
|
149
|
-
const
|
|
150
|
-
const basis = `${100 /
|
|
149
|
+
const rCols = Math.max(1, Math.floor(columns));
|
|
150
|
+
const basis = `${100 / rCols}%`;
|
|
151
151
|
const itemMargin = tokens.spacing.gap / 2;
|
|
152
152
|
const selectedSet = (0, _react().useMemo)(() => new Set(value), [value]);
|
|
153
153
|
const toggleOption = (0, _react().useCallback)(option => {
|
|
154
154
|
if (disabled || option.disabled) return;
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
} else {
|
|
160
|
-
nextValue = isActive ? [] : [option.value];
|
|
161
|
-
}
|
|
162
|
-
;
|
|
163
|
-
const items = nextValue.map(val => optionsByValue.get(val)).filter(Boolean);
|
|
164
|
-
triggerChange(nextValue, {
|
|
165
|
-
items
|
|
155
|
+
const active = selectedSet.has(option.value);
|
|
156
|
+
const nextVal = multiple ? active ? value.filter(item => item !== option.value) : [...value, option.value] : active ? [] : [option.value];
|
|
157
|
+
triggerChange(nextVal, {
|
|
158
|
+
items: nextVal.map(v => optionsByVal.get(v)).filter(Boolean)
|
|
166
159
|
});
|
|
167
|
-
}, [disabled, multiple,
|
|
160
|
+
}, [disabled, multiple, optionsByVal, selectedSet, triggerChange, value]);
|
|
168
161
|
return /*#__PURE__*/_react().default.createElement(_reactNative().View, _extends({}, rest, {
|
|
169
162
|
style: [tokens.layout.container, {
|
|
170
163
|
marginHorizontal: -itemMargin,
|
|
@@ -55,18 +55,21 @@ const ShareSheetOptionItem = /*#__PURE__*/_react().default.memo(({
|
|
|
55
55
|
testID: `rv-share-sheet-item-${i}`
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
|
+
const iconNode = (0, _validate.isText)(o.icon) ? (0, _utils.renderTextOrNode)(o.icon, []) : o.icon;
|
|
58
59
|
return /*#__PURE__*/_react().default.createElement(_reactNative().Pressable, _extends({
|
|
59
60
|
style: [S.o, ows]
|
|
60
61
|
}, p.interactionProps), /*#__PURE__*/_react().default.createElement(_reactNative().View, {
|
|
61
62
|
style: [S.ic, is, {
|
|
62
63
|
marginHorizontal: t.spacing.iconMarginHorizontal
|
|
63
64
|
}]
|
|
64
|
-
},
|
|
65
|
+
}, iconNode), (0, _validate.isValidNode)(o.name) && (0, _utils.renderTextOrNode)(o.name, [S.ot, {
|
|
65
66
|
color: t.colors.option,
|
|
67
|
+
fontFamily: t.typography.fontFamily,
|
|
66
68
|
fontSize: t.typography.option,
|
|
67
69
|
paddingHorizontal: t.spacing.optionTextPaddingHorizontal
|
|
68
70
|
}]), (0, _validate.isValidNode)(o.description) && ((0, _validate.isText)(o.description) ? (0, _utils.renderTextOrNode)(o.description, [S.od, {
|
|
69
71
|
color: t.colors.optionDesc,
|
|
72
|
+
fontFamily: t.typography.fontFamily,
|
|
70
73
|
marginTop: t.spacing.gap,
|
|
71
74
|
fontSize: t.typography.optionDesc,
|
|
72
75
|
paddingHorizontal: t.spacing.optionDescPaddingHorizontal
|
|
@@ -101,6 +104,7 @@ const ShareSheetCancel = /*#__PURE__*/_react().default.memo(({
|
|
|
101
104
|
}]
|
|
102
105
|
}, cp.interactionProps), (0, _utils.renderTextOrNode)(ct, [S.ct, {
|
|
103
106
|
color: t.colors.option,
|
|
107
|
+
fontFamily: t.typography.fontFamily,
|
|
104
108
|
fontSize: t.typography.cancel
|
|
105
109
|
}])));
|
|
106
110
|
});
|
|
@@ -193,6 +197,7 @@ const ShareSheetImpl = p => {
|
|
|
193
197
|
}]
|
|
194
198
|
}, ht && ((0, _validate.isText)(title) ? (0, _utils.renderTextOrNode)(title, [S.t, {
|
|
195
199
|
color: t.colors.title,
|
|
200
|
+
fontFamily: t.typography.fontFamily,
|
|
196
201
|
fontSize: t.typography.title,
|
|
197
202
|
marginTop: t.spacing.titleMarginTop
|
|
198
203
|
}]) : /*#__PURE__*/_react().default.createElement(_reactNative().View, {
|
|
@@ -201,6 +206,7 @@ const ShareSheetImpl = p => {
|
|
|
201
206
|
}]
|
|
202
207
|
}, title)), hd && ((0, _validate.isText)(description) ? (0, _utils.renderTextOrNode)(description, [S.d, {
|
|
203
208
|
color: t.colors.description,
|
|
209
|
+
fontFamily: t.typography.fontFamily,
|
|
204
210
|
fontSize: t.typography.description,
|
|
205
211
|
marginTop: t.spacing.descriptionMarginTop
|
|
206
212
|
}]) : /*#__PURE__*/_react().default.createElement(_reactNative().View, {
|
|
@@ -208,7 +214,7 @@ const ShareSheetImpl = p => {
|
|
|
208
214
|
marginTop: t.spacing.nodeMarginTop
|
|
209
215
|
}]
|
|
210
216
|
}, description)));
|
|
211
|
-
}, [description, hd, ht, title, t.colors.description, t.colors.title, t.spacing.descriptionMarginTop, t.spacing.headerPaddingBottom, t.spacing.headerPaddingHorizontal, t.spacing.headerPaddingTop, t.spacing.nodeMarginTop, t.spacing.titleMarginTop, t.typography.description, t.typography.title]);
|
|
217
|
+
}, [description, hd, ht, title, t.colors.description, t.colors.title, t.spacing.descriptionMarginTop, t.spacing.headerPaddingBottom, t.spacing.headerPaddingHorizontal, t.spacing.headerPaddingTop, t.spacing.nodeMarginTop, t.spacing.titleMarginTop, t.typography.description, t.typography.fontFamily, t.typography.title]);
|
|
212
218
|
const psm = [{
|
|
213
219
|
padding: t.spacing.popupPadding
|
|
214
220
|
}, ps];
|
|
@@ -9,7 +9,8 @@ const createTokens = foundations => {
|
|
|
9
9
|
const {
|
|
10
10
|
palette,
|
|
11
11
|
spacing,
|
|
12
|
-
fontSize
|
|
12
|
+
fontSize,
|
|
13
|
+
typography
|
|
13
14
|
} = foundations;
|
|
14
15
|
return {
|
|
15
16
|
colors: {
|
|
@@ -42,6 +43,7 @@ const createTokens = foundations => {
|
|
|
42
43
|
icon: 48
|
|
43
44
|
},
|
|
44
45
|
typography: {
|
|
46
|
+
fontFamily: typography.fontFamily,
|
|
45
47
|
title: fontSize.md,
|
|
46
48
|
description: fontSize.xs,
|
|
47
49
|
option: fontSize.xs,
|
|
@@ -39,38 +39,44 @@ const SidebarBaseImpl = props => {
|
|
|
39
39
|
const dir = (0, _useDirection.useDirection)();
|
|
40
40
|
const sidebarItems = (0, _react().useMemo)(() => {
|
|
41
41
|
const items = [];
|
|
42
|
-
_react().default.Children.toArray(children).forEach((child,
|
|
42
|
+
_react().default.Children.toArray(children).forEach((child, i) => {
|
|
43
43
|
if (/*#__PURE__*/_react().default.isValidElement(child)) items.push({
|
|
44
44
|
element: child,
|
|
45
|
-
index
|
|
45
|
+
index: i
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
48
|
return items;
|
|
49
49
|
}, [children]);
|
|
50
|
-
const
|
|
50
|
+
const firstIdx = sidebarItems[0]?.index ?? 0;
|
|
51
51
|
const [activeIndex, setActiveIndex] = (0, _hooks.useControllableValue)(props, {
|
|
52
|
-
defaultValue:
|
|
52
|
+
defaultValue: firstIdx,
|
|
53
53
|
valuePropName: 'value',
|
|
54
54
|
defaultValuePropName: 'defaultValue',
|
|
55
55
|
trigger: 'onChange'
|
|
56
56
|
});
|
|
57
|
-
const
|
|
57
|
+
const curIdx = (0, _react().useMemo)(() => {
|
|
58
58
|
for (const item of sidebarItems) {
|
|
59
59
|
if (item.index === activeIndex) return activeIndex;
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
;
|
|
62
|
+
return firstIdx;
|
|
63
|
+
}, [activeIndex, firstIdx, sidebarItems]);
|
|
64
|
+
const ctxVal = (0, _react().useMemo)(() => ({
|
|
65
|
+
activeIndex: curIdx,
|
|
65
66
|
onSelect: setActiveIndex
|
|
66
|
-
}), [
|
|
67
|
-
const
|
|
67
|
+
}), [curIdx, setActiveIndex]);
|
|
68
|
+
const cloned = (0, _react().useMemo)(() => sidebarItems.map(item => /*#__PURE__*/_react().default.cloneElement(item.element, {
|
|
68
69
|
key: item.element.key ?? item.index,
|
|
69
70
|
index: item.index,
|
|
70
71
|
tokensOverride: (0, _designSystem.mergeTokensOverride)(tokensOverride, item.element.props.tokensOverride)
|
|
71
72
|
})), [sidebarItems, tokensOverride]);
|
|
72
|
-
const activeItem = sidebarItems.find(item => item.index ===
|
|
73
|
-
const
|
|
73
|
+
const activeItem = sidebarItems.find(item => item.index === curIdx)?.element;
|
|
74
|
+
const contentTxtStyle = (0, _react().useMemo)(() => ({
|
|
75
|
+
fontFamily: tokens.typography.fontFamily,
|
|
76
|
+
fontSize: tokens.typography.contentFontSize,
|
|
77
|
+
fontWeight: tokens.typography.fontWeight
|
|
78
|
+
}), [tokens.typography.fontFamily, tokens.typography.contentFontSize, tokens.typography.fontWeight]);
|
|
79
|
+
const activeContent = !(0, _validate.isRenderable)(activeItem?.props?.children) ? null : (0, _utils.renderTextOrNode)(activeItem.props.children, contentTxtStyle);
|
|
74
80
|
return /*#__PURE__*/_react().default.createElement(_reactNative().View, _extends({}, rest, {
|
|
75
81
|
style: [tokens.layout.container, {
|
|
76
82
|
backgroundColor: tokens.colors.background
|
|
@@ -81,8 +87,8 @@ const SidebarBaseImpl = props => {
|
|
|
81
87
|
}, sideStyle],
|
|
82
88
|
accessibilityRole: "tablist"
|
|
83
89
|
}, /*#__PURE__*/_react().default.createElement(_SidebarContext.SidebarContext.Provider, {
|
|
84
|
-
value:
|
|
85
|
-
},
|
|
90
|
+
value: ctxVal
|
|
91
|
+
}, cloned), /*#__PURE__*/_react().default.createElement(_reactNative().View, {
|
|
86
92
|
style: (0, _utils.createHairlineView)({
|
|
87
93
|
position: dir === 'rtl' ? 'left' : 'right',
|
|
88
94
|
color: tokens.colors.border,
|
|
@@ -91,7 +97,7 @@ const SidebarBaseImpl = props => {
|
|
|
91
97
|
})
|
|
92
98
|
})), /*#__PURE__*/_react().default.createElement(_reactNative().View, {
|
|
93
99
|
style: [tokens.layout.content, activeItem?.props?.contentStyle]
|
|
94
|
-
},
|
|
100
|
+
}, activeContent));
|
|
95
101
|
};
|
|
96
102
|
const SidebarBase = /*#__PURE__*/_react().default.memo(SidebarBaseImpl);
|
|
97
103
|
var _default = exports.default = SidebarBase;
|
|
@@ -42,16 +42,16 @@ const SidebarItemImpl = props => {
|
|
|
42
42
|
...rest
|
|
43
43
|
} = props;
|
|
44
44
|
const tokens = (0, _tokens.useSidebarTokens)(tokensOverride);
|
|
45
|
-
const
|
|
46
|
-
if (!
|
|
45
|
+
const ctx = (0, _SidebarContext.useSidebarContext)();
|
|
46
|
+
if (!ctx) return null;
|
|
47
47
|
const disabled = disabledProp ?? tokens.defaults.disabled;
|
|
48
|
-
const isActive =
|
|
49
|
-
const
|
|
48
|
+
const isActive = ctx.activeIndex === index;
|
|
49
|
+
const titleClr = disabled ? tokens.colors.disabled : isActive ? tokens.colors.titleActive : tokens.colors.title;
|
|
50
50
|
const press = (0, _hooks.useAriaPress)({
|
|
51
51
|
disabled,
|
|
52
52
|
onPress: () => {
|
|
53
53
|
onClick?.(index);
|
|
54
|
-
|
|
54
|
+
ctx.onSelect(index);
|
|
55
55
|
},
|
|
56
56
|
extraProps: {
|
|
57
57
|
accessibilityRole: 'tab',
|
|
@@ -62,14 +62,15 @@ const SidebarItemImpl = props => {
|
|
|
62
62
|
testID: `rv-sidebar-item-${index}`
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
|
-
const
|
|
65
|
+
const indStyle = [tokens.layout.indicator, {
|
|
66
66
|
width: tokens.sizing.indicatorWidth,
|
|
67
67
|
borderRadius: tokens.sizing.indicatorWidth,
|
|
68
68
|
backgroundColor: tokens.colors.indicator
|
|
69
69
|
}];
|
|
70
70
|
const titleNode = (0, _utils.isRenderable)(title) ? (0, _utils.isText)(title) ? /*#__PURE__*/_react().default.createElement(_reactNative().Text, {
|
|
71
71
|
style: [tokens.layout.title, {
|
|
72
|
-
color:
|
|
72
|
+
color: titleClr,
|
|
73
|
+
fontFamily: tokens.typography.fontFamily,
|
|
73
74
|
fontSize: tokens.typography.fontSize,
|
|
74
75
|
fontWeight: tokens.typography.fontWeight
|
|
75
76
|
}, textStyle]
|
|
@@ -91,7 +92,7 @@ const SidebarItemImpl = props => {
|
|
|
91
92
|
}), /*#__PURE__*/_react().default.createElement(_reactNative().View, {
|
|
92
93
|
style: tokens.layout.indicatorWrapper
|
|
93
94
|
}, isActive && /*#__PURE__*/_react().default.createElement(_reactNative().View, {
|
|
94
|
-
style:
|
|
95
|
+
style: indStyle
|
|
95
96
|
})), /*#__PURE__*/_react().default.createElement(_reactNative().View, {
|
|
96
97
|
style: tokens.layout.itemContent
|
|
97
98
|
}, /*#__PURE__*/_react().default.createElement(_reactNative().View, {
|
|
@@ -74,8 +74,10 @@ const createSidebarTokens = foundations => {
|
|
|
74
74
|
indicator: palette.primary[600]
|
|
75
75
|
},
|
|
76
76
|
typography: {
|
|
77
|
+
fontFamily: typography.fontFamily,
|
|
77
78
|
fontSize: fontSize.sm,
|
|
78
|
-
fontWeight: typography.weight.medium
|
|
79
|
+
fontWeight: typography.weight.medium,
|
|
80
|
+
contentFontSize: fontSize.sm
|
|
79
81
|
},
|
|
80
82
|
sizing: {
|
|
81
83
|
width: 120,
|
|
@@ -32,36 +32,36 @@ const SkeletonImpl = (props, ref) => {
|
|
|
32
32
|
const {
|
|
33
33
|
tokensOverride,
|
|
34
34
|
isLoaded,
|
|
35
|
-
loading:
|
|
36
|
-
animate:
|
|
35
|
+
loading: loadP,
|
|
36
|
+
animate: animP,
|
|
37
37
|
startColor,
|
|
38
|
-
speed:
|
|
39
|
-
avatar:
|
|
40
|
-
avatarSize:
|
|
41
|
-
avatarShape:
|
|
42
|
-
title:
|
|
43
|
-
titleWidth:
|
|
44
|
-
row:
|
|
45
|
-
rowWidth:
|
|
38
|
+
speed: speedP,
|
|
39
|
+
avatar: avP,
|
|
40
|
+
avatarSize: avSzP,
|
|
41
|
+
avatarShape: avShapeP,
|
|
42
|
+
title: titleP,
|
|
43
|
+
titleWidth: titleWP,
|
|
44
|
+
row: rowP,
|
|
45
|
+
rowWidth: rowWP,
|
|
46
46
|
rowHeight,
|
|
47
|
-
round:
|
|
47
|
+
round: roundP,
|
|
48
48
|
style,
|
|
49
49
|
children,
|
|
50
50
|
...rest
|
|
51
51
|
} = props;
|
|
52
52
|
const tokens = (0, _tokens.useSkeletonTokens)(tokensOverride);
|
|
53
53
|
const reducedMotion = (0, _animation.useReducedMotion)();
|
|
54
|
-
const loading =
|
|
55
|
-
const animate =
|
|
56
|
-
const avatar =
|
|
57
|
-
const avatarSize =
|
|
58
|
-
const avatarShape =
|
|
59
|
-
const title =
|
|
60
|
-
const titleWidth =
|
|
61
|
-
const row =
|
|
62
|
-
const rowWidth =
|
|
63
|
-
const round =
|
|
64
|
-
const speed = (0, _utils.isFiniteNumber)(
|
|
54
|
+
const loading = loadP ?? (isLoaded != null ? !isLoaded : true);
|
|
55
|
+
const animate = animP ?? true;
|
|
56
|
+
const avatar = avP ?? false;
|
|
57
|
+
const avatarSize = avSzP ?? tokens.defaults.avatarSize;
|
|
58
|
+
const avatarShape = avShapeP ?? 'round';
|
|
59
|
+
const title = titleP ?? false;
|
|
60
|
+
const titleWidth = titleWP ?? tokens.defaults.titleWidth;
|
|
61
|
+
const row = rowP ?? tokens.defaults.rowCount;
|
|
62
|
+
const rowWidth = rowWP ?? tokens.defaults.rowWidth;
|
|
63
|
+
const round = roundP ?? false;
|
|
64
|
+
const speed = (0, _utils.isFiniteNumber)(speedP) ? Math.max(0.01, speedP) : (0, _utils.isString)(speedP) && Number.isFinite(Number(speedP)) && Number(speedP) > 0 ? Number(speedP) : 1;
|
|
65
65
|
const duration = Math.max(0, tokens.animation.duration / speed);
|
|
66
66
|
const blockColor = startColor ?? tokens.colors.block;
|
|
67
67
|
const rows = (0, _utils.isFiniteNumber)(row) ? Math.max(0, Math.floor(row)) : 0;
|
|
@@ -72,14 +72,15 @@ const SkeletonImpl = (props, ref) => {
|
|
|
72
72
|
}, [props.rowWidth, rowWidth, rows, tokens.defaults.lastRowWidth, tokens.defaults.rowWidth]);
|
|
73
73
|
const rowHeights = (0, _react().useMemo)(() => resolveSeries(rows, rowHeight, tokens.defaults.rowHeight), [rowHeight, rows, tokens.defaults.rowHeight]);
|
|
74
74
|
const titleHeight = rowHeights[0] ?? tokens.defaults.rowHeight;
|
|
75
|
-
const
|
|
76
|
-
const
|
|
75
|
+
const rAvSz = normalize(avatarSize, tokens.defaults.avatarSize);
|
|
76
|
+
const rTitleW = normalize(titleWidth, tokens.defaults.titleWidth);
|
|
77
77
|
const animated = (0, _react().useRef)(new (_reactNative().Animated.Value)(0)).current;
|
|
78
78
|
(0, _react().useEffect)(() => {
|
|
79
79
|
if (!loading || !animate || duration <= 0 || reducedMotion) {
|
|
80
80
|
animated.setValue(0);
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
+
;
|
|
83
84
|
const loop = _reactNative().Animated.loop(_reactNative().Animated.sequence([_reactNative().Animated.timing(animated, {
|
|
84
85
|
toValue: 1,
|
|
85
86
|
duration: duration / 2,
|
|
@@ -94,51 +95,51 @@ const SkeletonImpl = (props, ref) => {
|
|
|
94
95
|
loop.start();
|
|
95
96
|
return () => loop.stop();
|
|
96
97
|
}, [animate, animated, duration, loading, reducedMotion]);
|
|
97
|
-
const
|
|
98
|
+
const animStyle = (0, _react().useMemo)(() => !loading || !animate ? undefined : {
|
|
98
99
|
opacity: animated.interpolate({
|
|
99
100
|
inputRange: [0, 1],
|
|
100
101
|
outputRange: [tokens.animation.minOpacity, tokens.animation.maxOpacity]
|
|
101
102
|
})
|
|
102
103
|
}, [animate, animated, loading, tokens.animation.maxOpacity, tokens.animation.minOpacity]);
|
|
103
|
-
const
|
|
104
|
+
const ctrStyles = [S.ctr, {
|
|
104
105
|
gap: tokens.spacing.containerGap
|
|
105
106
|
}, style];
|
|
106
107
|
const avatarNode = (0, _react().useMemo)(() => !avatar ? null : /*#__PURE__*/_react().default.createElement(_reactNative().Animated.View, {
|
|
107
108
|
style: [{
|
|
108
|
-
width:
|
|
109
|
-
height:
|
|
109
|
+
width: rAvSz,
|
|
110
|
+
height: rAvSz,
|
|
110
111
|
borderRadius: avatarShape === 'round' ? 999 : tokens.radius,
|
|
111
112
|
backgroundColor: blockColor
|
|
112
|
-
},
|
|
113
|
-
}), [
|
|
113
|
+
}, animStyle]
|
|
114
|
+
}), [animStyle, avatar, avatarShape, blockColor, rAvSz, tokens.radius]);
|
|
114
115
|
const titleNode = (0, _react().useMemo)(() => !title ? null : /*#__PURE__*/_react().default.createElement(_reactNative().Animated.View, {
|
|
115
116
|
style: [{
|
|
116
|
-
width:
|
|
117
|
+
width: rTitleW,
|
|
117
118
|
height: titleHeight,
|
|
118
119
|
backgroundColor: blockColor,
|
|
119
120
|
borderRadius: round ? tokens.radius : 0
|
|
120
|
-
},
|
|
121
|
-
}), [
|
|
121
|
+
}, animStyle]
|
|
122
|
+
}), [animStyle, blockColor, rTitleW, round, title, titleHeight, tokens.radius]);
|
|
122
123
|
const rowNodes = (0, _react().useMemo)(() => rows <= 0 ? null : /*#__PURE__*/_react().default.createElement(_reactNative().View, {
|
|
123
124
|
style: S.rows
|
|
124
|
-
}, rowWidths.map((
|
|
125
|
-
key:
|
|
126
|
-
testID: `rv-skeleton-row-${
|
|
125
|
+
}, rowWidths.map((w, i) => /*#__PURE__*/_react().default.createElement(_reactNative().Animated.View, {
|
|
126
|
+
key: i,
|
|
127
|
+
testID: `rv-skeleton-row-${i}`,
|
|
127
128
|
style: [{
|
|
128
|
-
width:
|
|
129
|
-
height: rowHeights[
|
|
130
|
-
marginTop:
|
|
129
|
+
width: w,
|
|
130
|
+
height: rowHeights[i],
|
|
131
|
+
marginTop: i === 0 && !title ? 0 : tokens.spacing.rowGap,
|
|
131
132
|
backgroundColor: blockColor,
|
|
132
133
|
borderRadius: round ? tokens.radius : 0
|
|
133
|
-
},
|
|
134
|
-
}))), [
|
|
134
|
+
}, animStyle]
|
|
135
|
+
}))), [animStyle, blockColor, rowHeights, rowWidths, rows, round, title, tokens.radius, tokens.spacing.rowGap]);
|
|
135
136
|
if (!loading) return /*#__PURE__*/_react().default.createElement(_reactNative().View, _extends({
|
|
136
137
|
ref: ref,
|
|
137
138
|
style: style
|
|
138
139
|
}, rest), children);
|
|
139
140
|
return /*#__PURE__*/_react().default.createElement(_reactNative().View, _extends({
|
|
140
141
|
ref: ref,
|
|
141
|
-
style:
|
|
142
|
+
style: ctrStyles
|
|
142
143
|
}, rest), avatarNode, /*#__PURE__*/_react().default.createElement(_reactNative().View, {
|
|
143
144
|
style: S.cnt
|
|
144
145
|
}, titleNode, rowNodes));
|
|
@@ -205,7 +205,7 @@ const ThumbNode = /*#__PURE__*/_react().default.memo(({
|
|
|
205
205
|
return /*#__PURE__*/_react().default.createElement(_reactNative().View, _extends({}, handlers, accessibilityProps, {
|
|
206
206
|
pointerEvents: isDisabled ? 'none' : 'auto',
|
|
207
207
|
style: [content ? S.thw : S.t, webGestureStyle, thumbStyle]
|
|
208
|
-
}), content
|
|
208
|
+
}), content != null ? (0, _validate.isText)(content) ? (0, _utils2.renderTextOrNode)(content, []) : content : /*#__PURE__*/_react().default.createElement(_reactNative().View, {
|
|
209
209
|
style: indicatorStyle
|
|
210
210
|
}), !content && /*#__PURE__*/_react().default.createElement(_reactNative().View, {
|
|
211
211
|
style: (0, _hairline.createHairlineView)({
|