react-native-platform-components 0.8.9 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +126 -30
- package/android/src/main/java/com/platformcomponents/PCImageLoader.kt +88 -0
- package/android/src/main/java/com/platformcomponents/PCSegmentedControlView.kt +288 -29
- package/android/src/main/java/com/platformcomponents/PCSegmentedControlViewManager.kt +74 -8
- package/ios/PCConstants.swift +39 -3
- package/ios/PCImageLoader.swift +58 -0
- package/ios/PCSegmentedControl.mm +85 -25
- package/ios/PCSegmentedControl.swift +231 -308
- package/ios/PCSelectionMenu.swift +60 -14
- package/lib/commonjs/DatePickerNativeComponent.ts +4 -2
- package/lib/commonjs/SegmentedControl.js +138 -6
- package/lib/commonjs/SegmentedControl.js.map +1 -1
- package/lib/commonjs/SegmentedControlNativeComponent.ts +62 -8
- package/lib/commonjs/SelectionMenuNativeComponent.ts +4 -2
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/module/DatePickerNativeComponent.ts +4 -2
- package/lib/module/SegmentedControl.js +138 -7
- package/lib/module/SegmentedControl.js.map +1 -1
- package/lib/module/SegmentedControlNativeComponent.ts +62 -8
- package/lib/module/SelectionMenuNativeComponent.ts +4 -2
- package/lib/module/index.web.js.map +1 -1
- package/lib/typescript/commonjs/src/DatePickerNativeComponent.d.ts +2 -2
- package/lib/typescript/commonjs/src/DatePickerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/SegmentedControl.d.ts +111 -6
- package/lib/typescript/commonjs/src/SegmentedControl.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/SegmentedControlNativeComponent.d.ts +46 -7
- package/lib/typescript/commonjs/src/SegmentedControlNativeComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/SelectionMenuNativeComponent.d.ts +2 -2
- package/lib/typescript/commonjs/src/SelectionMenuNativeComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.web.d.ts +36 -1
- package/lib/typescript/commonjs/src/index.web.d.ts.map +1 -1
- package/lib/typescript/module/src/DatePicker.d.ts +1 -1
- package/lib/typescript/module/src/DatePicker.d.ts.map +1 -1
- package/lib/typescript/module/src/DatePickerNativeComponent.d.ts +2 -2
- package/lib/typescript/module/src/DatePickerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/SegmentedControl.d.ts +111 -6
- package/lib/typescript/module/src/SegmentedControl.d.ts.map +1 -1
- package/lib/typescript/module/src/SegmentedControlNativeComponent.d.ts +46 -7
- package/lib/typescript/module/src/SegmentedControlNativeComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/SelectionMenu.d.ts +1 -1
- package/lib/typescript/module/src/SelectionMenu.d.ts.map +1 -1
- package/lib/typescript/module/src/SelectionMenuNativeComponent.d.ts +2 -2
- package/lib/typescript/module/src/SelectionMenuNativeComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +6 -6
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.web.d.ts +36 -1
- package/lib/typescript/module/src/index.web.d.ts.map +1 -1
- package/package.json +30 -25
- package/plugin/tsconfig.json +2 -2
- package/src/DatePickerNativeComponent.ts +4 -2
- package/src/SegmentedControl.tsx +238 -11
- package/src/SegmentedControlNativeComponent.ts +62 -8
- package/src/SelectionMenuNativeComponent.ts +4 -2
- package/src/index.web.tsx +34 -1
|
@@ -277,33 +277,53 @@ public final class PCSelectionMenuView: UIControl {
|
|
|
277
277
|
// Calculate menu position relative to source view
|
|
278
278
|
let sourceFrame = self.convert(self.bounds, to: vc.view)
|
|
279
279
|
let screenBounds = vc.view.bounds
|
|
280
|
-
let popoverHeight = min(
|
|
281
|
-
CGFloat(opts.count) * PCConstants.popoverRowHeight + PCConstants.popoverVerticalPadding,
|
|
282
|
-
PCConstants.popoverMaxHeight
|
|
283
|
-
)
|
|
284
280
|
let spacing: CGFloat = 8
|
|
285
281
|
|
|
282
|
+
// Adaptive width (wider at accessibility sizes), clamped to the screen.
|
|
283
|
+
let category = self.traitCollection.preferredContentSizeCategory
|
|
284
|
+
let menuWidth = min(
|
|
285
|
+
PCConstants.popoverWidth(forCategory: category),
|
|
286
|
+
screenBounds.width - 32
|
|
287
|
+
)
|
|
288
|
+
|
|
289
|
+
// Measure the real (possibly multi-line) content height so the
|
|
290
|
+
// container fits its rows instead of clipping or leaving gaps.
|
|
291
|
+
let contentHeight = opts.reduce(PCConstants.popoverVerticalPadding) { partial, opt in
|
|
292
|
+
partial + PCConstants.popoverRowHeight(forLabel: opt.label, width: menuWidth)
|
|
293
|
+
}
|
|
294
|
+
// Allow taller menus at accessibility sizes; otherwise keep them compact.
|
|
295
|
+
let maxHeight = category.isAccessibilityCategory
|
|
296
|
+
? max(PCConstants.popoverMaxHeight, screenBounds.height - 120)
|
|
297
|
+
: PCConstants.popoverMaxHeight
|
|
298
|
+
let popoverHeight = min(contentHeight, maxHeight)
|
|
299
|
+
|
|
286
300
|
// Check if menu fits below the source view
|
|
287
|
-
let
|
|
301
|
+
let firstRowHeight = PCConstants.popoverRowHeight(forLabel: opts[0].label, width: menuWidth)
|
|
288
302
|
let wouldExtendBeyondBottom = sourceFrame.maxY + spacing + popoverHeight > screenBounds.maxY - 20
|
|
289
303
|
|
|
290
|
-
|
|
304
|
+
var menuY: CGFloat
|
|
291
305
|
if wouldExtendBeyondBottom {
|
|
292
306
|
// Position above the source view (no overlap offset)
|
|
293
307
|
menuY = sourceFrame.minY - spacing - popoverHeight
|
|
294
308
|
} else {
|
|
295
309
|
// Position below, but shift up by one row to overlap trigger (like system menu)
|
|
296
|
-
menuY = sourceFrame.maxY + spacing -
|
|
310
|
+
menuY = sourceFrame.maxY + spacing - firstRowHeight
|
|
297
311
|
}
|
|
298
312
|
|
|
313
|
+
// Keep the menu fully on screen vertically (tall menus at large
|
|
314
|
+
// Dynamic Type sizes can otherwise run off the top or bottom).
|
|
315
|
+
let topMargin = vc.view.safeAreaInsets.top + spacing
|
|
316
|
+
let bottomLimit = screenBounds.maxY - vc.view.safeAreaInsets.bottom - spacing - popoverHeight
|
|
317
|
+
menuY = min(max(menuY, topMargin), max(topMargin, bottomLimit))
|
|
318
|
+
|
|
299
319
|
// Center horizontally, but keep within screen bounds
|
|
300
|
-
var menuX = sourceFrame.midX -
|
|
301
|
-
menuX = max(16, min(menuX, screenBounds.maxX -
|
|
320
|
+
var menuX = sourceFrame.midX - menuWidth / 2
|
|
321
|
+
menuX = max(16, min(menuX, screenBounds.maxX - menuWidth - 16))
|
|
302
322
|
|
|
303
323
|
let menuFrame = CGRect(
|
|
304
324
|
x: menuX,
|
|
305
325
|
y: menuY,
|
|
306
|
-
width:
|
|
326
|
+
width: menuWidth,
|
|
307
327
|
height: popoverHeight
|
|
308
328
|
)
|
|
309
329
|
|
|
@@ -365,6 +385,11 @@ public final class PCSelectionMenuView: UIControl {
|
|
|
365
385
|
private class PCGlassMenuCell: UITableViewCell {
|
|
366
386
|
static let reuseIdentifier = "PCGlassMenuCell"
|
|
367
387
|
|
|
388
|
+
/// Custom multi-line label. We avoid the legacy `textLabel` because it
|
|
389
|
+
/// defaults to a single line and does not drive self-sizing reliably, which
|
|
390
|
+
/// caused rows to overlap at large Dynamic Type sizes.
|
|
391
|
+
let menuLabel = UILabel()
|
|
392
|
+
|
|
368
393
|
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
|
369
394
|
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
|
370
395
|
setupCell()
|
|
@@ -379,8 +404,26 @@ private class PCGlassMenuCell: UITableViewCell {
|
|
|
379
404
|
backgroundColor = .clear
|
|
380
405
|
contentView.backgroundColor = .clear
|
|
381
406
|
selectionStyle = .none
|
|
382
|
-
|
|
383
|
-
|
|
407
|
+
|
|
408
|
+
menuLabel.font = .preferredFont(forTextStyle: .body)
|
|
409
|
+
menuLabel.adjustsFontForContentSizeCategory = true
|
|
410
|
+
menuLabel.numberOfLines = 0
|
|
411
|
+
menuLabel.translatesAutoresizingMaskIntoConstraints = false
|
|
412
|
+
contentView.addSubview(menuLabel)
|
|
413
|
+
|
|
414
|
+
let v = PCConstants.popoverRowVerticalPadding / 2
|
|
415
|
+
let h = PCConstants.popoverRowHorizontalInset
|
|
416
|
+
// Center the label and let it grow the row vertically. The min-height
|
|
417
|
+
// constraint guarantees the 44pt touch target for short labels, while
|
|
418
|
+
// the >= top / <= bottom pair lets tall (wrapped) labels expand the row.
|
|
419
|
+
NSLayoutConstraint.activate([
|
|
420
|
+
menuLabel.topAnchor.constraint(greaterThanOrEqualTo: contentView.topAnchor, constant: v),
|
|
421
|
+
menuLabel.bottomAnchor.constraint(lessThanOrEqualTo: contentView.bottomAnchor, constant: -v),
|
|
422
|
+
menuLabel.centerYAnchor.constraint(equalTo: contentView.centerYAnchor),
|
|
423
|
+
menuLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: h),
|
|
424
|
+
menuLabel.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -h),
|
|
425
|
+
contentView.heightAnchor.constraint(greaterThanOrEqualToConstant: PCConstants.popoverRowHeightMin),
|
|
426
|
+
])
|
|
384
427
|
}
|
|
385
428
|
}
|
|
386
429
|
|
|
@@ -451,7 +494,10 @@ private class PCMenuViewController: UIViewController, UITableViewDelegate, UITab
|
|
|
451
494
|
tableView.backgroundColor = .clear
|
|
452
495
|
tableView.separatorStyle = .none
|
|
453
496
|
tableView.isScrollEnabled = true
|
|
454
|
-
|
|
497
|
+
// Self-sizing rows so labels that wrap at large Dynamic Type sizes get
|
|
498
|
+
// the height they need instead of overlapping a fixed-height row.
|
|
499
|
+
tableView.rowHeight = UITableView.automaticDimension
|
|
500
|
+
tableView.estimatedRowHeight = PCConstants.popoverRowHeight
|
|
455
501
|
tableView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
|
456
502
|
let verticalPad = PCConstants.popoverVerticalPadding / 2
|
|
457
503
|
tableView.contentInset = UIEdgeInsets(top: verticalPad, left: 0, bottom: verticalPad, right: 0)
|
|
@@ -479,7 +525,7 @@ private class PCMenuViewController: UIViewController, UITableViewDelegate, UITab
|
|
|
479
525
|
|
|
480
526
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
|
481
527
|
let cell = tableView.dequeueReusableCell(withIdentifier: PCGlassMenuCell.reuseIdentifier, for: indexPath)
|
|
482
|
-
cell.
|
|
528
|
+
(cell as? PCGlassMenuCell)?.menuLabel.text = options[indexPath.row].label
|
|
483
529
|
return cell
|
|
484
530
|
}
|
|
485
531
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// DatePickerNativeComponent.ts
|
|
2
|
-
import type { CodegenTypes, ViewProps } from 'react-native';
|
|
2
|
+
import type { CodegenTypes, HostComponent, ViewProps } from 'react-native';
|
|
3
3
|
import { codegenNativeComponent } from 'react-native';
|
|
4
4
|
|
|
5
5
|
export type TimestampMs = CodegenTypes.Double;
|
|
@@ -69,4 +69,6 @@ export interface NativeProps extends ViewProps, CommonProps {
|
|
|
69
69
|
onClosed?: CodegenTypes.BubblingEventHandler<Readonly<{}>>;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
export default codegenNativeComponent<NativeProps>(
|
|
72
|
+
export default codegenNativeComponent<NativeProps>(
|
|
73
|
+
'PCDatePicker'
|
|
74
|
+
) as HostComponent<NativeProps>;
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SegmentedControl = SegmentedControl;
|
|
7
|
+
exports.resolveSegmentIcon = resolveSegmentIcon;
|
|
7
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
9
|
var _reactNative = require("react-native");
|
|
9
10
|
var _SegmentedControlNativeComponent = _interopRequireDefault(require("./SegmentedControlNativeComponent"));
|
|
@@ -16,6 +17,101 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
16
17
|
// Fabric's shadow node measurement isn't being called on initial render,
|
|
17
18
|
// so we apply a minHeight that matches Material design touch target guidelines.
|
|
18
19
|
const ANDROID_MIN_HEIGHT = 48;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* A single icon source.
|
|
23
|
+
*
|
|
24
|
+
* - `string`: shorthand for an SF Symbol name on iOS and a drawable resource
|
|
25
|
+
* name on Android (the original API).
|
|
26
|
+
* - `{ type: 'sfSymbol' }`: an SF Symbol. iOS only; ignored on Android.
|
|
27
|
+
* - `{ type: 'drawable' }`: a drawable from the app's `res/drawable`.
|
|
28
|
+
* Android only; ignored on iOS.
|
|
29
|
+
* - `{ type: 'image' }`: an image asset (`require('./icon.png')`) or a
|
|
30
|
+
* `{ uri }` source. Works on both platforms. Images are drawn as tinted
|
|
31
|
+
* templates unless `tinted` is `false`.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* An icon for a segment: a single source used on both platforms, or a
|
|
36
|
+
* per-platform pair so callers don't need to branch on `Platform.OS`.
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* How labels and icons combine for segments that have an icon.
|
|
41
|
+
*
|
|
42
|
+
* - `auto` (default): platform behavior. iOS shows the icon in place of the
|
|
43
|
+
* label (UISegmentedControl cannot show both); Android shows icon and label.
|
|
44
|
+
* - `labeled`: always show the label. iOS drops the icon; Android shows both.
|
|
45
|
+
* - `unlabeled`: show only the icon. Segments without an icon still show
|
|
46
|
+
* their label. Screen readers still announce the label on both platforms.
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Font for segment labels. Each field falls back to the platform default.
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Badge colors. Both default to the platform look (red with white text).
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
const NO_ICON = {
|
|
58
|
+
iconType: '',
|
|
59
|
+
iconName: '',
|
|
60
|
+
iconUri: '',
|
|
61
|
+
iconScale: 1,
|
|
62
|
+
iconTinted: 'true'
|
|
63
|
+
};
|
|
64
|
+
function pickIconSource(icon) {
|
|
65
|
+
if (icon === undefined || typeof icon === 'string' || 'type' in icon) {
|
|
66
|
+
return icon;
|
|
67
|
+
}
|
|
68
|
+
return _reactNative.Platform.OS === 'ios' ? icon.ios : icon.android;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Flattens the public icon shape into the strings native expects, dropping
|
|
73
|
+
* sources that don't apply to the current platform.
|
|
74
|
+
*/
|
|
75
|
+
function resolveSegmentIcon(icon) {
|
|
76
|
+
const source = pickIconSource(icon);
|
|
77
|
+
if (source === undefined) return NO_ICON;
|
|
78
|
+
if (typeof source === 'string') {
|
|
79
|
+
if (source.length === 0) return NO_ICON;
|
|
80
|
+
return {
|
|
81
|
+
...NO_ICON,
|
|
82
|
+
iconType: _reactNative.Platform.OS === 'ios' ? 'sfSymbol' : 'drawable',
|
|
83
|
+
iconName: source
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
switch (source.type) {
|
|
87
|
+
case 'sfSymbol':
|
|
88
|
+
return _reactNative.Platform.OS === 'ios' ? {
|
|
89
|
+
...NO_ICON,
|
|
90
|
+
iconType: 'sfSymbol',
|
|
91
|
+
iconName: source.name
|
|
92
|
+
} : NO_ICON;
|
|
93
|
+
case 'drawable':
|
|
94
|
+
return _reactNative.Platform.OS === 'android' ? {
|
|
95
|
+
...NO_ICON,
|
|
96
|
+
iconType: 'drawable',
|
|
97
|
+
iconName: source.name
|
|
98
|
+
} : NO_ICON;
|
|
99
|
+
case 'image':
|
|
100
|
+
{
|
|
101
|
+
const resolved = _reactNative.Image.resolveAssetSource(source.source);
|
|
102
|
+
if (!resolved?.uri) return NO_ICON;
|
|
103
|
+
return {
|
|
104
|
+
iconType: 'image',
|
|
105
|
+
iconName: '',
|
|
106
|
+
iconUri: resolved.uri,
|
|
107
|
+
iconScale: resolved.scale > 0 ? resolved.scale : 1,
|
|
108
|
+
iconTinted: source.tinted === false ? 'false' : 'true'
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
default:
|
|
112
|
+
return NO_ICON;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
19
115
|
function normalizeSelectedValue(selected) {
|
|
20
116
|
return selected ?? '';
|
|
21
117
|
}
|
|
@@ -25,7 +121,14 @@ function SegmentedControl(props) {
|
|
|
25
121
|
segments,
|
|
26
122
|
selectedValue,
|
|
27
123
|
disabled,
|
|
124
|
+
labelVisibility,
|
|
125
|
+
selectedSegmentColor,
|
|
126
|
+
activeTintColor,
|
|
127
|
+
inactiveTintColor,
|
|
128
|
+
labelStyle,
|
|
129
|
+
badgeStyle,
|
|
28
130
|
onSelect,
|
|
131
|
+
onDeselect,
|
|
29
132
|
ios,
|
|
30
133
|
android,
|
|
31
134
|
...viewProps
|
|
@@ -37,7 +140,9 @@ function SegmentedControl(props) {
|
|
|
37
140
|
label: seg.label,
|
|
38
141
|
value: seg.value,
|
|
39
142
|
disabled: seg.disabled ? 'disabled' : 'enabled',
|
|
40
|
-
|
|
143
|
+
badge: seg.badge === undefined || seg.badge === null ? '' : String(seg.badge),
|
|
144
|
+
accessibilityLabel: seg.accessibilityLabel ?? '',
|
|
145
|
+
...resolveSegmentIcon(seg.icon)
|
|
41
146
|
}));
|
|
42
147
|
}, [segments]);
|
|
43
148
|
const selectedData = (0, _react.useMemo)(() => normalizeSelectedValue(selectedValue), [selectedValue]);
|
|
@@ -46,24 +151,42 @@ function SegmentedControl(props) {
|
|
|
46
151
|
index,
|
|
47
152
|
value
|
|
48
153
|
} = e.nativeEvent;
|
|
154
|
+
// Native reports a cleared selection as index -1 with an empty value.
|
|
155
|
+
if (index < 0) {
|
|
156
|
+
onDeselect?.();
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
49
159
|
onSelect?.(value, index);
|
|
50
|
-
}, [onSelect]);
|
|
160
|
+
}, [onSelect, onDeselect]);
|
|
51
161
|
|
|
52
162
|
// Normalize iOS props to native string format
|
|
53
163
|
const nativeIos = (0, _react.useMemo)(() => {
|
|
54
164
|
if (!ios) return undefined;
|
|
55
165
|
return {
|
|
56
166
|
momentary: ios.momentary ? 'true' : 'false',
|
|
57
|
-
apportionsSegmentWidthsByContent: ios.apportionsSegmentWidthsByContent ? 'true' : 'false'
|
|
58
|
-
selectedSegmentTintColor: ios.selectedSegmentTintColor ?? ''
|
|
167
|
+
apportionsSegmentWidthsByContent: ios.apportionsSegmentWidthsByContent ? 'true' : 'false'
|
|
59
168
|
};
|
|
60
169
|
}, [ios]);
|
|
61
170
|
|
|
171
|
+
// Deprecated iOS-only tint falls back to the cross-platform prop
|
|
172
|
+
const nativeSelectedSegmentColor = selectedSegmentColor ?? (_reactNative.Platform.OS === 'ios' ? ios?.selectedSegmentTintColor : undefined);
|
|
173
|
+
|
|
174
|
+
// Normalize the label font; empty / 0 means platform default
|
|
175
|
+
const nativeLabelStyle = (0, _react.useMemo)(() => {
|
|
176
|
+
if (!labelStyle) return undefined;
|
|
177
|
+
return {
|
|
178
|
+
fontFamily: labelStyle.fontFamily ?? '',
|
|
179
|
+
fontSize: labelStyle.fontSize ?? 0,
|
|
180
|
+
fontWeight: labelStyle.fontWeight === undefined ? '' : String(labelStyle.fontWeight),
|
|
181
|
+
fontStyle: labelStyle.fontStyle ?? ''
|
|
182
|
+
};
|
|
183
|
+
}, [labelStyle]);
|
|
184
|
+
|
|
62
185
|
// Normalize Android props
|
|
63
186
|
const nativeAndroid = (0, _react.useMemo)(() => {
|
|
64
187
|
if (!android) return undefined;
|
|
65
188
|
return {
|
|
66
|
-
selectionRequired: android.selectionRequired ? '
|
|
189
|
+
selectionRequired: android.selectionRequired === false ? 'false' : 'true'
|
|
67
190
|
};
|
|
68
191
|
}, [android]);
|
|
69
192
|
|
|
@@ -79,7 +202,16 @@ function SegmentedControl(props) {
|
|
|
79
202
|
segments: nativeSegments,
|
|
80
203
|
selectedValue: selectedData,
|
|
81
204
|
interactivity: disabled ? 'disabled' : 'enabled',
|
|
82
|
-
|
|
205
|
+
labelVisibility: labelVisibility ?? 'auto',
|
|
206
|
+
selectedSegmentColor: nativeSelectedSegmentColor,
|
|
207
|
+
activeTintColor: activeTintColor,
|
|
208
|
+
inactiveTintColor: inactiveTintColor,
|
|
209
|
+
androidRippleColor: android?.rippleColor,
|
|
210
|
+
androidStrokeColor: android?.strokeColor,
|
|
211
|
+
labelStyle: nativeLabelStyle,
|
|
212
|
+
badgeBackgroundColor: badgeStyle?.backgroundColor,
|
|
213
|
+
badgeTextColor: badgeStyle?.color,
|
|
214
|
+
onSelect: onSelect || onDeselect ? handleSelect : undefined,
|
|
83
215
|
ios: nativeIos,
|
|
84
216
|
android: nativeAndroid,
|
|
85
217
|
...viewProps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_SegmentedControlNativeComponent","_interopRequireDefault","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ANDROID_MIN_HEIGHT","normalizeSelectedValue","selected","SegmentedControl","props","style","segments","selectedValue","disabled","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_SegmentedControlNativeComponent","_interopRequireDefault","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ANDROID_MIN_HEIGHT","NO_ICON","iconType","iconName","iconUri","iconScale","iconTinted","pickIconSource","icon","undefined","Platform","OS","ios","android","resolveSegmentIcon","source","length","type","name","resolved","Image","resolveAssetSource","uri","scale","tinted","normalizeSelectedValue","selected","SegmentedControl","props","style","segments","selectedValue","disabled","labelVisibility","selectedSegmentColor","activeTintColor","inactiveTintColor","labelStyle","badgeStyle","onSelect","onDeselect","viewProps","nativeSegments","useMemo","map","seg","label","value","badge","String","accessibilityLabel","selectedData","handleSelect","useCallback","index","nativeEvent","nativeIos","momentary","apportionsSegmentWidthsByContent","nativeSelectedSegmentColor","selectedSegmentTintColor","nativeLabelStyle","fontFamily","fontSize","fontWeight","fontStyle","nativeAndroid","selectionRequired","mergedStyle","styles","androidDefault","jsx","interactivity","androidRippleColor","rippleColor","androidStrokeColor","strokeColor","badgeBackgroundColor","backgroundColor","badgeTextColor","color","StyleSheet","create","minHeight"],"sourceRoot":"../../src","sources":["SegmentedControl.tsx"],"mappings":";;;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAaA,IAAAE,gCAAA,GAAAC,sBAAA,CAAAH,OAAA;AAG2C,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAG,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAM,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ,CAAA,GAAAO,CAAA,CAAAM,GAAA,CAAAb,CAAA,EAAAS,CAAA,gBAAAN,CAAA,IAAAH,CAAA,gBAAAG,CAAA,OAAAW,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAG,CAAA,OAAAK,CAAA,IAAAD,CAAA,GAAAS,MAAA,CAAAC,cAA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AAA,CAAA2F,GAAA,EAAC7F,gCAAA,CAAAK,OAAsB;IACrB8C,KAAK,EAAEuC,WAAY;IACnBtC,QAAQ,EAAEY,cAAe;IACzBX,aAAa,EAAEoB,YAAa;IAC5BqB,aAAa,EAAExC,QAAQ,GAAG,UAAU,GAAG,SAAU;IACjDC,eAAe,EAAEA,eAAe,IAAI,MAAO;IAC3CC,oBAAoB,EAAEyB,0BAA2B;IACjDxB,eAAe,EAAEA,eAAgB;IACjCC,iBAAiB,EAAEA,iBAAkB;IACrCqC,kBAAkB,EAAE5D,OAAO,EAAE6D,WAAY;IACzCC,kBAAkB,EAAE9D,OAAO,EAAE+D,WAAY;IACzCvC,UAAU,EAAEwB,gBAAiB;IAC7BgB,oBAAoB,EAAEvC,UAAU,EAAEwC,eAAgB;IAClDC,cAAc,EAAEzC,UAAU,EAAE0C,KAAM;IAClCzC,QAAQ,EAAEA,QAAQ,IAAIC,UAAU,GAAGY,YAAY,GAAG3C,SAAU;IAC5DG,GAAG,EAAE4C,SAAU;IACf3C,OAAO,EAAEqD,aAAc;IAAA,GACnBzB;EAAS,CACd,CAAC;AAEN;AAEA,MAAM4B,MAAM,GAAGY,uBAAU,CAACC,MAAM,CAAC;EAC/BZ,cAAc,EAAE;IACda,SAAS,EAAEnF;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,31 +1,59 @@
|
|
|
1
1
|
// SegmentedControlNativeComponent.ts
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
CodegenTypes,
|
|
4
|
+
ColorValue,
|
|
5
|
+
HostComponent,
|
|
6
|
+
ViewProps,
|
|
7
|
+
} from 'react-native';
|
|
3
8
|
import { codegenNativeComponent } from 'react-native';
|
|
4
9
|
|
|
5
10
|
/**
|
|
6
11
|
* A single segment in the control.
|
|
12
|
+
*
|
|
13
|
+
* Icons are pre-resolved on the JS side so native only deals with flat
|
|
14
|
+
* strings: `iconType` selects the source, `iconName` carries an SF Symbol or
|
|
15
|
+
* drawable name, and `iconUri` / `iconScale` carry a resolved image asset.
|
|
7
16
|
*/
|
|
8
17
|
export type SegmentedControlSegment = Readonly<{
|
|
9
18
|
label: string;
|
|
10
19
|
value: string;
|
|
11
20
|
disabled: string; // 'enabled' | 'disabled'
|
|
12
|
-
|
|
21
|
+
iconType: string; // '' | 'sfSymbol' | 'drawable' | 'image'
|
|
22
|
+
iconName: string; // SF Symbol (iOS) or drawable resource name (Android)
|
|
23
|
+
iconUri: string; // Resolved image URI when iconType === 'image'
|
|
24
|
+
iconScale: CodegenTypes.Double; // Resolved image scale when iconType === 'image'
|
|
25
|
+
iconTinted: string; // 'true' | 'false' — draw the image as a tinted template
|
|
26
|
+
badge: string; // Badge text, empty = no badge
|
|
27
|
+
accessibilityLabel: string; // Screen-reader label, empty = use label
|
|
13
28
|
}>;
|
|
14
29
|
|
|
15
30
|
/**
|
|
16
31
|
* Event emitted when the user selects a segment.
|
|
17
32
|
*/
|
|
18
33
|
export type SegmentedControlSelectEvent = Readonly<{
|
|
19
|
-
/** Selected segment index */
|
|
34
|
+
/** Selected segment index. -1 means the selection was cleared. */
|
|
20
35
|
index: CodegenTypes.Int32;
|
|
21
36
|
|
|
22
|
-
/** Selected segment value */
|
|
37
|
+
/** Selected segment value. Empty when the selection was cleared. */
|
|
23
38
|
value: string;
|
|
24
39
|
}>;
|
|
25
40
|
|
|
26
41
|
/** Interactivity state (no booleans). */
|
|
27
42
|
export type SegmentedControlInteractivity = 'enabled' | 'disabled';
|
|
28
43
|
|
|
44
|
+
/** How labels and icons combine (no booleans). */
|
|
45
|
+
export type SegmentedControlLabelVisibility = 'auto' | 'labeled' | 'unlabeled';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Label font. Empty strings / 0 mean "platform default".
|
|
49
|
+
*/
|
|
50
|
+
export type LabelStyleProps = Readonly<{
|
|
51
|
+
fontFamily?: string;
|
|
52
|
+
fontSize?: CodegenTypes.Double;
|
|
53
|
+
fontWeight?: string; // 'normal' | 'bold' | '100'..'900'
|
|
54
|
+
fontStyle?: string; // 'normal' | 'italic'
|
|
55
|
+
}>;
|
|
56
|
+
|
|
29
57
|
/**
|
|
30
58
|
* iOS-specific configuration.
|
|
31
59
|
*/
|
|
@@ -35,9 +63,6 @@ export type IOSProps = Readonly<{
|
|
|
35
63
|
|
|
36
64
|
/** Whether segment widths are proportional to content */
|
|
37
65
|
apportionsSegmentWidthsByContent?: string; // 'true' | 'false'
|
|
38
|
-
|
|
39
|
-
/** Selected segment tint color (hex string) */
|
|
40
|
-
selectedSegmentTintColor?: string;
|
|
41
66
|
}>;
|
|
42
67
|
|
|
43
68
|
/**
|
|
@@ -65,6 +90,35 @@ export interface SegmentedControlProps extends ViewProps {
|
|
|
65
90
|
*/
|
|
66
91
|
interactivity?: string; // SegmentedControlInteractivity
|
|
67
92
|
|
|
93
|
+
/**
|
|
94
|
+
* How segment labels and icons combine.
|
|
95
|
+
*/
|
|
96
|
+
labelVisibility?: string; // SegmentedControlLabelVisibility
|
|
97
|
+
|
|
98
|
+
/** Background of the selected segment. */
|
|
99
|
+
selectedSegmentColor?: ColorValue;
|
|
100
|
+
|
|
101
|
+
/** Text / icon color of the selected segment. */
|
|
102
|
+
activeTintColor?: ColorValue;
|
|
103
|
+
|
|
104
|
+
/** Text / icon color of unselected segments. */
|
|
105
|
+
inactiveTintColor?: ColorValue;
|
|
106
|
+
|
|
107
|
+
/** Android: ripple color when pressing a segment. */
|
|
108
|
+
androidRippleColor?: ColorValue;
|
|
109
|
+
|
|
110
|
+
/** Android: outline color of the segments. */
|
|
111
|
+
androidStrokeColor?: ColorValue;
|
|
112
|
+
|
|
113
|
+
/** Label font. */
|
|
114
|
+
labelStyle?: LabelStyleProps;
|
|
115
|
+
|
|
116
|
+
/** Badge background (default: system red). */
|
|
117
|
+
badgeBackgroundColor?: ColorValue;
|
|
118
|
+
|
|
119
|
+
/** Badge text color (default: white). */
|
|
120
|
+
badgeTextColor?: ColorValue;
|
|
121
|
+
|
|
68
122
|
/**
|
|
69
123
|
* Fired when the user selects a segment.
|
|
70
124
|
*/
|
|
@@ -76,4 +130,4 @@ export interface SegmentedControlProps extends ViewProps {
|
|
|
76
130
|
|
|
77
131
|
export default codegenNativeComponent<SegmentedControlProps>(
|
|
78
132
|
'PCSegmentedControl'
|
|
79
|
-
)
|
|
133
|
+
) as HostComponent<SegmentedControlProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SelectionMenuNativeComponent.ts
|
|
2
|
-
import type { CodegenTypes, ViewProps } from 'react-native';
|
|
2
|
+
import type { CodegenTypes, HostComponent, ViewProps } from 'react-native';
|
|
3
3
|
import { codegenNativeComponent } from 'react-native';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -94,4 +94,6 @@ export interface SelectionMenuProps extends ViewProps {
|
|
|
94
94
|
android?: AndroidProps;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
export default codegenNativeComponent<SelectionMenuProps>(
|
|
97
|
+
export default codegenNativeComponent<SelectionMenuProps>(
|
|
98
|
+
'PCSelectionMenu'
|
|
99
|
+
) as HostComponent<SelectionMenuProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_jsxRuntime","e","__esModule","default","DatePicker","_props","exports","SelectionMenu","ContextMenu","children","jsx","Fragment","SegmentedControl","LiquidGlass","isLiquidGlassSupported"],"sourceRoot":"../../src","sources":["index.web.tsx"],"mappings":";;;;;;AAKA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0B,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAL1B;AACA;AACA;AACA;;AAMA;AACA;AACA;;AAMA;AACA;AACA;;AAoBO,MAAMG,UAAU,GACrBC,MAAuB,IACO,IAAI;;AAEpC;AACA;AACA;AAAAC,OAAA,CAAAF,UAAA,GAAAA,UAAA;AAoBO,MAAMG,aAAa,GACxBF,MAA0B,IACI,IAAI;;AAEpC;AACA;AACA;AAAAC,OAAA,CAAAC,aAAA,GAAAA,aAAA;AAgCO,MAAMC,WAAW,GAAGA,CAAC;EAC1BC;AACgB,CAAC,KAAgC;EACjD,oBAAO,IAAAT,WAAA,CAAAU,GAAA,EAAAV,WAAA,CAAAW,QAAA;IAAAF,QAAA,EAAGA;EAAQ,CAAG,CAAC;AACxB,CAAC;;AAED;AACA;AACA;AAAAH,OAAA,CAAAE,WAAA,GAAAA,WAAA;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_jsxRuntime","e","__esModule","default","DatePicker","_props","exports","SelectionMenu","ContextMenu","children","jsx","Fragment","SegmentedControl","LiquidGlass","isLiquidGlassSupported"],"sourceRoot":"../../src","sources":["index.web.tsx"],"mappings":";;;;;;AAKA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0B,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAL1B;AACA;AACA;AACA;;AAMA;AACA;AACA;;AAMA;AACA;AACA;;AAoBO,MAAMG,UAAU,GACrBC,MAAuB,IACO,IAAI;;AAEpC;AACA;AACA;AAAAC,OAAA,CAAAF,UAAA,GAAAA,UAAA;AAoBO,MAAMG,aAAa,GACxBF,MAA0B,IACI,IAAI;;AAEpC;AACA;AACA;AAAAC,OAAA,CAAAC,aAAA,GAAAA,aAAA;AAgCO,MAAMC,WAAW,GAAGA,CAAC;EAC1BC;AACgB,CAAC,KAAgC;EACjD,oBAAO,IAAAT,WAAA,CAAAU,GAAA,EAAAV,WAAA,CAAAW,QAAA;IAAAF,QAAA,EAAGA;EAAQ,CAAG,CAAC;AACxB,CAAC;;AAED;AACA;AACA;AAAAH,OAAA,CAAAE,WAAA,GAAAA,WAAA;AAmDO,MAAMI,gBAAgB,GAC3BP,MAA6B,IACC,IAAI;;AAEpC;AACA;AACA;AAAAC,OAAA,CAAAM,gBAAA,GAAAA,gBAAA;AASO,MAAMC,WAAW,GAAGA,CAAC;EAC1BJ;AACgB,CAAC,KAAgC;EACjD,oBAAO,IAAAT,WAAA,CAAAU,GAAA,EAAAV,WAAA,CAAAW,QAAA;IAAAF,QAAA,EAAGA;EAAQ,CAAG,CAAC;AACxB,CAAC;AAACH,OAAA,CAAAO,WAAA,GAAAA,WAAA;AAEK,MAAMC,sBAAsB,GAAAR,OAAA,CAAAQ,sBAAA,GAAG,KAAK","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// DatePickerNativeComponent.ts
|
|
2
|
-
import type { CodegenTypes, ViewProps } from 'react-native';
|
|
2
|
+
import type { CodegenTypes, HostComponent, ViewProps } from 'react-native';
|
|
3
3
|
import { codegenNativeComponent } from 'react-native';
|
|
4
4
|
|
|
5
5
|
export type TimestampMs = CodegenTypes.Double;
|
|
@@ -69,4 +69,6 @@ export interface NativeProps extends ViewProps, CommonProps {
|
|
|
69
69
|
onClosed?: CodegenTypes.BubblingEventHandler<Readonly<{}>>;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
export default codegenNativeComponent<NativeProps>(
|
|
72
|
+
export default codegenNativeComponent<NativeProps>(
|
|
73
|
+
'PCDatePicker'
|
|
74
|
+
) as HostComponent<NativeProps>;
|