@octane-xplat/ui 0.2.1 → 0.4.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.
Files changed (126) hide show
  1. package/README.md +46 -0
  2. package/dist/native/octane-client-build.json +1 -1
  3. package/dist/native/ui.js +52 -19
  4. package/dist/native/ui10.js +25 -45
  5. package/dist/native/ui11.js +52 -57
  6. package/dist/native/ui12.js +47 -16
  7. package/dist/native/ui13.js +24 -18
  8. package/dist/native/ui14.js +117 -12
  9. package/dist/native/ui15.js +78 -17
  10. package/dist/native/ui16.js +88 -115
  11. package/dist/native/ui17.js +29 -19
  12. package/dist/native/ui18.js +34 -12
  13. package/dist/native/ui19.js +244 -8
  14. package/dist/native/ui2.js +10 -48
  15. package/dist/native/ui20.js +28 -0
  16. package/dist/native/ui21.js +383 -0
  17. package/dist/native/ui22.js +36 -0
  18. package/dist/native/ui23.js +55 -0
  19. package/dist/native/ui24.js +83 -0
  20. package/dist/native/ui25.js +141 -0
  21. package/dist/native/ui26.js +12 -0
  22. package/dist/native/ui27.js +61 -0
  23. package/dist/native/ui28.js +40 -0
  24. package/dist/native/ui29.js +108 -0
  25. package/dist/native/ui3.js +17 -20
  26. package/dist/native/ui30.js +18 -0
  27. package/dist/native/ui31.js +58 -0
  28. package/dist/native/ui32.js +58 -0
  29. package/dist/native/ui33.js +38 -0
  30. package/dist/native/ui34.js +53 -0
  31. package/dist/native/ui35.js +105 -0
  32. package/dist/native/ui36.js +10 -0
  33. package/dist/native/ui37.js +44 -0
  34. package/dist/native/ui38.js +197 -0
  35. package/dist/native/ui39.js +105 -0
  36. package/dist/native/ui4.js +23 -48
  37. package/dist/native/ui40.js +58 -0
  38. package/dist/native/ui41.js +19 -0
  39. package/dist/native/ui42.js +8 -0
  40. package/dist/native/ui43.js +38 -0
  41. package/dist/native/ui44.js +267 -0
  42. package/dist/native/ui45.js +28 -0
  43. package/dist/native/ui46.js +35 -0
  44. package/dist/native/ui47.js +41 -0
  45. package/dist/native/ui48.js +72 -0
  46. package/dist/native/ui49.js +66 -0
  47. package/dist/native/ui5.js +37 -34
  48. package/dist/native/ui50.js +27 -0
  49. package/dist/native/ui51.js +13 -0
  50. package/dist/native/ui52.js +92 -0
  51. package/dist/native/ui53.js +34 -0
  52. package/dist/native/ui54.js +17 -0
  53. package/dist/native/ui55.js +156 -0
  54. package/dist/native/ui56.js +33 -0
  55. package/dist/native/ui57.js +14 -0
  56. package/dist/native/ui58.js +22 -0
  57. package/dist/native/ui59.js +8 -0
  58. package/dist/native/ui6.js +79 -20
  59. package/dist/native/ui60.js +108 -0
  60. package/dist/native/ui61.js +76 -0
  61. package/dist/native/ui7.js +44 -65
  62. package/dist/native/ui8.js +25 -17
  63. package/dist/native/ui9.js +24 -12
  64. package/dist/web/octane-client-build.json +1 -1
  65. package/dist/web/ui.js +51 -19
  66. package/dist/web/ui10.js +33 -30
  67. package/dist/web/ui11.js +40 -55
  68. package/dist/web/ui12.js +36 -15
  69. package/dist/web/ui13.js +212 -20
  70. package/dist/web/ui14.js +84 -14
  71. package/dist/web/ui15.js +425 -46
  72. package/dist/web/ui16.js +12 -93
  73. package/dist/web/ui17.js +246 -28
  74. package/dist/web/ui18.js +238 -15
  75. package/dist/web/ui19.js +36 -8
  76. package/dist/web/ui2.js +15 -103
  77. package/dist/web/ui20.js +85 -0
  78. package/dist/web/ui21.js +111 -0
  79. package/dist/web/ui22.js +108 -0
  80. package/dist/web/ui23.js +96 -0
  81. package/dist/web/ui24.js +32 -0
  82. package/dist/web/ui25.js +108 -0
  83. package/dist/web/ui26.js +45 -0
  84. package/dist/web/ui27.js +16 -0
  85. package/dist/web/ui28.js +11 -0
  86. package/dist/web/ui29.js +58 -0
  87. package/dist/web/ui3.js +30 -27
  88. package/dist/web/ui30.js +34 -0
  89. package/dist/web/ui31.js +123 -0
  90. package/dist/web/ui32.js +44 -0
  91. package/dist/web/ui33.js +159 -0
  92. package/dist/web/ui34.js +70 -0
  93. package/dist/web/ui35.js +57 -0
  94. package/dist/web/ui36.js +22 -0
  95. package/dist/web/ui37.js +7 -0
  96. package/dist/web/ui38.js +38 -0
  97. package/dist/web/ui39.js +154 -0
  98. package/dist/web/ui4.js +46 -24
  99. package/dist/web/ui40.js +43 -0
  100. package/dist/web/ui41.js +42 -0
  101. package/dist/web/ui42.js +76 -0
  102. package/dist/web/ui43.js +42 -0
  103. package/dist/web/ui44.js +62 -0
  104. package/dist/web/ui45.js +9 -0
  105. package/dist/web/ui46.js +45 -0
  106. package/dist/web/ui47.js +13 -0
  107. package/dist/web/ui48.js +63 -0
  108. package/dist/web/ui49.js +47 -0
  109. package/dist/web/ui5.js +158 -52
  110. package/dist/web/ui50.js +17 -0
  111. package/dist/web/ui51.js +149 -0
  112. package/dist/web/ui52.js +42 -0
  113. package/dist/web/ui53.js +17 -0
  114. package/dist/web/ui54.js +9 -0
  115. package/dist/web/ui55.js +22 -0
  116. package/dist/web/ui56.js +8 -0
  117. package/dist/web/ui57.js +44 -0
  118. package/dist/web/ui58.js +46 -0
  119. package/dist/web/ui6.js +85 -22
  120. package/dist/web/ui7.js +46 -41
  121. package/dist/web/ui8.js +28 -11
  122. package/dist/web/ui9.js +32 -13
  123. package/package.json +18 -6
  124. package/src/theme/tokens.css +444 -47
  125. package/types/index.d.ts +180 -29
  126. package/types/props.d.ts +553 -8
