react-native-platform-components 1.2.0 → 1.4.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 +33 -31
- package/android/src/main/java/com/platformcomponents/PCButtonGroupView.kt +498 -0
- package/android/src/main/java/com/platformcomponents/PCButtonGroupViewManager.kt +191 -0
- package/android/src/main/java/com/platformcomponents/PCButtonSupport.kt +127 -0
- package/android/src/main/java/com/platformcomponents/PCButtonView.kt +345 -0
- package/android/src/main/java/com/platformcomponents/PCButtonViewManager.kt +126 -0
- package/android/src/main/java/com/platformcomponents/PCExpressive.kt +107 -0
- package/android/src/main/java/com/platformcomponents/PCFloatingToolbarView.kt +115 -0
- package/android/src/main/java/com/platformcomponents/PCFloatingToolbarViewManager.kt +65 -0
- package/android/src/main/java/com/platformcomponents/PCNativeThemeModule.kt +3 -0
- package/android/src/main/java/com/platformcomponents/PCSegmentedControlView.kt +13 -5
- package/android/src/main/java/com/platformcomponents/PCSegmentedControlViewManager.kt +6 -1
- package/android/src/main/java/com/platformcomponents/PCTextFieldView.kt +1018 -0
- package/android/src/main/java/com/platformcomponents/PCTextFieldViewManager.kt +248 -0
- package/android/src/main/java/com/platformcomponents/PlatformComponentsPackage.kt +13 -6
- package/android/src/main/jni/CMakeLists.txt +13 -1
- package/android/src/main/res/values/attrs.xml +13 -0
- package/android/src/main/res/values/styles.xml +183 -0
- package/ios/PCButton.h +10 -0
- package/ios/PCButton.mm +196 -0
- package/ios/PCButtonGroup.h +10 -0
- package/ios/PCButtonGroup.mm +256 -0
- package/ios/PCButtonGroupView.swift +254 -0
- package/ios/PCButtonSupport.swift +141 -0
- package/ios/PCButtonView.swift +155 -0
- package/ios/PCFloatingToolbar.h +10 -0
- package/ios/PCFloatingToolbar.mm +76 -0
- package/ios/PCFloatingToolbarView.swift +95 -0
- package/ios/PCNativeThemeModule.mm +13 -0
- package/ios/PCSelectionMenu.swift +9 -1
- package/ios/PCTextField.h +10 -0
- package/ios/PCTextField.mm +391 -0
- package/ios/PCTextFieldView.swift +1012 -0
- package/lib/commonjs/Button.js +77 -0
- package/lib/commonjs/Button.js.map +1 -0
- package/lib/commonjs/ButtonGroup.js +99 -0
- package/lib/commonjs/ButtonGroup.js.map +1 -0
- package/lib/commonjs/ButtonGroupNativeComponent.ts +121 -0
- package/lib/commonjs/ButtonNativeComponent.ts +76 -0
- package/lib/commonjs/ContextMenuNativeComponent.ts +5 -4
- package/lib/commonjs/DatePickerNativeComponent.ts +17 -11
- package/lib/commonjs/FloatingToolbar.js +69 -0
- package/lib/commonjs/FloatingToolbar.js.map +1 -0
- package/lib/commonjs/FloatingToolbarNativeComponent.ts +31 -0
- package/lib/commonjs/LiquidGlass.js +24 -4
- package/lib/commonjs/LiquidGlass.js.map +1 -1
- package/lib/commonjs/LiquidGlassNativeComponent.ts +6 -5
- package/lib/commonjs/NativePlatformComponentsTheme.js.map +1 -1
- package/lib/commonjs/SegmentedControl.js +11 -85
- package/lib/commonjs/SegmentedControl.js.map +1 -1
- package/lib/commonjs/SegmentedControlNativeComponent.ts +15 -11
- package/lib/commonjs/SelectionMenuNativeComponent.ts +6 -5
- package/lib/commonjs/TextField.js +195 -0
- package/lib/commonjs/TextField.js.map +1 -0
- package/lib/commonjs/TextFieldNativeComponent.ts +218 -0
- package/lib/commonjs/codegenTypes.js +6 -0
- package/lib/commonjs/codegenTypes.js.map +1 -0
- package/lib/commonjs/focusRegistry.js +78 -0
- package/lib/commonjs/focusRegistry.js.map +1 -0
- package/lib/commonjs/icons.js +92 -0
- package/lib/commonjs/icons.js.map +1 -0
- package/lib/commonjs/index.js +66 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +32 -2
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/labelStyle.js +27 -0
- package/lib/commonjs/labelStyle.js.map +1 -0
- package/lib/commonjs/reactNativeInternals.d.js +2 -0
- package/lib/commonjs/reactNativeInternals.d.js.map +1 -0
- package/lib/module/Button.js +70 -0
- package/lib/module/Button.js.map +1 -0
- package/lib/module/ButtonGroup.js +92 -0
- package/lib/module/ButtonGroup.js.map +1 -0
- package/lib/module/ButtonGroupNativeComponent.ts +121 -0
- package/lib/module/ButtonNativeComponent.ts +76 -0
- package/lib/module/ContextMenuNativeComponent.ts +5 -4
- package/lib/module/DatePickerNativeComponent.ts +17 -11
- package/lib/module/FloatingToolbar.js +62 -0
- package/lib/module/FloatingToolbar.js.map +1 -0
- package/lib/module/FloatingToolbarNativeComponent.ts +31 -0
- package/lib/module/LiquidGlass.js +24 -4
- package/lib/module/LiquidGlass.js.map +1 -1
- package/lib/module/LiquidGlassNativeComponent.ts +6 -5
- package/lib/module/NativePlatformComponentsTheme.js.map +1 -1
- package/lib/module/SegmentedControl.js +12 -87
- package/lib/module/SegmentedControl.js.map +1 -1
- package/lib/module/SegmentedControlNativeComponent.ts +15 -11
- package/lib/module/SelectionMenuNativeComponent.ts +6 -5
- package/lib/module/TextField.js +189 -0
- package/lib/module/TextField.js.map +1 -0
- package/lib/module/TextFieldNativeComponent.ts +218 -0
- package/lib/module/codegenTypes.js +4 -0
- package/lib/module/codegenTypes.js.map +1 -0
- package/lib/module/focusRegistry.js +74 -0
- package/lib/module/focusRegistry.js.map +1 -0
- package/lib/module/icons.js +87 -0
- package/lib/module/icons.js.map +1 -0
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +28 -0
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/labelStyle.js +23 -0
- package/lib/module/labelStyle.js.map +1 -0
- package/lib/module/reactNativeInternals.d.js +2 -0
- package/lib/module/reactNativeInternals.d.js.map +1 -0
- package/lib/typescript/commonjs/docs/sidebars.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/Button.d.ts +76 -0
- package/lib/typescript/commonjs/src/Button.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ButtonGroup.d.ts +102 -0
- package/lib/typescript/commonjs/src/ButtonGroup.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ButtonGroupNativeComponent.d.ts +93 -0
- package/lib/typescript/commonjs/src/ButtonGroupNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ButtonNativeComponent.d.ts +57 -0
- package/lib/typescript/commonjs/src/ButtonNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ContextMenuNativeComponent.d.ts +5 -4
- package/lib/typescript/commonjs/src/ContextMenuNativeComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/DatePickerNativeComponent.d.ts +12 -11
- package/lib/typescript/commonjs/src/DatePickerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/FloatingToolbar.d.ts +45 -0
- package/lib/typescript/commonjs/src/FloatingToolbar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/FloatingToolbarNativeComponent.d.ts +24 -0
- package/lib/typescript/commonjs/src/FloatingToolbarNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/LiquidGlass.d.ts +4 -3
- package/lib/typescript/commonjs/src/LiquidGlass.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/LiquidGlassNativeComponent.d.ts +6 -5
- package/lib/typescript/commonjs/src/LiquidGlassNativeComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/NativePlatformComponentsTheme.d.ts +10 -2
- package/lib/typescript/commonjs/src/NativePlatformComponentsTheme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/SegmentedControl.d.ts +17 -46
- package/lib/typescript/commonjs/src/SegmentedControl.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/SegmentedControlNativeComponent.d.ts +9 -6
- package/lib/typescript/commonjs/src/SegmentedControlNativeComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/SelectionMenuNativeComponent.d.ts +6 -5
- package/lib/typescript/commonjs/src/SelectionMenuNativeComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/TextField.d.ts +174 -0
- package/lib/typescript/commonjs/src/TextField.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/TextFieldNativeComponent.d.ts +162 -0
- package/lib/typescript/commonjs/src/TextFieldNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/codegenTypes.d.ts +12 -0
- package/lib/typescript/commonjs/src/codegenTypes.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/focusRegistry.d.ts +13 -0
- package/lib/typescript/commonjs/src/focusRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/icons.d.ts +52 -0
- package/lib/typescript/commonjs/src/icons.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.web.d.ts +121 -0
- package/lib/typescript/commonjs/src/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/labelStyle.d.ts +20 -0
- package/lib/typescript/commonjs/src/labelStyle.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/sharedTypes.d.ts +8 -3
- package/lib/typescript/commonjs/src/sharedTypes.d.ts.map +1 -1
- package/lib/typescript/module/docs/sidebars.d.ts.map +1 -1
- package/lib/typescript/module/src/Button.d.ts +76 -0
- package/lib/typescript/module/src/Button.d.ts.map +1 -0
- package/lib/typescript/module/src/ButtonGroup.d.ts +102 -0
- package/lib/typescript/module/src/ButtonGroup.d.ts.map +1 -0
- package/lib/typescript/module/src/ButtonGroupNativeComponent.d.ts +93 -0
- package/lib/typescript/module/src/ButtonGroupNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/ButtonNativeComponent.d.ts +57 -0
- package/lib/typescript/module/src/ButtonNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/ContextMenuNativeComponent.d.ts +5 -4
- package/lib/typescript/module/src/ContextMenuNativeComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/DatePickerNativeComponent.d.ts +12 -11
- package/lib/typescript/module/src/DatePickerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/FloatingToolbar.d.ts +45 -0
- package/lib/typescript/module/src/FloatingToolbar.d.ts.map +1 -0
- package/lib/typescript/module/src/FloatingToolbarNativeComponent.d.ts +24 -0
- package/lib/typescript/module/src/FloatingToolbarNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/LiquidGlass.d.ts +4 -3
- package/lib/typescript/module/src/LiquidGlass.d.ts.map +1 -1
- package/lib/typescript/module/src/LiquidGlassNativeComponent.d.ts +6 -5
- package/lib/typescript/module/src/LiquidGlassNativeComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/NativePlatformComponentsTheme.d.ts +10 -2
- package/lib/typescript/module/src/NativePlatformComponentsTheme.d.ts.map +1 -1
- package/lib/typescript/module/src/SegmentedControl.d.ts +17 -46
- package/lib/typescript/module/src/SegmentedControl.d.ts.map +1 -1
- package/lib/typescript/module/src/SegmentedControlNativeComponent.d.ts +9 -6
- package/lib/typescript/module/src/SegmentedControlNativeComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/SelectionMenuNativeComponent.d.ts +6 -5
- package/lib/typescript/module/src/SelectionMenuNativeComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/TextField.d.ts +174 -0
- package/lib/typescript/module/src/TextField.d.ts.map +1 -0
- package/lib/typescript/module/src/TextFieldNativeComponent.d.ts +162 -0
- package/lib/typescript/module/src/TextFieldNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/codegenTypes.d.ts +12 -0
- package/lib/typescript/module/src/codegenTypes.d.ts.map +1 -0
- package/lib/typescript/module/src/focusRegistry.d.ts +13 -0
- package/lib/typescript/module/src/focusRegistry.d.ts.map +1 -0
- package/lib/typescript/module/src/icons.d.ts +52 -0
- package/lib/typescript/module/src/icons.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +6 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.web.d.ts +121 -0
- package/lib/typescript/module/src/index.web.d.ts.map +1 -1
- package/lib/typescript/module/src/labelStyle.d.ts +20 -0
- package/lib/typescript/module/src/labelStyle.d.ts.map +1 -0
- package/lib/typescript/module/src/sharedTypes.d.ts +8 -3
- package/lib/typescript/module/src/sharedTypes.d.ts.map +1 -1
- package/package.json +28 -6
- package/react-native.config.js +3 -0
- package/shared/PCButtonComponentDescriptors-custom.h +22 -0
- package/shared/PCButtonGroupComponentDescriptors-custom.h +22 -0
- package/shared/PCButtonGroupShadowNode-custom.cpp +48 -0
- package/shared/PCButtonGroupShadowNode-custom.h +55 -0
- package/shared/PCButtonGroupState-custom.h +61 -0
- package/shared/PCButtonShadowNode-custom.cpp +48 -0
- package/shared/PCButtonShadowNode-custom.h +55 -0
- package/shared/PCButtonState-custom.h +61 -0
- package/shared/PCDatePickerState-custom.h +2 -2
- package/shared/PCSegmentedControlState-custom.h +2 -2
- package/shared/PCSelectionMenuState-custom.h +2 -2
- package/shared/PCTextFieldComponentDescriptors-custom.h +22 -0
- package/shared/PCTextFieldShadowNode-custom.cpp +47 -0
- package/shared/PCTextFieldShadowNode-custom.h +55 -0
- package/shared/PCTextFieldState-custom.h +61 -0
- package/shared/react/renderer/components/PlatformComponentsViewSpec/ComponentDescriptors.h +3 -0
- package/src/Button.tsx +144 -0
- package/src/ButtonGroup.tsx +233 -0
- package/src/ButtonGroupNativeComponent.ts +121 -0
- package/src/ButtonNativeComponent.ts +76 -0
- package/src/ContextMenuNativeComponent.ts +5 -4
- package/src/DatePickerNativeComponent.ts +17 -11
- package/src/FloatingToolbar.tsx +113 -0
- package/src/FloatingToolbarNativeComponent.ts +31 -0
- package/src/LiquidGlass.tsx +24 -5
- package/src/LiquidGlassNativeComponent.ts +6 -5
- package/src/NativePlatformComponentsTheme.ts +11 -2
- package/src/SegmentedControl.tsx +26 -118
- package/src/SegmentedControlNativeComponent.ts +15 -11
- package/src/SelectionMenuNativeComponent.ts +6 -5
- package/src/TextField.tsx +494 -0
- package/src/TextFieldNativeComponent.ts +218 -0
- package/src/codegenTypes.ts +40 -0
- package/src/focusRegistry.ts +89 -0
- package/src/icons.ts +116 -0
- package/src/index.tsx +6 -0
- package/src/index.web.tsx +194 -0
- package/src/labelStyle.ts +36 -0
- package/src/reactNativeInternals.d.ts +22 -0
- package/src/sharedTypes.ts +9 -3
- /package/{app.plugin.cjs → app.plugin.js} +0 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
// TextFieldNativeComponent.ts
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
4
|
+
import { codegenNativeCommands, codegenNativeComponent } from 'react-native';
|
|
5
|
+
import type { BubblingEventHandler, Double, Int32 } from './codegenTypes';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Icon fields, pre-resolved on the JS side (see icons.ts).
|
|
9
|
+
*/
|
|
10
|
+
export type TextFieldIconProps = Readonly<{
|
|
11
|
+
iconType: string; // '' | 'sfSymbol' | 'drawable' | 'image'
|
|
12
|
+
iconName: string; // SF Symbol (iOS) or drawable resource name (Android)
|
|
13
|
+
iconUri: string; // Resolved image URI when iconType === 'image'
|
|
14
|
+
iconScale: Double; // Resolved image scale when iconType === 'image'
|
|
15
|
+
iconTinted: string; // 'true' | 'false' — draw the image as a tinted template
|
|
16
|
+
}>;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Text font. Empty strings / 0 mean "platform default".
|
|
20
|
+
*/
|
|
21
|
+
export type TextFieldTextStyleProps = Readonly<{
|
|
22
|
+
fontFamily?: string;
|
|
23
|
+
fontSize?: Double;
|
|
24
|
+
fontWeight?: string; // 'normal' | 'bold' | '100'..'900'
|
|
25
|
+
fontStyle?: string; // 'normal' | 'italic'
|
|
26
|
+
}>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Fired on every edit. `eventCount` is the native edit counter that JS hands
|
|
30
|
+
* back with `setText`, so a stale controlled value can't overwrite what the
|
|
31
|
+
* user typed since.
|
|
32
|
+
*/
|
|
33
|
+
export type TextFieldChangeEvent = Readonly<{
|
|
34
|
+
text: string;
|
|
35
|
+
eventCount: Int32;
|
|
36
|
+
}>;
|
|
37
|
+
|
|
38
|
+
/** Focus, blur and submit carry the text at that moment. */
|
|
39
|
+
export type TextFieldTextEvent = Readonly<{
|
|
40
|
+
text: string;
|
|
41
|
+
}>;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* iOS-specific configuration. Every field is '' for the platform default.
|
|
45
|
+
*/
|
|
46
|
+
export type TextFieldIOSProps = Readonly<{
|
|
47
|
+
/** 'default' | 'complete' | 'limited' | 'none' (iOS 18) */
|
|
48
|
+
writingTools?: string;
|
|
49
|
+
/** 'default' | 'yes' | 'no' (iOS 17) */
|
|
50
|
+
inlinePrediction?: string;
|
|
51
|
+
/** 'default' | 'yes' | 'no' */
|
|
52
|
+
smartQuotes?: string;
|
|
53
|
+
/** 'default' | 'yes' | 'no' */
|
|
54
|
+
smartDashes?: string;
|
|
55
|
+
/** 'default' | 'yes' | 'no' */
|
|
56
|
+
smartInsertDelete?: string;
|
|
57
|
+
/** 'default' | 'yes' | 'no' (iOS 18) */
|
|
58
|
+
mathExpressionCompletion?: string;
|
|
59
|
+
/** 'roundedRect' | 'none' | 'line' | 'bezel' */
|
|
60
|
+
borderStyle?: string;
|
|
61
|
+
/** 'above' | 'leading': where the label sits */
|
|
62
|
+
labelPlacement?: string;
|
|
63
|
+
/** Width of a leading label column in points; 0 = default */
|
|
64
|
+
labelWidth?: Double;
|
|
65
|
+
}>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Android-specific configuration.
|
|
69
|
+
*/
|
|
70
|
+
export type TextFieldAndroidProps = Readonly<{
|
|
71
|
+
/** 'm3' | 'system' (AndroidMaterialMode) */
|
|
72
|
+
material?: string;
|
|
73
|
+
/** 'outlined' | 'filled' */
|
|
74
|
+
variant?: string;
|
|
75
|
+
/** 'standard' | 'dense' */
|
|
76
|
+
density?: string;
|
|
77
|
+
}>;
|
|
78
|
+
|
|
79
|
+
export interface TextFieldNativeProps extends ViewProps {
|
|
80
|
+
/**
|
|
81
|
+
* Text applied when the native view is created. Later updates go through
|
|
82
|
+
* the `setText` command so they can be checked against `eventCount`.
|
|
83
|
+
*/
|
|
84
|
+
initialText?: string;
|
|
85
|
+
|
|
86
|
+
/** Floating label (Android) / caption above the field (iOS). */
|
|
87
|
+
label?: string;
|
|
88
|
+
|
|
89
|
+
/** Placeholder shown while the field is empty. */
|
|
90
|
+
placeholder?: string;
|
|
91
|
+
|
|
92
|
+
/** Helper text below the field. */
|
|
93
|
+
supportingText?: string;
|
|
94
|
+
|
|
95
|
+
/** 'none' | 'error' */
|
|
96
|
+
errorState?: string;
|
|
97
|
+
|
|
98
|
+
/** Error message shown instead of the supporting text. */
|
|
99
|
+
errorText?: string;
|
|
100
|
+
|
|
101
|
+
/** Text shown before the input, inside the field. */
|
|
102
|
+
prefix?: string;
|
|
103
|
+
|
|
104
|
+
/** Text shown after the input, inside the field. */
|
|
105
|
+
suffix?: string;
|
|
106
|
+
|
|
107
|
+
/** Icon at the start of the field. */
|
|
108
|
+
leadingIcon?: TextFieldIconProps;
|
|
109
|
+
|
|
110
|
+
/** Icon at the end of the field; pressing it fires onTrailingIconPress. */
|
|
111
|
+
trailingIcon?: TextFieldIconProps;
|
|
112
|
+
|
|
113
|
+
/** 'never' | 'while-editing' | 'unless-editing' | 'always' */
|
|
114
|
+
clearButtonMode?: string;
|
|
115
|
+
|
|
116
|
+
/** 'shown' | 'hidden': a button that toggles secure text entry. */
|
|
117
|
+
passwordToggle?: string;
|
|
118
|
+
|
|
119
|
+
/** 'shown' | 'hidden': the character counter. */
|
|
120
|
+
characterCount?: string;
|
|
121
|
+
|
|
122
|
+
/** Maximum number of UTF-16 characters; 0 = unlimited. */
|
|
123
|
+
maxLength?: Int32;
|
|
124
|
+
|
|
125
|
+
/** React Native keyboardType value. */
|
|
126
|
+
keyboardType?: string;
|
|
127
|
+
|
|
128
|
+
/** React Native returnKeyType value. */
|
|
129
|
+
returnKeyType?: string;
|
|
130
|
+
|
|
131
|
+
/** 'none' | 'sentences' | 'words' | 'characters' */
|
|
132
|
+
autoCapitalize?: string;
|
|
133
|
+
|
|
134
|
+
/** 'enabled' | 'disabled' */
|
|
135
|
+
autoCorrect?: string;
|
|
136
|
+
|
|
137
|
+
/** 'secure' | 'plain' */
|
|
138
|
+
secureTextEntry?: string;
|
|
139
|
+
|
|
140
|
+
/** 'single' | 'multiline' */
|
|
141
|
+
lines?: string;
|
|
142
|
+
|
|
143
|
+
/** 'enabled' | 'disabled' */
|
|
144
|
+
interactivity?: string;
|
|
145
|
+
|
|
146
|
+
/** 'focus' | 'none': focus the field when it mounts. */
|
|
147
|
+
autoFocus?: string;
|
|
148
|
+
|
|
149
|
+
/** 'select' | 'keep': select all text on focus. */
|
|
150
|
+
selectTextOnFocus?: string;
|
|
151
|
+
|
|
152
|
+
/** React Native autoComplete value; '' = platform default. */
|
|
153
|
+
autoComplete?: string;
|
|
154
|
+
|
|
155
|
+
/** 'default' | 'light' | 'dark' (iOS keyboard appearance) */
|
|
156
|
+
keyboardAppearance?: string;
|
|
157
|
+
|
|
158
|
+
/** Font of the input text. */
|
|
159
|
+
textStyle?: TextFieldTextStyleProps;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Screen-reader label, applied to the native field rather than the host
|
|
163
|
+
* view. Empty means "use the label".
|
|
164
|
+
*/
|
|
165
|
+
spokenLabel?: string;
|
|
166
|
+
|
|
167
|
+
ios?: TextFieldIOSProps;
|
|
168
|
+
android?: TextFieldAndroidProps;
|
|
169
|
+
|
|
170
|
+
/** Fired on every user edit. */
|
|
171
|
+
onFieldChange?: BubblingEventHandler<TextFieldChangeEvent>;
|
|
172
|
+
|
|
173
|
+
/** Fired when the field gains focus. */
|
|
174
|
+
onFieldFocus?: BubblingEventHandler<TextFieldTextEvent>;
|
|
175
|
+
|
|
176
|
+
/** Fired when the field loses focus. */
|
|
177
|
+
onFieldBlur?: BubblingEventHandler<TextFieldTextEvent>;
|
|
178
|
+
|
|
179
|
+
/** Fired when the keyboard's return key is pressed (single-line). */
|
|
180
|
+
onFieldSubmit?: BubblingEventHandler<TextFieldTextEvent>;
|
|
181
|
+
|
|
182
|
+
/** Fired when the trailing icon is pressed. */
|
|
183
|
+
onTrailingIconPress?: BubblingEventHandler<Readonly<{}>>;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
type NativeTextFieldComponent = HostComponent<TextFieldNativeProps>;
|
|
187
|
+
|
|
188
|
+
// `React.ElementRef` rather than `React.ComponentRef`: the codegen shipped with
|
|
189
|
+
// React Native 0.81 (and the 0.76 Android floor) only accepts the former.
|
|
190
|
+
interface NativeCommands {
|
|
191
|
+
/** Focuses the field and shows the keyboard. */
|
|
192
|
+
focus: (viewRef: React.ElementRef<NativeTextFieldComponent>) => void;
|
|
193
|
+
|
|
194
|
+
/** Removes focus and hides the keyboard. */
|
|
195
|
+
blur: (viewRef: React.ElementRef<NativeTextFieldComponent>) => void;
|
|
196
|
+
|
|
197
|
+
/** Clears the text; fires onFieldChange like a user edit. */
|
|
198
|
+
clear: (viewRef: React.ElementRef<NativeTextFieldComponent>) => void;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Replaces the text, unless the user has edited since `eventCount` was
|
|
202
|
+
* reported, in which case the update is dropped and the next edit event
|
|
203
|
+
* brings JS back in sync.
|
|
204
|
+
*/
|
|
205
|
+
setText: (
|
|
206
|
+
viewRef: React.ElementRef<NativeTextFieldComponent>,
|
|
207
|
+
eventCount: Int32,
|
|
208
|
+
text: string
|
|
209
|
+
) => void;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
|
213
|
+
supportedCommands: ['focus', 'blur', 'clear', 'setText'],
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
export default codegenNativeComponent<TextFieldNativeProps>(
|
|
217
|
+
'PCTextField'
|
|
218
|
+
) as NativeTextFieldComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["codegenTypes.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.focusRegistry = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } // focusRegistry.ts
|
|
9
|
+
//
|
|
10
|
+
// TextField's link to React Native's focused-input bookkeeping. The core
|
|
11
|
+
// TextInput registers its host node with `TextInputState`, and that registry is
|
|
12
|
+
// what `Keyboard.dismiss()`, a ScrollView's `keyboardShouldPersistTaps` and
|
|
13
|
+
// `keyboardDismissMode`, and `KeyboardAvoidingView` act on. Registering the
|
|
14
|
+
// same way makes a TextField behave like a TextInput for all of them.
|
|
15
|
+
//
|
|
16
|
+
// `TextInputState` is a stable internal (it has kept this shape since 0.63),
|
|
17
|
+
// but React Native's Babel preset adds a dev-time warning to every static
|
|
18
|
+
// `import` or `require` of a deep path. A dynamic `import()` is resolved by
|
|
19
|
+
// Metro the same way and carries no warning; it settles in a microtask at
|
|
20
|
+
// startup, so a node registered before then is kept and registered once the
|
|
21
|
+
// module arrives. If a future release drops the path, the registry is simply
|
|
22
|
+
// absent and the field falls back to the public `TextInput.State` calls for
|
|
23
|
+
// focus and blur, keeping `Keyboard.dismiss()` working.
|
|
24
|
+
let registry;
|
|
25
|
+
const pendingRegistrations = new Set();
|
|
26
|
+
|
|
27
|
+
// A stable internal without a public counterpart; see reactNativeInternals.d.ts.
|
|
28
|
+
|
|
29
|
+
Promise.resolve().then(() => _interopRequireWildcard(require('react-native/Libraries/Components/TextInput/TextInputState'))).then(module => {
|
|
30
|
+
registry = module.default;
|
|
31
|
+
pendingRegistrations.forEach(node => registry?.registerInput(node));
|
|
32
|
+
pendingRegistrations.clear();
|
|
33
|
+
}).catch(() => {
|
|
34
|
+
// Not available: focus and blur still go through TextInput.State below.
|
|
35
|
+
});
|
|
36
|
+
const focusRegistry = exports.focusRegistry = {
|
|
37
|
+
/** Called when the field mounts. */
|
|
38
|
+
register(node) {
|
|
39
|
+
if (registry) {
|
|
40
|
+
registry.registerInput(node);
|
|
41
|
+
} else {
|
|
42
|
+
pendingRegistrations.add(node);
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
/** Called when the field unmounts; drops the focus if the field held it. */
|
|
46
|
+
unregister(node) {
|
|
47
|
+
pendingRegistrations.delete(node);
|
|
48
|
+
if (registry) {
|
|
49
|
+
registry.unregisterInput(node);
|
|
50
|
+
if (registry.currentlyFocusedInput() === node) {
|
|
51
|
+
registry.blurInput(node);
|
|
52
|
+
}
|
|
53
|
+
} else if (_reactNative.TextInput.State.currentlyFocusedInput() === node) {
|
|
54
|
+
_reactNative.TextInput.State.blurTextInput(node);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
/** The field gained focus natively. */
|
|
58
|
+
focused(node) {
|
|
59
|
+
if (node == null) return;
|
|
60
|
+
if (registry) {
|
|
61
|
+
registry.focusInput(node);
|
|
62
|
+
} else {
|
|
63
|
+
// Also re-sends the focus command, which the focused field ignores
|
|
64
|
+
_reactNative.TextInput.State.focusTextInput(node);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
/** The field lost focus natively. */
|
|
68
|
+
blurred(node) {
|
|
69
|
+
if (node == null) return;
|
|
70
|
+
if (registry) {
|
|
71
|
+
registry.blurInput(node);
|
|
72
|
+
} else {
|
|
73
|
+
// Also re-sends the blur command, which the unfocused field ignores
|
|
74
|
+
_reactNative.TextInput.State.blurTextInput(node);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=focusRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","registry","pendingRegistrations","Set","Promise","resolve","then","module","forEach","node","registerInput","clear","catch","focusRegistry","exports","register","add","unregister","delete","unregisterInput","currentlyFocusedInput","blurInput","TextInput","State","blurTextInput","focused","focusInput","focusTextInput","blurred"],"sourceRoot":"../../src","sources":["focusRegistry.ts"],"mappings":";;;;;;AAgBA,IAAAA,YAAA,GAAAC,OAAA;AAAyC,SAAAC,wBAAAC,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAH,uBAAA,YAAAA,CAAAC,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,C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AAI,CAAC;MAC9B,IAAIR,QAAQ,CAACmB,qBAAqB,CAAC,CAAC,KAAKX,IAAI,EAAE;QAC7CR,QAAQ,CAACoB,SAAS,CAACZ,IAAI,CAAC;MAC1B;IACF,CAAC,MAAM,IAAIa,sBAAS,CAACC,KAAK,CAACH,qBAAqB,CAAC,CAAC,KAAKX,IAAI,EAAE;MAC3Da,sBAAS,CAACC,KAAK,CAACC,aAAa,CAACf,IAAa,CAAC;IAC9C;EACF,CAAC;EAED;EACAgB,OAAOA,CAAChB,IAAqB,EAAQ;IACnC,IAAIA,IAAI,IAAI,IAAI,EAAE;IAClB,IAAIR,QAAQ,EAAE;MACZA,QAAQ,CAACyB,UAAU,CAACjB,IAAI,CAAC;IAC3B,CAAC,MAAM;MACL;MACAa,sBAAS,CAACC,KAAK,CAACI,cAAc,CAAClB,IAAa,CAAC;IAC/C;EACF,CAAC;EAED;EACAmB,OAAOA,CAACnB,IAAqB,EAAQ;IACnC,IAAIA,IAAI,IAAI,IAAI,EAAE;IAClB,IAAIR,QAAQ,EAAE;MACZA,QAAQ,CAACoB,SAAS,CAACZ,IAAI,CAAC;IAC1B,CAAC,MAAM;MACL;MACAa,sBAAS,CAACC,KAAK,CAACC,aAAa,CAACf,IAAa,CAAC;IAC9C;EACF;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NO_ICON = void 0;
|
|
7
|
+
exports.resolveIcon = resolveIcon;
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
// icons.ts
|
|
10
|
+
//
|
|
11
|
+
// Icon props shared by SegmentedControl, Button and ButtonGroup. Icons are
|
|
12
|
+
// resolved on the JS side so native only deals with flat strings.
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A single icon source.
|
|
16
|
+
*
|
|
17
|
+
* - `string`: shorthand for an SF Symbol name on iOS and a drawable resource
|
|
18
|
+
* name on Android.
|
|
19
|
+
* - `{ type: 'sfSymbol' }`: an SF Symbol. iOS only; ignored on Android.
|
|
20
|
+
* - `{ type: 'drawable' }`: a drawable from the app's `res/drawable`.
|
|
21
|
+
* Android only; ignored on iOS.
|
|
22
|
+
* - `{ type: 'image' }`: an image asset (`require('./icon.png')`) or a
|
|
23
|
+
* `{ uri }` source. Works on both platforms. Images are drawn as tinted
|
|
24
|
+
* templates unless `tinted` is `false`.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* An icon: a single source used on both platforms, or a per-platform pair so
|
|
29
|
+
* callers don't need to branch on `Platform.OS`.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/** The flat icon fields the native specs expect. */
|
|
33
|
+
|
|
34
|
+
const NO_ICON = exports.NO_ICON = {
|
|
35
|
+
iconType: '',
|
|
36
|
+
iconName: '',
|
|
37
|
+
iconUri: '',
|
|
38
|
+
iconScale: 1,
|
|
39
|
+
iconTinted: 'true'
|
|
40
|
+
};
|
|
41
|
+
function pickIconSource(icon) {
|
|
42
|
+
if (icon === undefined || typeof icon === 'string' || 'type' in icon) {
|
|
43
|
+
return icon;
|
|
44
|
+
}
|
|
45
|
+
return _reactNative.Platform.OS === 'ios' ? icon.ios : icon.android;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Flattens the public icon shape into the strings native expects, dropping
|
|
50
|
+
* sources that don't apply to the current platform.
|
|
51
|
+
*/
|
|
52
|
+
function resolveIcon(icon) {
|
|
53
|
+
const source = pickIconSource(icon);
|
|
54
|
+
if (source === undefined) return NO_ICON;
|
|
55
|
+
if (typeof source === 'string') {
|
|
56
|
+
if (source.length === 0) return NO_ICON;
|
|
57
|
+
return {
|
|
58
|
+
...NO_ICON,
|
|
59
|
+
iconType: _reactNative.Platform.OS === 'ios' ? 'sfSymbol' : 'drawable',
|
|
60
|
+
iconName: source
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
switch (source.type) {
|
|
64
|
+
case 'sfSymbol':
|
|
65
|
+
return _reactNative.Platform.OS === 'ios' ? {
|
|
66
|
+
...NO_ICON,
|
|
67
|
+
iconType: 'sfSymbol',
|
|
68
|
+
iconName: source.name
|
|
69
|
+
} : NO_ICON;
|
|
70
|
+
case 'drawable':
|
|
71
|
+
return _reactNative.Platform.OS === 'android' ? {
|
|
72
|
+
...NO_ICON,
|
|
73
|
+
iconType: 'drawable',
|
|
74
|
+
iconName: source.name
|
|
75
|
+
} : NO_ICON;
|
|
76
|
+
case 'image':
|
|
77
|
+
{
|
|
78
|
+
const resolved = _reactNative.Image.resolveAssetSource(source.source);
|
|
79
|
+
if (!resolved?.uri) return NO_ICON;
|
|
80
|
+
return {
|
|
81
|
+
iconType: 'image',
|
|
82
|
+
iconName: '',
|
|
83
|
+
iconUri: resolved.uri,
|
|
84
|
+
iconScale: resolved.scale > 0 ? resolved.scale : 1,
|
|
85
|
+
iconTinted: source.tinted === false ? 'false' : 'true'
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
default:
|
|
89
|
+
return NO_ICON;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","NO_ICON","exports","iconType","iconName","iconUri","iconScale","iconTinted","pickIconSource","icon","undefined","Platform","OS","ios","android","resolveIcon","source","length","type","name","resolved","Image","resolveAssetSource","uri","scale","tinted"],"sourceRoot":"../../src","sources":["icons.ts"],"mappings":";;;;;;;AAIA,IAAAA,YAAA,GAAAC,OAAA;AAJA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;;AAQA;;AAcO,MAAMC,OAAyB,GAAAC,OAAA,CAAAD,OAAA,GAAG;EACvCE,QAAQ,EA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,CAACC,kBAAkB,CAACN,MAAM,CAACA,MAAM,CAAC;QACxD,IAAI,CAACI,QAAQ,EAAEG,GAAG,EAAE,OAAOtB,OAAO;QAClC,OAAO;UACLE,QAAQ,EAAE,OAAO;UACjBC,QAAQ,EAAE,EAAE;UACZC,OAAO,EAAEe,QAAQ,CAACG,GAAG;UACrBjB,SAAS,EAAEc,QAAQ,CAACI,KAAK,GAAG,CAAC,GAAGJ,QAAQ,CAACI,KAAK,GAAG,CAAC;UAClDjB,UAAU,EAAES,MAAM,CAACS,MAAM,KAAK,KAAK,GAAG,OAAO,GAAG;QAClD,CAAC;MACH;IACA;MACE,OAAOxB,OAAO;EAClB;AACF","ignoreList":[]}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -47,6 +47,39 @@ Object.keys(_SegmentedControl).forEach(function (key) {
|
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
|
+
var _Button = require("./Button");
|
|
51
|
+
Object.keys(_Button).forEach(function (key) {
|
|
52
|
+
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _Button[key]) return;
|
|
54
|
+
Object.defineProperty(exports, key, {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _Button[key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
var _ButtonGroup = require("./ButtonGroup");
|
|
62
|
+
Object.keys(_ButtonGroup).forEach(function (key) {
|
|
63
|
+
if (key === "default" || key === "__esModule") return;
|
|
64
|
+
if (key in exports && exports[key] === _ButtonGroup[key]) return;
|
|
65
|
+
Object.defineProperty(exports, key, {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () {
|
|
68
|
+
return _ButtonGroup[key];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
var _FloatingToolbar = require("./FloatingToolbar");
|
|
73
|
+
Object.keys(_FloatingToolbar).forEach(function (key) {
|
|
74
|
+
if (key === "default" || key === "__esModule") return;
|
|
75
|
+
if (key in exports && exports[key] === _FloatingToolbar[key]) return;
|
|
76
|
+
Object.defineProperty(exports, key, {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () {
|
|
79
|
+
return _FloatingToolbar[key];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
50
83
|
var _LiquidGlass = require("./LiquidGlass");
|
|
51
84
|
Object.keys(_LiquidGlass).forEach(function (key) {
|
|
52
85
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -58,6 +91,39 @@ Object.keys(_LiquidGlass).forEach(function (key) {
|
|
|
58
91
|
}
|
|
59
92
|
});
|
|
60
93
|
});
|
|
94
|
+
var _TextField = require("./TextField");
|
|
95
|
+
Object.keys(_TextField).forEach(function (key) {
|
|
96
|
+
if (key === "default" || key === "__esModule") return;
|
|
97
|
+
if (key in exports && exports[key] === _TextField[key]) return;
|
|
98
|
+
Object.defineProperty(exports, key, {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function () {
|
|
101
|
+
return _TextField[key];
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
var _icons = require("./icons");
|
|
106
|
+
Object.keys(_icons).forEach(function (key) {
|
|
107
|
+
if (key === "default" || key === "__esModule") return;
|
|
108
|
+
if (key in exports && exports[key] === _icons[key]) return;
|
|
109
|
+
Object.defineProperty(exports, key, {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
get: function () {
|
|
112
|
+
return _icons[key];
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
var _labelStyle = require("./labelStyle");
|
|
117
|
+
Object.keys(_labelStyle).forEach(function (key) {
|
|
118
|
+
if (key === "default" || key === "__esModule") return;
|
|
119
|
+
if (key in exports && exports[key] === _labelStyle[key]) return;
|
|
120
|
+
Object.defineProperty(exports, key, {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () {
|
|
123
|
+
return _labelStyle[key];
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
});
|
|
61
127
|
var _sharedTypes = require("./sharedTypes");
|
|
62
128
|
Object.keys(_sharedTypes).forEach(function (key) {
|
|
63
129
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_DatePicker","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_SelectionMenu","_ContextMenu","_SegmentedControl","_LiquidGlass","_sharedTypes","_NativeTheme"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,WAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,WAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,WAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,cAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,cAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,cAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,cAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,YAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,YAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,YAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,YAAA,CAAAN,GAAA;IAAA;EAAA;AAAA;AACA,IAAAO,iBAAA,GAAAX,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAS,iBAAA,EAAAR,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAO,iBAAA,CAAAP,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,iBAAA,CAAAP,GAAA;IAAA;EAAA;AAAA;AACA,IAAAQ,
|
|
1
|
+
{"version":3,"names":["_DatePicker","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_SelectionMenu","_ContextMenu","_SegmentedControl","_Button","_ButtonGroup","_FloatingToolbar","_LiquidGlass","_TextField","_icons","_labelStyle","_sharedTypes","_NativeTheme"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,WAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,WAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,WAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,cAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,cAAA,EAA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AAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAe,YAAA,CAAAf,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAW,YAAA,CAAAf,GAAA;IAAA;EAAA;AAAA;AACA,IAAAgB,YAAA,GAAApB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAkB,YAAA,EAAAjB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAgB,YAAA,CAAAhB,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAY,YAAA,CAAAhB,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useNativeTheme = exports.setNativeTheme = exports.isLiquidGlassSupported = exports.SelectionMenu = exports.SegmentedControl = exports.LiquidGlass = exports.DatePicker = exports.ContextMenu = void 0;
|
|
6
|
+
exports.useNativeTheme = exports.setNativeTheme = exports.isLiquidGlassSupported = exports.TextField = exports.SelectionMenu = exports.SegmentedControl = exports.LiquidGlass = exports.FloatingToolbar = exports.DatePicker = exports.ContextMenu = exports.ButtonGroup = exports.Button = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -47,9 +47,25 @@ exports.ContextMenu = ContextMenu;
|
|
|
47
47
|
const SegmentedControl = _props => null;
|
|
48
48
|
|
|
49
49
|
// ============================================================================
|
|
50
|
-
//
|
|
50
|
+
// Button, ButtonGroup, FloatingToolbar
|
|
51
51
|
// ============================================================================
|
|
52
52
|
exports.SegmentedControl = SegmentedControl;
|
|
53
|
+
const Button = _props => null;
|
|
54
|
+
exports.Button = Button;
|
|
55
|
+
const ButtonGroup = _props => null;
|
|
56
|
+
exports.ButtonGroup = ButtonGroup;
|
|
57
|
+
const FloatingToolbar = ({
|
|
58
|
+
children
|
|
59
|
+
}) => {
|
|
60
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
61
|
+
children: children
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// ============================================================================
|
|
66
|
+
// LiquidGlass
|
|
67
|
+
// ============================================================================
|
|
68
|
+
exports.FloatingToolbar = FloatingToolbar;
|
|
53
69
|
const LiquidGlass = ({
|
|
54
70
|
children
|
|
55
71
|
}) => {
|
|
@@ -60,6 +76,20 @@ const LiquidGlass = ({
|
|
|
60
76
|
exports.LiquidGlass = LiquidGlass;
|
|
61
77
|
const isLiquidGlassSupported = exports.isLiquidGlassSupported = false;
|
|
62
78
|
|
|
79
|
+
// ============================================================================
|
|
80
|
+
// TextField
|
|
81
|
+
// ============================================================================
|
|
82
|
+
|
|
83
|
+
const TextField = exports.TextField = /*#__PURE__*/_react.default.forwardRef(function TextFieldComponent(_props, ref) {
|
|
84
|
+
_react.default.useImperativeHandle(ref, () => ({
|
|
85
|
+
focus: () => {},
|
|
86
|
+
blur: () => {},
|
|
87
|
+
clear: () => {},
|
|
88
|
+
isFocused: () => false
|
|
89
|
+
}));
|
|
90
|
+
return null;
|
|
91
|
+
});
|
|
92
|
+
|
|
63
93
|
// ============================================================================
|
|
64
94
|
// Native theme
|
|
65
95
|
// ============================================================================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_jsxRuntime","e","__esModule","default","DatePicker","_props","exports","SelectionMenu","ContextMenu","children","jsx","Fragment","SegmentedControl","LiquidGlass","isLiquidGlassSupported","setNativeTheme","_theme","useNativeTheme"],"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;;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_jsxRuntime","e","__esModule","default","DatePicker","_props","exports","SelectionMenu","ContextMenu","children","jsx","Fragment","SegmentedControl","Button","ButtonGroup","FloatingToolbar","LiquidGlass","isLiquidGlassSupported","TextField","React","forwardRef","TextFieldComponent","ref","useImperativeHandle","focus","blur","clear","isFocused","setNativeTheme","_theme","useNativeTheme"],"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;;AAQA;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;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CAAC;EACH,OAAO,IAAI;AACb,CACF,CAAC;;AAED;AACA;AACA;;AAQO,MAAMC,cAAc,GAAIC,MAA0B,IAAW,CAAC,CAAC;AAACvB,OAAA,CAAAsB,cAAA,GAAAA,cAAA;AAEhE,MAAME,cAAc,GACzBD,MAAsC,IAC7B,CAAC,CAAC;AAACvB,OAAA,CAAAwB,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.normalizeLabelStyle = normalizeLabelStyle;
|
|
7
|
+
// labelStyle.ts
|
|
8
|
+
//
|
|
9
|
+
// Label font props shared by SegmentedControl, Button and ButtonGroup.
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Font for a control's labels. Each field falls back to the platform default.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/** The flat font fields the native specs expect; empty / 0 = default. */
|
|
16
|
+
|
|
17
|
+
/** Normalizes a label font for native; `undefined` keeps the platform font. */
|
|
18
|
+
function normalizeLabelStyle(labelStyle) {
|
|
19
|
+
if (!labelStyle) return undefined;
|
|
20
|
+
return {
|
|
21
|
+
fontFamily: labelStyle.fontFamily ?? '',
|
|
22
|
+
fontSize: labelStyle.fontSize ?? 0,
|
|
23
|
+
fontWeight: labelStyle.fontWeight === undefined ? '' : String(labelStyle.fontWeight),
|
|
24
|
+
fontStyle: labelStyle.fontStyle ?? ''
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=labelStyle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["normalizeLabelStyle","labelStyle","undefined","fontFamily","fontSize","fontWeight","String","fontStyle"],"sourceRoot":"../../src","sources":["labelStyle.ts"],"mappings":";;;;;;AAAA;AACA;AACA;;AAGA;AACA;AACA;;AAQA;;AAQA;AACO,SAASA,mBAAmBA,CACjCC,UAAkC,EACJ;EAC9B,IAAI,CAACA,UAAU,EAAE,OAAOC,SAAS;EACjC,OAAO;IACLC,UAAU,EAAEF,UAAU,CAACE,UAAU,IAAI,EAAE;IACvCC,QAAQ,EAAEH,UAAU,CAACG,QAAQ,IAAI,CAAC;IAClCC,UAAU,EACRJ,UAAU,CAACI,UAAU,KAAKH,SAAS,GAAG,EAAE,GAAGI,MAAM,CAACL,UAAU,CAACI,UAAU,CAAC;IAC1EE,SAAS,EAAEN,UAAU,CAACM,SAAS,IAAI;EACrC,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["reactNativeInternals.d.ts"],"mappings":"","ignoreList":[]}
|