react-native-platform-components 0.0.3 → 0.3.1
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/PlatformComponents.podspec +1 -1
- package/README.md +2 -0
- package/android/src/main/java/com/platformcomponents/PCDatePickerView.kt +5 -7
- package/android/src/main/java/com/platformcomponents/PCSelectionMenuView.kt +273 -146
- package/android/src/main/java/com/platformcomponents/PCSelectionMenuViewManager.kt +5 -4
- package/ios/PCDatePickerView.swift +2 -11
- package/ios/PCSelectionMenu.mm +0 -10
- package/ios/PCSelectionMenu.swift +145 -179
- package/lib/module/DatePicker.js +3 -1
- package/lib/module/DatePicker.js.map +1 -1
- package/lib/module/SelectionMenu.js +4 -10
- package/lib/module/SelectionMenu.js.map +1 -1
- package/lib/module/SelectionMenuNativeComponent.ts +0 -9
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/DatePicker.d.ts +2 -0
- package/lib/typescript/src/DatePicker.d.ts.map +1 -1
- package/lib/typescript/src/SelectionMenu.d.ts +6 -10
- package/lib/typescript/src/SelectionMenu.d.ts.map +1 -1
- package/lib/typescript/src/SelectionMenuNativeComponent.d.ts +0 -7
- package/lib/typescript/src/SelectionMenuNativeComponent.d.ts.map +1 -1
- package/package.json +16 -9
- package/src/DatePicker.tsx +5 -1
- package/src/SelectionMenu.tsx +8 -33
- package/src/SelectionMenuNativeComponent.ts +0 -9
- package/lib/module/SelectionMenu.web.js +0 -57
- package/lib/module/SelectionMenu.web.js.map +0 -1
- package/lib/typescript/src/SelectionMenu.web.d.ts +0 -19
- package/lib/typescript/src/SelectionMenu.web.d.ts.map +0 -1
- package/src/SelectionMenu.web.tsx +0 -93
|
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.authors = package["author"]
|
|
12
12
|
|
|
13
13
|
s.platforms = { :ios => min_ios_version_supported }
|
|
14
|
-
s.source = { :git => "https://github.com/
|
|
14
|
+
s.source = { :git => "https://github.com/JarX-Concepts/react-native-platform-components.git", :tag => "#{s.version}" }
|
|
15
15
|
|
|
16
16
|
s.source_files = ["ios/**/*.{h,m,mm,swift,cpp}", "shared/**/*.{h,m,mm,swift,cpp}"]
|
|
17
17
|
s.private_header_files = ["ios/**/*.h", "shared/**/*.h"]
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# react-native-platform-components
|
|
2
2
|
|
|
3
|
+
> 🚧 In development — not ready for public use.
|
|
4
|
+
|
|
3
5
|
High-quality **native UI components for React Native**, implemented with platform-first APIs and exposed through clean, typed JavaScript interfaces.
|
|
4
6
|
|
|
5
7
|
This library focuses on **true native behavior**, not JavaScript re-implementations — starting with:
|
|
@@ -6,6 +6,7 @@ import android.content.ContextWrapper
|
|
|
6
6
|
import android.content.DialogInterface
|
|
7
7
|
import android.os.Build
|
|
8
8
|
import android.view.Gravity
|
|
9
|
+
import android.view.View
|
|
9
10
|
import android.view.ViewGroup
|
|
10
11
|
import android.widget.DatePicker
|
|
11
12
|
import android.widget.FrameLayout
|
|
@@ -58,8 +59,6 @@ class PCDatePickerView(context: Context) : FrameLayout(context) {
|
|
|
58
59
|
private var showingModal = false
|
|
59
60
|
|
|
60
61
|
init {
|
|
61
|
-
minimumHeight = 0
|
|
62
|
-
minimumWidth = 0
|
|
63
62
|
rebuildUI()
|
|
64
63
|
}
|
|
65
64
|
|
|
@@ -171,7 +170,7 @@ class PCDatePickerView(context: Context) : FrameLayout(context) {
|
|
|
171
170
|
// UI construction
|
|
172
171
|
// -----------------------------
|
|
173
172
|
|
|
174
|
-
private fun isInline(): Boolean = presentation == "inline"
|
|
173
|
+
private fun isInline(): Boolean = presentation == "inline" || presentation == "embedded"
|
|
175
174
|
|
|
176
175
|
private fun rebuildUI() {
|
|
177
176
|
removeAllViews()
|
|
@@ -185,19 +184,18 @@ class PCDatePickerView(context: Context) : FrameLayout(context) {
|
|
|
185
184
|
}
|
|
186
185
|
|
|
187
186
|
val container = LinearLayout(context).apply {
|
|
188
|
-
layoutParams = LayoutParams(
|
|
187
|
+
layoutParams = FrameLayout.LayoutParams(
|
|
189
188
|
ViewGroup.LayoutParams.MATCH_PARENT,
|
|
190
189
|
ViewGroup.LayoutParams.WRAP_CONTENT
|
|
191
190
|
)
|
|
192
191
|
orientation = LinearLayout.VERTICAL
|
|
193
|
-
gravity = Gravity.CENTER_VERTICAL
|
|
194
192
|
}
|
|
195
193
|
|
|
196
194
|
// date and/or time
|
|
197
195
|
if (mode == "date" || mode == "dateAndTime") {
|
|
198
196
|
val dp = DatePicker(context).apply {
|
|
199
197
|
layoutParams = LinearLayout.LayoutParams(
|
|
200
|
-
ViewGroup.LayoutParams.
|
|
198
|
+
ViewGroup.LayoutParams.WRAP_CONTENT,
|
|
201
199
|
ViewGroup.LayoutParams.WRAP_CONTENT
|
|
202
200
|
)
|
|
203
201
|
calendarViewShown = true
|
|
@@ -215,7 +213,7 @@ class PCDatePickerView(context: Context) : FrameLayout(context) {
|
|
|
215
213
|
if (mode == "time" || mode == "dateAndTime") {
|
|
216
214
|
val tp = TimePicker(context).apply {
|
|
217
215
|
layoutParams = LinearLayout.LayoutParams(
|
|
218
|
-
ViewGroup.LayoutParams.
|
|
216
|
+
ViewGroup.LayoutParams.WRAP_CONTENT,
|
|
219
217
|
ViewGroup.LayoutParams.WRAP_CONTENT
|
|
220
218
|
)
|
|
221
219
|
val is24 = android.text.format.DateFormat.is24HourFormat(context)
|