package/dist/web/ui13.js CHANGED
@@ -1,22 +1,214 @@
1
- import { componentSlot } from "octane";
2
- //#region src/styled.web.tsrx
3
- function styled(Base, def) {
4
- function Styled(props, __s, __extra) {
5
- const __block = __s.block;
6
- const cls = [def.base];
7
- const rest = { ...props };
8
- for (const k of Object.keys(def.variants ?? {})) {
9
- if (props[k]) cls.push(def.variants[k]);
10
- delete rest[k];
11
- }
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");
1
+ import { applyEscapeProps } from "./ui2.js";
2
+ import { layoutChildProps } from "./ui4.js";
3
+ import { __s, bag16, clone, snapshotSpread, template } from "octane";
4
+ import { bindSignalChild, bindSignalHostPropSources, enableSignalBindings } from "octane/internal/client";
5
+ //#region src/Text.web.tsrx
6
+ enableSignalBindings(1, true);
7
+ var _t$0 = /* @__PURE__ */ template("<span></span>");
8
+ var _rm$1 = [
9
+ "s",
10
+ "n",
11
+ "m"
12
+ ];
13
+ var Text = /* @__PURE__ */ __s(function Text(props, __s, __extra) {
14
+ const textStyle = {
15
+ ...props.style,
16
+ ...props.numberOfLines ? {
17
+ display: "-webkit-box",
18
+ WebkitLineClamp: props.numberOfLines,
19
+ WebkitBoxOrient: "vertical",
20
+ overflow: "hidden"
21
+ } : {},
22
+ ...props.selectable === false ? { userSelect: "none" } : props.selectable ? { userSelect: "text" } : {},
23
+ ...props.ellipsize ? {
24
+ textOverflow: "ellipsis",
25
+ whiteSpace: "nowrap",
26
+ overflow: "hidden"
27
+ } : {}
28
+ };
29
+ let _b = __s.slots[0];
30
+ if (_b === void 0) {
31
+ let _m0, _m1, _m2, _m3, _m4, _m5, _m6, _m7, _m8, _m9, _m10, _m11, _m12, _m13;
32
+ const _root = clone(_t$0);
33
+ _m0 = props.id;
34
+ _m1 = (el) => applyEscapeProps(el, props);
35
+ _m2 = props.className;
36
+ _m3 = snapshotSpread(layoutChildProps(props, textStyle));
37
+ _m4 = props.accessibilityHint;
38
+ _m5 = props.accessibilityValue;
39
+ _m6 = props.accessibilityState?.disabled;
40
+ _m7 = props.accessibilityState?.selected;
41
+ _m8 = props.accessibilityState?.checked;
42
+ _m9 = props.accessibilityState?.busy;
43
+ _m10 = props.accessibilityState?.expanded;
44
+ _m11 = props.accessibilityLiveRegion === "none" ? "off" : props.accessibilityLiveRegion;
45
+ _m12 = _root;
46
+ _m13 = bindSignalHostPropSources(__s, void 0, _root, [
47
+ [
48
+ false,
49
+ "id",
50
+ _m0
51
+ ],
52
+ [
53
+ false,
54
+ "ref",
55
+ _m1
56
+ ],
57
+ [
58
+ false,
59
+ "className",
60
+ _m2
61
+ ],
62
+ [true, _m3],
63
+ [
64
+ false,
65
+ "aria-description",
66
+ _m4
67
+ ],
68
+ [
69
+ false,
70
+ "aria-valuetext",
71
+ _m5
72
+ ],
73
+ [
74
+ false,
75
+ "aria-disabled",
76
+ _m6
77
+ ],
78
+ [
79
+ false,
80
+ "aria-selected",
81
+ _m7
82
+ ],
83
+ [
84
+ false,
85
+ "aria-checked",
86
+ _m8
87
+ ],
88
+ [
89
+ false,
90
+ "aria-busy",
91
+ _m9
92
+ ],
93
+ [
94
+ false,
95
+ "aria-expanded",
96
+ _m10
97
+ ],
98
+ [
99
+ false,
100
+ "aria-live",
101
+ _m11
102
+ ]
103
+ ], "b:3b621770", true);
104
+ _b = bag16(__s, _root, _m0, _m1, _m2, _m3, _m4, _m5, _m6, _m7, _m8, _m9, _m10, _m11, _m12, _m13, null, void 0);
105
+ __s.refFields = _rm$1;
106
+ } else {
107
+ {
108
+ const _v = props.id;
109
+ if (_b.a !== _v) _b.a = _v;
110
+ }
111
+ {
112
+ const _v = (el) => applyEscapeProps(el, props);
113
+ if (_b.b !== _v) _b.b = _v;
114
+ }
115
+ {
116
+ const _v = props.className;
117
+ if (_b.c !== _v) _b.c = _v;
118
+ }
119
+ _b.d = snapshotSpread(layoutChildProps(props, textStyle));
120
+ {
121
+ const _v = props.accessibilityHint;
122
+ if (_b.e !== _v) _b.e = _v;
123
+ }
124
+ {
125
+ const _v = props.accessibilityValue;
126
+ if (_b.f !== _v) _b.f = _v;
127
+ }
128
+ {
129
+ const _v = props.accessibilityState?.disabled;
130
+ if (_b.g !== _v) _b.g = _v;
131
+ }
132
+ {
133
+ const _v = props.accessibilityState?.selected;
134
+ if (_b.h !== _v) _b.h = _v;
135
+ }
136
+ {
137
+ const _v = props.accessibilityState?.checked;
138
+ if (_b.i !== _v) _b.i = _v;
139
+ }
140
+ {
141
+ const _v = props.accessibilityState?.busy;
142
+ if (_b.j !== _v) _b.j = _v;
143
+ }
144
+ {
145
+ const _v = props.accessibilityState?.expanded;
146
+ if (_b.k !== _v) _b.k = _v;
147
+ }
148
+ {
149
+ const _v = props.accessibilityLiveRegion === "none" ? "off" : props.accessibilityLiveRegion;
150
+ if (_b.l !== _v) _b.l = _v;
151
+ }
152
+ _b.n = bindSignalHostPropSources(__s, _b.n, _b.m, [
153
+ [
154
+ false,
155
+ "id",
156
+ _b.a
157
+ ],
158
+ [
159
+ false,
160
+ "ref",
161
+ _b.b
162
+ ],
163
+ [
164
+ false,
165
+ "className",
166
+ _b.c
167
+ ],
168
+ [true, _b.d],
169
+ [
170
+ false,
171
+ "aria-description",
172
+ _b.e
173
+ ],
174
+ [
175
+ false,
176
+ "aria-valuetext",
177
+ _b.f
178
+ ],
179
+ [
180
+ false,
181
+ "aria-disabled",
182
+ _b.g
183
+ ],
184
+ [
185
+ false,
186
+ "aria-selected",
187
+ _b.h
188
+ ],
189
+ [
190
+ false,
191
+ "aria-checked",
192
+ _b.i
193
+ ],
194
+ [
195
+ false,
196
+ "aria-busy",
197
+ _b.j
198
+ ],
199
+ [
200
+ false,
201
+ "aria-expanded",
202
+ _b.k
203
+ ],
204
+ [
205
+ false,
206
+ "aria-live",
207
+ _b.l
208
+ ]
209
+ ], "b:3b621770", true);
18
210
  }
19
- return Styled;
20
- }
211
+ _b.q = bindSignalChild(__s, _b.q, 1, _b.m, props.children, "b:5ab934f0", null, void 0, void 0, void 0, true);
212
+ });
21
213
  //#endregion
22
- export { styled };
214
+ export { Text };
package/dist/web/ui14.js CHANGED
@@ -1,16 +1,90 @@
1
- import { __s, bag5, clone, setStyle, template } from "octane";
2
- import { childTextHoleUpdate, updateFreshClassName } from "octane/internal/client";
3
- //#region src/Screen.web.tsrx
4
- var _t$0 = /* @__PURE__ */ template("<div></div>");
5
- var Screen = /* @__PURE__ */ __s(function Screen(props, __s, __extra) {
1
+ import { applyEscapeProps } from "./ui2.js";
2
+ import { layoutChildProps } from "./ui4.js";
3
+ import { __s, bag5, bag8, clone, delegateEvents, setEventHandler, setStyle, snapshotSpread, template } from "octane";
4
+ import { bindSignalAttribute, bindSignalChild, bindSignalHostPropSources, enableSignalBindings } from "octane/internal/client";
5
+ //#region src/RichText.web.tsrx
6
+ enableSignalBindings(1, true);
7
+ var _t$0 = /* @__PURE__ */ template("<span></span>");
8
+ var _rm$1 = [
9
+ "s",
10
+ "f",
11
+ "e"
12
+ ];
13
+ var RichText = /* @__PURE__ */ __s(function RichText(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 = props.id;
19
+ _m1 = (el) => applyEscapeProps(el, props);
20
+ _m2 = ["vx-rich-text", props.className];
21
+ _m3 = snapshotSpread(layoutChildProps(props, props.style));
22
+ _m4 = _root;
23
+ _m5 = bindSignalHostPropSources(__s, void 0, _root, [
24
+ [
25
+ false,
26
+ "id",
27
+ _m0
28
+ ],
29
+ [
30
+ false,
31
+ "ref",
32
+ _m1
33
+ ],
34
+ [
35
+ false,
36
+ "className",
37
+ _m2
38
+ ],
39
+ [true, _m3]
40
+ ], "b:e9859754", true);
41
+ _b = bag8(__s, _root, _m0, _m1, _m2, _m3, _m4, _m5, null, void 0);
42
+ __s.refFields = _rm$1;
43
+ } else {
44
+ {
45
+ const _v = props.id;
46
+ if (_b.a !== _v) _b.a = _v;
47
+ }
48
+ {
49
+ const _v = (el) => applyEscapeProps(el, props);
50
+ if (_b.b !== _v) _b.b = _v;
51
+ }
52
+ {
53
+ const _v = ["vx-rich-text", props.className];
54
+ if (_b.c !== _v) _b.c = _v;
55
+ }
56
+ _b.d = snapshotSpread(layoutChildProps(props, props.style));
57
+ _b.f = bindSignalHostPropSources(__s, _b.f, _b.e, [
58
+ [
59
+ false,
60
+ "id",
61
+ _b.a
62
+ ],
63
+ [
64
+ false,
65
+ "ref",
66
+ _b.b
67
+ ],
68
+ [
69
+ false,
70
+ "className",
71
+ _b.c
72
+ ],
73
+ [true, _b.d]
74
+ ], "b:e9859754", true);
75
+ }
76
+ _b.i = bindSignalChild(__s, _b.i, 1, _b.e, props.children, "b:f9a8f27a", null, void 0, void 0, void 0, true);
77
+ });
78
+ var RichTextSpan = /* @__PURE__ */ (() => (delegateEvents(["click"]), /* @__PURE__ */ __s(function RichTextSpan(props, __s, __extra) {
6
79
  let _b = __s.slots[0];
7
80
  if (_b === void 0) {
8
81
  let _m1;
9
82
  const _root = clone(_t$0);
10
83
  _m1 = _root;
84
+ setEventHandler(_root, "$$click", () => props.onPress?.());
11
85
  _b = bag5(__s, _root, void 0, _m1, void 0, null, void 0);
12
- }
13
- _b.a = updateFreshClassName(["vx-screen", props.className], _b.a, _b.b);
86
+ } else setEventHandler(_b.b, "$$click", () => props.onPress?.());
87
+ _b.a = bindSignalAttribute(__s, _b.a, _b.b, "class", props.className, "b:76166c9b", "class");
14
88
  {
15
89
  const _v = props.style;
16
90
  if (_b.c !== _v) {
@@ -18,11 +92,7 @@ var Screen = /* @__PURE__ */ __s(function Screen(props, __s, __extra) {
18
92
  _b.c = _v;
19
93
  }
20
94
  }
21
- {
22
- const _v = props.children;
23
- _b.d = childTextHoleUpdate(__s, 1, _b.b, _v, _b.d, _b.e);
24
- _b.e = _v;
25
- }
26
- });
95
+ _b.f = bindSignalChild(__s, _b.f, 1, _b.b, props.text ?? props.children, "b:f71ea880", null, void 0, void 0, void 0, true);
96
+ })))();
27
97
  //#endregion
28
- export { Screen };
98
+ export { RichText, RichTextSpan };