@octane-xplat/ui 0.2.1 → 0.3.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/dist/native/octane-client-build.json +1 -1
- package/dist/native/ui.js +40 -19
- package/dist/native/ui10.js +19 -48
- package/dist/native/ui11.js +118 -56
- package/dist/native/ui12.js +114 -16
- package/dist/native/ui13.js +54 -18
- package/dist/native/ui14.js +76 -13
- package/dist/native/ui15.js +128 -18
- package/dist/native/ui16.js +48 -136
- package/dist/native/ui17.js +42 -19
- package/dist/native/ui18.js +50 -9
- package/dist/native/ui19.js +34 -12
- package/dist/native/ui2.js +10 -48
- package/dist/native/ui20.js +17 -0
- package/dist/native/ui21.js +93 -0
- package/dist/native/ui22.js +124 -0
- package/dist/native/ui23.js +103 -0
- package/dist/native/ui24.js +58 -0
- package/dist/native/ui25.js +19 -0
- package/dist/native/ui26.js +27 -0
- package/dist/native/ui27.js +35 -0
- package/dist/native/ui28.js +146 -0
- package/dist/native/ui29.js +28 -0
- package/dist/native/ui3.js +17 -20
- package/dist/native/ui30.js +35 -0
- package/dist/native/ui31.js +39 -0
- package/dist/native/ui32.js +70 -0
- package/dist/native/ui33.js +30 -0
- package/dist/native/ui34.js +10 -0
- package/dist/native/ui35.js +27 -0
- package/dist/native/ui36.js +34 -0
- package/dist/native/ui37.js +17 -0
- package/dist/native/ui38.js +68 -0
- package/dist/native/ui39.js +33 -0
- package/dist/native/ui4.js +21 -48
- package/dist/native/ui40.js +14 -0
- package/dist/native/ui41.js +104 -0
- package/dist/native/ui42.js +148 -0
- package/dist/native/ui43.js +22 -0
- package/dist/native/ui44.js +8 -0
- package/dist/native/ui5.js +70 -27
- package/dist/native/ui6.js +36 -20
- package/dist/native/ui7.js +24 -61
- package/dist/native/ui8.js +16 -18
- package/dist/native/ui9.js +16 -13
- package/dist/web/octane-client-build.json +1 -1
- package/dist/web/ui.js +40 -19
- package/dist/web/ui10.js +187 -31
- package/dist/web/ui11.js +419 -53
- package/dist/web/ui12.js +83 -15
- package/dist/web/ui13.js +107 -19
- package/dist/web/ui14.js +98 -18
- package/dist/web/ui15.js +83 -47
- package/dist/web/ui16.js +100 -93
- package/dist/web/ui17.js +36 -22
- package/dist/web/ui18.js +29 -15
- package/dist/web/ui19.js +9 -7
- package/dist/web/ui2.js +15 -103
- package/dist/web/ui20.js +114 -0
- package/dist/web/ui21.js +82 -0
- package/dist/web/ui22.js +68 -0
- package/dist/web/ui23.js +57 -0
- package/dist/web/ui24.js +16 -0
- package/dist/web/ui25.js +22 -0
- package/dist/web/ui26.js +39 -0
- package/dist/web/ui27.js +127 -0
- package/dist/web/ui28.js +112 -0
- package/dist/web/ui29.js +108 -0
- package/dist/web/ui3.js +19 -27
- package/dist/web/ui30.js +43 -0
- package/dist/web/ui31.js +42 -0
- package/dist/web/ui32.js +77 -0
- package/dist/web/ui33.js +43 -0
- package/dist/web/ui34.js +67 -0
- package/dist/web/ui35.js +9 -0
- package/dist/web/ui36.js +45 -0
- package/dist/web/ui37.js +47 -0
- package/dist/web/ui38.js +17 -0
- package/dist/web/ui39.js +100 -0
- package/dist/web/ui4.js +145 -17
- package/dist/web/ui40.js +41 -0
- package/dist/web/ui41.js +17 -0
- package/dist/web/ui42.js +9 -0
- package/dist/web/ui43.js +22 -0
- package/dist/web/ui44.js +8 -0
- package/dist/web/ui5.js +54 -52
- package/dist/web/ui6.js +43 -16
- package/dist/web/ui7.js +29 -46
- package/dist/web/ui8.js +29 -18
- package/dist/web/ui9.js +24 -16
- package/package.json +6 -3
- package/src/theme/tokens.css +166 -0
- package/types/index.d.ts +108 -1
- package/types/props.d.ts +333 -8
package/dist/web/ui12.js
CHANGED
|
@@ -1,16 +1,84 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { applyEscapeProps } from "./ui2.js";
|
|
2
|
+
import { __s, bag11, clone, delegateEvents, queueRefAttach, queueRefDetach, setEventHandler, setStyle, template } from "octane";
|
|
3
|
+
import { bindSignalAttribute, bindSignalValue, enableSignalBindings, replaceRef, setBooleanAttributeIfChanged } from "octane/internal/client";
|
|
4
|
+
//#region src/TextInput.web.tsrx
|
|
5
|
+
enableSignalBindings(1, true);
|
|
6
|
+
delegateEvents([
|
|
7
|
+
"focusin",
|
|
8
|
+
"focusout",
|
|
9
|
+
"input",
|
|
10
|
+
"keydown"
|
|
11
|
+
]);
|
|
12
|
+
var _t$0 = /* @__PURE__ */ template("<input data-octane-input=\"i:82d59fa0\"/>");
|
|
13
|
+
var _rm$0 = [
|
|
14
|
+
"r",
|
|
15
|
+
"b",
|
|
16
|
+
"a"
|
|
17
|
+
];
|
|
18
|
+
var TextInput = /* @__PURE__ */ __s(function TextInput(props, __s, __extra) {
|
|
19
|
+
const keyboardType = props.keyboardType === "phone" ? "tel" : props.keyboardType === "default" ? "text" : props.keyboardType;
|
|
20
|
+
const inputMode = props.keyboardType === "number" ? "numeric" : props.keyboardType === "phone" ? "tel" : props.keyboardType === "default" ? "text" : props.keyboardType;
|
|
21
|
+
let _b = __s.slots[0];
|
|
22
|
+
if (_b === void 0) {
|
|
23
|
+
let _m0, _m1, _m5;
|
|
24
|
+
const _root = clone(_t$0);
|
|
25
|
+
queueRefAttach(__s, _m1 = (el) => {
|
|
26
|
+
if (!el) return;
|
|
27
|
+
applyEscapeProps(el, props);
|
|
28
|
+
props.bind?.({
|
|
29
|
+
focus: () => el.focus(),
|
|
30
|
+
blur: () => el.blur(),
|
|
31
|
+
native: el
|
|
32
|
+
});
|
|
33
|
+
}, _m0 = _root);
|
|
34
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
|
|
35
|
+
_m5 = bindSignalValue(__s, void 0, _root, props.value, "i:82d59fa0");
|
|
36
|
+
setEventHandler(_root, "$$input", (e) => props.onChange?.(e.target.value));
|
|
37
|
+
setEventHandler(_root, "$$keydown", (e) => {
|
|
38
|
+
if (e.key === "Enter" && !e.shiftKey) props.onSubmit?.();
|
|
39
|
+
});
|
|
40
|
+
setEventHandler(_root, "$$focusin", props.onFocus);
|
|
41
|
+
setEventHandler(_root, "$$focusout", props.onBlur);
|
|
42
|
+
_b = bag11(__s, _root, _m0, _m1, void 0, void 0, void 0, _m5, void 0, void 0, void 0, void 0, void 0);
|
|
43
|
+
__s.refFields = _rm$0;
|
|
44
|
+
} else {
|
|
45
|
+
{
|
|
46
|
+
const _r = (el) => {
|
|
47
|
+
if (!el) return;
|
|
48
|
+
applyEscapeProps(el, props);
|
|
49
|
+
props.bind?.({
|
|
50
|
+
focus: () => el.focus(),
|
|
51
|
+
blur: () => el.blur(),
|
|
52
|
+
native: el
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
|
|
56
|
+
}
|
|
57
|
+
_b.f = bindSignalValue(__s, _b.f, _b.a, props.value, "i:82d59fa0");
|
|
58
|
+
setEventHandler(_b.a, "$$input", (e) => props.onChange?.(e.target.value));
|
|
59
|
+
setEventHandler(_b.a, "$$keydown", (e) => {
|
|
60
|
+
if (e.key === "Enter" && !e.shiftKey) props.onSubmit?.();
|
|
61
|
+
});
|
|
62
|
+
setEventHandler(_b.a, "$$focusin", props.onFocus);
|
|
63
|
+
setEventHandler(_b.a, "$$focusout", props.onBlur);
|
|
64
|
+
}
|
|
65
|
+
_b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:06cf141a", "attr");
|
|
66
|
+
_b.d = bindSignalAttribute(__s, _b.d, _b.a, "class", props.className, "b:7bbaa2d6", "class");
|
|
67
|
+
{
|
|
68
|
+
const _v = {
|
|
69
|
+
...props.style,
|
|
70
|
+
...props.placeholderTextColor ? { "--placeholder-color": props.placeholderTextColor } : {}
|
|
71
|
+
};
|
|
72
|
+
if (_b.e !== _v) {
|
|
73
|
+
setStyle(_b.a, _v, _b.e);
|
|
74
|
+
_b.e = _v;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
_b.g = bindSignalAttribute(__s, _b.g, _b.a, "type", props.secure ? "password" : props.keyboardType === "number" || props.keyboardType === "decimal" ? "number" : keyboardType, "b:0eb96c19", "attr");
|
|
78
|
+
_b.h = bindSignalAttribute(__s, _b.h, _b.a, "inputMode", inputMode, "b:d98445c3", "attr");
|
|
79
|
+
_b.i = bindSignalAttribute(__s, _b.i, _b.a, "enterKeyHint", props.returnKeyType, "b:d63ff8ca", "attr");
|
|
80
|
+
_b.j = setBooleanAttributeIfChanged(props.editable === false, _b.j, _b.a, "readonly");
|
|
81
|
+
_b.k = bindSignalAttribute(__s, _b.k, _b.a, "placeholder", props.placeholder ?? props.hint, "b:7bb4056a", "attr");
|
|
82
|
+
});
|
|
15
83
|
//#endregion
|
|
16
|
-
export {
|
|
84
|
+
export { TextInput };
|
package/dist/web/ui13.js
CHANGED
|
@@ -1,22 +1,110 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { applyEscapeProps } from "./ui2.js";
|
|
2
|
+
import { __s, bag11, clone, delegateEvents, hookSlots, queueRefAttach, queueRefDetach, setEventHandler, setStyle, template, useLayoutEffect, useRef } from "octane";
|
|
3
|
+
import { bindSignalAttribute, bindSignalValue, enableSignalBindings, replaceRef, setBooleanAttributeIfChanged, updateFreshClassName } from "octane/internal/client";
|
|
4
|
+
//#region src/TextArea.web.tsrx
|
|
5
|
+
enableSignalBindings(1, true);
|
|
6
|
+
delegateEvents([
|
|
7
|
+
"focusin",
|
|
8
|
+
"focusout",
|
|
9
|
+
"input",
|
|
10
|
+
"keydown"
|
|
11
|
+
]);
|
|
12
|
+
var _t$0 = /* @__PURE__ */ template("<textarea data-octane-input=\"i:8374d32b\"></textarea>");
|
|
13
|
+
var _hs$ = /* @__PURE__ */ hookSlots(2);
|
|
14
|
+
var _rm$0 = [
|
|
15
|
+
"r",
|
|
16
|
+
"b",
|
|
17
|
+
"a"
|
|
18
|
+
];
|
|
19
|
+
var TextArea = /* @__PURE__ */ __s(function TextArea(props, __s, __extra) {
|
|
20
|
+
const el = useRef(null, _hs$ + 0);
|
|
21
|
+
useLayoutEffect(() => {
|
|
22
|
+
const t = el.current;
|
|
23
|
+
if (!t) return;
|
|
24
|
+
const cs = getComputedStyle(t);
|
|
25
|
+
const pad = parseFloat(cs.paddingTop) + parseFloat(cs.paddingBottom);
|
|
26
|
+
const bord = parseFloat(cs.borderTopWidth) + parseFloat(cs.borderBottomWidth);
|
|
27
|
+
const adj = cs.boxSizing === "border-box" ? bord : -pad;
|
|
28
|
+
const line = parseFloat(cs.lineHeight) || parseFloat(cs.fontSize) * 1.2;
|
|
29
|
+
const cap = props.maxRows ? props.maxRows * line + (cs.boxSizing === "border-box" ? pad + bord : 0) : parseFloat(cs.maxHeight) || Infinity;
|
|
30
|
+
if (props.maxRows) t.style.maxHeight = Math.ceil(cap) + "px";
|
|
31
|
+
if (props.autoGrow) {
|
|
32
|
+
t.style.height = "auto";
|
|
33
|
+
const need = t.scrollHeight + adj;
|
|
34
|
+
t.style.height = Math.min(need, cap) + "px";
|
|
35
|
+
t.style.overflowY = need > cap ? "auto" : "hidden";
|
|
36
|
+
}
|
|
37
|
+
}, [
|
|
38
|
+
props.value,
|
|
39
|
+
props.rows,
|
|
40
|
+
props.autoGrow,
|
|
41
|
+
props.maxRows,
|
|
42
|
+
props.className,
|
|
43
|
+
props.style
|
|
44
|
+
], _hs$ + 1);
|
|
45
|
+
let _b = __s.slots[0];
|
|
46
|
+
if (_b === void 0) {
|
|
47
|
+
let _m0, _m1, _m5;
|
|
48
|
+
const _root = clone(_t$0);
|
|
49
|
+
queueRefAttach(__s, _m1 = (node) => {
|
|
50
|
+
el.current = node;
|
|
51
|
+
if (!node) return;
|
|
52
|
+
applyEscapeProps(node, props);
|
|
53
|
+
props.bind?.({
|
|
54
|
+
focus: () => node.focus(),
|
|
55
|
+
blur: () => node.blur(),
|
|
56
|
+
native: node
|
|
57
|
+
});
|
|
58
|
+
}, _m0 = _root);
|
|
59
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
|
|
60
|
+
_m5 = bindSignalValue(__s, void 0, _root, props.value, "i:8374d32b");
|
|
61
|
+
setEventHandler(_root, "$$input", (e) => props.onChange?.(e.target.value));
|
|
62
|
+
setEventHandler(_root, "$$keydown", (e) => {
|
|
63
|
+
if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) props.onSubmit?.();
|
|
64
|
+
});
|
|
65
|
+
setEventHandler(_root, "$$focusin", props.onFocus);
|
|
66
|
+
setEventHandler(_root, "$$focusout", props.onBlur);
|
|
67
|
+
_b = bag11(__s, _root, _m0, _m1, void 0, void 0, void 0, _m5, void 0, void 0, void 0, void 0, void 0);
|
|
68
|
+
__s.refFields = _rm$0;
|
|
69
|
+
} else {
|
|
70
|
+
{
|
|
71
|
+
const _r = (node) => {
|
|
72
|
+
el.current = node;
|
|
73
|
+
if (!node) return;
|
|
74
|
+
applyEscapeProps(node, props);
|
|
75
|
+
props.bind?.({
|
|
76
|
+
focus: () => node.focus(),
|
|
77
|
+
blur: () => node.blur(),
|
|
78
|
+
native: node
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
|
|
82
|
+
}
|
|
83
|
+
_b.f = bindSignalValue(__s, _b.f, _b.a, props.value, "i:8374d32b");
|
|
84
|
+
setEventHandler(_b.a, "$$input", (e) => props.onChange?.(e.target.value));
|
|
85
|
+
setEventHandler(_b.a, "$$keydown", (e) => {
|
|
86
|
+
if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) props.onSubmit?.();
|
|
87
|
+
});
|
|
88
|
+
setEventHandler(_b.a, "$$focusin", props.onFocus);
|
|
89
|
+
setEventHandler(_b.a, "$$focusout", props.onBlur);
|
|
90
|
+
}
|
|
91
|
+
_b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:016c5af0", "attr");
|
|
92
|
+
_b.d = updateFreshClassName(["vx-textarea", props.className], _b.d, _b.a);
|
|
93
|
+
{
|
|
94
|
+
const _v = {
|
|
95
|
+
...props.style,
|
|
96
|
+
...props.placeholderTextColor ? { "--placeholder-color": props.placeholderTextColor } : {}
|
|
97
|
+
};
|
|
98
|
+
if (_b.e !== _v) {
|
|
99
|
+
setStyle(_b.a, _v, _b.e);
|
|
100
|
+
_b.e = _v;
|
|
11
101
|
}
|
|
12
|
-
if (props.className) cls.push(props.className);
|
|
13
|
-
if (__s.block.pending && !__s.block.crossRenderUpdate) return;
|
|
14
|
-
componentSlot(__s, 0, __block.parentNode, Base, {
|
|
15
|
-
...rest,
|
|
16
|
-
"className": cls
|
|
17
|
-
}, __block.endMarker, void 0, void 0, true, void 0, "c:5d3d2b58");
|
|
18
102
|
}
|
|
19
|
-
|
|
20
|
-
|
|
103
|
+
_b.g = bindSignalAttribute(__s, _b.g, _b.a, "inputMode", props.keyboardType === "number" ? "numeric" : props.keyboardType === "phone" ? "tel" : props.keyboardType === "default" ? "text" : props.keyboardType, "b:5c730abe", "attr");
|
|
104
|
+
_b.h = bindSignalAttribute(__s, _b.h, _b.a, "enterKeyHint", props.returnKeyType, "b:a6a3a77f", "attr");
|
|
105
|
+
_b.i = setBooleanAttributeIfChanged(props.editable === false, _b.i, _b.a, "readonly");
|
|
106
|
+
_b.j = bindSignalAttribute(__s, _b.j, _b.a, "placeholder", props.placeholder ?? props.hint, "b:df751435", "attr");
|
|
107
|
+
_b.k = bindSignalAttribute(__s, _b.k, _b.a, "rows", props.rows ?? (props.autoGrow ? 1 : 3), "b:dfee7c66", "attr");
|
|
108
|
+
});
|
|
21
109
|
//#endregion
|
|
22
|
-
export {
|
|
110
|
+
export { TextArea };
|
package/dist/web/ui14.js
CHANGED
|
@@ -1,28 +1,108 @@
|
|
|
1
|
-
import { __s,
|
|
2
|
-
import {
|
|
3
|
-
//#region src/
|
|
4
|
-
|
|
5
|
-
var
|
|
1
|
+
import { __s, bag4, bag6, child, clone, drainFrag, forBlock, hookSlots, queueRefAttach, queueRefDetach, setStyle, template, useLayoutEffect, useRef } from "octane";
|
|
2
|
+
import { bindSignalAttribute, bindSignalChild, enableSignalBindings, replaceRef, updateFreshClassName } from "octane/internal/client";
|
|
3
|
+
//#region src/List.web.tsrx
|
|
4
|
+
enableSignalBindings(1, true);
|
|
5
|
+
var _t$0 = /* @__PURE__ */ template("<!>", 0, 1);
|
|
6
|
+
var _t$1 = /* @__PURE__ */ template("<div><!></div>");
|
|
7
|
+
var _hs$ = /* @__PURE__ */ hookSlots(3);
|
|
8
|
+
function __empty$1(__props, __s, __extra) {
|
|
9
|
+
const __block = __s.block;
|
|
10
|
+
const props = __extra[0];
|
|
6
11
|
let _b = __s.slots[0];
|
|
7
12
|
if (_b === void 0) {
|
|
8
|
-
let _m1;
|
|
13
|
+
let _m0, _m1;
|
|
9
14
|
const _root = clone(_t$0);
|
|
15
|
+
_m0 = __block.parentNode;
|
|
16
|
+
_m1 = child(_root);
|
|
17
|
+
drainFrag(_root, __block.parentNode, __block.endMarker);
|
|
18
|
+
_b = bag4(__s, null, _m0, _m1, null, void 0);
|
|
19
|
+
}
|
|
20
|
+
_b.e = bindSignalChild(__s, _b.e, 1, _b.a, props.renderEmpty?.(), "b:00ed4516", _b.b, true, void 0, true, void 0);
|
|
21
|
+
}
|
|
22
|
+
function __item$3(item, __s, __extra) {
|
|
23
|
+
const __block = __s.block;
|
|
24
|
+
const props = __extra[0];
|
|
25
|
+
const i = __block.itemIndex;
|
|
26
|
+
let _b = __s.slots[0];
|
|
27
|
+
if (_b === void 0) {
|
|
28
|
+
let _m0, _m1;
|
|
29
|
+
const _root = clone(_t$0);
|
|
30
|
+
_m0 = __block.parentNode;
|
|
31
|
+
_m1 = child(_root);
|
|
32
|
+
drainFrag(_root, __block.parentNode, __block.endMarker);
|
|
33
|
+
_b = bag4(__s, null, _m0, _m1, null, void 0);
|
|
34
|
+
}
|
|
35
|
+
_b.e = bindSignalChild(__s, _b.e, 1, _b.a, props.renderItem(item, i), "b:3e351c68", _b.b, true, void 0, true, void 0);
|
|
36
|
+
}
|
|
37
|
+
var _rm$6 = [
|
|
38
|
+
"r",
|
|
39
|
+
"c",
|
|
40
|
+
"b"
|
|
41
|
+
];
|
|
42
|
+
var List = /* @__PURE__ */ __s(function List(props, __s, __extra) {
|
|
43
|
+
const el = useRef(null, _hs$ + 0);
|
|
44
|
+
const reachedEnd = useRef(false, _hs$ + 1);
|
|
45
|
+
useLayoutEffect(() => {
|
|
46
|
+
const node = el.current;
|
|
47
|
+
if (!node) return;
|
|
48
|
+
for (const [name, value] of Object.entries(props.web ?? {})) if (name.includes("-")) {
|
|
49
|
+
if (value == null) node.removeAttribute(name);
|
|
50
|
+
else node.setAttribute(name, String(value));
|
|
51
|
+
} else node[name] = value;
|
|
52
|
+
let frame = 0;
|
|
53
|
+
const checkEnd = () => {
|
|
54
|
+
frame = 0;
|
|
55
|
+
if (node.scrollHeight - node.scrollTop - node.clientHeight > node.clientHeight) reachedEnd.current = false;
|
|
56
|
+
else if (!reachedEnd.current) {
|
|
57
|
+
reachedEnd.current = true;
|
|
58
|
+
props.onEndReached?.();
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const onScroll = () => {
|
|
62
|
+
if (!frame) frame = requestAnimationFrame(checkEnd);
|
|
63
|
+
};
|
|
64
|
+
node.addEventListener("scroll", onScroll, { passive: true });
|
|
65
|
+
checkEnd();
|
|
66
|
+
return () => {
|
|
67
|
+
node.removeEventListener("scroll", onScroll);
|
|
68
|
+
if (frame) cancelAnimationFrame(frame);
|
|
69
|
+
};
|
|
70
|
+
}, [
|
|
71
|
+
props.onEndReached,
|
|
72
|
+
props.web,
|
|
73
|
+
props.items
|
|
74
|
+
], _hs$ + 2);
|
|
75
|
+
let _b = __s.slots[0];
|
|
76
|
+
if (_b === void 0) {
|
|
77
|
+
let _m1, _m2, _m5;
|
|
78
|
+
const _root = clone(_t$1);
|
|
10
79
|
_m1 = _root;
|
|
11
|
-
|
|
80
|
+
queueRefAttach(__s, _m2 = el, _m1);
|
|
81
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.c, _b.b));
|
|
82
|
+
_m5 = child(_root);
|
|
83
|
+
_b = bag6(__s, _root, void 0, _m1, _m2, void 0, void 0, _m5);
|
|
84
|
+
__s.refFields = _rm$6;
|
|
85
|
+
} else {
|
|
86
|
+
const _r = el;
|
|
87
|
+
if (_r !== _b.c) _b.c = replaceRef(__s, _b.c, _r, _b.b);
|
|
12
88
|
}
|
|
13
|
-
_b.a =
|
|
89
|
+
_b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:6c896629", "attr");
|
|
90
|
+
_b.d = updateFreshClassName(["vx-list", props.className], _b.d, _b.b);
|
|
14
91
|
{
|
|
15
|
-
const _v =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
92
|
+
const _v = Object.assign({
|
|
93
|
+
display: "flex",
|
|
94
|
+
flexDirection: "column",
|
|
95
|
+
flexWrap: "nowrap",
|
|
96
|
+
alignItems: "stretch",
|
|
97
|
+
overflowY: "auto",
|
|
98
|
+
minHeight: 0
|
|
99
|
+
}, props.style);
|
|
100
|
+
if (_b.e !== _v) {
|
|
101
|
+
setStyle(_b.b, _v, _b.e);
|
|
102
|
+
_b.e = _v;
|
|
19
103
|
}
|
|
20
104
|
}
|
|
21
|
-
|
|
22
|
-
const _v = props.children;
|
|
23
|
-
_b.d = childTextHoleUpdate(__s, 1, _b.b, _v, _b.d, _b.e);
|
|
24
|
-
_b.e = _v;
|
|
25
|
-
}
|
|
105
|
+
forBlock(__s, 1, _b.b, props.items, (item, i) => props.keyFor?.(item) ?? item.id, __item$3, 0, [props], __empty$1, _b.f, true);
|
|
26
106
|
});
|
|
27
107
|
//#endregion
|
|
28
|
-
export {
|
|
108
|
+
export { List };
|
package/dist/web/ui15.js
CHANGED
|
@@ -1,49 +1,85 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
import { applyEscapeProps } from "./ui2.js";
|
|
2
|
+
import { layoutChildProps } from "./ui3.js";
|
|
3
|
+
import { __s, bag8, clone, snapshotSpread, template } from "octane";
|
|
4
|
+
import { bindSignalChild, bindSignalHostPropSources, enableSignalBindings } from "octane/internal/client";
|
|
5
|
+
//#region src/ScrollView.web.tsrx
|
|
6
|
+
enableSignalBindings(1, true);
|
|
7
|
+
var _t$0 = /* @__PURE__ */ template("<div></div>");
|
|
8
|
+
var _rm$1 = [
|
|
9
|
+
"s",
|
|
10
|
+
"f",
|
|
11
|
+
"e"
|
|
12
|
+
];
|
|
13
|
+
var ScrollView = /* @__PURE__ */ __s(function ScrollView(props, __s, __extra) {
|
|
14
|
+
let _b = __s.slots[0];
|
|
15
|
+
if (_b === void 0) {
|
|
16
|
+
let _m0, _m1, _m2, _m3, _m4, _m5;
|
|
17
|
+
const _root = clone(_t$0);
|
|
18
|
+
_m0 = (e) => applyEscapeProps(e, props);
|
|
19
|
+
_m1 = props.id;
|
|
20
|
+
_m2 = ["vx-scroll", props.className];
|
|
21
|
+
_m3 = snapshotSpread(layoutChildProps(props, {
|
|
22
|
+
...props.horizontal ? { overflowX: "auto" } : { overflowY: "auto" },
|
|
23
|
+
...props.style
|
|
24
|
+
}));
|
|
25
|
+
_m4 = _root;
|
|
26
|
+
_m5 = bindSignalHostPropSources(__s, void 0, _root, [
|
|
27
|
+
[
|
|
28
|
+
false,
|
|
29
|
+
"ref",
|
|
30
|
+
_m0
|
|
31
|
+
],
|
|
32
|
+
[
|
|
33
|
+
false,
|
|
34
|
+
"id",
|
|
35
|
+
_m1
|
|
36
|
+
],
|
|
37
|
+
[
|
|
38
|
+
false,
|
|
39
|
+
"className",
|
|
40
|
+
_m2
|
|
41
|
+
],
|
|
42
|
+
[true, _m3]
|
|
43
|
+
], "b:6c414165", true);
|
|
44
|
+
_b = bag8(__s, _root, _m0, _m1, _m2, _m3, _m4, _m5, null, void 0);
|
|
45
|
+
__s.refFields = _rm$1;
|
|
46
|
+
} else {
|
|
47
|
+
{
|
|
48
|
+
const _v = (e) => applyEscapeProps(e, props);
|
|
49
|
+
if (_b.a !== _v) _b.a = _v;
|
|
50
|
+
}
|
|
51
|
+
{
|
|
52
|
+
const _v = props.id;
|
|
53
|
+
if (_b.b !== _v) _b.b = _v;
|
|
54
|
+
}
|
|
55
|
+
{
|
|
56
|
+
const _v = ["vx-scroll", props.className];
|
|
57
|
+
if (_b.c !== _v) _b.c = _v;
|
|
58
|
+
}
|
|
59
|
+
_b.d = snapshotSpread(layoutChildProps(props, {
|
|
60
|
+
...props.horizontal ? { overflowX: "auto" } : { overflowY: "auto" },
|
|
61
|
+
...props.style
|
|
62
|
+
}));
|
|
63
|
+
_b.f = bindSignalHostPropSources(__s, _b.f, _b.e, [
|
|
64
|
+
[
|
|
65
|
+
false,
|
|
66
|
+
"ref",
|
|
67
|
+
_b.a
|
|
68
|
+
],
|
|
69
|
+
[
|
|
70
|
+
false,
|
|
71
|
+
"id",
|
|
72
|
+
_b.b
|
|
73
|
+
],
|
|
74
|
+
[
|
|
75
|
+
false,
|
|
76
|
+
"className",
|
|
77
|
+
_b.c
|
|
78
|
+
],
|
|
79
|
+
[true, _b.d]
|
|
80
|
+
], "b:6c414165", true);
|
|
81
|
+
}
|
|
82
|
+
_b.i = bindSignalChild(__s, _b.i, 1, _b.e, props.children, "b:f6a0255f", null, void 0, void 0, void 0, true);
|
|
32
83
|
});
|
|
33
|
-
/** Current route if it targets `stack`, else null. */
|
|
34
|
-
function routeFor(stack) {
|
|
35
|
-
return current && current.stack === stack ? current : null;
|
|
36
|
-
}
|
|
37
|
-
/** The route active at boot — for deep-link tab selection. */
|
|
38
|
-
function currentRoute() {
|
|
39
|
-
return current;
|
|
40
|
-
}
|
|
41
|
-
function useRoute(stack) {
|
|
42
|
-
return useSyncExternalStore((cb) => {
|
|
43
|
-
listeners.add(cb);
|
|
44
|
-
return () => listeners.delete(cb);
|
|
45
|
-
}, () => routeFor(stack), _h$0);
|
|
46
|
-
}
|
|
47
|
-
var _h$0 = /* @__PURE__ */ Symbol(/* @__PURE__ */ hookSlots(1));
|
|
48
84
|
//#endregion
|
|
49
|
-
export {
|
|
85
|
+
export { ScrollView };
|