@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,85 @@
|
|
|
1
|
+
import { applyEscapeProps } from "./escape-props.web.js";
|
|
2
|
+
import { Collapsible } from "./Collapsible.web.tsrx.js";
|
|
3
|
+
import { __s, bag4, bag6, child, clone, componentSlotVoid, drainFrag, forBlock, hookSlots, markChildrenBlock, queueRefAttach, queueRefDetach, setStyle, template, useState } from "octane";
|
|
4
|
+
import { bindSignalAttribute, bindSignalChild, compilerMemoRegion, enableSignalBindings, hookMemoCreate, hookMemoPublishInvariant, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
|
|
5
|
+
//#region src/Accordion.web.tsrx
|
|
6
|
+
enableSignalBindings(1, true);
|
|
7
|
+
var _t$0 = /* @__PURE__ */ template("<!>", 0, 1);
|
|
8
|
+
var _t$1 = /* @__PURE__ */ template("<div><!></div>");
|
|
9
|
+
var _hs$ = /* @__PURE__ */ hookSlots(3);
|
|
10
|
+
var _key$0 = (item) => item.key;
|
|
11
|
+
var __childrenBody = {};
|
|
12
|
+
function __item$1(item, __s, __extra) {
|
|
13
|
+
const __block = __s.block;
|
|
14
|
+
const openKeys = __extra[0];
|
|
15
|
+
const toggle = __extra[1];
|
|
16
|
+
function __children$3(__props, __s, __extra) {
|
|
17
|
+
const __block = __s.block;
|
|
18
|
+
let _b = __s.slots[0];
|
|
19
|
+
if (_b === void 0) {
|
|
20
|
+
let _m0, _m1;
|
|
21
|
+
const _root = clone(_t$0);
|
|
22
|
+
_m0 = __block.parentNode;
|
|
23
|
+
_m1 = child(_root);
|
|
24
|
+
drainFrag(_root, __block.parentNode, __block.endMarker);
|
|
25
|
+
_b = bag4(__s, null, _m0, _m1, null, void 0);
|
|
26
|
+
}
|
|
27
|
+
_b.e = bindSignalChild(__s, _b.e, 1, _b.a, item.content, "b:c752caaf", _b.b, true, void 0, true, void 0);
|
|
28
|
+
}
|
|
29
|
+
componentSlotVoid(__s, 0, __block.parentNode, Collapsible, {
|
|
30
|
+
"className": "vx-accordion-item",
|
|
31
|
+
"trigger": item.header,
|
|
32
|
+
"disabled": item.disabled,
|
|
33
|
+
"open": openKeys.includes(item.key),
|
|
34
|
+
"onOpenChange": (next) => toggle(item.key, next),
|
|
35
|
+
"children": markChildrenBlock(__children$3, __childrenBody)
|
|
36
|
+
}, __block.endMarker, void 0, void 0, void 0, void 0, "c:670a9e50");
|
|
37
|
+
}
|
|
38
|
+
var _rm$6 = [
|
|
39
|
+
"r",
|
|
40
|
+
"b",
|
|
41
|
+
"a"
|
|
42
|
+
];
|
|
43
|
+
var Accordion = /* @__PURE__ */ __s(function Accordion(props, __s, __extra) {
|
|
44
|
+
const __memoRegion = compilerMemoRegion(__s, _hs$ + 0);
|
|
45
|
+
let __hk = __memoRegion.hooks;
|
|
46
|
+
if (__hk === void 0) __memoRegion.hooks = __hk = hookMemoCreate(1);
|
|
47
|
+
const normalize = __hk[0] ?? hookMemoPublishInvariant(__hk, 0, (v) => v === void 0 ? [] : Array.isArray(v) ? v : [v]);
|
|
48
|
+
const [internal, setInternal] = useState(normalize(props.defaultOpen), _hs$ + 0);
|
|
49
|
+
const controlled = props.open !== void 0;
|
|
50
|
+
const openKeys = controlled ? normalize(props.open) : internal;
|
|
51
|
+
const report = (keys) => {
|
|
52
|
+
if (!controlled) setInternal(keys);
|
|
53
|
+
props.onOpenChange?.(props.multiple ? keys : keys[0]);
|
|
54
|
+
};
|
|
55
|
+
const toggle = (key, next) => {
|
|
56
|
+
if (props.multiple) report(next ? [...openKeys, key] : openKeys.filter((k) => k !== key));
|
|
57
|
+
else report(next ? [key] : []);
|
|
58
|
+
};
|
|
59
|
+
if (__s.block.pending && !__s.block.crossRenderUpdate) return;
|
|
60
|
+
let _b = __s.slots[0];
|
|
61
|
+
if (_b === void 0) {
|
|
62
|
+
let _m0, _m1, _m5;
|
|
63
|
+
const _root = clone(_t$1);
|
|
64
|
+
queueRefAttach(__s, _m1 = (e) => applyEscapeProps(e, props), _m0 = _root);
|
|
65
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
|
|
66
|
+
_m5 = child(_root);
|
|
67
|
+
_b = bag6(__s, _root, _m0, _m1, void 0, void 0, void 0, _m5);
|
|
68
|
+
__s.refFields = _rm$6;
|
|
69
|
+
} else {
|
|
70
|
+
const _r = (e) => applyEscapeProps(e, props);
|
|
71
|
+
if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
|
|
72
|
+
}
|
|
73
|
+
_b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:8b8f9ec4", setPlainAttribute);
|
|
74
|
+
_b.d = updateFreshClassName(["vx-accordion", props.className], _b.d, _b.a);
|
|
75
|
+
{
|
|
76
|
+
const _v = props.style;
|
|
77
|
+
if (_b.e !== _v) {
|
|
78
|
+
setStyle(_b.a, _v, _b.e);
|
|
79
|
+
_b.e = _v;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
forBlock(__s, 1, _b.a, props.items, _key$0, __item$1, 40, [openKeys, toggle], null, _b.f, true, "f3hh4mv");
|
|
83
|
+
});
|
|
84
|
+
//#endregion
|
|
85
|
+
export { Accordion };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { applyWebProps } from "./
|
|
1
|
+
import { applyWebProps } from "./platformProps.web.js";
|
|
2
2
|
import { bag5, clone, ifBlock, queueRefAttach, queueRefDetach, setStyle, template } from "octane";
|
|
3
3
|
import { bindSignalAttribute, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
|
|
4
4
|
//#region src/ActivityIndicator.web.tsrx
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { applyEscapeProps } from "./escape-props.web.js";
|
|
2
|
+
import { Icon } from "./Icon.web.tsrx.js";
|
|
3
|
+
import { __s, bag12, bag3, child, clone, componentSlot, ifBlock, queueRefAttach, queueRefDetach, setStyle, sibling, template } from "octane";
|
|
4
|
+
import { bindSignalAttribute, bindSignalChild, enableSignalBindings, replaceRef, setPlainAttribute, setPlainAttributeIfChanged, updateFreshClassName } from "octane/internal/client";
|
|
5
|
+
//#region src/Alert.web.tsrx
|
|
6
|
+
enableSignalBindings(1, true);
|
|
7
|
+
var _t$0 = /* @__PURE__ */ template("<span class=\"vx-alert-title\"></span>");
|
|
8
|
+
var _t$1 = /* @__PURE__ */ template("<div><!><div class=\"vx-alert-body\"><!><!></div></div>");
|
|
9
|
+
function __then$0(__props, __s, __extra) {
|
|
10
|
+
const __block = __s.block;
|
|
11
|
+
const props = __extra[0];
|
|
12
|
+
componentSlot(__s, 0, __block.parentNode, Icon, {
|
|
13
|
+
"name": props.icon,
|
|
14
|
+
"className": "vx-alert-icon"
|
|
15
|
+
}, __block.endMarker, void 0, 2, void 0, void 0, "c:1ab0feae");
|
|
16
|
+
}
|
|
17
|
+
function __then$3(__props, __s, __extra) {
|
|
18
|
+
const props = __extra[0];
|
|
19
|
+
let _b = __s.slots[0];
|
|
20
|
+
if (_b === void 0) {
|
|
21
|
+
let _m0;
|
|
22
|
+
const _root = clone(_t$0);
|
|
23
|
+
_m0 = _root;
|
|
24
|
+
_b = bag3(__s, _root, _m0, null, void 0);
|
|
25
|
+
}
|
|
26
|
+
_b.d = bindSignalChild(__s, _b.d, 1, _b.a, props.title, "b:0feb376d", null, void 0, void 0, void 0, true);
|
|
27
|
+
}
|
|
28
|
+
var _rm$7 = [
|
|
29
|
+
"r",
|
|
30
|
+
"b",
|
|
31
|
+
"a"
|
|
32
|
+
];
|
|
33
|
+
var Alert = /* @__PURE__ */ __s(function Alert(props, __s, __extra) {
|
|
34
|
+
const tone = props.tone ?? "info";
|
|
35
|
+
let _b = __s.slots[0];
|
|
36
|
+
if (_b === void 0) {
|
|
37
|
+
let _m0, _m1, _m6, _m7, _m8, _m9;
|
|
38
|
+
const _root = clone(_t$1);
|
|
39
|
+
queueRefAttach(__s, _m1 = (e) => applyEscapeProps(e, props), _m0 = _root);
|
|
40
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
|
|
41
|
+
const _el0 = child(_root);
|
|
42
|
+
_m6 = _el0;
|
|
43
|
+
const _el1 = sibling(_el0, 1);
|
|
44
|
+
_m7 = _el1;
|
|
45
|
+
const _el2 = child(_el1);
|
|
46
|
+
_m8 = _el2;
|
|
47
|
+
_m9 = sibling(_el2, 1);
|
|
48
|
+
_b = bag12(__s, _root, _m0, _m1, void 0, void 0, void 0, void 0, _m6, _m7, _m8, _m9, null, void 0);
|
|
49
|
+
__s.refFields = _rm$7;
|
|
50
|
+
} else {
|
|
51
|
+
const _r = (e) => applyEscapeProps(e, props);
|
|
52
|
+
if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
|
|
53
|
+
}
|
|
54
|
+
_b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:8ff61676", setPlainAttribute);
|
|
55
|
+
_b.d = updateFreshClassName([
|
|
56
|
+
"vx-alert",
|
|
57
|
+
"vx-alert--" + tone,
|
|
58
|
+
props.className
|
|
59
|
+
], _b.d, _b.a);
|
|
60
|
+
{
|
|
61
|
+
const _v = props.style;
|
|
62
|
+
if (_b.e !== _v) {
|
|
63
|
+
setStyle(_b.a, _v, _b.e);
|
|
64
|
+
_b.e = _v;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
_b.f = setPlainAttributeIfChanged(tone === "error" ? "alert" : "status", _b.f, _b.a, "role");
|
|
68
|
+
{
|
|
69
|
+
const __ifCondition = props.icon;
|
|
70
|
+
ifBlock(__s, 1, _b.a, __ifCondition, __then$0, null, _b.g, __ifCondition ? [props] : void 0);
|
|
71
|
+
}
|
|
72
|
+
{
|
|
73
|
+
const __ifCondition$ = props.title != null;
|
|
74
|
+
ifBlock(__s, 2, _b.h, __ifCondition$, __then$3, null, _b.i, __ifCondition$ ? [props] : void 0);
|
|
75
|
+
}
|
|
76
|
+
_b.m = bindSignalChild(__s, _b.m, 3, _b.h, props.children, "b:9e8f422d", _b.j, true, void 0, void 0, void 0);
|
|
77
|
+
});
|
|
78
|
+
//#endregion
|
|
79
|
+
export { Alert };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { applyEscapeProps } from "./escape-props.web.js";
|
|
2
|
+
import { __s, bag3, bag7, child, clone, ifBlock, isHydratingStyle, queueRefAttach, queueRefDetach, setAriaAttribute, setStyle, setStyleProperties, setStyleProperty, template } from "octane";
|
|
3
|
+
import { bindSignalAttribute, bindSignalChild, enableSignalBindings, replaceRef, setPlainAttribute, setURLAttribute, updateFreshClassName } from "octane/internal/client";
|
|
4
|
+
//#region src/Avatar.web.tsrx
|
|
5
|
+
enableSignalBindings(1, true);
|
|
6
|
+
var _t$0 = /* @__PURE__ */ template("<img class=\"vx-avatar-img\"/>");
|
|
7
|
+
var _t$1 = /* @__PURE__ */ template("<span class=\"vx-avatar-fallback\"></span>");
|
|
8
|
+
var _t$2 = /* @__PURE__ */ template("<div role=\"img\"><!></div>");
|
|
9
|
+
function __then$0(__props, __s, __extra) {
|
|
10
|
+
const props = __extra[0];
|
|
11
|
+
const size = __extra[1];
|
|
12
|
+
let _b = __s.slots[0];
|
|
13
|
+
if (_b === void 0) {
|
|
14
|
+
let _m1;
|
|
15
|
+
const _root = clone(_t$0);
|
|
16
|
+
_m1 = _root;
|
|
17
|
+
_b = bag7(__s, _root, void 0, _m1, void 0, __s, void 0, void 0, void 0);
|
|
18
|
+
}
|
|
19
|
+
_b.a = bindSignalAttribute(__s, _b.a, _b.b, "src", props.src, "b:cb1013e2", setURLAttribute);
|
|
20
|
+
_b.c = bindSignalAttribute(__s, _b.c, _b.b, "alt", props.alt, "b:007ff231", setPlainAttribute);
|
|
21
|
+
{
|
|
22
|
+
const _v0 = size;
|
|
23
|
+
const _v1 = size;
|
|
24
|
+
const _v2 = size / 2;
|
|
25
|
+
if (_b.d === __s || isHydratingStyle()) {
|
|
26
|
+
setStyleProperties(_b.b, [
|
|
27
|
+
"width",
|
|
28
|
+
_v0,
|
|
29
|
+
"height",
|
|
30
|
+
_v1,
|
|
31
|
+
"borderRadius",
|
|
32
|
+
_v2
|
|
33
|
+
], "");
|
|
34
|
+
_b.d = null;
|
|
35
|
+
_b.e = _v0;
|
|
36
|
+
_b.f = _v1;
|
|
37
|
+
_b.g = _v2;
|
|
38
|
+
} else {
|
|
39
|
+
if (_b.e !== _v0) {
|
|
40
|
+
setStyleProperty(_b.b, "width", _v0, "", _b.e);
|
|
41
|
+
_b.e = _v0;
|
|
42
|
+
}
|
|
43
|
+
if (_b.f !== _v1) {
|
|
44
|
+
setStyleProperty(_b.b, "height", _v1, "", _b.f);
|
|
45
|
+
_b.f = _v1;
|
|
46
|
+
}
|
|
47
|
+
if (_b.g !== _v2) {
|
|
48
|
+
setStyleProperty(_b.b, "borderRadius", _v2, "", _b.g);
|
|
49
|
+
_b.g = _v2;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function __else$1(__props, __s, __extra) {
|
|
55
|
+
const props = __extra[0];
|
|
56
|
+
let _b = __s.slots[0];
|
|
57
|
+
if (_b === void 0) {
|
|
58
|
+
let _m0;
|
|
59
|
+
const _root = clone(_t$1);
|
|
60
|
+
_m0 = _root;
|
|
61
|
+
_b = bag3(__s, _root, _m0, null, void 0);
|
|
62
|
+
}
|
|
63
|
+
_b.d = bindSignalChild(__s, _b.d, 1, _b.a, props.fallback ?? "", "b:771d29cc", null, void 0, void 0, void 0, true);
|
|
64
|
+
}
|
|
65
|
+
var _rm$4 = [
|
|
66
|
+
"r",
|
|
67
|
+
"b",
|
|
68
|
+
"a"
|
|
69
|
+
];
|
|
70
|
+
var Avatar = /* @__PURE__ */ __s(function Avatar(props, __s, __extra) {
|
|
71
|
+
const size = props.size ?? 32;
|
|
72
|
+
const box = {
|
|
73
|
+
width: size,
|
|
74
|
+
height: size,
|
|
75
|
+
borderRadius: size / 2
|
|
76
|
+
};
|
|
77
|
+
let _b = __s.slots[0];
|
|
78
|
+
if (_b === void 0) {
|
|
79
|
+
let _m0, _m1, _m6;
|
|
80
|
+
const _root = clone(_t$2);
|
|
81
|
+
queueRefAttach(__s, _m1 = (e) => applyEscapeProps(e, props), _m0 = _root);
|
|
82
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
|
|
83
|
+
_m6 = child(_root);
|
|
84
|
+
_b = bag7(__s, _root, _m0, _m1, void 0, void 0, void 0, void 0, _m6);
|
|
85
|
+
__s.refFields = _rm$4;
|
|
86
|
+
} else {
|
|
87
|
+
const _r = (e) => applyEscapeProps(e, props);
|
|
88
|
+
if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
|
|
89
|
+
}
|
|
90
|
+
_b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:f8d199ae", setPlainAttribute);
|
|
91
|
+
_b.d = updateFreshClassName(["vx-avatar", props.className], _b.d, _b.a);
|
|
92
|
+
{
|
|
93
|
+
const _v = {
|
|
94
|
+
...props.style,
|
|
95
|
+
...box
|
|
96
|
+
};
|
|
97
|
+
if (_b.e !== _v) {
|
|
98
|
+
setStyle(_b.a, _v, _b.e);
|
|
99
|
+
_b.e = _v;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
_b.f = bindSignalAttribute(__s, _b.f, _b.a, "aria-label", props.alt, "b:a8db4498", setAriaAttribute);
|
|
103
|
+
ifBlock(__s, 1, _b.a, props.src, __then$0, __else$1, _b.g, [props, size]);
|
|
104
|
+
});
|
|
105
|
+
//#endregion
|
|
106
|
+
export { Avatar };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { applyEscapeProps } from "./escape-props.web.js";
|
|
2
|
+
import { Avatar } from "./Avatar.web.tsrx.js";
|
|
3
|
+
import { toChildArray } from "./child-array.js";
|
|
4
|
+
import { __s, bag2, bag4, bag7, child, clone, componentSlotVoid, createScopedElement, ifBlock, mapSlot, queueRefAttach, queueRefDetach, setStyle, sibling, template } from "octane";
|
|
5
|
+
import { bindSignalAttribute, bindSignalChild, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
|
|
6
|
+
//#region src/AvatarGroup.web.tsrx
|
|
7
|
+
enableSignalBindings(1, true);
|
|
8
|
+
var _t$0 = /* @__PURE__ */ template("<div class=\"vx-avatar-group-item\"></div>");
|
|
9
|
+
var _t$1 = /* @__PURE__ */ template("<div><!><!></div>");
|
|
10
|
+
var _key$0 = (child, i) => i;
|
|
11
|
+
function __item$1(child, __s, __extra) {
|
|
12
|
+
const __block = __s.block;
|
|
13
|
+
const itemStyle = __extra[0];
|
|
14
|
+
const i = __block.itemIndex;
|
|
15
|
+
let _b = __s.slots[0];
|
|
16
|
+
if (_b === void 0) {
|
|
17
|
+
let _m1;
|
|
18
|
+
const _root = clone(_t$0);
|
|
19
|
+
_m1 = _root;
|
|
20
|
+
_b = bag4(__s, _root, void 0, _m1, null, void 0);
|
|
21
|
+
}
|
|
22
|
+
{
|
|
23
|
+
const _v = itemStyle(i);
|
|
24
|
+
if (_b.a !== _v) {
|
|
25
|
+
setStyle(_b.b, _v, _b.a);
|
|
26
|
+
_b.a = _v;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
_b.e = bindSignalChild(__s, _b.e, 1, _b.b, child, "b:b3f01a1e", null, void 0, void 0, void 0, true);
|
|
30
|
+
}
|
|
31
|
+
function __then$4(__props, __s, __extra) {
|
|
32
|
+
const itemStyle = __extra[0];
|
|
33
|
+
const overflow = __extra[1];
|
|
34
|
+
const shown = __extra[2];
|
|
35
|
+
const size = __extra[3];
|
|
36
|
+
let _b = __s.slots[0];
|
|
37
|
+
if (_b === void 0) {
|
|
38
|
+
let _m1;
|
|
39
|
+
const _root = clone(_t$0);
|
|
40
|
+
_m1 = _root;
|
|
41
|
+
_b = bag2(__s, _root, void 0, _m1);
|
|
42
|
+
}
|
|
43
|
+
{
|
|
44
|
+
const _v = itemStyle(shown.length);
|
|
45
|
+
if (_b.a !== _v) {
|
|
46
|
+
setStyle(_b.b, _v, _b.a);
|
|
47
|
+
_b.a = _v;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
componentSlotVoid(__s, 1, _b.b, Avatar, {
|
|
51
|
+
"fallback": `+${overflow}`,
|
|
52
|
+
"size": size
|
|
53
|
+
}, void 0, void 0, 2, void 0, void 0, "c:c138eac7");
|
|
54
|
+
}
|
|
55
|
+
var _rm$7 = [
|
|
56
|
+
"r",
|
|
57
|
+
"b",
|
|
58
|
+
"a"
|
|
59
|
+
];
|
|
60
|
+
var AvatarGroup = /* @__PURE__ */ __s(function AvatarGroup(props, __s, __extra) {
|
|
61
|
+
let __mapMethod;
|
|
62
|
+
const size = props.size ?? 32;
|
|
63
|
+
const children = toChildArray(props.children);
|
|
64
|
+
const shown = props.max != null ? children.slice(0, props.max) : children;
|
|
65
|
+
const overflow = children.length - shown.length;
|
|
66
|
+
const itemStyle = (i) => i === 0 ? void 0 : { marginLeft: -size / 3 };
|
|
67
|
+
if (__s.block.pending && !__s.block.crossRenderUpdate) return;
|
|
68
|
+
let _b = __s.slots[0];
|
|
69
|
+
if (_b === void 0) {
|
|
70
|
+
let _m0, _m1, _m5, _m6;
|
|
71
|
+
const _root = clone(_t$1);
|
|
72
|
+
queueRefAttach(__s, _m1 = (e) => applyEscapeProps(e, props), _m0 = _root);
|
|
73
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
|
|
74
|
+
const _el0 = child(_root);
|
|
75
|
+
_m5 = _el0;
|
|
76
|
+
_m6 = sibling(_el0, 1);
|
|
77
|
+
_b = bag7(__s, _root, _m0, _m1, void 0, void 0, void 0, _m5, _m6);
|
|
78
|
+
__s.refFields = _rm$7;
|
|
79
|
+
} else {
|
|
80
|
+
const _r = (e) => applyEscapeProps(e, props);
|
|
81
|
+
if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
|
|
82
|
+
}
|
|
83
|
+
_b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:a447c372", setPlainAttribute);
|
|
84
|
+
_b.d = updateFreshClassName(["vx-avatar-group", props.className], _b.d, _b.a);
|
|
85
|
+
{
|
|
86
|
+
const _v = props.style;
|
|
87
|
+
if (_b.e !== _v) {
|
|
88
|
+
setStyle(_b.a, _v, _b.e);
|
|
89
|
+
_b.e = _v;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
mapSlot(__s, 1, _b.a, (__mapMethod = shown.map, shown), __mapMethod, (child, i) => createScopedElement("div", {
|
|
93
|
+
key: i,
|
|
94
|
+
className: "vx-avatar-group-item",
|
|
95
|
+
style: itemStyle(i)
|
|
96
|
+
}, () => child), _key$0, __item$1, 18, [itemStyle], _b.f, 1);
|
|
97
|
+
{
|
|
98
|
+
const __ifCondition = overflow > 0;
|
|
99
|
+
ifBlock(__s, 2, _b.a, __ifCondition, __then$4, null, _b.g, __ifCondition ? [
|
|
100
|
+
itemStyle,
|
|
101
|
+
overflow,
|
|
102
|
+
shown,
|
|
103
|
+
size
|
|
104
|
+
] : void 0);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
//#endregion
|
|
108
|
+
export { AvatarGroup };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { applyEscapeProps } from "./escape-props.web.js";
|
|
2
|
+
import { __s, bag7, clone, queueRefAttach, queueRefDetach, setStyle, template } from "octane";
|
|
3
|
+
import { bindSignalAttribute, bindSignalChild, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
|
|
4
|
+
//#region src/Badge.web.tsrx
|
|
5
|
+
enableSignalBindings(1, true);
|
|
6
|
+
var _t$0 = /* @__PURE__ */ template("<span></span>");
|
|
7
|
+
var _rm$1 = [
|
|
8
|
+
"r",
|
|
9
|
+
"b",
|
|
10
|
+
"a"
|
|
11
|
+
];
|
|
12
|
+
var Badge = /* @__PURE__ */ __s(function Badge(props, __s, __extra) {
|
|
13
|
+
let _b = __s.slots[0];
|
|
14
|
+
if (_b === void 0) {
|
|
15
|
+
let _m0, _m1;
|
|
16
|
+
const _root = clone(_t$0);
|
|
17
|
+
queueRefAttach(__s, _m1 = (e) => applyEscapeProps(e, props), _m0 = _root);
|
|
18
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
|
|
19
|
+
_b = bag7(__s, _root, _m0, _m1, void 0, void 0, void 0, null, void 0);
|
|
20
|
+
__s.refFields = _rm$1;
|
|
21
|
+
} else {
|
|
22
|
+
const _r = (e) => applyEscapeProps(e, props);
|
|
23
|
+
if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
|
|
24
|
+
}
|
|
25
|
+
_b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:3c31c1e6", setPlainAttribute);
|
|
26
|
+
_b.d = updateFreshClassName(["vx-badge", props.className], _b.d, _b.a);
|
|
27
|
+
{
|
|
28
|
+
const _v = props.style;
|
|
29
|
+
if (_b.e !== _v) {
|
|
30
|
+
setStyle(_b.a, _v, _b.e);
|
|
31
|
+
_b.e = _v;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
_b.h = bindSignalChild(__s, _b.h, 1, _b.a, props.children, "b:a28cb297", null, void 0, void 0, void 0, true);
|
|
35
|
+
});
|
|
36
|
+
//#endregion
|
|
37
|
+
export { Badge };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { applyEscapeProps } from "./escape-props.web.js";
|
|
2
|
+
import { Icon } from "./Icon.web.tsrx.js";
|
|
3
|
+
import { __s, bag1, bag10, child, clone, componentSlot, delegateEvents, ifBlock, queueRefAttach, queueRefDetach, setEventHandler, setStyle, sibling, template } from "octane";
|
|
4
|
+
import { bindSignalAttribute, bindSignalChild, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
|
|
5
|
+
//#region src/Banner.web.tsrx
|
|
6
|
+
enableSignalBindings(1, true);
|
|
7
|
+
delegateEvents(["click", "keydown"]);
|
|
8
|
+
var _t$0 = /* @__PURE__ */ template("<span class=\"vx-banner-dismiss\" role=\"button\" aria-label=\"Dismiss\" tabindex=\"0\">✕</span>");
|
|
9
|
+
var _t$1 = /* @__PURE__ */ template("<div role=\"status\"><!><div class=\"vx-banner-body\"></div><!></div>");
|
|
10
|
+
function __then$0(__props, __s, __extra) {
|
|
11
|
+
const __block = __s.block;
|
|
12
|
+
const props = __extra[0];
|
|
13
|
+
componentSlot(__s, 0, __block.parentNode, Icon, {
|
|
14
|
+
"name": props.icon,
|
|
15
|
+
"className": "vx-banner-icon"
|
|
16
|
+
}, __block.endMarker, void 0, 2, void 0, void 0, "c:e8039dcc");
|
|
17
|
+
}
|
|
18
|
+
function __then$4(__props, __s, __extra) {
|
|
19
|
+
const props = __extra[0];
|
|
20
|
+
let _b = __s.slots[0];
|
|
21
|
+
if (_b === void 0) {
|
|
22
|
+
let _m0;
|
|
23
|
+
const _root = clone(_t$0);
|
|
24
|
+
_m0 = _root;
|
|
25
|
+
setEventHandler(_root, "$$click", props.onDismiss);
|
|
26
|
+
setEventHandler(_root, "$$keydown", (e) => {
|
|
27
|
+
if (e.key === "Enter") props.onDismiss?.();
|
|
28
|
+
});
|
|
29
|
+
_b = bag1(__s, _root, _m0);
|
|
30
|
+
} else {
|
|
31
|
+
setEventHandler(_b.a, "$$click", props.onDismiss);
|
|
32
|
+
setEventHandler(_b.a, "$$keydown", (e) => {
|
|
33
|
+
if (e.key === "Enter") props.onDismiss?.();
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
var _rm$6 = [
|
|
38
|
+
"r",
|
|
39
|
+
"b",
|
|
40
|
+
"a"
|
|
41
|
+
];
|
|
42
|
+
var Banner = /* @__PURE__ */ __s(function Banner(props, __s, __extra) {
|
|
43
|
+
let _b = __s.slots[0];
|
|
44
|
+
if (_b === void 0) {
|
|
45
|
+
let _m0, _m1, _m5, _m6, _m7;
|
|
46
|
+
const _root = clone(_t$1);
|
|
47
|
+
queueRefAttach(__s, _m1 = (e) => applyEscapeProps(e, props), _m0 = _root);
|
|
48
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
|
|
49
|
+
const _el0 = child(_root);
|
|
50
|
+
_m5 = _el0;
|
|
51
|
+
_m6 = sibling(_el0, 2);
|
|
52
|
+
_m7 = sibling(_el0, 1);
|
|
53
|
+
_b = bag10(__s, _root, _m0, _m1, void 0, void 0, void 0, _m5, _m6, _m7, null, void 0);
|
|
54
|
+
__s.refFields = _rm$6;
|
|
55
|
+
} else {
|
|
56
|
+
const _r = (e) => applyEscapeProps(e, props);
|
|
57
|
+
if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
|
|
58
|
+
}
|
|
59
|
+
_b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:42d357ae", setPlainAttribute);
|
|
60
|
+
_b.d = updateFreshClassName(["vx-banner", props.className], _b.d, _b.a);
|
|
61
|
+
{
|
|
62
|
+
const _v = props.style;
|
|
63
|
+
if (_b.e !== _v) {
|
|
64
|
+
setStyle(_b.a, _v, _b.e);
|
|
65
|
+
_b.e = _v;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
{
|
|
69
|
+
const __ifCondition = props.icon;
|
|
70
|
+
ifBlock(__s, 1, _b.a, __ifCondition, __then$0, null, _b.f, __ifCondition ? [props] : void 0);
|
|
71
|
+
}
|
|
72
|
+
_b.k = bindSignalChild(__s, _b.k, 2, _b.h, props.children, "b:a4c4877a", null, void 0, void 0, void 0, true);
|
|
73
|
+
{
|
|
74
|
+
const __ifCondition$ = props.onDismiss;
|
|
75
|
+
ifBlock(__s, 3, _b.a, __ifCondition$, __then$4, null, _b.g, __ifCondition$ ? [props] : void 0);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
//#endregion
|
|
79
|
+
export { Banner };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { applyEscapeProps } from "./escape-props.web.js";
|
|
2
|
+
import { __s, bag3, bag4, bag7, child, clone, createScopedElement, createScopedValue, delegateEvents, ifBlock, mapSlot, positionalChildren, queueRefAttach, queueRefDetach, setAriaAttribute, setEventHandler, setStyle, sibling, template } from "octane";
|
|
3
|
+
import { bindSignalAttribute, bindSignalChild, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
|
|
4
|
+
//#region src/Breadcrumb.web.tsrx
|
|
5
|
+
enableSignalBindings(1, true);
|
|
6
|
+
delegateEvents(["click", "keydown"]);
|
|
7
|
+
var _t$0 = /* @__PURE__ */ template("<span class=\"vx-breadcrumb-sep\" aria-hidden=\"true\"></span>");
|
|
8
|
+
var _t$1 = /* @__PURE__ */ template("<span class=\"vx-breadcrumb-link\" role=\"link\" tabindex=\"0\"></span>");
|
|
9
|
+
var _t$2 = /* @__PURE__ */ template("<span class=\"vx-breadcrumb-text\"></span>");
|
|
10
|
+
var _t$3 = /* @__PURE__ */ template("<span class=\"vx-breadcrumb-item\"><!><!></span>");
|
|
11
|
+
var _t$4 = /* @__PURE__ */ template("<nav><!></nav>");
|
|
12
|
+
var _key$0 = (item, i) => i;
|
|
13
|
+
function __then$2(__props, __s, __extra) {
|
|
14
|
+
const sep = __extra[0];
|
|
15
|
+
let _b = __s.slots[0];
|
|
16
|
+
if (_b === void 0) {
|
|
17
|
+
let _m0;
|
|
18
|
+
const _root = clone(_t$0);
|
|
19
|
+
_m0 = _root;
|
|
20
|
+
_b = bag3(__s, _root, _m0, null, void 0);
|
|
21
|
+
}
|
|
22
|
+
_b.d = bindSignalChild(__s, _b.d, 1, _b.a, sep, "b:c735e571", null, void 0, void 0, void 0, true);
|
|
23
|
+
}
|
|
24
|
+
function __then$5(__props, __s, __extra) {
|
|
25
|
+
const item = __extra[1];
|
|
26
|
+
let _b = __s.slots[0];
|
|
27
|
+
if (_b === void 0) {
|
|
28
|
+
let _m0;
|
|
29
|
+
const _root = clone(_t$1);
|
|
30
|
+
_m0 = _root;
|
|
31
|
+
setEventHandler(_root, "$$click", item.onSelect);
|
|
32
|
+
setEventHandler(_root, "$$keydown", (e) => {
|
|
33
|
+
if (e.key === "Enter") item.onSelect?.();
|
|
34
|
+
});
|
|
35
|
+
_b = bag3(__s, _root, _m0, null, void 0);
|
|
36
|
+
} else {
|
|
37
|
+
setEventHandler(_b.a, "$$click", item.onSelect);
|
|
38
|
+
setEventHandler(_b.a, "$$keydown", (e) => {
|
|
39
|
+
if (e.key === "Enter") item.onSelect?.();
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
_b.d = bindSignalChild(__s, _b.d, 1, _b.a, item.label, "b:4751ae62", null, void 0, void 0, void 0, true);
|
|
43
|
+
}
|
|
44
|
+
function __else$7(__props, __s, __extra) {
|
|
45
|
+
const i = __extra[0];
|
|
46
|
+
const item = __extra[1];
|
|
47
|
+
const props = __extra[2];
|
|
48
|
+
let _b = __s.slots[0];
|
|
49
|
+
if (_b === void 0) {
|
|
50
|
+
let _m1;
|
|
51
|
+
const _root = clone(_t$2);
|
|
52
|
+
_m1 = _root;
|
|
53
|
+
_b = bag4(__s, _root, void 0, _m1, null, void 0);
|
|
54
|
+
}
|
|
55
|
+
_b.a = bindSignalAttribute(__s, _b.a, _b.b, "aria-current", i === props.items.length - 1 ? "page" : void 0, "b:670ea810", setAriaAttribute);
|
|
56
|
+
_b.e = bindSignalChild(__s, _b.e, 1, _b.b, item.label, "b:519128f8", null, void 0, void 0, void 0, true);
|
|
57
|
+
}
|
|
58
|
+
function __item$1(item, __s, __extra) {
|
|
59
|
+
const __block = __s.block;
|
|
60
|
+
const sep = __extra[0];
|
|
61
|
+
const props = __extra[1];
|
|
62
|
+
const i = __block.itemIndex;
|
|
63
|
+
let _b = __s.slots[0];
|
|
64
|
+
if (_b === void 0) {
|
|
65
|
+
let _m0, _m1, _m2;
|
|
66
|
+
const _root = clone(_t$3);
|
|
67
|
+
_m0 = _root;
|
|
68
|
+
const _el0 = child(_root);
|
|
69
|
+
_m1 = _el0;
|
|
70
|
+
_m2 = sibling(_el0, 1);
|
|
71
|
+
_b = bag3(__s, _root, _m0, _m1, _m2);
|
|
72
|
+
}
|
|
73
|
+
{
|
|
74
|
+
const __ifCondition = i > 0;
|
|
75
|
+
ifBlock(__s, 1, _b.a, __ifCondition, __then$2, null, _b.b, __ifCondition ? [sep] : void 0);
|
|
76
|
+
}
|
|
77
|
+
ifBlock(__s, 2, _b.a, item.onSelect, __then$5, __else$7, _b.c, [
|
|
78
|
+
i,
|
|
79
|
+
item,
|
|
80
|
+
props
|
|
81
|
+
]);
|
|
82
|
+
}
|
|
83
|
+
var _rm$11 = [
|
|
84
|
+
"r",
|
|
85
|
+
"b",
|
|
86
|
+
"a"
|
|
87
|
+
];
|
|
88
|
+
var Breadcrumb = /* @__PURE__ */ __s(function Breadcrumb(props, __s, __extra) {
|
|
89
|
+
let __mapItems;
|
|
90
|
+
let __mapMethod;
|
|
91
|
+
const sep = props.separator ?? "/";
|
|
92
|
+
let _b = __s.slots[0];
|
|
93
|
+
if (_b === void 0) {
|
|
94
|
+
let _m0, _m1, _m6;
|
|
95
|
+
const _root = clone(_t$4);
|
|
96
|
+
queueRefAttach(__s, _m1 = (e) => applyEscapeProps(e, props), _m0 = _root);
|
|
97
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
|
|
98
|
+
_m6 = child(_root);
|
|
99
|
+
_b = bag7(__s, _root, _m0, _m1, void 0, void 0, void 0, void 0, _m6);
|
|
100
|
+
__s.refFields = _rm$11;
|
|
101
|
+
} else {
|
|
102
|
+
const _r = (e) => applyEscapeProps(e, props);
|
|
103
|
+
if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
|
|
104
|
+
}
|
|
105
|
+
_b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:61d89341", setPlainAttribute);
|
|
106
|
+
_b.d = updateFreshClassName(["vx-breadcrumb", props.className], _b.d, _b.a);
|
|
107
|
+
{
|
|
108
|
+
const _v = props.style;
|
|
109
|
+
if (_b.e !== _v) {
|
|
110
|
+
setStyle(_b.a, _v, _b.e);
|
|
111
|
+
_b.e = _v;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
_b.f = bindSignalAttribute(__s, _b.f, _b.a, "aria-label", props.accessibilityLabel ?? "Breadcrumb", "b:f89f1a9e", setAriaAttribute);
|
|
115
|
+
mapSlot(__s, 1, _b.a, (__mapItems = props.items, __mapMethod = __mapItems.map, __mapItems), __mapMethod, (item, i) => createScopedElement("span", {
|
|
116
|
+
key: i,
|
|
117
|
+
className: "vx-breadcrumb-item"
|
|
118
|
+
}, () => positionalChildren([i > 0 ? createScopedElement("span", {
|
|
119
|
+
className: "vx-breadcrumb-sep",
|
|
120
|
+
"aria-hidden": "true"
|
|
121
|
+
}, () => sep) : null, item.onSelect ? createScopedValue(() => createScopedElement("span", {
|
|
122
|
+
className: "vx-breadcrumb-link",
|
|
123
|
+
role: "link",
|
|
124
|
+
tabIndex: 0,
|
|
125
|
+
onClick: item.onSelect,
|
|
126
|
+
onKeyDown: (e) => {
|
|
127
|
+
if (e.key === "Enter") item.onSelect?.();
|
|
128
|
+
}
|
|
129
|
+
}, () => item.label)) : createScopedValue(() => createScopedElement("span", {
|
|
130
|
+
className: "vx-breadcrumb-text",
|
|
131
|
+
"aria-current": i === props.items.length - 1 ? "page" : void 0
|
|
132
|
+
}, () => item.label))])), _key$0, __item$1, 18, [sep, props], _b.g, 1);
|
|
133
|
+
});
|
|
134
|
+
//#endregion
|
|
135
|
+
export { Breadcrumb };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Pressable } from "./Pressable.web.tsrx.js";
|
|
2
|
+
import { ActivityIndicator } from "./ActivityIndicator.web.tsrx.js";
|
|
3
|
+
import { Fragment, bag4, child, clone, componentSlotVoid, createScopedElement, drainFrag, markChildrenBlock, positionalChildren, template } from "octane";
|
|
4
|
+
import { createElementFromConfig, textHoleUpdate } from "octane/internal/client";
|
|
5
|
+
//#region src/Button.web.tsrx
|
|
6
|
+
var _t$0 = /* @__PURE__ */ template("<!>", 0, 1);
|
|
7
|
+
var __childrenBody = {};
|
|
8
|
+
var Button = function Button(props, __s, __extra) {
|
|
9
|
+
const __block = __s.block;
|
|
10
|
+
const disabled = props.disabled || props.loading;
|
|
11
|
+
function __children$1(__props, __s, __extra) {
|
|
12
|
+
const __block = __s.block;
|
|
13
|
+
let _b = __s.slots[0];
|
|
14
|
+
if (_b === void 0) {
|
|
15
|
+
let _m0, _m1;
|
|
16
|
+
const _root = clone(_t$0);
|
|
17
|
+
_m0 = __block.parentNode;
|
|
18
|
+
_m1 = child(_root);
|
|
19
|
+
drainFrag(_root, __block.parentNode, __block.endMarker);
|
|
20
|
+
_b = bag4(__s, null, _m0, _m1, null, void 0);
|
|
21
|
+
}
|
|
22
|
+
{
|
|
23
|
+
const _v = props.loading ? createElementFromConfig("c:b2cf3c5f", ActivityIndicator, {}) : createScopedElement(Fragment, {}, () => positionalChildren([
|
|
24
|
+
props.leading,
|
|
25
|
+
props.children,
|
|
26
|
+
props.trailing
|
|
27
|
+
]));
|
|
28
|
+
_b.c = textHoleUpdate(__s, 1, _b.a, _v, _b.c, _b.d, _b.b, true, true);
|
|
29
|
+
_b.d = _v;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
componentSlotVoid(__s, 0, __block.parentNode, Pressable, {
|
|
33
|
+
...props,
|
|
34
|
+
"disabled": disabled,
|
|
35
|
+
"className": [
|
|
36
|
+
"vx-button",
|
|
37
|
+
props.loading ? "vx-button--loading" : void 0,
|
|
38
|
+
props.className
|
|
39
|
+
],
|
|
40
|
+
"accessibilityRole": props.accessibilityRole ?? "button",
|
|
41
|
+
"children": markChildrenBlock(__children$1, __childrenBody)
|
|
42
|
+
}, __block.endMarker, void 0, void 0, true, void 0, "c:ed4bf1f1");
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { Button };
|