@octane-xplat/ui 0.5.0 → 0.6.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 +3 -0
- package/dist/native/Absolute.native.tsrx.js +43 -0
- package/dist/native/Accordion.native.tsrx.js +75 -0
- package/dist/native/ActivityIndicator.native.tsrx.js +35 -0
- package/dist/native/Alert.native.tsrx.js +74 -0
- package/dist/native/Avatar.native.tsrx.js +76 -0
- package/dist/native/AvatarGroup.native.tsrx.js +84 -0
- package/dist/native/Badge.native.tsrx.js +29 -0
- package/dist/native/Banner.native.tsrx.js +80 -0
- package/dist/native/Breadcrumb.native.tsrx.js +66 -0
- package/dist/native/Button.native.tsrx.js +62 -0
- package/dist/native/CameraView.native.tsrx.js +165 -0
- package/dist/native/Card.native.tsrx.js +64 -0
- package/dist/native/Checkbox.native.tsrx.js +58 -0
- package/dist/native/CheckboxGroup.native.tsrx.js +70 -0
- package/dist/native/Chip.native.tsrx.js +83 -0
- package/dist/native/Collapsible.native.tsrx.js +74 -0
- package/dist/native/CommandPalette.native.tsrx.js +143 -0
- package/dist/native/ContextMenu.native.tsrx.js +140 -0
- package/dist/native/Drawer.native.tsrx.js +60 -0
- package/dist/native/DropdownMenu.native.tsrx.js +155 -0
- package/dist/native/Empty.native.tsrx.js +82 -0
- package/dist/native/FieldGroup.native.tsrx.js +39 -0
- package/dist/native/FormField.native.tsrx.js +53 -0
- package/dist/native/{ui8.js → Grid.native.tsrx.js} +19 -8
- package/dist/native/{ui59.js → Heading.native.tsrx.js} +2 -2
- package/dist/native/{ui58.js → Icon.native.tsrx.js} +4 -4
- package/dist/native/{ui29.js → Image.native.tsrx.js} +4 -4
- package/dist/native/InputNumber.native.tsrx.js +146 -0
- package/dist/native/InputRating.native.tsrx.js +74 -0
- package/dist/native/InputTags.native.tsrx.js +131 -0
- package/dist/native/Kbd.native.tsrx.js +29 -0
- package/dist/native/{ui50.js → KeyboardAvoiding.native.tsrx.js} +1 -1
- package/dist/native/{ui17.js → Link.native.tsrx.js} +1 -1
- package/dist/native/{ui55.js → Meter.native.tsrx.js} +2 -2
- package/dist/native/{ui22.js → NavLink.native.tsrx.js} +3 -3
- package/dist/native/NavigationMenu.native.tsrx.js +67 -0
- package/dist/native/{ui35.js → Overlay.native.tsrx.js} +3 -3
- package/dist/native/Pager.native.tsrx.js +282 -0
- package/dist/native/Pagination.native.tsrx.js +107 -0
- package/dist/native/PinInput.native.tsrx.js +94 -0
- package/dist/native/{ui38.js → Popover.native.tsrx.js} +5 -5
- package/dist/native/{ui16.js → Pressable.native.tsrx.js} +20 -14
- package/dist/native/ProgressGroup.native.tsrx.js +66 -0
- package/dist/native/RadioGroup.native.tsrx.js +85 -0
- package/dist/native/{ui15.js → RichText.native.tsrx.js} +15 -22
- package/dist/native/Row.native.tsrx.js +98 -0
- package/dist/native/{ui49.js → SafeArea.native.tsrx.js} +2 -2
- package/dist/native/{ui45.js → Screen.native.tsrx.js} +3 -3
- package/dist/native/{ui26.js → ScrollBox.native.tsrx.js} +1 -1
- package/dist/native/ScrollView.native.tsrx.js +233 -0
- package/dist/native/SearchInput.native.tsrx.js +151 -0
- package/dist/native/SegmentedControl.native.tsrx.js +75 -0
- package/dist/native/Select.native.tsrx.js +202 -0
- package/dist/native/Separator.native.tsrx.js +25 -0
- package/dist/native/{ui63.js → Sheet.native.tsrx.js} +15 -7
- package/dist/native/Skeleton.native.tsrx.js +28 -0
- package/dist/native/Slider.native.tsrx.js +98 -0
- package/dist/native/{ui13.js → Spacer.native.tsrx.js} +2 -2
- package/dist/native/{ui9.js → Stack.native.tsrx.js} +20 -9
- package/dist/native/Stepper.native.tsrx.js +75 -0
- package/dist/native/Switch.native.tsrx.js +33 -0
- package/dist/native/Table.native.tsrx.js +103 -0
- package/dist/native/Tabs.native.tsrx.js +163 -0
- package/dist/native/{ui14.js → Text.native.tsrx.js} +4 -3
- package/dist/native/{ui24.js → TextArea.native.tsrx.js} +17 -16
- package/dist/native/{ui23.js → TextInput.native.tsrx.js} +21 -16
- package/dist/native/Timeline.native.tsrx.js +112 -0
- package/dist/native/Tree.native.tsrx.js +140 -0
- package/dist/native/User.native.tsrx.js +95 -0
- package/dist/native/Video.native.tsrx.js +248 -0
- package/dist/native/View.native.tsrx.js +98 -0
- package/dist/native/WebView.native.tsrx.js +110 -0
- package/dist/native/aliases.native.tsrx.js +38 -0
- package/dist/native/android/BottomNavigationView.android.tsrx.js +171 -0
- package/dist/native/android/CircularProgressIndicator.android.tsrx.js +27 -0
- package/dist/native/{ui51.js → android/DrawerLayout.android.tsrx.js} +5 -7
- package/dist/native/android/MaterialDialog.android.tsrx.js +62 -0
- package/dist/native/android/MaterialSwitch.android.tsrx.js +28 -0
- package/dist/native/android/RecyclerView.android.tsrx.js +248 -0
- package/dist/native/android/SeekBar.android.tsrx.js +34 -0
- package/dist/native/android/index.js +9 -0
- package/dist/native/android/openModal.android.js +39 -0
- package/dist/native/camera-permission.native.js +47 -0
- package/dist/native/child-array.js +15 -0
- package/dist/native/icons.js +25 -0
- package/dist/native/{ui11.js → ios/LiquidGlass.ios.tsrx.js} +4 -4
- package/dist/native/{ui12.js → ios/LiquidGlassContainer.ios.tsrx.js} +4 -4
- package/dist/native/ios/SideDrawer.ios.tsrx.js +64 -0
- package/dist/native/{ui53.js → ios/UIActivityIndicatorView.ios.tsrx.js} +5 -5
- package/dist/native/{ui32.js → ios/UIModal.ios.tsrx.js} +10 -6
- package/dist/native/{ui56.js → ios/UISlider.ios.tsrx.js} +5 -5
- package/dist/native/{ui47.js → ios/UISwitch.ios.tsrx.js} +5 -5
- package/dist/native/ios/UITabBar.ios.tsrx.js +166 -0
- package/dist/native/ios/UITableView.ios.tsrx.js +270 -0
- package/dist/native/ios/index.js +11 -0
- package/dist/native/{ui33.js → ios/openModal.ios.js} +5 -4
- package/dist/native/modal-presenter.native.js +19 -0
- package/dist/native/native/index.js +4 -0
- package/dist/native/octane-client-build.json +1 -1
- package/dist/native/{ui6.js → pan.native.tsrx.js} +9 -69
- package/dist/native/platform.native.js +10 -0
- package/dist/native/refresh-metrics.js +9 -0
- package/dist/native/refresh.native.js +177 -0
- package/dist/native/{ui34.js → root-layout.native.js} +6 -1
- package/dist/native/{ui21.js → route.native.js} +96 -12
- package/dist/native/sheet-detents.native.js +102 -0
- package/dist/native/{ui64.js → sheet-service.native.js} +19 -9
- package/dist/native/sheet-snap.js +35 -0
- package/dist/native/text-write.native.js +27 -0
- package/dist/native/{ui42.js → theme/status-bar-scheme.native.js} +2 -2
- package/dist/{web/ui29.js → native/theme/theme-scheme.js} +2 -2
- package/dist/native/{ui40.js → toast-anchor.native.tsrx.js} +3 -3
- package/dist/native/translate.native.js +11 -0
- package/dist/native/ui.js +93 -55
- package/dist/native/use-back.native.tsrx.js +9 -0
- package/dist/native/{ui52.js → useMeasure.native.tsrx.js} +1 -1
- package/dist/native/video-chrome.native.tsrx.js +365 -0
- package/dist/web/Absolute.web.tsrx.js +47 -0
- package/dist/web/Accordion.web.tsrx.js +85 -0
- package/dist/web/{ui48.js → ActivityIndicator.web.tsrx.js} +1 -1
- package/dist/web/Alert.web.tsrx.js +79 -0
- package/dist/web/Avatar.web.tsrx.js +106 -0
- package/dist/web/AvatarGroup.web.tsrx.js +108 -0
- package/dist/web/Badge.web.tsrx.js +37 -0
- package/dist/web/Banner.web.tsrx.js +79 -0
- package/dist/web/Breadcrumb.web.tsrx.js +135 -0
- package/dist/web/Button.web.tsrx.js +45 -0
- package/dist/web/CameraView.web.tsrx.js +310 -0
- package/dist/web/Card.web.tsrx.js +73 -0
- package/dist/web/Checkbox.web.tsrx.js +89 -0
- package/dist/web/CheckboxGroup.web.tsrx.js +79 -0
- package/dist/web/Chip.web.tsrx.js +64 -0
- package/dist/web/Collapsible.web.tsrx.js +94 -0
- package/dist/web/CommandPalette.web.tsrx.js +125 -0
- package/dist/web/ContextMenu.web.tsrx.js +154 -0
- package/dist/web/{ui45.js → Drawer.web.tsrx.js} +13 -9
- package/dist/web/DropdownMenu.web.tsrx.js +162 -0
- package/dist/web/Empty.web.tsrx.js +89 -0
- package/dist/web/FieldGroup.web.tsrx.js +57 -0
- package/dist/web/FormField.web.tsrx.js +92 -0
- package/dist/web/Grid.web.tsrx.js +65 -0
- package/dist/web/{ui54.js → Heading.web.tsrx.js} +2 -2
- package/dist/web/{ui53.js → Icon.web.tsrx.js} +2 -2
- package/dist/web/{ui25.js → Image.web.tsrx.js} +2 -2
- package/dist/web/InputNumber.web.tsrx.js +99 -0
- package/dist/web/InputRating.web.tsrx.js +72 -0
- package/dist/web/InputTags.web.tsrx.js +122 -0
- package/dist/web/Kbd.web.tsrx.js +37 -0
- package/dist/web/{ui50.js → Meter.web.tsrx.js} +1 -1
- package/dist/web/{ui19.js → NavLink.web.tsrx.js} +1 -1
- package/dist/web/NavigationMenu.web.tsrx.js +118 -0
- package/dist/web/{ui31.js → Overlay.web.tsrx.js} +2 -2
- package/dist/web/Pager.web.tsrx.js +337 -0
- package/dist/web/Pagination.web.tsrx.js +80 -0
- package/dist/web/PinInput.web.tsrx.js +72 -0
- package/dist/web/{ui33.js → Popover.web.tsrx.js} +3 -3
- package/dist/web/{ui15.js → Pressable.web.tsrx.js} +68 -95
- package/dist/web/ProgressGroup.web.tsrx.js +109 -0
- package/dist/web/RadioGroup.web.tsrx.js +69 -0
- package/dist/web/{ui14.js → RichText.web.tsrx.js} +2 -2
- package/dist/web/Row.web.tsrx.js +250 -0
- package/dist/web/{ui43.js → SafeArea.web.tsrx.js} +1 -1
- package/dist/web/{ui39.js → Screen.web.tsrx.js} +1 -1
- package/dist/web/{ui24.js → ScrollBox.web.tsrx.js} +1 -1
- package/dist/web/ScrollView.web.tsrx.js +388 -0
- package/dist/web/SearchInput.web.tsrx.js +137 -0
- package/dist/web/SegmentedControl.web.tsrx.js +75 -0
- package/dist/web/Select.web.tsrx.js +149 -0
- package/dist/web/Separator.web.tsrx.js +42 -0
- package/dist/web/Sheet.web.tsrx.js +81 -0
- package/dist/web/Skeleton.web.tsrx.js +56 -0
- package/dist/web/Slider.web.tsrx.js +97 -0
- package/dist/web/{ui12.js → Spacer.web.tsrx.js} +1 -1
- package/dist/web/Stack.web.tsrx.js +47 -0
- package/dist/web/Stepper.web.tsrx.js +65 -0
- package/dist/web/Switch.web.tsrx.js +59 -0
- package/dist/web/Table.web.tsrx.js +161 -0
- package/dist/web/{ui40.js → Tabs.web.tsrx.js} +33 -16
- package/dist/web/{ui13.js → Text.web.tsrx.js} +18 -50
- package/dist/web/{ui21.js → TextArea.web.tsrx.js} +4 -4
- package/dist/web/{ui20.js → TextInput.web.tsrx.js} +8 -8
- package/dist/web/Timeline.web.tsrx.js +172 -0
- package/dist/web/Tree.web.tsrx.js +146 -0
- package/dist/web/User.web.tsrx.js +116 -0
- package/dist/web/Video.web.tsrx.js +400 -0
- package/dist/web/View.web.tsrx.js +250 -0
- package/dist/web/WebView.web.tsrx.js +235 -0
- package/dist/web/aliases.web.tsrx.js +24 -0
- package/dist/web/{ui36.js → anim.web.tsrx.js} +3 -35
- package/dist/web/child-array.js +15 -0
- package/dist/web/icons.js +25 -0
- package/dist/web/octane-client-build.json +1 -1
- package/dist/web/pan.web.tsrx.js +66 -0
- package/dist/web/platform.web.js +9 -0
- package/dist/web/refresh-metrics.js +9 -0
- package/dist/web/refresh.web.js +133 -0
- package/dist/web/{ui18.js → route.web.js} +14 -2
- package/dist/web/sheet-detents.web.js +103 -0
- package/dist/web/{ui60.js → sheet-service.web.js} +5 -1
- package/dist/web/sheet-snap.js +35 -0
- package/dist/{native/ui31.js → web/theme/theme-scheme.js} +2 -2
- package/dist/web/{ui35.js → toast-anchor.web.tsrx.js} +3 -3
- package/dist/web/transform.web.js +43 -0
- package/dist/web/translate.web.js +13 -0
- package/dist/web/ui.js +91 -53
- package/dist/web/use-back.web.tsrx.js +9 -0
- package/dist/web/video-chrome.web.tsrx.js +207 -0
- package/dist/web/{ui34.js → web/Hoverable.web.tsrx.js} +6 -6
- package/dist/web/web/Tooltip.web.tsrx.js +183 -0
- package/dist/web/web/index.js +3 -0
- package/package.json +30 -3
- package/src/theme/tokens.css +1380 -200
- package/types/android.d.ts +53 -0
- package/types/index.d.ts +32 -17
- package/types/index.native.d.ts +273 -0
- package/types/index.web.d.ts +272 -0
- package/types/ios.d.ts +59 -0
- package/types/native.d.ts +5 -0
- package/types/props.d.ts +930 -40
- package/types/web.d.ts +17 -0
- package/dist/native/ui10.js +0 -32
- package/dist/native/ui25.js +0 -141
- package/dist/native/ui27.js +0 -61
- package/dist/native/ui39.js +0 -103
- package/dist/native/ui4.js +0 -24
- package/dist/native/ui46.js +0 -267
- package/dist/native/ui57.js +0 -19
- package/dist/native/ui60.js +0 -14
- package/dist/native/ui7.js +0 -52
- package/dist/web/ui10.js +0 -46
- package/dist/web/ui11.js +0 -42
- package/dist/web/ui22.js +0 -108
- package/dist/web/ui23.js +0 -96
- package/dist/web/ui26.js +0 -45
- package/dist/web/ui3.js +0 -31
- package/dist/web/ui30.js +0 -34
- package/dist/web/ui41.js +0 -43
- package/dist/web/ui44.js +0 -42
- package/dist/web/ui5.js +0 -168
- package/dist/web/ui51.js +0 -47
- package/dist/web/ui52.js +0 -19
- package/dist/web/ui55.js +0 -17
- package/dist/web/ui59.js +0 -44
- package/dist/web/ui6.js +0 -94
- package/dist/web/ui7.js +0 -62
- package/dist/web/ui8.js +0 -46
- package/dist/web/ui9.js +0 -46
- /package/dist/native/{ui20.js → RouteHost.native.tsrx.js} +0 -0
- /package/dist/native/{ui41.js → anim.native.tsrx.js} +0 -0
- /package/dist/native/{ui2.js → cx.js} +0 -0
- /package/dist/native/{ui3.js → escape-props.native.js} +0 -0
- /package/dist/native/{ui5.js → layout-child.native.js} +0 -0
- /package/dist/native/{ui54.js → meter-math.js} +0 -0
- /package/dist/native/{ui36.js → platformProps.native.js} +0 -0
- /package/dist/native/{ui37.js → popover-position.js} +0 -0
- /package/dist/native/{ui19.js → route-table.js} +0 -0
- /package/dist/native/{ui48.js → safeAreaInsets.native.tsrx.js} +0 -0
- /package/dist/native/{ui18.js → stacks.native.js} +0 -0
- /package/dist/native/{ui61.js → store.js} +0 -0
- /package/dist/native/{ui43.js → styled.native.tsrx.js} +0 -0
- /package/dist/native/{ui28.js → svg.native.js} +0 -0
- /package/dist/native/{ui30.js → theme/colorScheme.native.js} +0 -0
- /package/dist/native/{ui62.js → use-store.native.tsrx.js} +0 -0
- /package/dist/native/{ui44.js → windows.native.js} +0 -0
- /package/dist/web/{ui16.js → Link.web.tsrx.js} +0 -0
- /package/dist/web/{ui28.js → cx.js} +0 -0
- /package/dist/web/{ui2.js → escape-props.web.js} +0 -0
- /package/dist/web/{ui4.js → layout-child.web.js} +0 -0
- /package/dist/web/{ui49.js → meter-math.js} +0 -0
- /package/dist/web/{ui47.js → platformProps.web.js} +0 -0
- /package/dist/web/{ui32.js → popover-position.js} +0 -0
- /package/dist/web/{ui17.js → route-table.js} +0 -0
- /package/dist/web/{ui42.js → safeAreaInsets.web.tsrx.js} +0 -0
- /package/dist/web/{ui56.js → stacks.web.js} +0 -0
- /package/dist/web/{ui57.js → store.js} +0 -0
- /package/dist/web/{ui37.js → styled.web.tsrx.js} +0 -0
- /package/dist/web/{ui27.js → theme/colorScheme.web.js} +0 -0
- /package/dist/web/{ui58.js → use-store.web.tsrx.js} +0 -0
- /package/dist/web/{ui46.js → useMeasure.web.tsrx.js} +0 -0
- /package/dist/web/{ui38.js → windows.web.js} +0 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { cx } from "./cx.js";
|
|
2
|
+
import { applyEscapeProps } from "./escape-props.native.js";
|
|
3
|
+
import { Pressable } from "./Pressable.native.tsrx.js";
|
|
4
|
+
import { TextInput } from "./TextInput.native.tsrx.js";
|
|
5
|
+
import { defineUniversalComponent, hookSlots, universalChildren, universalComponent, universalPlan, universalProps, universalValue, useState } from "@nativescript-community/octane";
|
|
6
|
+
//#region src/InputNumber.native.tsrx
|
|
7
|
+
var _h$0 = /* @__PURE__ */ Symbol(/* @__PURE__ */ hookSlots(1));
|
|
8
|
+
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
9
|
+
"kind": "host",
|
|
10
|
+
"type": "label",
|
|
11
|
+
"props": { "text": "−" }
|
|
12
|
+
});
|
|
13
|
+
var __octaneUniversalPlan1 = universalPlan("nativescript", {
|
|
14
|
+
"kind": "host",
|
|
15
|
+
"type": "label",
|
|
16
|
+
"props": { "text": "+" }
|
|
17
|
+
});
|
|
18
|
+
var __octaneUniversalPlan2 = universalPlan("nativescript", {
|
|
19
|
+
"kind": "host",
|
|
20
|
+
"type": "flexboxlayout",
|
|
21
|
+
"bindings": [
|
|
22
|
+
["ref", 0],
|
|
23
|
+
["id", 1],
|
|
24
|
+
["className", 2],
|
|
25
|
+
["style", 3]
|
|
26
|
+
],
|
|
27
|
+
"children": [
|
|
28
|
+
{
|
|
29
|
+
"kind": "slot",
|
|
30
|
+
"slot": 4
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"kind": "slot",
|
|
34
|
+
"slot": 5
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"kind": "slot",
|
|
38
|
+
"slot": 6
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
});
|
|
42
|
+
var InputNumber = defineUniversalComponent("nativescript", function InputNumber(props) {
|
|
43
|
+
const [internal, setInternal] = useState(props.defaultValue, _h$0);
|
|
44
|
+
const controlled = props.value !== void 0;
|
|
45
|
+
const value = controlled ? props.value : internal;
|
|
46
|
+
const clamp = (n) => Math.min(props.max ?? Infinity, Math.max(props.min ?? -Infinity, n));
|
|
47
|
+
const setValue = (n) => {
|
|
48
|
+
if (!controlled) setInternal(n);
|
|
49
|
+
props.onValueChange?.(n);
|
|
50
|
+
};
|
|
51
|
+
const stepBy = (dir) => {
|
|
52
|
+
if (props.disabled) return;
|
|
53
|
+
setValue(clamp((value ?? 0) + dir * (props.step ?? 1)));
|
|
54
|
+
};
|
|
55
|
+
return universalValue(__octaneUniversalPlan2, [
|
|
56
|
+
(v) => applyEscapeProps(v, props),
|
|
57
|
+
props.id,
|
|
58
|
+
cx("vx-inputnumber", props.disabled && "vx-inputnumber--disabled", props.className),
|
|
59
|
+
props.style,
|
|
60
|
+
universalComponent("nativescript", Pressable, universalProps([
|
|
61
|
+
[
|
|
62
|
+
"set",
|
|
63
|
+
"className",
|
|
64
|
+
"vx-inputnumber-step"
|
|
65
|
+
],
|
|
66
|
+
[
|
|
67
|
+
"set",
|
|
68
|
+
"disabled",
|
|
69
|
+
props.disabled
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
"set",
|
|
73
|
+
"onPress",
|
|
74
|
+
() => stepBy(-1)
|
|
75
|
+
],
|
|
76
|
+
[
|
|
77
|
+
"set",
|
|
78
|
+
"accessibilityLabel",
|
|
79
|
+
"Decrement"
|
|
80
|
+
]
|
|
81
|
+
], universalChildren("nativescript", () => {
|
|
82
|
+
return universalValue(__octaneUniversalPlan0, []);
|
|
83
|
+
}))),
|
|
84
|
+
universalComponent("nativescript", TextInput, universalProps([
|
|
85
|
+
[
|
|
86
|
+
"set",
|
|
87
|
+
"className",
|
|
88
|
+
"vx-inputnumber-field"
|
|
89
|
+
],
|
|
90
|
+
[
|
|
91
|
+
"set",
|
|
92
|
+
"keyboardType",
|
|
93
|
+
"decimal"
|
|
94
|
+
],
|
|
95
|
+
[
|
|
96
|
+
"set",
|
|
97
|
+
"editable",
|
|
98
|
+
!props.disabled
|
|
99
|
+
],
|
|
100
|
+
[
|
|
101
|
+
"set",
|
|
102
|
+
"placeholder",
|
|
103
|
+
props.placeholder
|
|
104
|
+
],
|
|
105
|
+
[
|
|
106
|
+
"set",
|
|
107
|
+
"value",
|
|
108
|
+
value == null ? "" : String(value)
|
|
109
|
+
],
|
|
110
|
+
[
|
|
111
|
+
"set",
|
|
112
|
+
"onChange",
|
|
113
|
+
(text) => {
|
|
114
|
+
const n = parseFloat(text);
|
|
115
|
+
if (text === "" || !isNaN(n)) setValue(clamp(text === "" ? 0 : n));
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
])),
|
|
119
|
+
universalComponent("nativescript", Pressable, universalProps([
|
|
120
|
+
[
|
|
121
|
+
"set",
|
|
122
|
+
"className",
|
|
123
|
+
"vx-inputnumber-step"
|
|
124
|
+
],
|
|
125
|
+
[
|
|
126
|
+
"set",
|
|
127
|
+
"disabled",
|
|
128
|
+
props.disabled
|
|
129
|
+
],
|
|
130
|
+
[
|
|
131
|
+
"set",
|
|
132
|
+
"onPress",
|
|
133
|
+
() => stepBy(1)
|
|
134
|
+
],
|
|
135
|
+
[
|
|
136
|
+
"set",
|
|
137
|
+
"accessibilityLabel",
|
|
138
|
+
"Increment"
|
|
139
|
+
]
|
|
140
|
+
], universalChildren("nativescript", () => {
|
|
141
|
+
return universalValue(__octaneUniversalPlan1, []);
|
|
142
|
+
})))
|
|
143
|
+
]);
|
|
144
|
+
}, { "module": "@nativescript-community/octane" });
|
|
145
|
+
//#endregion
|
|
146
|
+
export { InputNumber };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { cx } from "./cx.js";
|
|
2
|
+
import { applyEscapeProps } from "./escape-props.native.js";
|
|
3
|
+
import { Icon } from "./Icon.native.tsrx.js";
|
|
4
|
+
import { defineUniversalComponent, hookSlots, universalComponent, universalFor, universalPlan, universalProps, universalValue, useState } from "@nativescript-community/octane";
|
|
5
|
+
//#region src/InputRating.native.tsrx
|
|
6
|
+
var _h$0 = /* @__PURE__ */ Symbol(/* @__PURE__ */ hookSlots(1));
|
|
7
|
+
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
8
|
+
"kind": "slot",
|
|
9
|
+
"slot": 0
|
|
10
|
+
});
|
|
11
|
+
var __octaneUniversalPlan1 = universalPlan("nativescript", {
|
|
12
|
+
"kind": "host",
|
|
13
|
+
"type": "label",
|
|
14
|
+
"props": {
|
|
15
|
+
"className": "vx-rating-glyph",
|
|
16
|
+
"text": "★"
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
var __octaneUniversalPlan2 = universalPlan("nativescript", {
|
|
20
|
+
"kind": "host",
|
|
21
|
+
"type": "flexboxlayout",
|
|
22
|
+
"bindings": [["className", 0], ["onTap", 1]],
|
|
23
|
+
"children": [{
|
|
24
|
+
"kind": "slot",
|
|
25
|
+
"slot": 2
|
|
26
|
+
}]
|
|
27
|
+
});
|
|
28
|
+
var __octaneUniversalPlan3 = universalPlan("nativescript", {
|
|
29
|
+
"kind": "host",
|
|
30
|
+
"type": "flexboxlayout",
|
|
31
|
+
"props": { "flexDirection": "row" },
|
|
32
|
+
"bindings": [
|
|
33
|
+
["ref", 0],
|
|
34
|
+
["id", 1],
|
|
35
|
+
["className", 2],
|
|
36
|
+
["style", 3],
|
|
37
|
+
["accessibilityLabel", 4]
|
|
38
|
+
],
|
|
39
|
+
"children": [{
|
|
40
|
+
"kind": "slot",
|
|
41
|
+
"slot": 5
|
|
42
|
+
}]
|
|
43
|
+
});
|
|
44
|
+
var InputRating = defineUniversalComponent("nativescript", function InputRating(props) {
|
|
45
|
+
const max = props.max ?? 5;
|
|
46
|
+
const [internal, setInternal] = useState(props.defaultValue ?? 0, _h$0);
|
|
47
|
+
const controlled = props.value !== void 0;
|
|
48
|
+
const value = controlled ? props.value : internal;
|
|
49
|
+
const setValue = (n) => {
|
|
50
|
+
if (props.disabled) return;
|
|
51
|
+
if (!controlled) setInternal(n);
|
|
52
|
+
props.onValueChange?.(n);
|
|
53
|
+
};
|
|
54
|
+
return universalValue(__octaneUniversalPlan3, [
|
|
55
|
+
(v) => applyEscapeProps(v, props),
|
|
56
|
+
props.id,
|
|
57
|
+
cx("vx-rating", props.disabled && "vx-rating--disabled", props.className),
|
|
58
|
+
props.style,
|
|
59
|
+
props.accessibilityLabel,
|
|
60
|
+
universalFor(Array.from({ length: max }, (_, i) => i + 1), (score, __octaneUniversalIndex) => score, (score, __octaneUniversalIndex) => {
|
|
61
|
+
return universalValue(__octaneUniversalPlan2, [
|
|
62
|
+
cx("vx-rating-cell", score <= value && "vx-rating-cell--on"),
|
|
63
|
+
props.disabled ? void 0 : () => setValue(score),
|
|
64
|
+
props.icon ? universalValue(__octaneUniversalPlan0, [universalComponent("nativescript", Icon, universalProps([[
|
|
65
|
+
"set",
|
|
66
|
+
"name",
|
|
67
|
+
props.icon
|
|
68
|
+
]]))]) : universalValue(__octaneUniversalPlan1, [])
|
|
69
|
+
]);
|
|
70
|
+
})
|
|
71
|
+
]);
|
|
72
|
+
}, { "module": "@nativescript-community/octane" });
|
|
73
|
+
//#endregion
|
|
74
|
+
export { InputRating };
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { cx } from "./cx.js";
|
|
2
|
+
import { applyEscapeProps } from "./escape-props.native.js";
|
|
3
|
+
import { Pressable } from "./Pressable.native.tsrx.js";
|
|
4
|
+
import { TextInput } from "./TextInput.native.tsrx.js";
|
|
5
|
+
import { defineUniversalComponent, hookSlots, universalChildren, universalComponent, universalFor, universalPlan, universalProps, universalValue, useState } from "@nativescript-community/octane";
|
|
6
|
+
//#region src/InputTags.native.tsrx
|
|
7
|
+
var _hs$ = /* @__PURE__ */ hookSlots(2);
|
|
8
|
+
var _h$0 = /* @__PURE__ */ Symbol(_hs$);
|
|
9
|
+
var _h$1 = /* @__PURE__ */ Symbol(_hs$ + 1);
|
|
10
|
+
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
11
|
+
"kind": "host",
|
|
12
|
+
"type": "label",
|
|
13
|
+
"props": { "text": "✕" }
|
|
14
|
+
});
|
|
15
|
+
var __octaneUniversalPlan1 = universalPlan("nativescript", {
|
|
16
|
+
"kind": "host",
|
|
17
|
+
"type": "flexboxlayout",
|
|
18
|
+
"props": { "className": "vx-inputtags-tag" },
|
|
19
|
+
"children": [{
|
|
20
|
+
"kind": "host",
|
|
21
|
+
"type": "label",
|
|
22
|
+
"props": { "className": "vx-inputtags-tag-label" },
|
|
23
|
+
"bindings": [["text", 0]]
|
|
24
|
+
}, {
|
|
25
|
+
"kind": "slot",
|
|
26
|
+
"slot": 1
|
|
27
|
+
}]
|
|
28
|
+
});
|
|
29
|
+
var __octaneUniversalPlan2 = universalPlan("nativescript", {
|
|
30
|
+
"kind": "host",
|
|
31
|
+
"type": "flexboxlayout",
|
|
32
|
+
"bindings": [
|
|
33
|
+
["ref", 0],
|
|
34
|
+
["id", 1],
|
|
35
|
+
["className", 2],
|
|
36
|
+
["style", 3]
|
|
37
|
+
],
|
|
38
|
+
"children": [{
|
|
39
|
+
"kind": "slot",
|
|
40
|
+
"slot": 4
|
|
41
|
+
}, {
|
|
42
|
+
"kind": "slot",
|
|
43
|
+
"slot": 5
|
|
44
|
+
}]
|
|
45
|
+
});
|
|
46
|
+
var InputTags = defineUniversalComponent("nativescript", function InputTags(props) {
|
|
47
|
+
const [internal, setInternal] = useState(props.defaultValue ?? [], _h$0);
|
|
48
|
+
const controlled = props.value !== void 0;
|
|
49
|
+
const tags = controlled ? props.value : internal;
|
|
50
|
+
const [text, setText] = useState("", _h$1);
|
|
51
|
+
const setTags = (next) => {
|
|
52
|
+
if (!controlled) setInternal(next);
|
|
53
|
+
props.onValueChange?.(next);
|
|
54
|
+
};
|
|
55
|
+
const commit = () => {
|
|
56
|
+
const tag = text.trim();
|
|
57
|
+
if (!tag || props.max != null && tags.length >= props.max) return;
|
|
58
|
+
setTags([...tags, tag]);
|
|
59
|
+
setText("");
|
|
60
|
+
};
|
|
61
|
+
const removeAt = (i) => setTags(tags.filter((_, k) => k !== i));
|
|
62
|
+
return universalValue(__octaneUniversalPlan2, [
|
|
63
|
+
(v) => applyEscapeProps(v, props),
|
|
64
|
+
props.id,
|
|
65
|
+
cx("vx-inputtags", props.disabled && "vx-inputtags--disabled", props.className),
|
|
66
|
+
props.style,
|
|
67
|
+
universalFor(tags.map((tag, i) => ({
|
|
68
|
+
tag,
|
|
69
|
+
i
|
|
70
|
+
})), (e, __octaneUniversalIndex) => e.tag + e.i, (e, __octaneUniversalIndex) => {
|
|
71
|
+
return universalValue(__octaneUniversalPlan1, [e.tag, universalComponent("nativescript", Pressable, universalProps([
|
|
72
|
+
[
|
|
73
|
+
"set",
|
|
74
|
+
"className",
|
|
75
|
+
"vx-inputtags-remove"
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
"set",
|
|
79
|
+
"disabled",
|
|
80
|
+
props.disabled
|
|
81
|
+
],
|
|
82
|
+
[
|
|
83
|
+
"set",
|
|
84
|
+
"onPress",
|
|
85
|
+
() => removeAt(e.i)
|
|
86
|
+
],
|
|
87
|
+
[
|
|
88
|
+
"set",
|
|
89
|
+
"accessibilityLabel",
|
|
90
|
+
"Remove " + e.tag
|
|
91
|
+
]
|
|
92
|
+
], universalChildren("nativescript", () => {
|
|
93
|
+
return universalValue(__octaneUniversalPlan0, []);
|
|
94
|
+
})))]);
|
|
95
|
+
}),
|
|
96
|
+
universalComponent("nativescript", TextInput, universalProps([
|
|
97
|
+
[
|
|
98
|
+
"set",
|
|
99
|
+
"className",
|
|
100
|
+
"vx-inputtags-field"
|
|
101
|
+
],
|
|
102
|
+
[
|
|
103
|
+
"set",
|
|
104
|
+
"placeholder",
|
|
105
|
+
props.placeholder
|
|
106
|
+
],
|
|
107
|
+
[
|
|
108
|
+
"set",
|
|
109
|
+
"editable",
|
|
110
|
+
!props.disabled
|
|
111
|
+
],
|
|
112
|
+
[
|
|
113
|
+
"set",
|
|
114
|
+
"value",
|
|
115
|
+
text
|
|
116
|
+
],
|
|
117
|
+
[
|
|
118
|
+
"set",
|
|
119
|
+
"onChange",
|
|
120
|
+
setText
|
|
121
|
+
],
|
|
122
|
+
[
|
|
123
|
+
"set",
|
|
124
|
+
"onSubmit",
|
|
125
|
+
commit
|
|
126
|
+
]
|
|
127
|
+
]))
|
|
128
|
+
]);
|
|
129
|
+
}, { "module": "@nativescript-community/octane" });
|
|
130
|
+
//#endregion
|
|
131
|
+
export { InputTags };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { cx } from "./cx.js";
|
|
2
|
+
import { applyEscapeProps } from "./escape-props.native.js";
|
|
3
|
+
import { defineUniversalComponent, universalPlan, universalValue } from "@nativescript-community/octane";
|
|
4
|
+
//#region src/Kbd.native.tsrx
|
|
5
|
+
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
6
|
+
"kind": "host",
|
|
7
|
+
"type": "flexboxlayout",
|
|
8
|
+
"bindings": [
|
|
9
|
+
["ref", 0],
|
|
10
|
+
["id", 1],
|
|
11
|
+
["className", 2],
|
|
12
|
+
["style", 3]
|
|
13
|
+
],
|
|
14
|
+
"children": [{
|
|
15
|
+
"kind": "slot",
|
|
16
|
+
"slot": 4
|
|
17
|
+
}]
|
|
18
|
+
});
|
|
19
|
+
var Kbd = defineUniversalComponent("nativescript", function Kbd(props) {
|
|
20
|
+
return universalValue(__octaneUniversalPlan0, [
|
|
21
|
+
(v) => applyEscapeProps(v, props),
|
|
22
|
+
props.id,
|
|
23
|
+
cx("vx-kbd", props.className),
|
|
24
|
+
props.style,
|
|
25
|
+
props.children
|
|
26
|
+
]);
|
|
27
|
+
}, { "module": "@nativescript-community/octane" });
|
|
28
|
+
//#endregion
|
|
29
|
+
export { Kbd };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cx } from "./
|
|
1
|
+
import { cx } from "./cx.js";
|
|
2
2
|
import { defineUniversalComponent, hookSlots, universalPlan, universalValue, useEffect, useState, withSlot } from "@nativescript-community/octane";
|
|
3
3
|
import { Application } from "@nativescript/core";
|
|
4
4
|
//#region src/KeyboardAvoiding.native.tsrx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Pressable } from "./
|
|
1
|
+
import { Pressable } from "./Pressable.native.tsrx.js";
|
|
2
2
|
import { defineUniversalComponent, universalChildren, universalComponent, universalPlan, universalProps, universalValue } from "@nativescript-community/octane";
|
|
3
3
|
import { Utils } from "@nativescript/core";
|
|
4
4
|
//#region src/Link.native.tsrx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cx } from "./
|
|
2
|
-
import { meterRange } from "./
|
|
1
|
+
import { cx } from "./cx.js";
|
|
2
|
+
import { meterRange } from "./meter-math.js";
|
|
3
3
|
import { defineUniversalComponent, hookSlots, registerElement, universalPlan, universalValue, useEffect, useRef } from "@nativescript-community/octane";
|
|
4
4
|
import { AccessibilityRole } from "@nativescript/core";
|
|
5
5
|
import { CanvasView, Cap, Paint, Style } from "@nativescript-community/ui-canvas";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cx } from "./
|
|
2
|
-
import { Pressable } from "./
|
|
3
|
-
import { pushRoute, useRoute } from "./
|
|
1
|
+
import { cx } from "./cx.js";
|
|
2
|
+
import { Pressable } from "./Pressable.native.tsrx.js";
|
|
3
|
+
import { pushRoute, useRoute } from "./route.native.js";
|
|
4
4
|
import { defineUniversalComponent, hookSlots, universalChildren, universalComponent, universalPlan, universalProps, universalValue, withSlot } from "@nativescript-community/octane";
|
|
5
5
|
//#region src/NavLink.native.tsrx
|
|
6
6
|
var _h$0 = /* @__PURE__ */ Symbol(/* @__PURE__ */ hookSlots(1));
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { cx } from "./cx.js";
|
|
2
|
+
import { applyEscapeProps } from "./escape-props.native.js";
|
|
3
|
+
import { Icon } from "./Icon.native.tsrx.js";
|
|
4
|
+
import { defineUniversalComponent, universalComponent, universalFor, universalPlan, universalProps, universalValue } from "@nativescript-community/octane";
|
|
5
|
+
//#region src/NavigationMenu.native.tsrx
|
|
6
|
+
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
7
|
+
"kind": "slot",
|
|
8
|
+
"slot": 0
|
|
9
|
+
});
|
|
10
|
+
var __octaneUniversalPlan1 = universalPlan("nativescript", {
|
|
11
|
+
"kind": "host",
|
|
12
|
+
"type": "label",
|
|
13
|
+
"props": { "className": "vx-navmenu-label" },
|
|
14
|
+
"bindings": [["text", 0]]
|
|
15
|
+
});
|
|
16
|
+
var __octaneUniversalPlan2 = universalPlan("nativescript", {
|
|
17
|
+
"kind": "host",
|
|
18
|
+
"type": "flexboxlayout",
|
|
19
|
+
"bindings": [["className", 0], ["onTap", 1]],
|
|
20
|
+
"children": [{
|
|
21
|
+
"kind": "slot",
|
|
22
|
+
"slot": 2
|
|
23
|
+
}, {
|
|
24
|
+
"kind": "slot",
|
|
25
|
+
"slot": 3
|
|
26
|
+
}]
|
|
27
|
+
});
|
|
28
|
+
var __octaneUniversalPlan3 = universalPlan("nativescript", {
|
|
29
|
+
"kind": "host",
|
|
30
|
+
"type": "flexboxlayout",
|
|
31
|
+
"bindings": [
|
|
32
|
+
["ref", 0],
|
|
33
|
+
["id", 1],
|
|
34
|
+
["flexDirection", 2],
|
|
35
|
+
["className", 3],
|
|
36
|
+
["style", 4],
|
|
37
|
+
["accessibilityLabel", 5]
|
|
38
|
+
],
|
|
39
|
+
"children": [{
|
|
40
|
+
"kind": "slot",
|
|
41
|
+
"slot": 6
|
|
42
|
+
}]
|
|
43
|
+
});
|
|
44
|
+
var NavigationMenu = defineUniversalComponent("nativescript", function NavigationMenu(props) {
|
|
45
|
+
return universalValue(__octaneUniversalPlan3, [
|
|
46
|
+
(v) => applyEscapeProps(v, props),
|
|
47
|
+
props.id,
|
|
48
|
+
props.horizontal === false ? "column" : "row",
|
|
49
|
+
cx("vx-navmenu", props.horizontal === false ? "vx-navmenu--col" : "vx-navmenu--row", props.className),
|
|
50
|
+
props.style,
|
|
51
|
+
props.accessibilityLabel,
|
|
52
|
+
universalFor(props.items, (item, __octaneUniversalIndex) => item.key, (item, __octaneUniversalIndex) => {
|
|
53
|
+
return universalValue(__octaneUniversalPlan2, [
|
|
54
|
+
cx("vx-navmenu-item", item.active && "vx-navmenu-item--on", item.disabled && "vx-navmenu-item--disabled"),
|
|
55
|
+
item.disabled ? void 0 : item.onSelect,
|
|
56
|
+
item.icon ? universalValue(__octaneUniversalPlan0, [universalComponent("nativescript", Icon, universalProps([[
|
|
57
|
+
"set",
|
|
58
|
+
"name",
|
|
59
|
+
item.icon
|
|
60
|
+
]]))]) : null,
|
|
61
|
+
item.label != null ? universalValue(__octaneUniversalPlan1, [item.label]) : null
|
|
62
|
+
]);
|
|
63
|
+
})
|
|
64
|
+
]);
|
|
65
|
+
}, { "module": "@nativescript-community/octane" });
|
|
66
|
+
//#endregion
|
|
67
|
+
export { NavigationMenu };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cx } from "./
|
|
2
|
-
import { applyThemeClasses } from "./
|
|
3
|
-
import { rootLayoutFor } from "./
|
|
1
|
+
import { cx } from "./cx.js";
|
|
2
|
+
import { applyThemeClasses } from "./theme/theme-scheme.js";
|
|
3
|
+
import { rootLayoutFor } from "./root-layout.native.js";
|
|
4
4
|
import { createNativeScriptRoot, defineUniversalComponent, hookSlots, universalPlan, universalValue, useEffect, useRef } from "@nativescript-community/octane";
|
|
5
5
|
import { GridLayout, isAndroid, isIOS } from "@nativescript/core";
|
|
6
6
|
//#region src/Overlay.native.tsrx
|