@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,183 @@
|
|
|
1
|
+
import { View } from "../View.web.tsrx.js";
|
|
2
|
+
import { cx } from "../cx.js";
|
|
3
|
+
import { Popover } from "../Popover.web.tsrx.js";
|
|
4
|
+
import { bag4, bag5, child, clone, componentSlotVoid, drainFrag, hookSlots, markChildrenBlock, sibling, template, useEffect, useRef, useState } from "octane";
|
|
5
|
+
import { compilerMemoRegion, hookMemoCreate, hookMemoPublishInvariant, textHoleUpdate } from "octane/internal/client";
|
|
6
|
+
//#region src/web/Tooltip.web.tsrx
|
|
7
|
+
var _t$0 = /* @__PURE__ */ template("<!>", 0, 1);
|
|
8
|
+
var _t$1 = /* @__PURE__ */ template("<!><!>", 3, 1);
|
|
9
|
+
var _hs$ = /* @__PURE__ */ hookSlots(9);
|
|
10
|
+
var __childrenBody = {};
|
|
11
|
+
var __childrenBody$ = {};
|
|
12
|
+
var nextTooltipId = 0;
|
|
13
|
+
var FOCUSABLE = "a[href],button,input,select,textarea,[tabindex],[contenteditable=\"true\"]";
|
|
14
|
+
var Tooltip = function Tooltip(props, __s, __extra) {
|
|
15
|
+
const __block = __s.block;
|
|
16
|
+
const __memoRegion = compilerMemoRegion(__s, _hs$ + 0);
|
|
17
|
+
let __hk = __memoRegion.hooks;
|
|
18
|
+
if (__hk === void 0) __memoRegion.hooks = __hk = hookMemoCreate(3);
|
|
19
|
+
const [open, setOpen] = useState(false, _hs$ + 0);
|
|
20
|
+
const anchor = useRef(null, _hs$ + 1);
|
|
21
|
+
const binding = useRef(null, _hs$ + 2);
|
|
22
|
+
const described = useRef(null, _hs$ + 3);
|
|
23
|
+
const tooltipId = useRef("", _hs$ + 4);
|
|
24
|
+
if (!tooltipId.current) tooltipId.current = `vx-tooltip-${++nextTooltipId}`;
|
|
25
|
+
const openTimer = useRef(null, _hs$ + 5);
|
|
26
|
+
const closeTimer = useRef(null, _hs$ + 6);
|
|
27
|
+
const clearOpen = __hk[0] ?? hookMemoPublishInvariant(__hk, 0, () => {
|
|
28
|
+
if (openTimer.current !== null) clearTimeout(openTimer.current);
|
|
29
|
+
openTimer.current = null;
|
|
30
|
+
});
|
|
31
|
+
const clearClose = __hk[1] ?? hookMemoPublishInvariant(__hk, 1, () => {
|
|
32
|
+
if (closeTimer.current !== null) clearTimeout(closeTimer.current);
|
|
33
|
+
closeTimer.current = null;
|
|
34
|
+
});
|
|
35
|
+
const startOpen = () => {
|
|
36
|
+
if (props.disabled) return;
|
|
37
|
+
clearClose();
|
|
38
|
+
clearOpen();
|
|
39
|
+
openTimer.current = setTimeout(() => {
|
|
40
|
+
openTimer.current = null;
|
|
41
|
+
setOpen(true);
|
|
42
|
+
}, Math.max(0, props.openDelay ?? 500));
|
|
43
|
+
};
|
|
44
|
+
const scheduleClose = () => {
|
|
45
|
+
clearClose();
|
|
46
|
+
closeTimer.current = setTimeout(() => {
|
|
47
|
+
closeTimer.current = null;
|
|
48
|
+
setOpen(false);
|
|
49
|
+
}, Math.max(0, props.closeDelay ?? 100));
|
|
50
|
+
};
|
|
51
|
+
const openNow = () => {
|
|
52
|
+
if (props.disabled) return;
|
|
53
|
+
clearClose();
|
|
54
|
+
clearOpen();
|
|
55
|
+
setOpen(true);
|
|
56
|
+
};
|
|
57
|
+
const closeNow = __hk[2] ?? hookMemoPublishInvariant(__hk, 2, () => {
|
|
58
|
+
clearOpen();
|
|
59
|
+
clearClose();
|
|
60
|
+
setOpen(false);
|
|
61
|
+
});
|
|
62
|
+
const bindAnchor = (node) => {
|
|
63
|
+
anchor.current = node;
|
|
64
|
+
if (binding.current?.node === node) return;
|
|
65
|
+
const old = binding.current;
|
|
66
|
+
if (old) {
|
|
67
|
+
old.node.removeEventListener("mouseenter", old.enter);
|
|
68
|
+
old.node.removeEventListener("mouseleave", old.leave);
|
|
69
|
+
old.node.removeEventListener("focusin", old.focusIn);
|
|
70
|
+
old.node.removeEventListener("focusout", old.focusOut);
|
|
71
|
+
}
|
|
72
|
+
binding.current = null;
|
|
73
|
+
if (!node) return;
|
|
74
|
+
const next = {
|
|
75
|
+
node,
|
|
76
|
+
enter: startOpen,
|
|
77
|
+
leave: () => {
|
|
78
|
+
clearOpen();
|
|
79
|
+
scheduleClose();
|
|
80
|
+
},
|
|
81
|
+
focusIn: openNow,
|
|
82
|
+
focusOut: closeNow
|
|
83
|
+
};
|
|
84
|
+
node.addEventListener("mouseenter", next.enter);
|
|
85
|
+
node.addEventListener("mouseleave", next.leave);
|
|
86
|
+
node.addEventListener("focusin", next.focusIn);
|
|
87
|
+
node.addEventListener("focusout", next.focusOut);
|
|
88
|
+
binding.current = next;
|
|
89
|
+
};
|
|
90
|
+
useEffect(() => () => {
|
|
91
|
+
clearOpen();
|
|
92
|
+
clearClose();
|
|
93
|
+
const current = binding.current;
|
|
94
|
+
if (current) {
|
|
95
|
+
current.node.removeEventListener("mouseenter", current.enter);
|
|
96
|
+
current.node.removeEventListener("mouseleave", current.leave);
|
|
97
|
+
current.node.removeEventListener("focusin", current.focusIn);
|
|
98
|
+
current.node.removeEventListener("focusout", current.focusOut);
|
|
99
|
+
}
|
|
100
|
+
}, [], _hs$ + 7);
|
|
101
|
+
useEffect(() => {
|
|
102
|
+
if (!open) return;
|
|
103
|
+
const host = anchor.current;
|
|
104
|
+
const target = host?.matches?.(FOCUSABLE) ? host : host?.querySelector?.(FOCUSABLE) ?? host;
|
|
105
|
+
if (target) {
|
|
106
|
+
target.setAttribute("aria-describedby", tooltipId.current);
|
|
107
|
+
described.current = target;
|
|
108
|
+
}
|
|
109
|
+
const onKey = (event) => {
|
|
110
|
+
if (event.key === "Escape") closeNow();
|
|
111
|
+
};
|
|
112
|
+
const onScroll = () => closeNow();
|
|
113
|
+
window.addEventListener("keydown", onKey);
|
|
114
|
+
window.addEventListener("scroll", onScroll, true);
|
|
115
|
+
return () => {
|
|
116
|
+
window.removeEventListener("keydown", onKey);
|
|
117
|
+
window.removeEventListener("scroll", onScroll, true);
|
|
118
|
+
described.current?.removeAttribute("aria-describedby");
|
|
119
|
+
described.current = null;
|
|
120
|
+
};
|
|
121
|
+
}, [open], _hs$ + 8);
|
|
122
|
+
function __children$1(__props, __s, __extra) {
|
|
123
|
+
const __block = __s.block;
|
|
124
|
+
function __children$4(__props, __s, __extra) {
|
|
125
|
+
const __block = __s.block;
|
|
126
|
+
let _b = __s.slots[0];
|
|
127
|
+
if (_b === void 0) {
|
|
128
|
+
let _m0, _m1;
|
|
129
|
+
const _root = clone(_t$0);
|
|
130
|
+
_m0 = __block.parentNode;
|
|
131
|
+
_m1 = child(_root);
|
|
132
|
+
drainFrag(_root, __block.parentNode, __block.endMarker);
|
|
133
|
+
_b = bag4(__s, null, _m0, _m1, null, void 0);
|
|
134
|
+
}
|
|
135
|
+
{
|
|
136
|
+
const _v = props.content;
|
|
137
|
+
_b.c = textHoleUpdate(__s, 1, _b.a, _v, _b.c, _b.d, _b.b, true, true);
|
|
138
|
+
_b.d = _v;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
let _b = __s.slots[0];
|
|
142
|
+
if (_b === void 0) {
|
|
143
|
+
let _m0, _m1, _m4;
|
|
144
|
+
const _root = clone(_t$1);
|
|
145
|
+
_m0 = __block.parentNode;
|
|
146
|
+
const _el0 = child(_root);
|
|
147
|
+
_m1 = _el0;
|
|
148
|
+
_m4 = sibling(_el0, 1);
|
|
149
|
+
drainFrag(_root, __block.parentNode, __block.endMarker);
|
|
150
|
+
_b = bag5(__s, null, _m0, _m1, null, void 0, _m4);
|
|
151
|
+
}
|
|
152
|
+
{
|
|
153
|
+
const _v = props.trigger;
|
|
154
|
+
_b.c = textHoleUpdate(__s, 1, _b.a, _v, _b.c, _b.d, _b.b, true);
|
|
155
|
+
_b.d = _v;
|
|
156
|
+
}
|
|
157
|
+
componentSlotVoid(__s, 2, _b.a, Popover, {
|
|
158
|
+
"open": open,
|
|
159
|
+
"anchor": anchor,
|
|
160
|
+
"placement": props.placement ?? "top",
|
|
161
|
+
"dismissOnOutsideTap": false,
|
|
162
|
+
"className": cx("vx-tooltip", props.contentClassName),
|
|
163
|
+
"style": {
|
|
164
|
+
pointerEvents: "none",
|
|
165
|
+
...props.contentStyle
|
|
166
|
+
},
|
|
167
|
+
"web": {
|
|
168
|
+
role: "tooltip",
|
|
169
|
+
id: tooltipId.current
|
|
170
|
+
},
|
|
171
|
+
"children": markChildrenBlock(__children$4, __childrenBody)
|
|
172
|
+
}, _b.e, void 0, void 0, void 0, void 0, "c:268467ce");
|
|
173
|
+
}
|
|
174
|
+
componentSlotVoid(__s, 0, __block.parentNode, View, {
|
|
175
|
+
"className": props.className,
|
|
176
|
+
"style": props.style,
|
|
177
|
+
"bind": bindAnchor,
|
|
178
|
+
"web": props.web,
|
|
179
|
+
"children": markChildrenBlock(__children$1, __childrenBody$)
|
|
180
|
+
}, __block.endMarker, void 0, void 0, true, void 0, "c:624a85e5");
|
|
181
|
+
};
|
|
182
|
+
//#endregion
|
|
183
|
+
export { Tooltip };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octane-xplat/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"types",
|
|
@@ -10,10 +10,32 @@
|
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
12
|
"types": "./types/index.d.ts",
|
|
13
|
-
"web":
|
|
14
|
-
|
|
13
|
+
"web": {
|
|
14
|
+
"types": "./types/index.web.d.ts",
|
|
15
|
+
"default": "./dist/web/ui.js"
|
|
16
|
+
},
|
|
17
|
+
"native": {
|
|
18
|
+
"types": "./types/index.native.d.ts",
|
|
19
|
+
"default": "./dist/native/ui.js"
|
|
20
|
+
},
|
|
15
21
|
"default": "./dist/native/ui.js"
|
|
16
22
|
},
|
|
23
|
+
"./ios": {
|
|
24
|
+
"types": "./types/ios.d.ts",
|
|
25
|
+
"native": "./dist/native/ios/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./android": {
|
|
28
|
+
"types": "./types/android.d.ts",
|
|
29
|
+
"native": "./dist/native/android/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./native": {
|
|
32
|
+
"types": "./types/native.d.ts",
|
|
33
|
+
"native": "./dist/native/native/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./web": {
|
|
36
|
+
"types": "./types/web.d.ts",
|
|
37
|
+
"web": "./dist/web/web/index.js"
|
|
38
|
+
},
|
|
17
39
|
"./theme/tokens.css": "./src/theme/tokens.css"
|
|
18
40
|
},
|
|
19
41
|
"devDependencies": {
|
|
@@ -22,6 +44,8 @@
|
|
|
22
44
|
"@nativescript-community/ui-drawer": "0.1.32",
|
|
23
45
|
"@nativescript-community/ui-svg": "0.2.24",
|
|
24
46
|
"@nativescript/core": "9.1.2",
|
|
47
|
+
"@nstudio/nativescript-camera-plus": "6.0.1",
|
|
48
|
+
"@nstudio/nativescript-exoplayer": "6.2.0",
|
|
25
49
|
"@octanejs/vite-plugin": "0.1.60",
|
|
26
50
|
"jsdom": "30.1.1",
|
|
27
51
|
"octane": "0.5.0",
|
|
@@ -33,8 +57,11 @@
|
|
|
33
57
|
"@nativescript-community/octane": ">=0.2.1 <1",
|
|
34
58
|
"@nativescript-community/ui-canvas": ">=4.6.52 <5",
|
|
35
59
|
"@nativescript-community/ui-drawer": ">=0.1.32 <1",
|
|
60
|
+
"@nativescript-community/ui-pager": ">=14.1.42 <15",
|
|
36
61
|
"@nativescript-community/ui-svg": ">=0.2.24 <1",
|
|
37
62
|
"@nativescript/core": ">=9.1.0 <10",
|
|
63
|
+
"@nstudio/nativescript-camera-plus": ">=6.0.1 <7",
|
|
64
|
+
"@nstudio/nativescript-exoplayer": ">=6.2.0 <7",
|
|
38
65
|
"octane": ">=0.1.51 <1"
|
|
39
66
|
},
|
|
40
67
|
"peerDependenciesMeta": {
|