@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
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { applyEscapeProps } from "./
|
|
2
|
-
import { layoutChildProps } from "./
|
|
3
|
-
import { __s,
|
|
1
|
+
import { applyEscapeProps } from "./escape-props.web.js";
|
|
2
|
+
import { layoutChildProps } from "./layout-child.web.js";
|
|
3
|
+
import { __s, bagOf, clone, snapshotSpread, template } from "octane";
|
|
4
4
|
import { bindSignalChild, bindSignalHostPropSources, enableSignalBindings } from "octane/internal/client";
|
|
5
5
|
//#region src/Text.web.tsrx
|
|
6
6
|
enableSignalBindings(1, true);
|
|
7
7
|
var _t$0 = /* @__PURE__ */ template("<span></span>");
|
|
8
8
|
var _rm$1 = [
|
|
9
9
|
"s",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
10
|
+
"o",
|
|
11
|
+
"n"
|
|
12
12
|
];
|
|
13
13
|
var Text = /* @__PURE__ */ __s(function Text(props, __s, __extra) {
|
|
14
14
|
const textStyle = {
|
|
@@ -19,7 +19,7 @@ var Text = /* @__PURE__ */ __s(function Text(props, __s, __extra) {
|
|
|
19
19
|
WebkitBoxOrient: "vertical",
|
|
20
20
|
overflow: "hidden"
|
|
21
21
|
} : {},
|
|
22
|
-
...props.
|
|
22
|
+
...props.ellipsize || props.numberOfLines ? { flexShrink: 1 } : {},
|
|
23
23
|
...props.ellipsize ? {
|
|
24
24
|
textOverflow: "ellipsis",
|
|
25
25
|
whiteSpace: "nowrap",
|
|
@@ -28,22 +28,23 @@ var Text = /* @__PURE__ */ __s(function Text(props, __s, __extra) {
|
|
|
28
28
|
};
|
|
29
29
|
let _b = __s.slots[0];
|
|
30
30
|
if (_b === void 0) {
|
|
31
|
-
let _m0, _m1, _m2, _m3, _m4, _m5, _m6, _m7, _m8, _m9, _m10, _m11, _m12, _m13;
|
|
31
|
+
let _m0, _m1, _m2, _m3, _m4, _m5, _m6, _m7, _m8, _m9, _m10, _m11, _m12, _m13, _m14;
|
|
32
32
|
const _root = clone(_t$0);
|
|
33
33
|
_m0 = props.id;
|
|
34
34
|
_m1 = (el) => applyEscapeProps(el, props);
|
|
35
35
|
_m2 = props.className;
|
|
36
36
|
_m3 = snapshotSpread(layoutChildProps(props, textStyle));
|
|
37
|
-
_m4 = props.
|
|
38
|
-
_m5 = props.
|
|
39
|
-
_m6 = props.
|
|
40
|
-
_m7 = props.
|
|
41
|
-
_m8 = props.
|
|
42
|
-
_m9 = props.accessibilityState?.
|
|
43
|
-
_m10 = props.accessibilityState?.
|
|
44
|
-
_m11 = props.
|
|
45
|
-
_m12 =
|
|
46
|
-
_m13 =
|
|
37
|
+
_m4 = props.accessibilityRole;
|
|
38
|
+
_m5 = props.accessibilityLabel;
|
|
39
|
+
_m6 = props.accessible === false ? true : void 0;
|
|
40
|
+
_m7 = props.accessibilityHint;
|
|
41
|
+
_m8 = props.accessibilityValue;
|
|
42
|
+
_m9 = props.accessibilityState?.disabled;
|
|
43
|
+
_m10 = props.accessibilityState?.selected;
|
|
44
|
+
_m11 = props.accessibilityState?.checked;
|
|
45
|
+
_m12 = props.accessibilityLiveRegion === "none" ? "off" : props.accessibilityLiveRegion;
|
|
46
|
+
_m13 = _root;
|
|
47
|
+
_m14 = bindSignalHostPropSources(__s, void 0, _root, [
|
|
47
48
|
[
|
|
48
49
|
false,
|
|
49
50
|
"id",
|
|
@@ -62,46 +63,69 @@ var Text = /* @__PURE__ */ __s(function Text(props, __s, __extra) {
|
|
|
62
63
|
[true, _m3],
|
|
63
64
|
[
|
|
64
65
|
false,
|
|
65
|
-
"
|
|
66
|
+
"role",
|
|
66
67
|
_m4
|
|
67
68
|
],
|
|
68
69
|
[
|
|
69
70
|
false,
|
|
70
|
-
"aria-
|
|
71
|
+
"aria-label",
|
|
71
72
|
_m5
|
|
72
73
|
],
|
|
73
74
|
[
|
|
74
75
|
false,
|
|
75
|
-
"aria-
|
|
76
|
+
"aria-hidden",
|
|
76
77
|
_m6
|
|
77
78
|
],
|
|
78
79
|
[
|
|
79
80
|
false,
|
|
80
|
-
"aria-
|
|
81
|
+
"aria-description",
|
|
81
82
|
_m7
|
|
82
83
|
],
|
|
83
84
|
[
|
|
84
85
|
false,
|
|
85
|
-
"aria-
|
|
86
|
+
"aria-valuetext",
|
|
86
87
|
_m8
|
|
87
88
|
],
|
|
88
89
|
[
|
|
89
90
|
false,
|
|
90
|
-
"aria-
|
|
91
|
+
"aria-disabled",
|
|
91
92
|
_m9
|
|
92
93
|
],
|
|
93
94
|
[
|
|
94
95
|
false,
|
|
95
|
-
"aria-
|
|
96
|
+
"aria-selected",
|
|
96
97
|
_m10
|
|
97
98
|
],
|
|
98
99
|
[
|
|
99
100
|
false,
|
|
100
|
-
"aria-
|
|
101
|
+
"aria-checked",
|
|
101
102
|
_m11
|
|
103
|
+
],
|
|
104
|
+
[
|
|
105
|
+
false,
|
|
106
|
+
"aria-live",
|
|
107
|
+
_m12
|
|
102
108
|
]
|
|
103
|
-
], "b:
|
|
104
|
-
_b =
|
|
109
|
+
], "b:085f588b", true);
|
|
110
|
+
_b = bagOf(__s, _root, {
|
|
111
|
+
a: _m0,
|
|
112
|
+
b: _m1,
|
|
113
|
+
c: _m2,
|
|
114
|
+
d: _m3,
|
|
115
|
+
e: _m4,
|
|
116
|
+
f: _m5,
|
|
117
|
+
g: _m6,
|
|
118
|
+
h: _m7,
|
|
119
|
+
i: _m8,
|
|
120
|
+
j: _m9,
|
|
121
|
+
k: _m10,
|
|
122
|
+
l: _m11,
|
|
123
|
+
m: _m12,
|
|
124
|
+
n: _m13,
|
|
125
|
+
o: _m14,
|
|
126
|
+
p: null,
|
|
127
|
+
q: void 0
|
|
128
|
+
});
|
|
105
129
|
__s.refFields = _rm$1;
|
|
106
130
|
} else {
|
|
107
131
|
{
|
|
@@ -118,38 +142,42 @@ var Text = /* @__PURE__ */ __s(function Text(props, __s, __extra) {
|
|
|
118
142
|
}
|
|
119
143
|
_b.d = snapshotSpread(layoutChildProps(props, textStyle));
|
|
120
144
|
{
|
|
121
|
-
const _v = props.
|
|
145
|
+
const _v = props.accessibilityRole;
|
|
122
146
|
if (_b.e !== _v) _b.e = _v;
|
|
123
147
|
}
|
|
124
148
|
{
|
|
125
|
-
const _v = props.
|
|
149
|
+
const _v = props.accessibilityLabel;
|
|
126
150
|
if (_b.f !== _v) _b.f = _v;
|
|
127
151
|
}
|
|
128
152
|
{
|
|
129
|
-
const _v = props.
|
|
153
|
+
const _v = props.accessible === false ? true : void 0;
|
|
130
154
|
if (_b.g !== _v) _b.g = _v;
|
|
131
155
|
}
|
|
132
156
|
{
|
|
133
|
-
const _v = props.
|
|
157
|
+
const _v = props.accessibilityHint;
|
|
134
158
|
if (_b.h !== _v) _b.h = _v;
|
|
135
159
|
}
|
|
136
160
|
{
|
|
137
|
-
const _v = props.
|
|
161
|
+
const _v = props.accessibilityValue;
|
|
138
162
|
if (_b.i !== _v) _b.i = _v;
|
|
139
163
|
}
|
|
140
164
|
{
|
|
141
|
-
const _v = props.accessibilityState?.
|
|
165
|
+
const _v = props.accessibilityState?.disabled;
|
|
142
166
|
if (_b.j !== _v) _b.j = _v;
|
|
143
167
|
}
|
|
144
168
|
{
|
|
145
|
-
const _v = props.accessibilityState?.
|
|
169
|
+
const _v = props.accessibilityState?.selected;
|
|
146
170
|
if (_b.k !== _v) _b.k = _v;
|
|
147
171
|
}
|
|
148
172
|
{
|
|
149
|
-
const _v = props.
|
|
173
|
+
const _v = props.accessibilityState?.checked;
|
|
150
174
|
if (_b.l !== _v) _b.l = _v;
|
|
151
175
|
}
|
|
152
|
-
|
|
176
|
+
{
|
|
177
|
+
const _v = props.accessibilityLiveRegion === "none" ? "off" : props.accessibilityLiveRegion;
|
|
178
|
+
if (_b.m !== _v) _b.m = _v;
|
|
179
|
+
}
|
|
180
|
+
_b.o = bindSignalHostPropSources(__s, _b.o, _b.n, [
|
|
153
181
|
[
|
|
154
182
|
false,
|
|
155
183
|
"id",
|
|
@@ -168,47 +196,52 @@ var Text = /* @__PURE__ */ __s(function Text(props, __s, __extra) {
|
|
|
168
196
|
[true, _b.d],
|
|
169
197
|
[
|
|
170
198
|
false,
|
|
171
|
-
"
|
|
199
|
+
"role",
|
|
172
200
|
_b.e
|
|
173
201
|
],
|
|
174
202
|
[
|
|
175
203
|
false,
|
|
176
|
-
"aria-
|
|
204
|
+
"aria-label",
|
|
177
205
|
_b.f
|
|
178
206
|
],
|
|
179
207
|
[
|
|
180
208
|
false,
|
|
181
|
-
"aria-
|
|
209
|
+
"aria-hidden",
|
|
182
210
|
_b.g
|
|
183
211
|
],
|
|
184
212
|
[
|
|
185
213
|
false,
|
|
186
|
-
"aria-
|
|
214
|
+
"aria-description",
|
|
187
215
|
_b.h
|
|
188
216
|
],
|
|
189
217
|
[
|
|
190
218
|
false,
|
|
191
|
-
"aria-
|
|
219
|
+
"aria-valuetext",
|
|
192
220
|
_b.i
|
|
193
221
|
],
|
|
194
222
|
[
|
|
195
223
|
false,
|
|
196
|
-
"aria-
|
|
224
|
+
"aria-disabled",
|
|
197
225
|
_b.j
|
|
198
226
|
],
|
|
199
227
|
[
|
|
200
228
|
false,
|
|
201
|
-
"aria-
|
|
229
|
+
"aria-selected",
|
|
202
230
|
_b.k
|
|
203
231
|
],
|
|
204
232
|
[
|
|
205
233
|
false,
|
|
206
|
-
"aria-
|
|
234
|
+
"aria-checked",
|
|
207
235
|
_b.l
|
|
236
|
+
],
|
|
237
|
+
[
|
|
238
|
+
false,
|
|
239
|
+
"aria-live",
|
|
240
|
+
_b.m
|
|
208
241
|
]
|
|
209
|
-
], "b:
|
|
242
|
+
], "b:085f588b", true);
|
|
210
243
|
}
|
|
211
|
-
_b.
|
|
244
|
+
_b.r = bindSignalChild(__s, _b.r, 1, _b.n, props.children, "b:ef1ae445", null, void 0, void 0, void 0, true);
|
|
212
245
|
});
|
|
213
246
|
//#endregion
|
|
214
247
|
export { Text };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { applyEscapeProps } from "./
|
|
2
|
-
import { normStyle } from "./
|
|
1
|
+
import { applyEscapeProps } from "./escape-props.web.js";
|
|
2
|
+
import { normStyle } from "./layout-child.web.js";
|
|
3
3
|
import { __s, bag11, clone, delegateEvents, hookSlots, queueRefAttach, queueRefDetach, setAttribute, setEventHandler, setStyle, template, useLayoutEffect, useRef } from "octane";
|
|
4
4
|
import { bindSignalAttribute, bindSignalValue, enableSignalBindings, replaceRef, setBooleanAttributeIfChanged, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
|
|
5
5
|
//#region src/TextArea.web.tsrx
|
|
@@ -104,8 +104,8 @@ var TextArea = /* @__PURE__ */ __s(function TextArea(props, __s, __extra) {
|
|
|
104
104
|
_b.g = bindSignalAttribute(__s, _b.g, _b.a, "inputMode", props.keyboardType === "number" ? "numeric" : props.keyboardType === "phone" ? "tel" : props.keyboardType === "default" ? "text" : props.keyboardType, "b:ef3d0153", setPlainAttribute);
|
|
105
105
|
_b.h = bindSignalAttribute(__s, _b.h, _b.a, "enterKeyHint", props.returnKeyType, "b:c58c3b7f", setPlainAttribute);
|
|
106
106
|
_b.i = setBooleanAttributeIfChanged(props.editable === false, _b.i, _b.a, "readonly");
|
|
107
|
-
_b.j = bindSignalAttribute(__s, _b.j, _b.a, "placeholder", props.placeholder
|
|
108
|
-
_b.k = bindSignalAttribute(__s, _b.k, _b.a, "rows", props.rows ?? (props.autoGrow ? 1 : 3), "b:
|
|
107
|
+
_b.j = bindSignalAttribute(__s, _b.j, _b.a, "placeholder", props.placeholder, "b:49264ef3", setPlainAttribute);
|
|
108
|
+
_b.k = bindSignalAttribute(__s, _b.k, _b.a, "rows", props.rows ?? (props.autoGrow ? 1 : 3), "b:5d7a03c8", setAttribute);
|
|
109
109
|
});
|
|
110
110
|
//#endregion
|
|
111
111
|
export { TextArea };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { applyEscapeProps } from "./
|
|
2
|
-
import { normStyle } from "./
|
|
1
|
+
import { applyEscapeProps } from "./escape-props.web.js";
|
|
2
|
+
import { normStyle } from "./layout-child.web.js";
|
|
3
3
|
import { __s, bag11, clone, delegateEvents, queueRefAttach, queueRefDetach, setEventHandler, setStyle, template } from "octane";
|
|
4
|
-
import { bindSignalAttribute, bindSignalValue, enableSignalBindings, replaceRef, setBooleanAttributeIfChanged, setPlainAttribute } from "octane/internal/client";
|
|
4
|
+
import { bindSignalAttribute, bindSignalValue, enableSignalBindings, replaceRef, setBooleanAttributeIfChanged, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
|
|
5
5
|
//#region src/TextInput.web.tsrx
|
|
6
6
|
enableSignalBindings(1, true);
|
|
7
7
|
delegateEvents([
|
|
@@ -64,7 +64,7 @@ var TextInput = /* @__PURE__ */ __s(function TextInput(props, __s, __extra) {
|
|
|
64
64
|
setEventHandler(_b.a, "$$focusout", props.onBlur);
|
|
65
65
|
}
|
|
66
66
|
_b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:b371d08c", setPlainAttribute);
|
|
67
|
-
_b.d =
|
|
67
|
+
_b.d = updateFreshClassName(["vx-input", props.className], _b.d, _b.a);
|
|
68
68
|
{
|
|
69
69
|
const _v = {
|
|
70
70
|
...normStyle(props.style),
|
|
@@ -75,11 +75,11 @@ var TextInput = /* @__PURE__ */ __s(function TextInput(props, __s, __extra) {
|
|
|
75
75
|
_b.e = _v;
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
_b.g = bindSignalAttribute(__s, _b.g, _b.a, "type", props.secure ? "password" : props.keyboardType === "number" || props.keyboardType === "decimal" ? "number" : keyboardType, "b:
|
|
79
|
-
_b.h = bindSignalAttribute(__s, _b.h, _b.a, "inputMode", inputMode, "b:
|
|
80
|
-
_b.i = bindSignalAttribute(__s, _b.i, _b.a, "enterKeyHint", props.returnKeyType, "b:
|
|
78
|
+
_b.g = bindSignalAttribute(__s, _b.g, _b.a, "type", props.secure ? "password" : props.keyboardType === "number" || props.keyboardType === "decimal" ? "number" : keyboardType, "b:2800aef1", setPlainAttribute);
|
|
79
|
+
_b.h = bindSignalAttribute(__s, _b.h, _b.a, "inputMode", inputMode, "b:7a599efe", setPlainAttribute);
|
|
80
|
+
_b.i = bindSignalAttribute(__s, _b.i, _b.a, "enterKeyHint", props.returnKeyType, "b:7bb4056a", setPlainAttribute);
|
|
81
81
|
_b.j = setBooleanAttributeIfChanged(props.editable === false, _b.j, _b.a, "readonly");
|
|
82
|
-
_b.k = bindSignalAttribute(__s, _b.k, _b.a, "placeholder", props.placeholder
|
|
82
|
+
_b.k = bindSignalAttribute(__s, _b.k, _b.a, "placeholder", props.placeholder, "b:56a80277", setPlainAttribute);
|
|
83
83
|
});
|
|
84
84
|
//#endregion
|
|
85
85
|
export { TextInput };
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { applyEscapeProps } from "./escape-props.web.js";
|
|
2
|
+
import { Icon } from "./Icon.web.tsrx.js";
|
|
3
|
+
import { __s, bag0, bag3, bag6, bag8, child, clone, compilerCacheContext, componentSlot, createElement, createScopedElement, createScopedValue, hookSlots, ifBlock, mapSlot, positionalChildren, queueRefAttach, queueRefDetach, setStyle, sibling, template } from "octane";
|
|
4
|
+
import { bindSignalAttribute, bindSignalChild, compilerMemoRegion, createElementFromConfig, enableSignalBindings, hookMemoEqual, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
|
|
5
|
+
//#region src/Timeline.web.tsrx
|
|
6
|
+
enableSignalBindings(1, true);
|
|
7
|
+
var _t$0 = /* @__PURE__ */ template("<div class=\"vx-timeline-line\"></div>");
|
|
8
|
+
var _t$1 = /* @__PURE__ */ template("<span class=\"vx-timeline-time\"></span>");
|
|
9
|
+
var _t$2 = /* @__PURE__ */ template("<span class=\"vx-timeline-title\"></span>");
|
|
10
|
+
var _t$3 = /* @__PURE__ */ template("<span class=\"vx-timeline-desc\"></span>");
|
|
11
|
+
var _t$4 = /* @__PURE__ */ template("<div class=\"vx-timeline-item\"><div class=\"vx-timeline-rail\" aria-hidden=\"true\"><div class=\"vx-timeline-dot\"><!></div><!></div><div class=\"vx-timeline-body\"><!><!><!></div></div>");
|
|
12
|
+
var _t$5 = /* @__PURE__ */ template("<div><!></div>");
|
|
13
|
+
var _key$0 = (item, i) => item.key;
|
|
14
|
+
function __then$2(__props, __s, __extra) {
|
|
15
|
+
const __block = __s.block;
|
|
16
|
+
const item = __extra[0];
|
|
17
|
+
componentSlot(__s, 0, __block.parentNode, Icon, { "name": item.icon }, __block.endMarker, void 0, 2, void 0, void 0, "c:5643b2d9");
|
|
18
|
+
}
|
|
19
|
+
function __then$5(__props, __s, __extra) {
|
|
20
|
+
let _b = __s.slots[0];
|
|
21
|
+
if (_b === void 0) {
|
|
22
|
+
const _root = clone(_t$0);
|
|
23
|
+
_b = bag0(__s, _root);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function __then$7(__props, __s, __extra) {
|
|
27
|
+
const item = __extra[0];
|
|
28
|
+
let _b = __s.slots[0];
|
|
29
|
+
if (_b === void 0) {
|
|
30
|
+
let _m0;
|
|
31
|
+
const _root = clone(_t$1);
|
|
32
|
+
_m0 = _root;
|
|
33
|
+
_b = bag3(__s, _root, _m0, null, void 0);
|
|
34
|
+
}
|
|
35
|
+
_b.d = bindSignalChild(__s, _b.d, 1, _b.a, item.time, "b:fa704bab", null, void 0, void 0, void 0, true);
|
|
36
|
+
}
|
|
37
|
+
function __then$10(__props, __s, __extra) {
|
|
38
|
+
const item = __extra[0];
|
|
39
|
+
let _b = __s.slots[0];
|
|
40
|
+
if (_b === void 0) {
|
|
41
|
+
let _m0;
|
|
42
|
+
const _root = clone(_t$2);
|
|
43
|
+
_m0 = _root;
|
|
44
|
+
_b = bag3(__s, _root, _m0, null, void 0);
|
|
45
|
+
}
|
|
46
|
+
_b.d = bindSignalChild(__s, _b.d, 1, _b.a, item.title, "b:5fccd11b", null, void 0, void 0, void 0, true);
|
|
47
|
+
}
|
|
48
|
+
function __then$13(__props, __s, __extra) {
|
|
49
|
+
const item = __extra[0];
|
|
50
|
+
let _b = __s.slots[0];
|
|
51
|
+
if (_b === void 0) {
|
|
52
|
+
let _m0;
|
|
53
|
+
const _root = clone(_t$3);
|
|
54
|
+
_m0 = _root;
|
|
55
|
+
_b = bag3(__s, _root, _m0, null, void 0);
|
|
56
|
+
}
|
|
57
|
+
_b.d = bindSignalChild(__s, _b.d, 1, _b.a, item.description, "b:72e5897c", null, void 0, void 0, void 0, true);
|
|
58
|
+
}
|
|
59
|
+
function __item$1(item, __s, __extra) {
|
|
60
|
+
const __block = __s.block;
|
|
61
|
+
const props = __extra[0];
|
|
62
|
+
const i = __block.itemIndex;
|
|
63
|
+
let _b = __s.slots[0];
|
|
64
|
+
if (_b === void 0) {
|
|
65
|
+
let _m0, _m1, _m2, _m3, _m4, _m5, _m6, _m7;
|
|
66
|
+
const _root = clone(_t$4);
|
|
67
|
+
const _el0 = child(_root);
|
|
68
|
+
const _el1 = child(_el0);
|
|
69
|
+
_m0 = _el1;
|
|
70
|
+
_m1 = child(_el1);
|
|
71
|
+
_m2 = _el0;
|
|
72
|
+
_m3 = sibling(_el1, 1);
|
|
73
|
+
const _el4 = sibling(_el0, 1);
|
|
74
|
+
_m4 = _el4;
|
|
75
|
+
const _el5 = child(_el4);
|
|
76
|
+
_m5 = _el5;
|
|
77
|
+
const _el6 = sibling(_el5, 1);
|
|
78
|
+
_m6 = _el6;
|
|
79
|
+
_m7 = sibling(_el6, 1);
|
|
80
|
+
_b = bag8(__s, _root, _m0, _m1, _m2, _m3, _m4, _m5, _m6, _m7);
|
|
81
|
+
}
|
|
82
|
+
{
|
|
83
|
+
const __ifCondition = item.icon;
|
|
84
|
+
ifBlock(__s, 1, _b.a, __ifCondition, __then$2, null, _b.b, __ifCondition ? [item] : void 0);
|
|
85
|
+
}
|
|
86
|
+
ifBlock(__s, 2, _b.c, i < props.items.length - 1, __then$5, null, _b.d);
|
|
87
|
+
{
|
|
88
|
+
const __ifCondition$ = item.time != null;
|
|
89
|
+
ifBlock(__s, 3, _b.e, __ifCondition$, __then$7, null, _b.f, __ifCondition$ ? [item] : void 0);
|
|
90
|
+
}
|
|
91
|
+
{
|
|
92
|
+
const __ifCondition$2 = item.title != null;
|
|
93
|
+
ifBlock(__s, 4, _b.e, __ifCondition$2, __then$10, null, _b.g, __ifCondition$2 ? [item] : void 0);
|
|
94
|
+
}
|
|
95
|
+
{
|
|
96
|
+
const __ifCondition$3 = item.description != null;
|
|
97
|
+
ifBlock(__s, 5, _b.e, __ifCondition$3, __then$13, null, _b.h, __ifCondition$3 ? [item] : void 0);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
var _rm$17 = [
|
|
101
|
+
"r",
|
|
102
|
+
"b",
|
|
103
|
+
"a"
|
|
104
|
+
];
|
|
105
|
+
var _hs$ = /* @__PURE__ */ hookSlots(7);
|
|
106
|
+
var Timeline = /* @__PURE__ */ __s(function Timeline(props, __s, __extra) {
|
|
107
|
+
const __memoRegion = compilerMemoRegion(__s, _hs$ + 0);
|
|
108
|
+
const __memoCommitted = __memoRegion.auto;
|
|
109
|
+
let __memoCache = __memoCommitted === void 0 ? [] : __memoCommitted;
|
|
110
|
+
let __mapItems;
|
|
111
|
+
let __mapMethod;
|
|
112
|
+
let _b = __s.slots[0];
|
|
113
|
+
if (_b === void 0) {
|
|
114
|
+
let _m0, _m1, _m5;
|
|
115
|
+
const _root = clone(_t$5);
|
|
116
|
+
queueRefAttach(__s, _m1 = (e) => applyEscapeProps(e, props), _m0 = _root);
|
|
117
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
|
|
118
|
+
_m5 = child(_root);
|
|
119
|
+
_b = bag6(__s, _root, _m0, _m1, void 0, void 0, void 0, _m5);
|
|
120
|
+
__s.refFields = _rm$17;
|
|
121
|
+
} else {
|
|
122
|
+
const _r = (e) => applyEscapeProps(e, props);
|
|
123
|
+
if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
|
|
124
|
+
}
|
|
125
|
+
_b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:38cab871", setPlainAttribute);
|
|
126
|
+
_b.d = updateFreshClassName(["vx-timeline", props.className], _b.d, _b.a);
|
|
127
|
+
{
|
|
128
|
+
const _v = props.style;
|
|
129
|
+
if (_b.e !== _v) {
|
|
130
|
+
setStyle(_b.a, _v, _b.e);
|
|
131
|
+
_b.e = _v;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
{
|
|
135
|
+
const _v = (__mapItems = props.items, __mapMethod = __mapItems.map, __mapItems);
|
|
136
|
+
const __mapNative = mapSlot(_v, __mapMethod);
|
|
137
|
+
{
|
|
138
|
+
const __memoDep = _v;
|
|
139
|
+
const __memoDep$ = Icon;
|
|
140
|
+
const __memoDep$2 = props;
|
|
141
|
+
if (__s.slots[1] === void 0 || !__mapNative || Icon.__memo !== true || Icon.__compare !== void 0 || __memoCache[4] !== true || !hookMemoEqual(__memoCache[0], __memoDep) || !hookMemoEqual(__memoCache[1], __memoDep$) || !hookMemoEqual(__memoCache[2], __memoDep$2)) {
|
|
142
|
+
mapSlot(__s, 1, _b.a, _v, __mapMethod, __mapNative, (item, i) => createScopedElement("div", {
|
|
143
|
+
key: item.key,
|
|
144
|
+
className: "vx-timeline-item"
|
|
145
|
+
}, () => positionalChildren([createScopedElement("div", {
|
|
146
|
+
className: "vx-timeline-rail",
|
|
147
|
+
"aria-hidden": "true"
|
|
148
|
+
}, () => positionalChildren([createScopedElement("div", { className: "vx-timeline-dot" }, () => item.icon ? createScopedValue(() => createElementFromConfig("c:1003e85c", Icon, { name: item.icon })) : null), i < props.items.length - 1 ? createElement("div", { className: "vx-timeline-line" }) : null])), createScopedElement("div", { className: "vx-timeline-body" }, () => positionalChildren([
|
|
149
|
+
item.time != null ? createScopedElement("span", { className: "vx-timeline-time" }, () => item.time) : null,
|
|
150
|
+
item.title != null ? createScopedElement("span", { className: "vx-timeline-title" }, () => item.title) : null,
|
|
151
|
+
item.description != null ? createScopedElement("span", { className: "vx-timeline-desc" }, () => item.description) : null
|
|
152
|
+
]))])), _key$0, __item$1, 18 | (Icon.__memo === true && Icon.__compare === void 0 ? 4 : 0), [props, Icon], _b.f, 1);
|
|
153
|
+
const _c = compilerCacheContext(__s, 1, __memoCache[3]);
|
|
154
|
+
if (__memoCache === __memoCommitted) __memoCache = __memoCache.slice();
|
|
155
|
+
__memoCache[0] = __memoDep;
|
|
156
|
+
__memoCache[1] = __memoDep$;
|
|
157
|
+
__memoCache[2] = __memoDep$2;
|
|
158
|
+
__memoCache[3] = _c;
|
|
159
|
+
__memoCache[4] = __mapNative;
|
|
160
|
+
} else {
|
|
161
|
+
const _c = compilerCacheContext(__s, 1, __memoCache[3]);
|
|
162
|
+
if (_c !== __memoCache[3]) {
|
|
163
|
+
if (__memoCache === __memoCommitted) __memoCache = __memoCache.slice();
|
|
164
|
+
__memoCache[3] = _c;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
if (__memoCache !== __memoCommitted) __memoRegion.auto = __memoCache;
|
|
170
|
+
});
|
|
171
|
+
//#endregion
|
|
172
|
+
export { Timeline };
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { applyEscapeProps } from "./escape-props.web.js";
|
|
2
|
+
import { __s, bag14, bag6, child, clone, componentSlotVoid, delegateEvents, hookSlots, htext, mapSlot, queueRefAttach, queueRefDetach, setAriaAttribute, setEventHandler, setStyle, setStyleProperty, setText, sibling, template, useState } from "octane";
|
|
3
|
+
import { bindSignalAttribute, bindSignalChild, createElementFromConfig, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
|
|
4
|
+
//#region src/Tree.web.tsrx
|
|
5
|
+
enableSignalBindings(1, true);
|
|
6
|
+
delegateEvents(["click", "keydown"]);
|
|
7
|
+
var _t$0 = /* @__PURE__ */ template("<div class=\"vx-tree-node\" role=\"treeitem\"><div role=\"button\"><span class=\"vx-tree-caret\" aria-hidden=\"true\"> </span><span class=\"vx-tree-label\"></span></div><!></div>");
|
|
8
|
+
var _t$1 = /* @__PURE__ */ template("<div role=\"tree\"><!></div>");
|
|
9
|
+
var _hs$ = /* @__PURE__ */ hookSlots(3);
|
|
10
|
+
var _key$2 = (node) => node.key;
|
|
11
|
+
function __item$3(node, __s, __extra) {
|
|
12
|
+
const __block = __s.block;
|
|
13
|
+
const open = __extra[0];
|
|
14
|
+
const props = __extra[1];
|
|
15
|
+
const toggle = __extra[2];
|
|
16
|
+
componentSlotVoid(__s, 0, __block.parentNode, TreeRow, {
|
|
17
|
+
"node": node,
|
|
18
|
+
"depth": 0,
|
|
19
|
+
"open": open,
|
|
20
|
+
"toggle": toggle,
|
|
21
|
+
"onSelect": props.onSelect
|
|
22
|
+
}, __block.endMarker, void 0, true, void 0, void 0, "c:88d52115");
|
|
23
|
+
}
|
|
24
|
+
var _rm$6 = [
|
|
25
|
+
"r",
|
|
26
|
+
"b",
|
|
27
|
+
"a"
|
|
28
|
+
];
|
|
29
|
+
var TreeRow = /* @__PURE__ */ __s(function TreeRow(props, __s, __extra) {
|
|
30
|
+
const node = props.node;
|
|
31
|
+
const kids = node.children ?? [];
|
|
32
|
+
const isOpen = props.open.has(node.key);
|
|
33
|
+
if (__s.block.pending && !__s.block.crossRenderUpdate) return;
|
|
34
|
+
let _b = __s.slots[0];
|
|
35
|
+
if (_b === void 0) {
|
|
36
|
+
let _m1, _m3, _m6, _m7, _m8, _m11;
|
|
37
|
+
const _root = clone(_t$0);
|
|
38
|
+
_m1 = _root;
|
|
39
|
+
const _el0 = child(_root);
|
|
40
|
+
_m3 = _el0;
|
|
41
|
+
setEventHandler(_el0, "$$click", node.disabled ? void 0 : () => kids.length ? props.toggle(node) : props.onSelect?.(node));
|
|
42
|
+
setEventHandler(_el0, "$$keydown", (e) => {
|
|
43
|
+
if (node.disabled) return;
|
|
44
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
if (kids.length) props.toggle(node);
|
|
47
|
+
else props.onSelect?.(node);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
const _el1 = child(_el0);
|
|
51
|
+
{
|
|
52
|
+
const _v = kids.length ? isOpen ? "▾" : "▸" : "";
|
|
53
|
+
_m6 = htext(_el1, _v, 1);
|
|
54
|
+
_m7 = _v;
|
|
55
|
+
}
|
|
56
|
+
_m8 = sibling(_el1, 1);
|
|
57
|
+
_m11 = sibling(_el0, 1);
|
|
58
|
+
_b = bag14(__s, _root, void 0, _m1, void 0, _m3, __s, void 0, _m6, _m7, _m8, null, void 0, _m11, null, void 0);
|
|
59
|
+
} else {
|
|
60
|
+
setEventHandler(_b.d, "$$click", node.disabled ? void 0 : () => kids.length ? props.toggle(node) : props.onSelect?.(node));
|
|
61
|
+
setEventHandler(_b.d, "$$keydown", (e) => {
|
|
62
|
+
if (node.disabled) return;
|
|
63
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
if (kids.length) props.toggle(node);
|
|
66
|
+
else props.onSelect?.(node);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
{
|
|
70
|
+
const _v = kids.length ? isOpen ? "▾" : "▸" : "";
|
|
71
|
+
if (_b.h !== _v) {
|
|
72
|
+
setText(_b.g, _v);
|
|
73
|
+
_b.h = _v;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
_b.a = bindSignalAttribute(__s, _b.a, _b.b, "aria-expanded", kids.length ? isOpen : void 0, "b:06a2728a", setAriaAttribute);
|
|
78
|
+
_b.c = updateFreshClassName(["vx-tree-row", node.disabled ? "vx-tree-row--disabled" : void 0], _b.c, _b.d);
|
|
79
|
+
{
|
|
80
|
+
const _v = props.depth * 16;
|
|
81
|
+
if (_b.e !== _v) {
|
|
82
|
+
setStyleProperty(_b.d, "paddingLeft", _v, "", _b.e);
|
|
83
|
+
_b.e = _v;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
_b.f = bindSignalAttribute(__s, _b.f, _b.d, "tabindex", node.disabled ? void 0 : 0, "b:a11a3438", setPlainAttribute);
|
|
87
|
+
_b.o = bindSignalChild(__s, _b.o, 1, _b.i, node.label ?? node.key, "b:34dbe901", null, void 0, void 0, void 0, true);
|
|
88
|
+
_b.p = bindSignalChild(__s, _b.p, 2, _b.b, isOpen && kids.map((kid) => createElementFromConfig("c:7b3274a7", TreeRow, {
|
|
89
|
+
key: kid.key,
|
|
90
|
+
node: kid,
|
|
91
|
+
depth: props.depth + 1,
|
|
92
|
+
open: props.open,
|
|
93
|
+
toggle: props.toggle,
|
|
94
|
+
onSelect: props.onSelect
|
|
95
|
+
})), "b:2e1f6af7", _b.l, true, void 0, void 0, void 0);
|
|
96
|
+
});
|
|
97
|
+
var Tree = /* @__PURE__ */ __s(function Tree(props, __s, __extra) {
|
|
98
|
+
let __mapItems;
|
|
99
|
+
let __mapMethod;
|
|
100
|
+
const [open, setOpen] = useState(new Set(props.defaultExpanded ?? []), _hs$ + 0);
|
|
101
|
+
const toggle = (node) => {
|
|
102
|
+
const next = new Set(open);
|
|
103
|
+
const willOpen = !next.has(node.key);
|
|
104
|
+
if (willOpen) next.add(node.key);
|
|
105
|
+
else next.delete(node.key);
|
|
106
|
+
setOpen(next);
|
|
107
|
+
props.onToggle?.(node.key, willOpen);
|
|
108
|
+
};
|
|
109
|
+
if (__s.block.pending && !__s.block.crossRenderUpdate) return;
|
|
110
|
+
let _b = __s.slots[0];
|
|
111
|
+
if (_b === void 0) {
|
|
112
|
+
let _m0, _m1, _m5;
|
|
113
|
+
const _root = clone(_t$1);
|
|
114
|
+
queueRefAttach(__s, _m1 = (e) => applyEscapeProps(e, props), _m0 = _root);
|
|
115
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
|
|
116
|
+
_m5 = child(_root);
|
|
117
|
+
_b = bag6(__s, _root, _m0, _m1, void 0, void 0, void 0, _m5);
|
|
118
|
+
__s.refFields = _rm$6;
|
|
119
|
+
} else {
|
|
120
|
+
const _r = (e) => applyEscapeProps(e, props);
|
|
121
|
+
if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
|
|
122
|
+
}
|
|
123
|
+
_b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:ebb0f180", setPlainAttribute);
|
|
124
|
+
_b.d = updateFreshClassName(["vx-tree", props.className], _b.d, _b.a);
|
|
125
|
+
{
|
|
126
|
+
const _v = props.style;
|
|
127
|
+
if (_b.e !== _v) {
|
|
128
|
+
setStyle(_b.a, _v, _b.e);
|
|
129
|
+
_b.e = _v;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
mapSlot(__s, 1, _b.a, (__mapItems = props.nodes, __mapMethod = __mapItems.map, __mapItems), __mapMethod, (node) => createElementFromConfig("c:3f4e10dc", TreeRow, {
|
|
133
|
+
key: node.key,
|
|
134
|
+
node,
|
|
135
|
+
depth: 0,
|
|
136
|
+
open,
|
|
137
|
+
toggle,
|
|
138
|
+
onSelect: props.onSelect
|
|
139
|
+
}), _key$2, __item$3, 10, [
|
|
140
|
+
open,
|
|
141
|
+
props,
|
|
142
|
+
toggle
|
|
143
|
+
], _b.f, 1);
|
|
144
|
+
});
|
|
145
|
+
//#endregion
|
|
146
|
+
export { Tree };
|