one 2.0.0-beta.120.1 → 2.0.0-beta.123.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/android/src/main/java/dev/onejs/onenative/OneNativeComposeNodeManager.kt +20 -0
- package/android/src/main/java/dev/onejs/onenative/OneNativeComposeNodeView.kt +166 -2
- package/dist/cjs/one.cjs +1 -0
- package/dist/cjs/one.native.cjs +1 -0
- package/dist/cjs/one.native.js +1 -0
- package/dist/cjs/one.native.js.map +1 -1
- package/dist/cjs/platform/compose.android.cjs +109 -6
- package/dist/cjs/platform/compose.android.js +109 -6
- package/dist/cjs/platform/compose.android.js.map +1 -1
- package/dist/cjs/platform/compose.cjs +31 -0
- package/dist/cjs/platform/compose.native.cjs +49 -0
- package/dist/cjs/platform/compose.native.js +49 -0
- package/dist/cjs/platform/compose.native.js.map +1 -1
- package/dist/cjs/platform/composeValidation.cjs +38 -0
- package/dist/cjs/platform/composeValidation.native.cjs +41 -0
- package/dist/cjs/platform/composeValidation.native.js +41 -0
- package/dist/cjs/platform/composeValidation.native.js.map +1 -1
- package/dist/cjs/platform/contacts/index.cjs +33 -0
- package/dist/cjs/platform/contacts/index.native.cjs +61 -0
- package/dist/cjs/platform/contacts/index.native.js +63 -0
- package/dist/cjs/platform/contacts/index.native.js.map +1 -0
- package/dist/cjs/platform/generated/Controls.native.cjs +81 -0
- package/dist/cjs/platform/generated/Controls.native.js +81 -0
- package/dist/cjs/platform/generated/Controls.native.js.map +1 -1
- package/dist/cjs/platform/generated/unsupportedControls.cjs +8 -0
- package/dist/cjs/platform/generated/unsupportedControls.native.cjs +8 -0
- package/dist/cjs/platform/generated/unsupportedControls.native.js +8 -0
- package/dist/cjs/platform/generated/unsupportedControls.native.js.map +1 -1
- package/dist/cjs/platform/index.cjs +2 -0
- package/dist/cjs/platform/index.native.cjs +2 -0
- package/dist/cjs/platform/index.native.js +2 -0
- package/dist/cjs/platform/index.native.js.map +1 -1
- package/dist/cjs/platform/specs/OneContacts.nitro.cjs +16 -0
- package/dist/cjs/platform/specs/OneContacts.nitro.native.cjs +18 -0
- package/dist/cjs/platform/specs/OneContacts.nitro.native.js +20 -0
- package/dist/cjs/platform/specs/OneContacts.nitro.native.js.map +1 -0
- package/dist/cjs/platform/specs/OneNativeComposeNodeNativeComponent.cjs +5 -0
- package/dist/cjs/platform/specs/OneNativeComposeNodeNativeComponent.native.cjs +5 -0
- package/dist/cjs/platform/specs/OneNativeComposeNodeNativeComponent.native.js +5 -0
- package/dist/cjs/platform/specs/OneNativeComposeNodeNativeComponent.native.js.map +2 -2
- package/dist/cjs/platform/specs/OneNativeTextEditorNativeComponent.cjs +63 -0
- package/dist/cjs/platform/specs/OneNativeTextEditorNativeComponent.native.cjs +63 -0
- package/dist/cjs/platform/specs/OneNativeTextEditorNativeComponent.native.js +64 -0
- package/dist/cjs/platform/specs/OneNativeTextEditorNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/specs/OneNativeUnevenRoundedRectangleNativeComponent.cjs +48 -0
- package/dist/cjs/platform/specs/OneNativeUnevenRoundedRectangleNativeComponent.native.cjs +48 -0
- package/dist/cjs/platform/specs/OneNativeUnevenRoundedRectangleNativeComponent.native.js +49 -0
- package/dist/cjs/platform/specs/OneNativeUnevenRoundedRectangleNativeComponent.native.js.map +7 -0
- package/dist/esm/one.mjs +2 -1
- package/dist/esm/one.mjs.map +1 -1
- package/dist/esm/one.native.js +2 -1
- package/dist/esm/one.native.js.map +1 -1
- package/dist/esm/platform/compose.android.js +110 -7
- package/dist/esm/platform/compose.android.js.map +1 -1
- package/dist/esm/platform/compose.mjs +31 -0
- package/dist/esm/platform/compose.mjs.map +1 -1
- package/dist/esm/platform/compose.native.js +49 -0
- package/dist/esm/platform/compose.native.js.map +1 -1
- package/dist/esm/platform/composeValidation.mjs +36 -1
- package/dist/esm/platform/composeValidation.mjs.map +1 -1
- package/dist/esm/platform/composeValidation.native.js +39 -1
- package/dist/esm/platform/composeValidation.native.js.map +1 -1
- package/dist/esm/platform/contacts/index.mjs +13 -0
- package/dist/esm/platform/contacts/index.mjs.map +1 -0
- package/dist/esm/platform/contacts/index.native.js +40 -0
- package/dist/esm/platform/contacts/index.native.js.map +1 -0
- package/dist/esm/platform/generated/Controls.native.js +80 -1
- package/dist/esm/platform/generated/Controls.native.js.map +1 -1
- package/dist/esm/platform/generated/unsupportedControls.mjs +8 -0
- package/dist/esm/platform/generated/unsupportedControls.mjs.map +1 -1
- package/dist/esm/platform/generated/unsupportedControls.native.js +8 -0
- package/dist/esm/platform/generated/unsupportedControls.native.js.map +1 -1
- package/dist/esm/platform/index.mjs +2 -1
- package/dist/esm/platform/index.mjs.map +1 -1
- package/dist/esm/platform/index.native.js +2 -1
- package/dist/esm/platform/index.native.js.map +1 -1
- package/dist/esm/platform/specs/OneContacts.nitro.mjs +0 -0
- package/dist/esm/platform/specs/OneContacts.nitro.native.js +0 -0
- package/dist/esm/platform/specs/OneNativeComposeNodeNativeComponent.mjs +5 -0
- package/dist/esm/platform/specs/OneNativeComposeNodeNativeComponent.mjs.map +2 -2
- package/dist/esm/platform/specs/OneNativeComposeNodeNativeComponent.native.js +5 -0
- package/dist/esm/platform/specs/OneNativeComposeNodeNativeComponent.native.js.map +2 -2
- package/dist/esm/platform/specs/OneNativeTextEditorNativeComponent.mjs +45 -0
- package/dist/esm/platform/specs/OneNativeTextEditorNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/specs/OneNativeTextEditorNativeComponent.native.js +45 -0
- package/dist/esm/platform/specs/OneNativeTextEditorNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/specs/OneNativeUnevenRoundedRectangleNativeComponent.mjs +30 -0
- package/dist/esm/platform/specs/OneNativeUnevenRoundedRectangleNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/specs/OneNativeUnevenRoundedRectangleNativeComponent.native.js +30 -0
- package/dist/esm/platform/specs/OneNativeUnevenRoundedRectangleNativeComponent.native.js.map +7 -0
- package/ios/Generated/OneNativeTextEditorComponentView.h +7 -0
- package/ios/Generated/OneNativeTextEditorComponentView.mm +58 -0
- package/ios/Generated/OneNativeTextEditorView.swift +143 -0
- package/ios/Generated/OneNativeUnevenRoundedRectangleComponentView.h +7 -0
- package/ios/Generated/OneNativeUnevenRoundedRectangleComponentView.mm +43 -0
- package/ios/Generated/OneNativeUnevenRoundedRectangleView.swift +91 -0
- package/ios/Nitro/HybridOneContacts.swift +185 -0
- package/ios/OneNativeSlot.swift +9 -3
- package/nitrogen/generated/android/One+autolinking.cmake +1 -0
- package/nitrogen/generated/ios/One-Swift-Cxx-Bridge.cpp +33 -0
- package/nitrogen/generated/ios/One-Swift-Cxx-Bridge.hpp +140 -11
- package/nitrogen/generated/ios/One-Swift-Cxx-Umbrella.hpp +14 -0
- package/nitrogen/generated/ios/OneAutolinking.mm +8 -0
- package/nitrogen/generated/ios/OneAutolinking.swift +12 -0
- package/nitrogen/generated/ios/c++/HybridOneContactsSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridOneContactsSpecSwift.hpp +124 -0
- package/nitrogen/generated/ios/swift/ContactInfo.swift +61 -0
- package/nitrogen/generated/ios/swift/ContactInput.swift +56 -0
- package/nitrogen/generated/ios/swift/ContactsPermissionStatus.swift +52 -0
- package/nitrogen/generated/ios/swift/Func_void_ContactsPermissionStatus.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_ContactInfo_.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridOneContactsSpec.swift +59 -0
- package/nitrogen/generated/ios/swift/HybridOneContactsSpec_cxx.swift +220 -0
- package/nitrogen/generated/shared/c++/ContactInfo.hpp +100 -0
- package/nitrogen/generated/shared/c++/ContactInput.hpp +96 -0
- package/nitrogen/generated/shared/c++/ContactsPermissionStatus.hpp +88 -0
- package/nitrogen/generated/shared/c++/HybridOneContactsSpec.cpp +25 -0
- package/nitrogen/generated/shared/c++/HybridOneContactsSpec.hpp +76 -0
- package/package.json +12 -10
- package/schema.json +123 -0
- package/src/one.ts +3 -0
- package/src/platform/README.md +24 -0
- package/src/platform/compose.android.tsx +119 -7
- package/src/platform/compose.tsx +47 -0
- package/src/platform/composeTypes.ts +30 -1
- package/src/platform/composeValidation.ts +38 -1
- package/src/platform/contacts/index.native.ts +51 -0
- package/src/platform/contacts/index.ts +19 -0
- package/src/platform/generated/Controls.native.tsx +118 -0
- package/src/platform/generated/controlTypes.ts +20 -0
- package/src/platform/generated/unsupportedControls.ts +8 -0
- package/src/platform/index.native.ts +2 -0
- package/src/platform/index.ts +2 -0
- package/src/platform/specs/OneContacts.nitro.ts +31 -0
- package/src/platform/specs/OneNativeComposeNodeNativeComponent.ts +12 -0
- package/src/platform/specs/OneNativeTextEditorNativeComponent.ts +66 -0
- package/src/platform/specs/OneNativeUnevenRoundedRectangleNativeComponent.ts +52 -0
- package/types/one.d.ts +2 -1
- package/types/one.d.ts.map +1 -1
- package/types/platform/compose.android.d.ts +34 -1
- package/types/platform/compose.android.d.ts.map +1 -1
- package/types/platform/compose.d.ts +34 -1
- package/types/platform/compose.d.ts.map +1 -1
- package/types/platform/composeTypes.d.ts +29 -1
- package/types/platform/composeTypes.d.ts.map +1 -1
- package/types/platform/composeValidation.d.ts +7 -2
- package/types/platform/composeValidation.d.ts.map +1 -1
- package/types/platform/contacts/index.d.ts +10 -0
- package/types/platform/contacts/index.d.ts.map +1 -0
- package/types/platform/contacts/index.native.d.ts +15 -0
- package/types/platform/contacts/index.native.d.ts.map +1 -0
- package/types/platform/generated/Controls.native.d.ts +2 -0
- package/types/platform/generated/Controls.native.d.ts.map +1 -1
- package/types/platform/generated/controlTypes.d.ts +20 -0
- package/types/platform/generated/controlTypes.d.ts.map +1 -1
- package/types/platform/generated/unsupportedControls.d.ts +4 -0
- package/types/platform/generated/unsupportedControls.d.ts.map +1 -1
- package/types/platform/index.d.ts +2 -0
- package/types/platform/index.d.ts.map +1 -1
- package/types/platform/index.native.d.ts +4 -0
- package/types/platform/index.native.d.ts.map +1 -1
- package/types/platform/specs/OneContacts.nitro.d.ts +25 -0
- package/types/platform/specs/OneContacts.nitro.d.ts.map +1 -0
- package/types/platform/specs/OneNativeComposeNodeNativeComponent.d.ts +12 -0
- package/types/platform/specs/OneNativeComposeNodeNativeComponent.d.ts.map +1 -1
- package/types/platform/specs/OneNativeTextEditorNativeComponent.d.ts +66 -0
- package/types/platform/specs/OneNativeTextEditorNativeComponent.d.ts.map +1 -0
- package/types/platform/specs/OneNativeUnevenRoundedRectangleNativeComponent.d.ts +49 -0
- package/types/platform/specs/OneNativeUnevenRoundedRectangleNativeComponent.d.ts.map +1 -0
- package/types/platform/unsupported.d.ts +2 -0
- package/types/platform/unsupported.d.ts.map +1 -1
|
@@ -174,6 +174,18 @@ class OneNativeComposeNodeManager :
|
|
|
174
174
|
view.stageCardColors(value)
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
+
override fun setIconButtonColors(view: OneNativeComposeNodeView, value: ReadableMap?) {
|
|
178
|
+
view.stageIconButtonColors(value)
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
override fun setFabColors(view: OneNativeComposeNodeView, value: ReadableMap?) {
|
|
182
|
+
view.stageFabColors(value)
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
override fun setFabExpanded(view: OneNativeComposeNodeView, value: Boolean) {
|
|
186
|
+
view.stageFabExpanded(value)
|
|
187
|
+
}
|
|
188
|
+
|
|
177
189
|
override fun setBadgeColors(view: OneNativeComposeNodeView, value: ReadableMap?) {
|
|
178
190
|
view.stageBadgeColors(value)
|
|
179
191
|
}
|
|
@@ -234,10 +246,18 @@ class OneNativeComposeNodeManager :
|
|
|
234
246
|
view.stageArrangement(value)
|
|
235
247
|
}
|
|
236
248
|
|
|
249
|
+
override fun setVerticalArrangement(view: OneNativeComposeNodeView, value: String?) {
|
|
250
|
+
view.stageVerticalArrangement(value)
|
|
251
|
+
}
|
|
252
|
+
|
|
237
253
|
override fun setSpacing(view: OneNativeComposeNodeView, value: Double) {
|
|
238
254
|
view.stageSpacing(value)
|
|
239
255
|
}
|
|
240
256
|
|
|
257
|
+
override fun setVerticalSpacing(view: OneNativeComposeNodeView, value: Double) {
|
|
258
|
+
view.stageVerticalSpacing(value)
|
|
259
|
+
}
|
|
260
|
+
|
|
241
261
|
override fun setTextValue(view: OneNativeComposeNodeView, value: String?) {
|
|
242
262
|
view.stageTextValue(value)
|
|
243
263
|
}
|
|
@@ -11,6 +11,8 @@ import androidx.compose.foundation.background
|
|
|
11
11
|
import androidx.compose.foundation.border
|
|
12
12
|
import androidx.compose.foundation.layout.Arrangement
|
|
13
13
|
import androidx.compose.foundation.layout.Box
|
|
14
|
+
import androidx.compose.foundation.layout.ExperimentalLayoutApi
|
|
15
|
+
import androidx.compose.foundation.layout.FlowRow
|
|
14
16
|
import androidx.compose.foundation.layout.Column
|
|
15
17
|
import androidx.compose.foundation.layout.Row
|
|
16
18
|
import androidx.compose.foundation.layout.RowScope
|
|
@@ -45,10 +47,23 @@ import androidx.compose.material3.darkColorScheme
|
|
|
45
47
|
import androidx.compose.material3.dynamicDarkColorScheme
|
|
46
48
|
import androidx.compose.material3.dynamicLightColorScheme
|
|
47
49
|
import androidx.compose.material3.ElevatedCard
|
|
50
|
+
import androidx.compose.material3.ElevatedButton
|
|
48
51
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
|
49
52
|
import androidx.compose.material3.FilterChip
|
|
50
53
|
import androidx.compose.material3.FilterChipDefaults
|
|
51
54
|
import androidx.compose.material3.HorizontalDivider
|
|
55
|
+
import androidx.compose.material3.IconButton
|
|
56
|
+
import androidx.compose.material3.IconButtonColors
|
|
57
|
+
import androidx.compose.material3.IconButtonDefaults
|
|
58
|
+
import androidx.compose.material3.FilledIconButton
|
|
59
|
+
import androidx.compose.material3.FilledTonalIconButton
|
|
60
|
+
import androidx.compose.material3.FilledTonalButton
|
|
61
|
+
import androidx.compose.material3.FloatingActionButton
|
|
62
|
+
import androidx.compose.material3.FloatingActionButtonDefaults
|
|
63
|
+
import androidx.compose.material3.SmallFloatingActionButton
|
|
64
|
+
import androidx.compose.material3.LargeFloatingActionButton
|
|
65
|
+
import androidx.compose.material3.ExtendedFloatingActionButton
|
|
66
|
+
import androidx.compose.material3.OutlinedIconButton
|
|
52
67
|
import androidx.compose.material3.InputChip
|
|
53
68
|
import androidx.compose.material3.InputChipDefaults
|
|
54
69
|
import androidx.compose.material3.lightColorScheme
|
|
@@ -196,6 +211,23 @@ internal data class OneNativeCardColors(
|
|
|
196
211
|
}
|
|
197
212
|
}
|
|
198
213
|
|
|
214
|
+
internal data class OneNativeIconButtonColors(
|
|
215
|
+
val containerColor: Int? = null,
|
|
216
|
+
val contentColor: Int? = null,
|
|
217
|
+
val disabledContainerColor: Int? = null,
|
|
218
|
+
val disabledContentColor: Int? = null,
|
|
219
|
+
) {
|
|
220
|
+
companion object {
|
|
221
|
+
fun fromMap(map: ReadableMap?, context: Context): OneNativeIconButtonColors =
|
|
222
|
+
if (map == null) OneNativeIconButtonColors() else OneNativeIconButtonColors(
|
|
223
|
+
containerColor = readComposeColor(map, "containerColor", context),
|
|
224
|
+
contentColor = readComposeColor(map, "contentColor", context),
|
|
225
|
+
disabledContainerColor = readComposeColor(map, "disabledContainerColor", context),
|
|
226
|
+
disabledContentColor = readComposeColor(map, "disabledContentColor", context),
|
|
227
|
+
)
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
199
231
|
internal data class OneNativeListItemColors(
|
|
200
232
|
val containerColor: Int? = null,
|
|
201
233
|
val contentColor: Int? = null,
|
|
@@ -350,6 +382,9 @@ internal data class OneNativeComposeNodeProps(
|
|
|
350
382
|
val selected: Boolean = false,
|
|
351
383
|
val radioColors: OneNativeRadioColors = OneNativeRadioColors(),
|
|
352
384
|
val cardColors: OneNativeCardColors = OneNativeCardColors(),
|
|
385
|
+
val iconButtonColors: OneNativeIconButtonColors = OneNativeIconButtonColors(),
|
|
386
|
+
val fabColors: OneNativeCardColors = OneNativeCardColors(),
|
|
387
|
+
val fabExpanded: Boolean = true,
|
|
353
388
|
val badgeColors: OneNativeCardColors = OneNativeCardColors(),
|
|
354
389
|
val listItemColors: OneNativeListItemColors = OneNativeListItemColors(),
|
|
355
390
|
val tonalElevation: Double = -1.0,
|
|
@@ -365,7 +400,9 @@ internal data class OneNativeComposeNodeProps(
|
|
|
365
400
|
val revision: Int = 0,
|
|
366
401
|
val alignment: String? = null,
|
|
367
402
|
val arrangement: String? = null,
|
|
403
|
+
val verticalArrangement: String? = null,
|
|
368
404
|
val spacing: Double = -1.0,
|
|
405
|
+
val verticalSpacing: Double = -1.0,
|
|
369
406
|
val textValue: String? = null,
|
|
370
407
|
val syncStateId: Int = 0,
|
|
371
408
|
val placeholder: String? = null,
|
|
@@ -650,6 +687,18 @@ class OneNativeComposeNodeView(context: Context) : ReactViewGroup(context) {
|
|
|
650
687
|
pendingProps = pendingProps.copy(cardColors = OneNativeCardColors.fromMap(value, context))
|
|
651
688
|
}
|
|
652
689
|
|
|
690
|
+
internal fun stageIconButtonColors(value: ReadableMap?) {
|
|
691
|
+
pendingProps = pendingProps.copy(iconButtonColors = OneNativeIconButtonColors.fromMap(value, context))
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
internal fun stageFabColors(value: ReadableMap?) {
|
|
695
|
+
pendingProps = pendingProps.copy(fabColors = OneNativeCardColors.fromMap(value, context))
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
internal fun stageFabExpanded(value: Boolean) {
|
|
699
|
+
pendingProps = pendingProps.copy(fabExpanded = value)
|
|
700
|
+
}
|
|
701
|
+
|
|
653
702
|
internal fun stageBadgeColors(value: ReadableMap?) {
|
|
654
703
|
pendingProps = pendingProps.copy(badgeColors = OneNativeCardColors.fromMap(value, context))
|
|
655
704
|
}
|
|
@@ -710,10 +759,18 @@ class OneNativeComposeNodeView(context: Context) : ReactViewGroup(context) {
|
|
|
710
759
|
pendingProps = pendingProps.copy(arrangement = value)
|
|
711
760
|
}
|
|
712
761
|
|
|
762
|
+
internal fun stageVerticalArrangement(value: String?) {
|
|
763
|
+
pendingProps = pendingProps.copy(verticalArrangement = value)
|
|
764
|
+
}
|
|
765
|
+
|
|
713
766
|
internal fun stageSpacing(value: Double) {
|
|
714
767
|
pendingProps = pendingProps.copy(spacing = value)
|
|
715
768
|
}
|
|
716
769
|
|
|
770
|
+
internal fun stageVerticalSpacing(value: Double) {
|
|
771
|
+
pendingProps = pendingProps.copy(verticalSpacing = value)
|
|
772
|
+
}
|
|
773
|
+
|
|
717
774
|
internal fun stageTextValue(value: String?) {
|
|
718
775
|
pendingProps = pendingProps.copy(textValue = value)
|
|
719
776
|
}
|
|
@@ -1029,6 +1086,7 @@ private fun RenderComposeNode(
|
|
|
1029
1086
|
}
|
|
1030
1087
|
}
|
|
1031
1088
|
|
|
1089
|
+
@OptIn(ExperimentalLayoutApi::class)
|
|
1032
1090
|
@Composable
|
|
1033
1091
|
private fun RenderComposeNodeBody(
|
|
1034
1092
|
node: OneNativeComposeNodeView,
|
|
@@ -1052,6 +1110,14 @@ private fun RenderComposeNodeBody(
|
|
|
1052
1110
|
) {
|
|
1053
1111
|
RenderComposeChildren(node)
|
|
1054
1112
|
}
|
|
1113
|
+
"flowrow" ->
|
|
1114
|
+
FlowRow(
|
|
1115
|
+
modifier = modifier,
|
|
1116
|
+
horizontalArrangement = rowArrangement(props.arrangement, props.spacing),
|
|
1117
|
+
verticalArrangement = columnArrangement(props.verticalArrangement, props.verticalSpacing),
|
|
1118
|
+
) {
|
|
1119
|
+
RenderComposeChildren(node)
|
|
1120
|
+
}
|
|
1055
1121
|
"box" ->
|
|
1056
1122
|
Box(
|
|
1057
1123
|
modifier = modifier,
|
|
@@ -1142,6 +1208,9 @@ private fun RenderComposeNodeBody(
|
|
|
1142
1208
|
)
|
|
1143
1209
|
}
|
|
1144
1210
|
"button" -> RenderComposeButton(node, props, modifier)
|
|
1211
|
+
"iconbutton", "fillediconbutton", "filledtonaliconbutton", "outlinediconbutton" ->
|
|
1212
|
+
RenderComposeIconButton(node, props, modifier)
|
|
1213
|
+
"floatingactionbutton" -> RenderComposeFloatingActionButton(node, props, modifier)
|
|
1145
1214
|
"switch" -> RenderComposeSwitch(node, props, modifier)
|
|
1146
1215
|
"checkbox" ->
|
|
1147
1216
|
Checkbox(
|
|
@@ -1419,6 +1488,34 @@ private fun RenderComposeButton(
|
|
|
1419
1488
|
val enabled = !props.disabled && node.isEnabled
|
|
1420
1489
|
val danger = props.tone.equals("danger", ignoreCase = true)
|
|
1421
1490
|
when (props.variant?.trim()?.lowercase()) {
|
|
1491
|
+
"tonal" ->
|
|
1492
|
+
FilledTonalButton(
|
|
1493
|
+
onClick = { node.handlePress() },
|
|
1494
|
+
modifier = modifier,
|
|
1495
|
+
enabled = enabled,
|
|
1496
|
+
colors =
|
|
1497
|
+
if (danger) {
|
|
1498
|
+
ButtonDefaults.filledTonalButtonColors(containerColor = DangerColor, contentColor = Color.White)
|
|
1499
|
+
} else {
|
|
1500
|
+
ButtonDefaults.filledTonalButtonColors()
|
|
1501
|
+
},
|
|
1502
|
+
) {
|
|
1503
|
+
ComposeButtonContent(props)
|
|
1504
|
+
}
|
|
1505
|
+
"elevated" ->
|
|
1506
|
+
ElevatedButton(
|
|
1507
|
+
onClick = { node.handlePress() },
|
|
1508
|
+
modifier = modifier,
|
|
1509
|
+
enabled = enabled,
|
|
1510
|
+
colors =
|
|
1511
|
+
if (danger) {
|
|
1512
|
+
ButtonDefaults.elevatedButtonColors(containerColor = DangerColor, contentColor = Color.White)
|
|
1513
|
+
} else {
|
|
1514
|
+
ButtonDefaults.elevatedButtonColors()
|
|
1515
|
+
},
|
|
1516
|
+
) {
|
|
1517
|
+
ComposeButtonContent(props)
|
|
1518
|
+
}
|
|
1422
1519
|
"outlined" ->
|
|
1423
1520
|
OutlinedButton(
|
|
1424
1521
|
onClick = { node.handlePress() },
|
|
@@ -1467,6 +1564,73 @@ private fun RenderComposeButton(
|
|
|
1467
1564
|
}
|
|
1468
1565
|
}
|
|
1469
1566
|
|
|
1567
|
+
@Composable
|
|
1568
|
+
private fun RenderComposeIconButton(
|
|
1569
|
+
node: OneNativeComposeNodeView,
|
|
1570
|
+
props: OneNativeComposeNodeProps,
|
|
1571
|
+
modifier: Modifier,
|
|
1572
|
+
) {
|
|
1573
|
+
val enabled = !props.disabled && node.isEnabled
|
|
1574
|
+
val custom = props.iconButtonColors
|
|
1575
|
+
fun colors(defaults: IconButtonColors): IconButtonColors = defaults.copy(
|
|
1576
|
+
containerColor = custom.containerColor?.let(::Color) ?: defaults.containerColor,
|
|
1577
|
+
contentColor = custom.contentColor?.let(::Color) ?: defaults.contentColor,
|
|
1578
|
+
disabledContainerColor = custom.disabledContainerColor?.let(::Color) ?: defaults.disabledContainerColor,
|
|
1579
|
+
disabledContentColor = custom.disabledContentColor?.let(::Color) ?: defaults.disabledContentColor,
|
|
1580
|
+
)
|
|
1581
|
+
when (node.renderedNodeKind) {
|
|
1582
|
+
"fillediconbutton" -> FilledIconButton(
|
|
1583
|
+
onClick = node::handlePress,
|
|
1584
|
+
modifier = modifier,
|
|
1585
|
+
enabled = enabled,
|
|
1586
|
+
colors = colors(IconButtonDefaults.filledIconButtonColors()),
|
|
1587
|
+
) { RenderComposeChildren(node) }
|
|
1588
|
+
"filledtonaliconbutton" -> FilledTonalIconButton(
|
|
1589
|
+
onClick = node::handlePress,
|
|
1590
|
+
modifier = modifier,
|
|
1591
|
+
enabled = enabled,
|
|
1592
|
+
colors = colors(IconButtonDefaults.filledTonalIconButtonColors()),
|
|
1593
|
+
) { RenderComposeChildren(node) }
|
|
1594
|
+
"outlinediconbutton" -> OutlinedIconButton(
|
|
1595
|
+
onClick = node::handlePress,
|
|
1596
|
+
modifier = modifier,
|
|
1597
|
+
enabled = enabled,
|
|
1598
|
+
colors = colors(IconButtonDefaults.outlinedIconButtonColors()),
|
|
1599
|
+
) { RenderComposeChildren(node) }
|
|
1600
|
+
else -> IconButton(
|
|
1601
|
+
onClick = node::handlePress,
|
|
1602
|
+
modifier = modifier,
|
|
1603
|
+
enabled = enabled,
|
|
1604
|
+
colors = colors(IconButtonDefaults.iconButtonColors()),
|
|
1605
|
+
) { RenderComposeChildren(node) }
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
@Composable
|
|
1610
|
+
private fun RenderComposeFloatingActionButton(
|
|
1611
|
+
node: OneNativeComposeNodeView,
|
|
1612
|
+
props: OneNativeComposeNodeProps,
|
|
1613
|
+
modifier: Modifier,
|
|
1614
|
+
) {
|
|
1615
|
+
val icon = node.renderedChildren.firstOrNull { it.renderedProps.slotName == "icon" }
|
|
1616
|
+
val text = node.renderedChildren.firstOrNull { it.renderedProps.slotName == "text" }
|
|
1617
|
+
val iconContent: @Composable () -> Unit = { if (icon != null) RenderComposeChildren(icon) }
|
|
1618
|
+
val containerColor = props.fabColors.containerColor?.let(::Color) ?: FloatingActionButtonDefaults.containerColor
|
|
1619
|
+
when (props.variant) {
|
|
1620
|
+
"small" -> SmallFloatingActionButton(onClick = node::handlePress, modifier = modifier, containerColor = containerColor, content = iconContent)
|
|
1621
|
+
"large" -> LargeFloatingActionButton(onClick = node::handlePress, modifier = modifier, containerColor = containerColor, content = iconContent)
|
|
1622
|
+
"extended" -> ExtendedFloatingActionButton(
|
|
1623
|
+
onClick = node::handlePress,
|
|
1624
|
+
modifier = modifier,
|
|
1625
|
+
expanded = props.fabExpanded,
|
|
1626
|
+
containerColor = containerColor,
|
|
1627
|
+
icon = iconContent,
|
|
1628
|
+
text = { if (text != null) RenderComposeChildren(text) },
|
|
1629
|
+
)
|
|
1630
|
+
else -> FloatingActionButton(onClick = node::handlePress, modifier = modifier, containerColor = containerColor, content = iconContent)
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1470
1634
|
@Composable
|
|
1471
1635
|
private fun RowScope.ComposeButtonContent(props: OneNativeComposeNodeProps) {
|
|
1472
1636
|
val icon = props.icon
|
|
@@ -1797,7 +1961,7 @@ private fun Modifier.applyReactSemantics(
|
|
|
1797
1961
|
val semanticRole =
|
|
1798
1962
|
composeRole(normalizedRole)
|
|
1799
1963
|
?: when (node.renderedNodeKind) {
|
|
1800
|
-
"button" -> Role.Button
|
|
1964
|
+
"button", "iconbutton", "fillediconbutton", "filledtonaliconbutton", "outlinediconbutton", "floatingactionbutton" -> Role.Button
|
|
1801
1965
|
"switch" -> Role.Switch
|
|
1802
1966
|
"checkbox" -> Role.Checkbox
|
|
1803
1967
|
"radio" -> Role.RadioButton
|
|
@@ -1818,7 +1982,7 @@ private fun Modifier.applyReactSemantics(
|
|
|
1818
1982
|
// Fabric; only logical-only children need the compose testTag.
|
|
1819
1983
|
val needsComposeTag = !testId.isNullOrEmpty() && node.parent == null
|
|
1820
1984
|
if (needsComposeTag) result = result.testTag(testId)
|
|
1821
|
-
val mergeDescendants = node.renderedNodeKind == "button" || node.renderedNodeKind == "switch" || node.renderedNodeKind == "checkbox" || node.renderedNodeKind == "radio"
|
|
1985
|
+
val mergeDescendants = node.renderedNodeKind == "button" || node.renderedNodeKind.endsWith("iconbutton") || node.renderedNodeKind == "switch" || node.renderedNodeKind == "checkbox" || node.renderedNodeKind == "radio"
|
|
1822
1986
|
return result.semantics(mergeDescendants = mergeDescendants) {
|
|
1823
1987
|
if (node.renderedNodeKind == "icon" && label.isNullOrEmpty()) invisibleToUser()
|
|
1824
1988
|
if (!label.isNullOrEmpty()) contentDescription = label
|
package/dist/cjs/one.cjs
CHANGED
|
@@ -39,6 +39,7 @@ const iOS = Object.freeze({
|
|
|
39
39
|
Share: import_platform.Share,
|
|
40
40
|
PhotoLibrary: import_platform.PhotoLibrary,
|
|
41
41
|
Device: import_platform.Device,
|
|
42
|
+
Contacts: import_platform.Contacts,
|
|
42
43
|
Color: import_platform.Color.ios,
|
|
43
44
|
MenuAction: import_platform.MenuAction,
|
|
44
45
|
SplitView: import_platform.SplitView,
|
package/dist/cjs/one.native.cjs
CHANGED
|
@@ -42,6 +42,7 @@ var iOS = Object.freeze({
|
|
|
42
42
|
Share: import_platform.Share,
|
|
43
43
|
PhotoLibrary: import_platform.PhotoLibrary,
|
|
44
44
|
Device: import_platform.Device,
|
|
45
|
+
Contacts: import_platform.Contacts,
|
|
45
46
|
Color: import_platform.Color.ios,
|
|
46
47
|
MenuAction: import_platform.MenuAction,
|
|
47
48
|
SplitView: import_platform.SplitView,
|
package/dist/cjs/one.native.js
CHANGED
|
@@ -42,6 +42,7 @@ var iOS = Object.freeze({
|
|
|
42
42
|
Share: import_platform.Share,
|
|
43
43
|
PhotoLibrary: import_platform.PhotoLibrary,
|
|
44
44
|
Device: import_platform.Device,
|
|
45
|
+
Contacts: import_platform.Contacts,
|
|
45
46
|
Color: import_platform.Color.ios,
|
|
46
47
|
MenuAction: import_platform.MenuAction,
|
|
47
48
|
SplitView: import_platform.SplitView,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"one.native.js","names":[],"sources":["cjs/one.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar one_exports = {};\n__export(one_exports, {\n One: () => One\n});\nmodule.exports = __toCommonJS(one_exports);\nvar import_platform = require(\"./platform\");\nvar import_safe_area_context = require(\"./safe-area-context\");\nfunction currentPlatform() {\n var _Reflect_get;\n var defined = (_Reflect_get = Reflect.get(globalThis, \"__ONE_PLATFORM__\")) !== null && _Reflect_get !== void 0 ? _Reflect_get : typeof process !== \"undefined\" ? process.env.ONE_PLATFORM : void 0;\n return defined === \"ios\" || defined === \"android\" || defined === \"rnx\" ? defined : \"web\";\n}\nvar iOS = Object.freeze({\n ...import_platform.Swift,\n Widgets: import_platform.Widgets,\n LiveActivities: import_platform.LiveActivities,\n WidgetUI: import_platform.WidgetUI,\n LocalAuthentication: import_platform.LocalAuthentication,\n Location: import_platform.Location,\n FileSystem: import_platform.FileSystem,\n Audio: import_platform.Audio,\n Share: import_platform.Share,\n PhotoLibrary: import_platform.PhotoLibrary,\n Device: import_platform.Device,\n Color: import_platform.Color.ios,\n MenuAction: import_platform.MenuAction,\n SplitView: import_platform.SplitView,\n ToolbarHost: import_platform.ToolbarHost,\n BarButtonItem: import_platform.ToolbarItem,\n ZoomTransitionAlignmentRectDetector: import_platform.ZoomTransitionAlignmentRectDetector,\n ZoomTransitionEnabler: import_platform.ZoomTransitionEnabler,\n ZoomTransitionSource: import_platform.ZoomTransitionSource\n});\nvar Android = Object.freeze({\n ...import_platform.Compose,\n Color: import_platform.Color.android,\n Menu: import_platform.Menu,\n ContextMenu: import_platform.ContextMenu\n});\nvar SafeArea = Object.freeze({\n Provider: import_safe_area_context.SafeAreaProvider,\n View: import_safe_area_context.SafeAreaView,\n initialMetrics: import_safe_area_context.initialWindowMetrics\n});\nvar UI = Object.freeze({\n ...import_platform.UI,\n Fonts: import_platform.Fonts,\n SafeArea,\n TextInput: import_platform.TextInput,\n ReservedRegions: import_platform.ReservedRegions\n});\nvar One = Object.freeze({\n get platform() {\n return currentPlatform();\n },\n AppInfo: import_platform.AppInfo,\n Database: import_platform.Database,\n iOS,\n Android,\n UI,\n Notifications: import_platform.Notifications,\n Clipboard: import_platform.Clipboard,\n Haptics: import_platform.Haptics,\n Network: import_platform.Network,\n Auth: import_platform.Auth,\n Browser: import_platform.Browser,\n ImagePicker: import_platform.ImagePicker,\n DocumentPicker: import_platform.DocumentPicker,\n SecureStore: import_platform.SecureStore,\n Speech: import_platform.Speech,\n Updates: import_platform.Updates\n});\n//# sourceMappingURL=one.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,cAAc,CAAC;AACnB,SAAS,aAAa,EACpB,WAAW,IACb,CAAC;AACD,OAAO,UAAU,aAAa,WAAW;AACzC,IAAI,kBAAkB,QAAQ,4BAAY;AAC1C,IAAI,2BAA2B,QAAQ,qCAAqB;AAC5D,SAAS,kBAAkB;CACzB,IAAI;CACJ,IAAI,WAAW,eAAe,QAAQ,IAAI,YAAY,kBAAkB,OAAO,QAAQ,iBAAiB,KAAK,IAAI,eAAe,OAAO,YAAY,cAAc,QAAQ,IAAI,eAAe,KAAK;CACjM,OAAO,YAAY,SAAS,YAAY,aAAa,YAAY,QAAQ,UAAU;AACrF;AACA,IAAI,MAAM,OAAO,OAAO;CACtB,GAAG,gBAAgB;CACnB,SAAS,gBAAgB;CACzB,gBAAgB,gBAAgB;CAChC,UAAU,gBAAgB;CAC1B,qBAAqB,gBAAgB;CACrC,UAAU,gBAAgB;CAC1B,YAAY,gBAAgB;CAC5B,OAAO,gBAAgB;CACvB,OAAO,gBAAgB;CACvB,cAAc,gBAAgB;CAC9B,QAAQ,gBAAgB;CACxB,OAAO,gBAAgB,MAAM;CAC7B,YAAY,gBAAgB;CAC5B,WAAW,gBAAgB;CAC3B,aAAa,gBAAgB;CAC7B,eAAe,gBAAgB;CAC/B,qCAAqC,gBAAgB;CACrD,uBAAuB,gBAAgB;CACvC,sBAAsB,gBAAgB;AACxC,CAAC;AACD,IAAI,UAAU,OAAO,OAAO;CAC1B,GAAG,gBAAgB;CACnB,OAAO,gBAAgB,MAAM;CAC7B,MAAM,gBAAgB;CACtB,aAAa,gBAAgB;AAC/B,CAAC;AACD,IAAI,WAAW,OAAO,OAAO;CAC3B,UAAU,yBAAyB;CACnC,MAAM,yBAAyB;CAC/B,gBAAgB,yBAAyB;AAC3C,CAAC;AACD,IAAI,KAAK,OAAO,OAAO;CACrB,GAAG,gBAAgB;CACnB,OAAO,gBAAgB;CACvB;CACA,WAAW,gBAAgB;CAC3B,iBAAiB,gBAAgB;AACnC,CAAC;AACD,IAAI,MAAM,OAAO,OAAO;CACtB,IAAI,WAAW;EACb,OAAO,gBAAgB;CACzB;CACA,SAAS,gBAAgB;CACzB,UAAU,gBAAgB;CAC1B;CACA;CACA;CACA,eAAe,gBAAgB;CAC/B,WAAW,gBAAgB;CAC3B,SAAS,gBAAgB;CACzB,SAAS,gBAAgB;CACzB,MAAM,gBAAgB;CACtB,SAAS,gBAAgB;CACzB,aAAa,gBAAgB;CAC7B,gBAAgB,gBAAgB;CAChC,aAAa,gBAAgB;CAC7B,QAAQ,gBAAgB;CACxB,SAAS,gBAAgB;AAC3B,CAAC"}
|
|
1
|
+
{"version":3,"file":"one.native.js","names":[],"sources":["cjs/one.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar one_exports = {};\n__export(one_exports, {\n One: () => One\n});\nmodule.exports = __toCommonJS(one_exports);\nvar import_platform = require(\"./platform\");\nvar import_safe_area_context = require(\"./safe-area-context\");\nfunction currentPlatform() {\n var _Reflect_get;\n var defined = (_Reflect_get = Reflect.get(globalThis, \"__ONE_PLATFORM__\")) !== null && _Reflect_get !== void 0 ? _Reflect_get : typeof process !== \"undefined\" ? process.env.ONE_PLATFORM : void 0;\n return defined === \"ios\" || defined === \"android\" || defined === \"rnx\" ? defined : \"web\";\n}\nvar iOS = Object.freeze({\n ...import_platform.Swift,\n Widgets: import_platform.Widgets,\n LiveActivities: import_platform.LiveActivities,\n WidgetUI: import_platform.WidgetUI,\n LocalAuthentication: import_platform.LocalAuthentication,\n Location: import_platform.Location,\n FileSystem: import_platform.FileSystem,\n Audio: import_platform.Audio,\n Share: import_platform.Share,\n PhotoLibrary: import_platform.PhotoLibrary,\n Device: import_platform.Device,\n Contacts: import_platform.Contacts,\n Color: import_platform.Color.ios,\n MenuAction: import_platform.MenuAction,\n SplitView: import_platform.SplitView,\n ToolbarHost: import_platform.ToolbarHost,\n BarButtonItem: import_platform.ToolbarItem,\n ZoomTransitionAlignmentRectDetector: import_platform.ZoomTransitionAlignmentRectDetector,\n ZoomTransitionEnabler: import_platform.ZoomTransitionEnabler,\n ZoomTransitionSource: import_platform.ZoomTransitionSource\n});\nvar Android = Object.freeze({\n ...import_platform.Compose,\n Color: import_platform.Color.android,\n Menu: import_platform.Menu,\n ContextMenu: import_platform.ContextMenu\n});\nvar SafeArea = Object.freeze({\n Provider: import_safe_area_context.SafeAreaProvider,\n View: import_safe_area_context.SafeAreaView,\n initialMetrics: import_safe_area_context.initialWindowMetrics\n});\nvar UI = Object.freeze({\n ...import_platform.UI,\n Fonts: import_platform.Fonts,\n SafeArea,\n TextInput: import_platform.TextInput,\n ReservedRegions: import_platform.ReservedRegions\n});\nvar One = Object.freeze({\n get platform() {\n return currentPlatform();\n },\n AppInfo: import_platform.AppInfo,\n Database: import_platform.Database,\n iOS,\n Android,\n UI,\n Notifications: import_platform.Notifications,\n Clipboard: import_platform.Clipboard,\n Haptics: import_platform.Haptics,\n Network: import_platform.Network,\n Auth: import_platform.Auth,\n Browser: import_platform.Browser,\n ImagePicker: import_platform.ImagePicker,\n DocumentPicker: import_platform.DocumentPicker,\n SecureStore: import_platform.SecureStore,\n Speech: import_platform.Speech,\n Updates: import_platform.Updates\n});\n//# sourceMappingURL=one.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,cAAc,CAAC;AACnB,SAAS,aAAa,EACpB,WAAW,IACb,CAAC;AACD,OAAO,UAAU,aAAa,WAAW;AACzC,IAAI,kBAAkB,QAAQ,4BAAY;AAC1C,IAAI,2BAA2B,QAAQ,qCAAqB;AAC5D,SAAS,kBAAkB;CACzB,IAAI;CACJ,IAAI,WAAW,eAAe,QAAQ,IAAI,YAAY,kBAAkB,OAAO,QAAQ,iBAAiB,KAAK,IAAI,eAAe,OAAO,YAAY,cAAc,QAAQ,IAAI,eAAe,KAAK;CACjM,OAAO,YAAY,SAAS,YAAY,aAAa,YAAY,QAAQ,UAAU;AACrF;AACA,IAAI,MAAM,OAAO,OAAO;CACtB,GAAG,gBAAgB;CACnB,SAAS,gBAAgB;CACzB,gBAAgB,gBAAgB;CAChC,UAAU,gBAAgB;CAC1B,qBAAqB,gBAAgB;CACrC,UAAU,gBAAgB;CAC1B,YAAY,gBAAgB;CAC5B,OAAO,gBAAgB;CACvB,OAAO,gBAAgB;CACvB,cAAc,gBAAgB;CAC9B,QAAQ,gBAAgB;CACxB,UAAU,gBAAgB;CAC1B,OAAO,gBAAgB,MAAM;CAC7B,YAAY,gBAAgB;CAC5B,WAAW,gBAAgB;CAC3B,aAAa,gBAAgB;CAC7B,eAAe,gBAAgB;CAC/B,qCAAqC,gBAAgB;CACrD,uBAAuB,gBAAgB;CACvC,sBAAsB,gBAAgB;AACxC,CAAC;AACD,IAAI,UAAU,OAAO,OAAO;CAC1B,GAAG,gBAAgB;CACnB,OAAO,gBAAgB,MAAM;CAC7B,MAAM,gBAAgB;CACtB,aAAa,gBAAgB;AAC/B,CAAC;AACD,IAAI,WAAW,OAAO,OAAO;CAC3B,UAAU,yBAAyB;CACnC,MAAM,yBAAyB;CAC/B,gBAAgB,yBAAyB;AAC3C,CAAC;AACD,IAAI,KAAK,OAAO,OAAO;CACrB,GAAG,gBAAgB;CACnB,OAAO,gBAAgB;CACvB;CACA,WAAW,gBAAgB;CAC3B,iBAAiB,gBAAgB;AACnC,CAAC;AACD,IAAI,MAAM,OAAO,OAAO;CACtB,IAAI,WAAW;EACb,OAAO,gBAAgB;CACzB;CACA,SAAS,gBAAgB;CACzB,UAAU,gBAAgB;CAC1B;CACA;CACA;CACA,eAAe,gBAAgB;CAC/B,WAAW,gBAAgB;CAC3B,SAAS,gBAAgB;CACzB,SAAS,gBAAgB;CACzB,MAAM,gBAAgB;CACtB,SAAS,gBAAgB;CACzB,aAAa,gBAAgB;CAC7B,gBAAgB,gBAAgB;CAChC,aAAa,gBAAgB;CAC7B,QAAQ,gBAAgB;CACxB,SAAS,gBAAgB;AAC3B,CAAC"}
|
|
@@ -106,6 +106,22 @@ function Row(param) {
|
|
|
106
106
|
children
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
+
function FlowRow(param) {
|
|
110
|
+
var { children, horizontalArrangement = "start", verticalArrangement = "top", ...props } = param;
|
|
111
|
+
(0, import_composeValidation.validateFlowRowProps)({
|
|
112
|
+
horizontalArrangement,
|
|
113
|
+
verticalArrangement
|
|
114
|
+
});
|
|
115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComposeNode, {
|
|
116
|
+
...props,
|
|
117
|
+
nodeType: "flowrow",
|
|
118
|
+
arrangement: typeof horizontalArrangement === "string" ? horizontalArrangement : "start",
|
|
119
|
+
verticalArrangement: typeof verticalArrangement === "string" ? verticalArrangement : "top",
|
|
120
|
+
spacing: typeof horizontalArrangement === "string" ? void 0 : horizontalArrangement.spacedBy,
|
|
121
|
+
verticalSpacing: typeof verticalArrangement === "string" ? void 0 : verticalArrangement.spacedBy,
|
|
122
|
+
children
|
|
123
|
+
});
|
|
124
|
+
}
|
|
109
125
|
function Box(param) {
|
|
110
126
|
var { children, contentAlignment = "topStart", ...props } = param;
|
|
111
127
|
(0, import_composeValidation.validateBoxProps)({ contentAlignment });
|
|
@@ -164,7 +180,7 @@ function ListItemRoot(param) {
|
|
|
164
180
|
children
|
|
165
181
|
});
|
|
166
182
|
}
|
|
167
|
-
function
|
|
183
|
+
function composeSlot(slotName) {
|
|
168
184
|
return function(param) {
|
|
169
185
|
var { children } = param;
|
|
170
186
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComposeNode, {
|
|
@@ -175,11 +191,11 @@ function listItemSlot(slotName) {
|
|
|
175
191
|
};
|
|
176
192
|
}
|
|
177
193
|
var ListItem = Object.assign(ListItemRoot, {
|
|
178
|
-
HeadlineContent:
|
|
179
|
-
OverlineContent:
|
|
180
|
-
SupportingContent:
|
|
181
|
-
LeadingContent:
|
|
182
|
-
TrailingContent:
|
|
194
|
+
HeadlineContent: composeSlot("headlineContent"),
|
|
195
|
+
OverlineContent: composeSlot("overlineContent"),
|
|
196
|
+
SupportingContent: composeSlot("supportingContent"),
|
|
197
|
+
LeadingContent: composeSlot("leadingContent"),
|
|
198
|
+
TrailingContent: composeSlot("trailingContent")
|
|
183
199
|
});
|
|
184
200
|
function renderCard(nodeType, kind, param) {
|
|
185
201
|
var { children, colors, elevation, border, ...props } = param;
|
|
@@ -395,6 +411,84 @@ function Button(param) {
|
|
|
395
411
|
} : void 0
|
|
396
412
|
});
|
|
397
413
|
}
|
|
414
|
+
function renderIconButton(nodeType, param) {
|
|
415
|
+
var { children, enabled = true, colors, onClick, ...props } = param;
|
|
416
|
+
(0, import_composeValidation.validateIconButtonProps)({
|
|
417
|
+
children,
|
|
418
|
+
enabled,
|
|
419
|
+
colors,
|
|
420
|
+
onClick
|
|
421
|
+
});
|
|
422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComposeNode, {
|
|
423
|
+
...props,
|
|
424
|
+
nodeType,
|
|
425
|
+
disabled: !enabled,
|
|
426
|
+
iconButtonColors: colors,
|
|
427
|
+
onNativeComposeNodeButtonPress: onClick ? function() {
|
|
428
|
+
return onClick();
|
|
429
|
+
} : void 0,
|
|
430
|
+
children
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
function IconButton(props) {
|
|
434
|
+
return renderIconButton("iconbutton", props);
|
|
435
|
+
}
|
|
436
|
+
function FilledIconButton(props) {
|
|
437
|
+
return renderIconButton("fillediconbutton", props);
|
|
438
|
+
}
|
|
439
|
+
function FilledTonalIconButton(props) {
|
|
440
|
+
return renderIconButton("filledtonaliconbutton", props);
|
|
441
|
+
}
|
|
442
|
+
function OutlinedIconButton(props) {
|
|
443
|
+
return renderIconButton("outlinediconbutton", props);
|
|
444
|
+
}
|
|
445
|
+
function FloatingActionButtonRoot(param) {
|
|
446
|
+
var { children, containerColor, expanded = true, onClick, variant = "medium", ...props } = param;
|
|
447
|
+
(0, import_composeValidation.validateFloatingActionButtonProps)({
|
|
448
|
+
children,
|
|
449
|
+
containerColor,
|
|
450
|
+
expanded,
|
|
451
|
+
onClick
|
|
452
|
+
}, variant);
|
|
453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComposeNode, {
|
|
454
|
+
...props,
|
|
455
|
+
nodeType: "floatingactionbutton",
|
|
456
|
+
variant,
|
|
457
|
+
fabColors: { containerColor },
|
|
458
|
+
fabExpanded: expanded,
|
|
459
|
+
onNativeComposeNodeButtonPress: onClick ? function() {
|
|
460
|
+
return onClick();
|
|
461
|
+
} : void 0,
|
|
462
|
+
children
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
var FloatingActionButton = Object.assign(function(props) {
|
|
466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingActionButtonRoot, {
|
|
467
|
+
...props,
|
|
468
|
+
variant: "medium"
|
|
469
|
+
});
|
|
470
|
+
}, { Icon: composeSlot("icon") });
|
|
471
|
+
var SmallFloatingActionButton = Object.assign(function(props) {
|
|
472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingActionButtonRoot, {
|
|
473
|
+
...props,
|
|
474
|
+
variant: "small"
|
|
475
|
+
});
|
|
476
|
+
}, { Icon: composeSlot("icon") });
|
|
477
|
+
var LargeFloatingActionButton = Object.assign(function(props) {
|
|
478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingActionButtonRoot, {
|
|
479
|
+
...props,
|
|
480
|
+
variant: "large"
|
|
481
|
+
});
|
|
482
|
+
}, { Icon: composeSlot("icon") });
|
|
483
|
+
var ExtendedFloatingActionButton = Object.assign(function(props) {
|
|
484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingActionButtonRoot, {
|
|
485
|
+
...props,
|
|
486
|
+
variant: "extended"
|
|
487
|
+
});
|
|
488
|
+
}, {
|
|
489
|
+
Icon: composeSlot("icon"),
|
|
490
|
+
Text: composeSlot("text")
|
|
491
|
+
});
|
|
398
492
|
function Switch(param) {
|
|
399
493
|
var { isOn, disabled = false, label = "", onIsOnChange, revision = 0, ...props } = param;
|
|
400
494
|
(0, import_composeValidation.validateSwitchProps)({
|
|
@@ -620,6 +714,7 @@ function ProgressIndicator(param) {
|
|
|
620
714
|
var Compose = {
|
|
621
715
|
Column,
|
|
622
716
|
Row,
|
|
717
|
+
FlowRow,
|
|
623
718
|
Box,
|
|
624
719
|
Badge,
|
|
625
720
|
BadgedBox,
|
|
@@ -636,6 +731,14 @@ var Compose = {
|
|
|
636
731
|
Text,
|
|
637
732
|
Icon,
|
|
638
733
|
Button,
|
|
734
|
+
IconButton,
|
|
735
|
+
FilledIconButton,
|
|
736
|
+
FilledTonalIconButton,
|
|
737
|
+
OutlinedIconButton,
|
|
738
|
+
FloatingActionButton,
|
|
739
|
+
SmallFloatingActionButton,
|
|
740
|
+
LargeFloatingActionButton,
|
|
741
|
+
ExtendedFloatingActionButton,
|
|
639
742
|
Switch,
|
|
640
743
|
Checkbox,
|
|
641
744
|
RadioButton,
|
|
@@ -106,6 +106,22 @@ function Row(param) {
|
|
|
106
106
|
children
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
+
function FlowRow(param) {
|
|
110
|
+
var { children, horizontalArrangement = "start", verticalArrangement = "top", ...props } = param;
|
|
111
|
+
(0, import_composeValidation.validateFlowRowProps)({
|
|
112
|
+
horizontalArrangement,
|
|
113
|
+
verticalArrangement
|
|
114
|
+
});
|
|
115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComposeNode, {
|
|
116
|
+
...props,
|
|
117
|
+
nodeType: "flowrow",
|
|
118
|
+
arrangement: typeof horizontalArrangement === "string" ? horizontalArrangement : "start",
|
|
119
|
+
verticalArrangement: typeof verticalArrangement === "string" ? verticalArrangement : "top",
|
|
120
|
+
spacing: typeof horizontalArrangement === "string" ? void 0 : horizontalArrangement.spacedBy,
|
|
121
|
+
verticalSpacing: typeof verticalArrangement === "string" ? void 0 : verticalArrangement.spacedBy,
|
|
122
|
+
children
|
|
123
|
+
});
|
|
124
|
+
}
|
|
109
125
|
function Box(param) {
|
|
110
126
|
var { children, contentAlignment = "topStart", ...props } = param;
|
|
111
127
|
(0, import_composeValidation.validateBoxProps)({ contentAlignment });
|
|
@@ -164,7 +180,7 @@ function ListItemRoot(param) {
|
|
|
164
180
|
children
|
|
165
181
|
});
|
|
166
182
|
}
|
|
167
|
-
function
|
|
183
|
+
function composeSlot(slotName) {
|
|
168
184
|
return function(param) {
|
|
169
185
|
var { children } = param;
|
|
170
186
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComposeNode, {
|
|
@@ -175,11 +191,11 @@ function listItemSlot(slotName) {
|
|
|
175
191
|
};
|
|
176
192
|
}
|
|
177
193
|
var ListItem = Object.assign(ListItemRoot, {
|
|
178
|
-
HeadlineContent:
|
|
179
|
-
OverlineContent:
|
|
180
|
-
SupportingContent:
|
|
181
|
-
LeadingContent:
|
|
182
|
-
TrailingContent:
|
|
194
|
+
HeadlineContent: composeSlot("headlineContent"),
|
|
195
|
+
OverlineContent: composeSlot("overlineContent"),
|
|
196
|
+
SupportingContent: composeSlot("supportingContent"),
|
|
197
|
+
LeadingContent: composeSlot("leadingContent"),
|
|
198
|
+
TrailingContent: composeSlot("trailingContent")
|
|
183
199
|
});
|
|
184
200
|
function renderCard(nodeType, kind, param) {
|
|
185
201
|
var { children, colors, elevation, border, ...props } = param;
|
|
@@ -395,6 +411,84 @@ function Button(param) {
|
|
|
395
411
|
} : void 0
|
|
396
412
|
});
|
|
397
413
|
}
|
|
414
|
+
function renderIconButton(nodeType, param) {
|
|
415
|
+
var { children, enabled = true, colors, onClick, ...props } = param;
|
|
416
|
+
(0, import_composeValidation.validateIconButtonProps)({
|
|
417
|
+
children,
|
|
418
|
+
enabled,
|
|
419
|
+
colors,
|
|
420
|
+
onClick
|
|
421
|
+
});
|
|
422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComposeNode, {
|
|
423
|
+
...props,
|
|
424
|
+
nodeType,
|
|
425
|
+
disabled: !enabled,
|
|
426
|
+
iconButtonColors: colors,
|
|
427
|
+
onNativeComposeNodeButtonPress: onClick ? function() {
|
|
428
|
+
return onClick();
|
|
429
|
+
} : void 0,
|
|
430
|
+
children
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
function IconButton(props) {
|
|
434
|
+
return renderIconButton("iconbutton", props);
|
|
435
|
+
}
|
|
436
|
+
function FilledIconButton(props) {
|
|
437
|
+
return renderIconButton("fillediconbutton", props);
|
|
438
|
+
}
|
|
439
|
+
function FilledTonalIconButton(props) {
|
|
440
|
+
return renderIconButton("filledtonaliconbutton", props);
|
|
441
|
+
}
|
|
442
|
+
function OutlinedIconButton(props) {
|
|
443
|
+
return renderIconButton("outlinediconbutton", props);
|
|
444
|
+
}
|
|
445
|
+
function FloatingActionButtonRoot(param) {
|
|
446
|
+
var { children, containerColor, expanded = true, onClick, variant = "medium", ...props } = param;
|
|
447
|
+
(0, import_composeValidation.validateFloatingActionButtonProps)({
|
|
448
|
+
children,
|
|
449
|
+
containerColor,
|
|
450
|
+
expanded,
|
|
451
|
+
onClick
|
|
452
|
+
}, variant);
|
|
453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComposeNode, {
|
|
454
|
+
...props,
|
|
455
|
+
nodeType: "floatingactionbutton",
|
|
456
|
+
variant,
|
|
457
|
+
fabColors: { containerColor },
|
|
458
|
+
fabExpanded: expanded,
|
|
459
|
+
onNativeComposeNodeButtonPress: onClick ? function() {
|
|
460
|
+
return onClick();
|
|
461
|
+
} : void 0,
|
|
462
|
+
children
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
var FloatingActionButton = Object.assign(function(props) {
|
|
466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingActionButtonRoot, {
|
|
467
|
+
...props,
|
|
468
|
+
variant: "medium"
|
|
469
|
+
});
|
|
470
|
+
}, { Icon: composeSlot("icon") });
|
|
471
|
+
var SmallFloatingActionButton = Object.assign(function(props) {
|
|
472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingActionButtonRoot, {
|
|
473
|
+
...props,
|
|
474
|
+
variant: "small"
|
|
475
|
+
});
|
|
476
|
+
}, { Icon: composeSlot("icon") });
|
|
477
|
+
var LargeFloatingActionButton = Object.assign(function(props) {
|
|
478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingActionButtonRoot, {
|
|
479
|
+
...props,
|
|
480
|
+
variant: "large"
|
|
481
|
+
});
|
|
482
|
+
}, { Icon: composeSlot("icon") });
|
|
483
|
+
var ExtendedFloatingActionButton = Object.assign(function(props) {
|
|
484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingActionButtonRoot, {
|
|
485
|
+
...props,
|
|
486
|
+
variant: "extended"
|
|
487
|
+
});
|
|
488
|
+
}, {
|
|
489
|
+
Icon: composeSlot("icon"),
|
|
490
|
+
Text: composeSlot("text")
|
|
491
|
+
});
|
|
398
492
|
function Switch(param) {
|
|
399
493
|
var { isOn, disabled = false, label = "", onIsOnChange, revision = 0, ...props } = param;
|
|
400
494
|
(0, import_composeValidation.validateSwitchProps)({
|
|
@@ -620,6 +714,7 @@ function ProgressIndicator(param) {
|
|
|
620
714
|
var Compose = {
|
|
621
715
|
Column,
|
|
622
716
|
Row,
|
|
717
|
+
FlowRow,
|
|
623
718
|
Box,
|
|
624
719
|
Badge,
|
|
625
720
|
BadgedBox,
|
|
@@ -636,6 +731,14 @@ var Compose = {
|
|
|
636
731
|
Text,
|
|
637
732
|
Icon,
|
|
638
733
|
Button,
|
|
734
|
+
IconButton,
|
|
735
|
+
FilledIconButton,
|
|
736
|
+
FilledTonalIconButton,
|
|
737
|
+
OutlinedIconButton,
|
|
738
|
+
FloatingActionButton,
|
|
739
|
+
SmallFloatingActionButton,
|
|
740
|
+
LargeFloatingActionButton,
|
|
741
|
+
ExtendedFloatingActionButton,
|
|
639
742
|
Switch,
|
|
640
743
|
Checkbox,
|
|
641
744
|
RadioButton,
|