@octane-xplat/ui 0.4.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/{ui56.js → Heading.native.tsrx.js} +2 -2
- package/dist/native/{ui55.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/{ui48.js → KeyboardAvoiding.native.tsrx.js} +1 -1
- package/dist/native/{ui17.js → Link.native.tsrx.js} +1 -1
- package/dist/native/{ui52.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} +21 -15
- 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/{ui47.js → SafeArea.native.tsrx.js} +2 -2
- package/dist/native/{ui43.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/{ui60.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} +19 -3
- package/dist/native/{ui24.js → TextArea.native.tsrx.js} +19 -17
- 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/{ui6.js → View.native.tsrx.js} +39 -25
- 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/{ui49.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/{ui3.js → escape-props.native.js} +22 -1
- 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/{ui50.js → ios/UIActivityIndicatorView.ios.tsrx.js} +5 -5
- package/dist/native/{ui32.js → ios/UIModal.ios.tsrx.js} +10 -6
- package/dist/native/{ui53.js → ios/UISlider.ios.tsrx.js} +5 -5
- package/dist/native/{ui45.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/pan.native.tsrx.js +66 -0
- 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/{ui61.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/theme/status-bar-scheme.native.js +17 -0
- package/dist/{web/ui29.js → native/theme/theme-scheme.js} +2 -2
- package/dist/native/toast-anchor.native.tsrx.js +185 -0
- package/dist/native/translate.native.js +11 -0
- package/dist/native/ui.js +93 -52
- package/dist/native/use-back.native.tsrx.js +9 -0
- package/dist/native/useMeasure.native.tsrx.js +64 -0
- 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/{ui46.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/{ui44.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/{ui52.js → Heading.web.tsrx.js} +2 -2
- package/dist/web/Icon.web.tsrx.js +273 -0
- 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/{ui48.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/{ui42.js → SafeArea.web.tsrx.js} +1 -1
- package/dist/web/{ui38.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/{ui39.js → Tabs.web.tsrx.js} +33 -16
- package/dist/web/{ui13.js → Text.web.tsrx.js} +79 -46
- 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/{ui35.js → anim.web.tsrx.js} +3 -2
- 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/{ui58.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/toast-anchor.web.tsrx.js +142 -0
- package/dist/web/transform.web.js +43 -0
- package/dist/web/translate.web.js +13 -0
- package/dist/web/ui.js +91 -51
- package/dist/web/use-back.web.tsrx.js +9 -0
- package/dist/web/useMeasure.web.tsrx.js +50 -0
- package/dist/web/video-chrome.web.tsrx.js +207 -0
- package/dist/web/web/Hoverable.web.tsrx.js +150 -0
- package/dist/web/web/Tooltip.web.tsrx.js +183 -0
- package/dist/web/web/index.js +3 -0
- package/package.json +34 -3
- package/src/theme/tokens.css +1599 -194
- package/types/android.d.ts +53 -0
- package/types/index.d.ts +39 -14
- 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 +989 -44
- 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 -105
- package/dist/native/ui4.js +0 -24
- package/dist/native/ui44.js +0 -267
- package/dist/native/ui54.js +0 -17
- package/dist/native/ui57.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/ui34.js +0 -70
- package/dist/web/ui40.js +0 -43
- package/dist/web/ui43.js +0 -42
- package/dist/web/ui49.js +0 -47
- package/dist/web/ui5.js +0 -168
- package/dist/web/ui50.js +0 -17
- package/dist/web/ui51.js +0 -149
- package/dist/web/ui53.js +0 -17
- package/dist/web/ui57.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/{ui40.js → anim.native.tsrx.js} +0 -0
- /package/dist/native/{ui2.js → cx.js} +0 -0
- /package/dist/native/{ui5.js → layout-child.native.js} +0 -0
- /package/dist/native/{ui51.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/{ui46.js → safeAreaInsets.native.tsrx.js} +0 -0
- /package/dist/native/{ui18.js → stacks.native.js} +0 -0
- /package/dist/native/{ui58.js → store.js} +0 -0
- /package/dist/native/{ui41.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/{ui59.js → use-store.native.tsrx.js} +0 -0
- /package/dist/native/{ui42.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/{ui47.js → meter-math.js} +0 -0
- /package/dist/web/{ui45.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/{ui41.js → safeAreaInsets.web.tsrx.js} +0 -0
- /package/dist/web/{ui54.js → stacks.web.js} +0 -0
- /package/dist/web/{ui55.js → store.js} +0 -0
- /package/dist/web/{ui36.js → styled.web.tsrx.js} +0 -0
- /package/dist/web/{ui27.js → theme/colorScheme.web.js} +0 -0
- /package/dist/web/{ui56.js → use-store.web.tsrx.js} +0 -0
- /package/dist/web/{ui37.js → windows.web.js} +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { applyThemeClasses } from "../theme/theme-scheme.js";
|
|
2
|
+
import { modalPresenter } from "../modal-presenter.native.js";
|
|
3
|
+
import { createNativeScriptRoot } from "@nativescript-community/octane";
|
|
4
|
+
import { Frame, GridLayout } from "@nativescript/core";
|
|
5
|
+
//#region src/android/openModal.android.ts
|
|
6
|
+
/** Open a component in its own NativeScript modal root and resolve on close. */
|
|
7
|
+
var openModal = (Component, params, options = {}) => new Promise((resolve, reject) => {
|
|
8
|
+
const presenter = modalPresenter(Frame.topmost());
|
|
9
|
+
if (!presenter) {
|
|
10
|
+
reject(/* @__PURE__ */ new Error("openModal dropped — no live presenter. The topmost frame has no loaded currentPage (a page mid-navigation), or no frame is active yet."));
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const host = new GridLayout();
|
|
14
|
+
const unbindTheme = applyThemeClasses(host, "vx-modal-host");
|
|
15
|
+
const root = createNativeScriptRoot(host);
|
|
16
|
+
let finished = false;
|
|
17
|
+
const finish = (result) => {
|
|
18
|
+
if (finished) return;
|
|
19
|
+
finished = true;
|
|
20
|
+
unbindTheme();
|
|
21
|
+
root.unmount?.();
|
|
22
|
+
host.removeChildren?.();
|
|
23
|
+
resolve(result);
|
|
24
|
+
};
|
|
25
|
+
const close = (result) => host.closeModal(result);
|
|
26
|
+
root.render(Component, {
|
|
27
|
+
params,
|
|
28
|
+
close
|
|
29
|
+
});
|
|
30
|
+
const fullscreen = options.presentation ? options.presentation === "fullscreen" : options.fullscreen ?? true;
|
|
31
|
+
presenter.showModal(host, {
|
|
32
|
+
context: {},
|
|
33
|
+
closeCallback: finish,
|
|
34
|
+
fullscreen,
|
|
35
|
+
animated: options.animated ?? true
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
//#endregion
|
|
39
|
+
export { openModal };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Application, isAndroid, isIOS } from "@nativescript/core";
|
|
2
|
+
//#region src/camera-permission.native.ts
|
|
3
|
+
var cameraRequestCode = 7719;
|
|
4
|
+
function cameraHardwarePresent() {
|
|
5
|
+
if (isIOS) return typeof globalThis.AVCaptureDevice !== "undefined";
|
|
6
|
+
if (isAndroid) try {
|
|
7
|
+
return (Application.android?.context ?? Application.android?.startActivity)?.packageManager?.hasSystemFeature("android.hardware.camera.any") !== false;
|
|
8
|
+
} catch {
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
async function ensureCameraPermission() {
|
|
14
|
+
try {
|
|
15
|
+
if (isIOS) {
|
|
16
|
+
const av = globalThis.AVCaptureDevice;
|
|
17
|
+
const video = globalThis.AVMediaTypeVideo;
|
|
18
|
+
const status = av?.authorizationStatusForMediaType?.(video);
|
|
19
|
+
if (status === 3) return true;
|
|
20
|
+
if (status === 1 || status === 2) return false;
|
|
21
|
+
return await new Promise((resolve) => {
|
|
22
|
+
av.requestAccessForMediaTypeCompletionHandler(video, (granted) => resolve(granted));
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
if (isAndroid) {
|
|
26
|
+
const perm = "android.permission.CAMERA";
|
|
27
|
+
const activity = Application.android.foregroundActivity ?? Application.android.startActivity;
|
|
28
|
+
if (activity?.checkSelfPermission?.(perm) === android.content.pm.PackageManager.PERMISSION_GRANTED) return true;
|
|
29
|
+
if (!activity) return false;
|
|
30
|
+
return await new Promise((resolve) => {
|
|
31
|
+
const requestCode = cameraRequestCode++;
|
|
32
|
+
const onResult = (args) => {
|
|
33
|
+
if (args.requestCode !== requestCode) return;
|
|
34
|
+
Application.android.off(Application.android.activityRequestPermissionsEvent, onResult);
|
|
35
|
+
resolve(args.grantResults?.[0] === android.content.pm.PackageManager.PERMISSION_GRANTED);
|
|
36
|
+
};
|
|
37
|
+
Application.android.on(Application.android.activityRequestPermissionsEvent, onResult);
|
|
38
|
+
activity.requestPermissions([perm], requestCode);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
} catch {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { cameraHardwarePresent, ensureCameraPermission };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/child-array.ts
|
|
2
|
+
/** Normalize a JSX children value to a flat array — children may be a
|
|
3
|
+
* single node, an array, or nested arrays from `.map` calls. */
|
|
4
|
+
function toChildArray(children) {
|
|
5
|
+
const out = [];
|
|
6
|
+
const walk = (node) => {
|
|
7
|
+
if (node == null || node === false) return;
|
|
8
|
+
if (Array.isArray(node)) for (const child of node) walk(child);
|
|
9
|
+
else out.push(node);
|
|
10
|
+
};
|
|
11
|
+
walk(children);
|
|
12
|
+
return out;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { toChildArray };
|
|
@@ -6,6 +6,27 @@ function applyEscapeProps(view, props) {
|
|
|
6
6
|
const bag = isIOS ? props.ios : isAndroid ? props.android : void 0;
|
|
7
7
|
if (bag) Object.assign(view, bag);
|
|
8
8
|
}
|
|
9
|
+
var NATIVE_ACCESSIBILITY_ROLES = {
|
|
10
|
+
button: "button",
|
|
11
|
+
link: "link",
|
|
12
|
+
search: "search",
|
|
13
|
+
image: "image",
|
|
14
|
+
heading: "header",
|
|
15
|
+
adjustable: "adjustable",
|
|
16
|
+
summary: "summary",
|
|
17
|
+
text: "text",
|
|
18
|
+
none: "none",
|
|
19
|
+
progressbar: "progressBar",
|
|
20
|
+
checkbox: "checkbox",
|
|
21
|
+
switch: "switch",
|
|
22
|
+
radio: "radioButton",
|
|
23
|
+
spinbutton: "spinButton",
|
|
24
|
+
tab: "button"
|
|
25
|
+
};
|
|
26
|
+
/** Translate the shared/ARIA spelling to NativeScript's narrower role enum. */
|
|
27
|
+
function nativeAccessibilityRole(role) {
|
|
28
|
+
return role ? NATIVE_ACCESSIBILITY_ROLES[role] : void 0;
|
|
29
|
+
}
|
|
9
30
|
/** NativeScript's AccessibilityState is a single enum value, unlike the
|
|
10
31
|
* web's independent ARIA booleans. Priority follows the strongest state. */
|
|
11
32
|
function nativeAccessibilityState(state) {
|
|
@@ -15,4 +36,4 @@ function nativeAccessibilityState(state) {
|
|
|
15
36
|
if (state?.checked === false) return "unchecked";
|
|
16
37
|
}
|
|
17
38
|
//#endregion
|
|
18
|
-
export { applyEscapeProps, nativeAccessibilityState };
|
|
39
|
+
export { applyEscapeProps, nativeAccessibilityRole, nativeAccessibilityState };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/icons.ts
|
|
2
|
+
/**
|
|
3
|
+
* App-owned icon registry. `svg` is SVG path `d` data (not a full SVG
|
|
4
|
+
* markup string). `src` can carry an image or an SVG source; the leaves only
|
|
5
|
+
* infer SVG from inline markup, SVG data URIs, and `.svg` paths/URLs. Native
|
|
6
|
+
* `font` glyphs render only when the app ships and registers that font.
|
|
7
|
+
*/
|
|
8
|
+
var icons = /* @__PURE__ */ new Map();
|
|
9
|
+
function registerIcon(name, glyph) {
|
|
10
|
+
icons.set(name, glyph);
|
|
11
|
+
}
|
|
12
|
+
function registerIcons(record) {
|
|
13
|
+
for (const [name, glyph] of Object.entries(record)) icons.set(name, glyph);
|
|
14
|
+
}
|
|
15
|
+
function getIcon(name) {
|
|
16
|
+
return icons.get(name);
|
|
17
|
+
}
|
|
18
|
+
if (!icons.has("xplat-search")) icons.set("xplat-search", { svg: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" });
|
|
19
|
+
if (!icons.has("xplat-clear")) icons.set("xplat-clear", { svg: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" });
|
|
20
|
+
if (!icons.has("xplat-play")) icons.set("xplat-play", { svg: "M8 5v14l11-7z" });
|
|
21
|
+
if (!icons.has("xplat-pause")) icons.set("xplat-pause", { svg: "M6 19h4V5H6v14zm8-14v14h4V5h-4z" });
|
|
22
|
+
if (!icons.has("xplat-volume")) icons.set("xplat-volume", { svg: "M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z" });
|
|
23
|
+
if (!icons.has("xplat-volume-off")) icons.set("xplat-volume-off", { svg: "M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.45-.54 2.78-1.32 3.97-2.27L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z" });
|
|
24
|
+
//#endregion
|
|
25
|
+
export { getIcon, registerIcon, registerIcons };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { cx } from "
|
|
2
|
-
import { applyEscapeProps } from "
|
|
3
|
-
import { layoutChildProps } from "
|
|
1
|
+
import { cx } from "../cx.js";
|
|
2
|
+
import { applyEscapeProps } from "../escape-props.native.js";
|
|
3
|
+
import { layoutChildProps } from "../layout-child.native.js";
|
|
4
4
|
import { defineUniversalComponent, registerElement, universalPlan, universalProps, universalValue } from "@nativescript-community/octane";
|
|
5
5
|
import { LiquidGlass } from "@nativescript/core";
|
|
6
|
-
//#region src/LiquidGlass.
|
|
6
|
+
//#region src/ios/LiquidGlass.ios.tsrx
|
|
7
7
|
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
8
8
|
"kind": "host",
|
|
9
9
|
"type": "liquidglass",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { cx } from "
|
|
2
|
-
import { applyEscapeProps } from "
|
|
3
|
-
import { layoutChildProps } from "
|
|
1
|
+
import { cx } from "../cx.js";
|
|
2
|
+
import { applyEscapeProps } from "../escape-props.native.js";
|
|
3
|
+
import { layoutChildProps } from "../layout-child.native.js";
|
|
4
4
|
import { defineUniversalComponent, registerElement, universalPlan, universalProps, universalValue } from "@nativescript-community/octane";
|
|
5
5
|
import { LiquidGlassContainer } from "@nativescript/core";
|
|
6
|
-
//#region src/LiquidGlassContainer.
|
|
6
|
+
//#region src/ios/LiquidGlassContainer.ios.tsrx
|
|
7
7
|
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
8
8
|
"kind": "host",
|
|
9
9
|
"type": "liquidglasscontainer",
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { cx } from "../cx.js";
|
|
2
|
+
import { defineUniversalComponent, hookSlots, registerElement, universalIf, universalPlan, universalValue, useEffect, useRef } from "@nativescript-community/octane";
|
|
3
|
+
import { Drawer, install } from "@nativescript-community/ui-drawer";
|
|
4
|
+
//#region src/ios/SideDrawer.ios.tsrx
|
|
5
|
+
var _hs$ = /* @__PURE__ */ hookSlots(2);
|
|
6
|
+
var _h$0 = /* @__PURE__ */ Symbol(_hs$);
|
|
7
|
+
var _h$1 = /* @__PURE__ */ Symbol(_hs$ + 1);
|
|
8
|
+
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
9
|
+
"kind": "host",
|
|
10
|
+
"type": "gridlayout",
|
|
11
|
+
"props": { "hostSlot": "leftDrawer" },
|
|
12
|
+
"children": [{
|
|
13
|
+
"kind": "slot",
|
|
14
|
+
"slot": 0
|
|
15
|
+
}]
|
|
16
|
+
});
|
|
17
|
+
var __octaneUniversalPlan1 = universalPlan("nativescript", {
|
|
18
|
+
"kind": "host",
|
|
19
|
+
"type": "drawer",
|
|
20
|
+
"bindings": [
|
|
21
|
+
["id", 0],
|
|
22
|
+
["ref", 1],
|
|
23
|
+
["className", 2],
|
|
24
|
+
["style", 3]
|
|
25
|
+
],
|
|
26
|
+
"children": [{
|
|
27
|
+
"kind": "host",
|
|
28
|
+
"type": "gridlayout",
|
|
29
|
+
"props": { "hostSlot": "mainContent" },
|
|
30
|
+
"children": [{
|
|
31
|
+
"kind": "slot",
|
|
32
|
+
"slot": 4
|
|
33
|
+
}]
|
|
34
|
+
}, {
|
|
35
|
+
"kind": "slot",
|
|
36
|
+
"slot": 5
|
|
37
|
+
}]
|
|
38
|
+
});
|
|
39
|
+
install();
|
|
40
|
+
registerElement("drawer", Drawer);
|
|
41
|
+
var SideDrawer = defineUniversalComponent("nativescript", function SideDrawer(props) {
|
|
42
|
+
const host = useRef(null, _h$0);
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
const d = host.current;
|
|
45
|
+
if (!d) return;
|
|
46
|
+
if (props.open && !d.isOpened("left")) d.open("left").catch(() => {});
|
|
47
|
+
else if (!props.open && d.isOpened("left")) d.close("left").catch(() => {});
|
|
48
|
+
}, [props.open], _h$1);
|
|
49
|
+
return universalValue(__octaneUniversalPlan1, [
|
|
50
|
+
props.id,
|
|
51
|
+
(d) => {
|
|
52
|
+
host.current = d;
|
|
53
|
+
if (d && props.ios) Object.assign(d, props.ios);
|
|
54
|
+
},
|
|
55
|
+
cx("vx-drawer", props.className),
|
|
56
|
+
props.style,
|
|
57
|
+
props.main,
|
|
58
|
+
universalIf(props.drawer != null, () => {
|
|
59
|
+
return universalValue(__octaneUniversalPlan0, [props.drawer]);
|
|
60
|
+
})
|
|
61
|
+
]);
|
|
62
|
+
}, { "module": "@nativescript-community/octane" });
|
|
63
|
+
//#endregion
|
|
64
|
+
export { SideDrawer };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { cx } from "
|
|
2
|
-
import { applyNativeProps } from "
|
|
1
|
+
import { cx } from "../cx.js";
|
|
2
|
+
import { applyNativeProps } from "../platformProps.native.js";
|
|
3
3
|
import { defineUniversalComponent, universalPlan, universalValue } from "@nativescript-community/octane";
|
|
4
|
-
//#region src/
|
|
4
|
+
//#region src/ios/UIActivityIndicatorView.ios.tsrx
|
|
5
5
|
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
6
6
|
"kind": "host",
|
|
7
7
|
"type": "activityindicator",
|
|
@@ -13,7 +13,7 @@ var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
|
13
13
|
["ref", 4]
|
|
14
14
|
]
|
|
15
15
|
});
|
|
16
|
-
var
|
|
16
|
+
var UIActivityIndicatorView = defineUniversalComponent("nativescript", function UIActivityIndicatorView(props) {
|
|
17
17
|
if (props.busy === false) return null;
|
|
18
18
|
return universalValue(__octaneUniversalPlan0, [
|
|
19
19
|
props.id,
|
|
@@ -24,4 +24,4 @@ var ActivityIndicator = defineUniversalComponent("nativescript", function Activi
|
|
|
24
24
|
]);
|
|
25
25
|
}, { "module": "@nativescript-community/octane" });
|
|
26
26
|
//#endregion
|
|
27
|
-
export {
|
|
27
|
+
export { UIActivityIndicatorView };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { applyThemeClasses } from "
|
|
1
|
+
import { applyThemeClasses } from "../theme/theme-scheme.js";
|
|
2
|
+
import { modalPresenter } from "../modal-presenter.native.js";
|
|
2
3
|
import { createNativeScriptRoot, defineUniversalComponent, hookSlots, universalPlan, universalValue, useEffect, useRef } from "@nativescript-community/octane";
|
|
3
4
|
import { Frame, GridLayout } from "@nativescript/core";
|
|
4
|
-
//#region src/
|
|
5
|
+
//#region src/ios/UIModal.ios.tsrx
|
|
5
6
|
var _hs$ = /* @__PURE__ */ hookSlots(2);
|
|
6
7
|
var _h$0 = /* @__PURE__ */ Symbol(_hs$);
|
|
7
8
|
var _h$1 = /* @__PURE__ */ Symbol(_hs$ + 1);
|
|
@@ -19,12 +20,15 @@ var __octaneUniversalPlan1 = universalPlan("nativescript", {
|
|
|
19
20
|
var Panel = defineUniversalComponent("nativescript", function Panel(props) {
|
|
20
21
|
return universalValue(__octaneUniversalPlan0, [props.children]);
|
|
21
22
|
}, { "module": "@nativescript-community/octane" });
|
|
22
|
-
var
|
|
23
|
+
var UIModal = defineUniversalComponent("nativescript", function UIModal(props) {
|
|
23
24
|
const shown = useRef(null, _h$0);
|
|
24
25
|
useEffect(() => {
|
|
25
26
|
if (props.open && !shown.current) {
|
|
26
|
-
const presenter =
|
|
27
|
-
if (!presenter)
|
|
27
|
+
const presenter = modalPresenter(Frame.topmost());
|
|
28
|
+
if (!presenter) {
|
|
29
|
+
console.warn("[Modal] open dropped — no live presenter (currentPage mid-navigation or no active frame).");
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
28
32
|
const host = new GridLayout();
|
|
29
33
|
const unbindTheme = applyThemeClasses(host, "vx-modal-host");
|
|
30
34
|
const root = createNativeScriptRoot(host);
|
|
@@ -55,4 +59,4 @@ var Modal = defineUniversalComponent("nativescript", function Modal(props) {
|
|
|
55
59
|
return universalValue(__octaneUniversalPlan1, []);
|
|
56
60
|
}, { "module": "@nativescript-community/octane" });
|
|
57
61
|
//#endregion
|
|
58
|
-
export {
|
|
62
|
+
export { UIModal };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { cx } from "
|
|
2
|
-
import { applyNativeProps } from "
|
|
1
|
+
import { cx } from "../cx.js";
|
|
2
|
+
import { applyNativeProps } from "../platformProps.native.js";
|
|
3
3
|
import { defineUniversalComponent, universalPlan, universalValue } from "@nativescript-community/octane";
|
|
4
|
-
//#region src/
|
|
4
|
+
//#region src/ios/UISlider.ios.tsrx
|
|
5
5
|
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
6
6
|
"kind": "host",
|
|
7
7
|
"type": "slider",
|
|
@@ -17,7 +17,7 @@ var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
|
17
17
|
["ref", 8]
|
|
18
18
|
]
|
|
19
19
|
});
|
|
20
|
-
var
|
|
20
|
+
var UISlider = defineUniversalComponent("nativescript", function UISlider(props) {
|
|
21
21
|
return universalValue(__octaneUniversalPlan0, [
|
|
22
22
|
props.id,
|
|
23
23
|
cx(props.className),
|
|
@@ -31,4 +31,4 @@ var Slider = defineUniversalComponent("nativescript", function Slider(props) {
|
|
|
31
31
|
]);
|
|
32
32
|
}, { "module": "@nativescript-community/octane" });
|
|
33
33
|
//#endregion
|
|
34
|
-
export {
|
|
34
|
+
export { UISlider };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { cx } from "
|
|
2
|
-
import { applyEscapeProps } from "
|
|
1
|
+
import { cx } from "../cx.js";
|
|
2
|
+
import { applyEscapeProps } from "../escape-props.native.js";
|
|
3
3
|
import { defineUniversalComponent, universalPlan, universalValue } from "@nativescript-community/octane";
|
|
4
|
-
//#region src/
|
|
4
|
+
//#region src/ios/UISwitch.ios.tsrx
|
|
5
5
|
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
6
6
|
"kind": "host",
|
|
7
7
|
"type": "switch",
|
|
@@ -14,7 +14,7 @@ var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
|
14
14
|
["onCheckedChange", 5]
|
|
15
15
|
]
|
|
16
16
|
});
|
|
17
|
-
var
|
|
17
|
+
var UISwitch = defineUniversalComponent("nativescript", function UISwitch(props) {
|
|
18
18
|
return universalValue(__octaneUniversalPlan0, [
|
|
19
19
|
(v) => applyEscapeProps(v, props),
|
|
20
20
|
props.id,
|
|
@@ -25,4 +25,4 @@ var Switch = defineUniversalComponent("nativescript", function Switch(props) {
|
|
|
25
25
|
]);
|
|
26
26
|
}, { "module": "@nativescript-community/octane" });
|
|
27
27
|
//#endregion
|
|
28
|
-
export {
|
|
28
|
+
export { UISwitch };
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { cx } from "../cx.js";
|
|
2
|
+
import { getIcon } from "../icons.js";
|
|
3
|
+
import { registerStack } from "../stacks.native.js";
|
|
4
|
+
import { createNativeScriptRoot, defineUniversalComponent, markWarm, memo, universalComponent, universalPlan, universalProps, universalValue, useBatch, warmChild } from "@nativescript-community/octane";
|
|
5
|
+
import { Frame, GridLayout, Page, TabViewItem } from "@nativescript/core";
|
|
6
|
+
//#region src/ios/UITabBar.ios.tsrx
|
|
7
|
+
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
8
|
+
"kind": "range",
|
|
9
|
+
"children": [{
|
|
10
|
+
"kind": "slot",
|
|
11
|
+
"slot": 0
|
|
12
|
+
}]
|
|
13
|
+
});
|
|
14
|
+
var __octaneUniversalPlan1 = universalPlan("nativescript", {
|
|
15
|
+
"kind": "host",
|
|
16
|
+
"type": "tabview",
|
|
17
|
+
"bindings": [
|
|
18
|
+
["id", 0],
|
|
19
|
+
["className", 1],
|
|
20
|
+
["style", 2],
|
|
21
|
+
["items", 3],
|
|
22
|
+
["selectedIndex", 4],
|
|
23
|
+
["onSelectedIndexChanged", 5],
|
|
24
|
+
["onLoaded", 6]
|
|
25
|
+
]
|
|
26
|
+
});
|
|
27
|
+
var __octaneUniversalPlan2 = universalPlan("nativescript", {
|
|
28
|
+
"kind": "slot",
|
|
29
|
+
"slot": 0
|
|
30
|
+
});
|
|
31
|
+
var TabPane = defineUniversalComponent("nativescript", function TabPane(props) {
|
|
32
|
+
return universalValue(__octaneUniversalPlan0, [props.render()]);
|
|
33
|
+
}, { "module": "@nativescript-community/octane" });
|
|
34
|
+
var paneRoots = /* @__PURE__ */ new WeakMap();
|
|
35
|
+
var tabsByView = /* @__PURE__ */ new WeakMap();
|
|
36
|
+
var itemsCache = /* @__PURE__ */ new WeakMap();
|
|
37
|
+
var iconWarned = /* @__PURE__ */ new Set();
|
|
38
|
+
function applyIcon(item, name) {
|
|
39
|
+
const glyph = getIcon(name);
|
|
40
|
+
if (!glyph) {
|
|
41
|
+
warnIconOnce(name, `tab icon '${name}' isn't registered — call registerIcons() at boot.`);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (glyph.src) item.iconSource = glyph.src;
|
|
45
|
+
else if (glyph.font) {
|
|
46
|
+
item.iconSource = "font://" + glyph.font.glyph;
|
|
47
|
+
item.iconFontFamily = glyph.font.family;
|
|
48
|
+
} else if (glyph.text) item.iconSource = "font://" + glyph.text;
|
|
49
|
+
else warnIconOnce(name, `tab icon '${name}' has no src/font/text representation — UITabBarItem can't render svg/markup glyphs.`);
|
|
50
|
+
}
|
|
51
|
+
function warnIconOnce(name, msg) {
|
|
52
|
+
if (iconWarned.has(name)) return;
|
|
53
|
+
iconWarned.add(name);
|
|
54
|
+
console.warn("[octane-xplat] " + msg);
|
|
55
|
+
}
|
|
56
|
+
function itemsFor(tabs) {
|
|
57
|
+
let items = itemsCache.get(tabs);
|
|
58
|
+
if (items !== void 0) return items;
|
|
59
|
+
items = tabs.map((t) => {
|
|
60
|
+
const item = new TabViewItem();
|
|
61
|
+
item.title = t.title;
|
|
62
|
+
if (t.icon) applyIcon(item, t.icon);
|
|
63
|
+
if (t.stack) {
|
|
64
|
+
const frame = new Frame();
|
|
65
|
+
frame.once("loaded", () => {
|
|
66
|
+
frame.navigate({ create: () => {
|
|
67
|
+
const page = new Page();
|
|
68
|
+
page.actionBarHidden = true;
|
|
69
|
+
const pane = new GridLayout();
|
|
70
|
+
page.content = pane;
|
|
71
|
+
createNativeScriptRoot(pane).render(TabPane, { render: t.render });
|
|
72
|
+
return page;
|
|
73
|
+
} });
|
|
74
|
+
});
|
|
75
|
+
registerStack(t.stack, frame);
|
|
76
|
+
item.view = frame;
|
|
77
|
+
return item;
|
|
78
|
+
}
|
|
79
|
+
const cv = new GridLayout();
|
|
80
|
+
tabsByView.set(cv, t.render);
|
|
81
|
+
item.view = cv;
|
|
82
|
+
return item;
|
|
83
|
+
});
|
|
84
|
+
itemsCache.set(tabs, items);
|
|
85
|
+
return items;
|
|
86
|
+
}
|
|
87
|
+
function mountPanes(e) {
|
|
88
|
+
const tv = e.object;
|
|
89
|
+
for (const item of tv.items) {
|
|
90
|
+
const cv = item.view;
|
|
91
|
+
if (!(cv instanceof GridLayout) || paneRoots.has(cv)) continue;
|
|
92
|
+
const render = tabsByView.get(cv);
|
|
93
|
+
if (!render) continue;
|
|
94
|
+
const root = createNativeScriptRoot(cv);
|
|
95
|
+
paneRoots.set(cv, root);
|
|
96
|
+
root.render(TabPane, { render });
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
var TabBarInner = defineUniversalComponent("nativescript", function TabBarInner(props) {
|
|
100
|
+
return universalValue(__octaneUniversalPlan1, [
|
|
101
|
+
props.id,
|
|
102
|
+
cx(props.className),
|
|
103
|
+
props.style,
|
|
104
|
+
itemsFor(props.tabs),
|
|
105
|
+
props.selectedIndex,
|
|
106
|
+
(e) => props.onSelectedIndexChanged?.(e.value),
|
|
107
|
+
mountPanes
|
|
108
|
+
]);
|
|
109
|
+
}, { "module": "@nativescript-community/octane" });
|
|
110
|
+
var MemoTabBar = memo(TabBarInner, (a, b) => a.tabs === b.tabs && a.selectedIndex === b.selectedIndex);
|
|
111
|
+
var UITabBar = defineUniversalComponent("nativescript", markWarm(function UITabBar(props) {
|
|
112
|
+
useBatch([], () => {
|
|
113
|
+
warmChild(MemoTabBar, {
|
|
114
|
+
id: props.id,
|
|
115
|
+
className: props.className,
|
|
116
|
+
style: props.style,
|
|
117
|
+
tabs: props.tabs,
|
|
118
|
+
selectedIndex: props.selectedIndex,
|
|
119
|
+
onSelectedIndexChanged: props.onSelectedIndexChanged
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
return universalValue(__octaneUniversalPlan2, [universalComponent("nativescript", MemoTabBar, universalProps([
|
|
123
|
+
[
|
|
124
|
+
"set",
|
|
125
|
+
"id",
|
|
126
|
+
props.id
|
|
127
|
+
],
|
|
128
|
+
[
|
|
129
|
+
"set",
|
|
130
|
+
"className",
|
|
131
|
+
props.className
|
|
132
|
+
],
|
|
133
|
+
[
|
|
134
|
+
"set",
|
|
135
|
+
"style",
|
|
136
|
+
props.style
|
|
137
|
+
],
|
|
138
|
+
[
|
|
139
|
+
"set",
|
|
140
|
+
"tabs",
|
|
141
|
+
props.tabs
|
|
142
|
+
],
|
|
143
|
+
[
|
|
144
|
+
"set",
|
|
145
|
+
"selectedIndex",
|
|
146
|
+
props.selectedIndex
|
|
147
|
+
],
|
|
148
|
+
[
|
|
149
|
+
"set",
|
|
150
|
+
"onSelectedIndexChanged",
|
|
151
|
+
props.onSelectedIndexChanged
|
|
152
|
+
]
|
|
153
|
+
]))]);
|
|
154
|
+
}, (__wp) => {
|
|
155
|
+
const props = __wp;
|
|
156
|
+
warmChild(MemoTabBar, {
|
|
157
|
+
id: props.id,
|
|
158
|
+
className: props.className,
|
|
159
|
+
style: props.style,
|
|
160
|
+
tabs: props.tabs,
|
|
161
|
+
selectedIndex: props.selectedIndex,
|
|
162
|
+
onSelectedIndexChanged: props.onSelectedIndexChanged
|
|
163
|
+
});
|
|
164
|
+
}), { "module": "@nativescript-community/octane" });
|
|
165
|
+
//#endregion
|
|
166
|
+
export { UITabBar };
|