@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.
Files changed (283) hide show
  1. package/README.md +3 -0
  2. package/dist/native/Absolute.native.tsrx.js +43 -0
  3. package/dist/native/Accordion.native.tsrx.js +75 -0
  4. package/dist/native/ActivityIndicator.native.tsrx.js +35 -0
  5. package/dist/native/Alert.native.tsrx.js +74 -0
  6. package/dist/native/Avatar.native.tsrx.js +76 -0
  7. package/dist/native/AvatarGroup.native.tsrx.js +84 -0
  8. package/dist/native/Badge.native.tsrx.js +29 -0
  9. package/dist/native/Banner.native.tsrx.js +80 -0
  10. package/dist/native/Breadcrumb.native.tsrx.js +66 -0
  11. package/dist/native/Button.native.tsrx.js +62 -0
  12. package/dist/native/CameraView.native.tsrx.js +165 -0
  13. package/dist/native/Card.native.tsrx.js +64 -0
  14. package/dist/native/Checkbox.native.tsrx.js +58 -0
  15. package/dist/native/CheckboxGroup.native.tsrx.js +70 -0
  16. package/dist/native/Chip.native.tsrx.js +83 -0
  17. package/dist/native/Collapsible.native.tsrx.js +74 -0
  18. package/dist/native/CommandPalette.native.tsrx.js +143 -0
  19. package/dist/native/ContextMenu.native.tsrx.js +140 -0
  20. package/dist/native/Drawer.native.tsrx.js +60 -0
  21. package/dist/native/DropdownMenu.native.tsrx.js +155 -0
  22. package/dist/native/Empty.native.tsrx.js +82 -0
  23. package/dist/native/FieldGroup.native.tsrx.js +39 -0
  24. package/dist/native/FormField.native.tsrx.js +53 -0
  25. package/dist/native/{ui8.js → Grid.native.tsrx.js} +19 -8
  26. package/dist/native/{ui56.js → Heading.native.tsrx.js} +2 -2
  27. package/dist/native/{ui55.js → Icon.native.tsrx.js} +4 -4
  28. package/dist/native/{ui29.js → Image.native.tsrx.js} +4 -4
  29. package/dist/native/InputNumber.native.tsrx.js +146 -0
  30. package/dist/native/InputRating.native.tsrx.js +74 -0
  31. package/dist/native/InputTags.native.tsrx.js +131 -0
  32. package/dist/native/Kbd.native.tsrx.js +29 -0
  33. package/dist/native/{ui48.js → KeyboardAvoiding.native.tsrx.js} +1 -1
  34. package/dist/native/{ui17.js → Link.native.tsrx.js} +1 -1
  35. package/dist/native/{ui52.js → Meter.native.tsrx.js} +2 -2
  36. package/dist/native/{ui22.js → NavLink.native.tsrx.js} +3 -3
  37. package/dist/native/NavigationMenu.native.tsrx.js +67 -0
  38. package/dist/native/{ui35.js → Overlay.native.tsrx.js} +3 -3
  39. package/dist/native/Pager.native.tsrx.js +282 -0
  40. package/dist/native/Pagination.native.tsrx.js +107 -0
  41. package/dist/native/PinInput.native.tsrx.js +94 -0
  42. package/dist/native/{ui38.js → Popover.native.tsrx.js} +5 -5
  43. package/dist/native/{ui16.js → Pressable.native.tsrx.js} +21 -15
  44. package/dist/native/ProgressGroup.native.tsrx.js +66 -0
  45. package/dist/native/RadioGroup.native.tsrx.js +85 -0
  46. package/dist/native/{ui15.js → RichText.native.tsrx.js} +15 -22
  47. package/dist/native/Row.native.tsrx.js +98 -0
  48. package/dist/native/{ui47.js → SafeArea.native.tsrx.js} +2 -2
  49. package/dist/native/{ui43.js → Screen.native.tsrx.js} +3 -3
  50. package/dist/native/{ui26.js → ScrollBox.native.tsrx.js} +1 -1
  51. package/dist/native/ScrollView.native.tsrx.js +233 -0
  52. package/dist/native/SearchInput.native.tsrx.js +151 -0
  53. package/dist/native/SegmentedControl.native.tsrx.js +75 -0
  54. package/dist/native/Select.native.tsrx.js +202 -0
  55. package/dist/native/Separator.native.tsrx.js +25 -0
  56. package/dist/native/{ui60.js → Sheet.native.tsrx.js} +15 -7
  57. package/dist/native/Skeleton.native.tsrx.js +28 -0
  58. package/dist/native/Slider.native.tsrx.js +98 -0
  59. package/dist/native/{ui13.js → Spacer.native.tsrx.js} +2 -2
  60. package/dist/native/{ui9.js → Stack.native.tsrx.js} +20 -9
  61. package/dist/native/Stepper.native.tsrx.js +75 -0
  62. package/dist/native/Switch.native.tsrx.js +33 -0
  63. package/dist/native/Table.native.tsrx.js +103 -0
  64. package/dist/native/Tabs.native.tsrx.js +163 -0
  65. package/dist/native/{ui14.js → Text.native.tsrx.js} +19 -3
  66. package/dist/native/{ui24.js → TextArea.native.tsrx.js} +19 -17
  67. package/dist/native/{ui23.js → TextInput.native.tsrx.js} +21 -16
  68. package/dist/native/Timeline.native.tsrx.js +112 -0
  69. package/dist/native/Tree.native.tsrx.js +140 -0
  70. package/dist/native/User.native.tsrx.js +95 -0
  71. package/dist/native/Video.native.tsrx.js +248 -0
  72. package/dist/native/{ui6.js → View.native.tsrx.js} +39 -25
  73. package/dist/native/WebView.native.tsrx.js +110 -0
  74. package/dist/native/aliases.native.tsrx.js +38 -0
  75. package/dist/native/android/BottomNavigationView.android.tsrx.js +171 -0
  76. package/dist/native/android/CircularProgressIndicator.android.tsrx.js +27 -0
  77. package/dist/native/{ui49.js → android/DrawerLayout.android.tsrx.js} +5 -7
  78. package/dist/native/android/MaterialDialog.android.tsrx.js +62 -0
  79. package/dist/native/android/MaterialSwitch.android.tsrx.js +28 -0
  80. package/dist/native/android/RecyclerView.android.tsrx.js +248 -0
  81. package/dist/native/android/SeekBar.android.tsrx.js +34 -0
  82. package/dist/native/android/index.js +9 -0
  83. package/dist/native/android/openModal.android.js +39 -0
  84. package/dist/native/camera-permission.native.js +47 -0
  85. package/dist/native/child-array.js +15 -0
  86. package/dist/native/{ui3.js → escape-props.native.js} +22 -1
  87. package/dist/native/icons.js +25 -0
  88. package/dist/native/{ui11.js → ios/LiquidGlass.ios.tsrx.js} +4 -4
  89. package/dist/native/{ui12.js → ios/LiquidGlassContainer.ios.tsrx.js} +4 -4
  90. package/dist/native/ios/SideDrawer.ios.tsrx.js +64 -0
  91. package/dist/native/{ui50.js → ios/UIActivityIndicatorView.ios.tsrx.js} +5 -5
  92. package/dist/native/{ui32.js → ios/UIModal.ios.tsrx.js} +10 -6
  93. package/dist/native/{ui53.js → ios/UISlider.ios.tsrx.js} +5 -5
  94. package/dist/native/{ui45.js → ios/UISwitch.ios.tsrx.js} +5 -5
  95. package/dist/native/ios/UITabBar.ios.tsrx.js +166 -0
  96. package/dist/native/ios/UITableView.ios.tsrx.js +270 -0
  97. package/dist/native/ios/index.js +11 -0
  98. package/dist/native/{ui33.js → ios/openModal.ios.js} +5 -4
  99. package/dist/native/modal-presenter.native.js +19 -0
  100. package/dist/native/native/index.js +4 -0
  101. package/dist/native/octane-client-build.json +1 -1
  102. package/dist/native/pan.native.tsrx.js +66 -0
  103. package/dist/native/platform.native.js +10 -0
  104. package/dist/native/refresh-metrics.js +9 -0
  105. package/dist/native/refresh.native.js +177 -0
  106. package/dist/native/{ui34.js → root-layout.native.js} +6 -1
  107. package/dist/native/{ui21.js → route.native.js} +96 -12
  108. package/dist/native/sheet-detents.native.js +102 -0
  109. package/dist/native/{ui61.js → sheet-service.native.js} +19 -9
  110. package/dist/native/sheet-snap.js +35 -0
  111. package/dist/native/text-write.native.js +27 -0
  112. package/dist/native/theme/status-bar-scheme.native.js +17 -0
  113. package/dist/{web/ui29.js → native/theme/theme-scheme.js} +2 -2
  114. package/dist/native/toast-anchor.native.tsrx.js +185 -0
  115. package/dist/native/translate.native.js +11 -0
  116. package/dist/native/ui.js +93 -52
  117. package/dist/native/use-back.native.tsrx.js +9 -0
  118. package/dist/native/useMeasure.native.tsrx.js +64 -0
  119. package/dist/native/video-chrome.native.tsrx.js +365 -0
  120. package/dist/web/Absolute.web.tsrx.js +47 -0
  121. package/dist/web/Accordion.web.tsrx.js +85 -0
  122. package/dist/web/{ui46.js → ActivityIndicator.web.tsrx.js} +1 -1
  123. package/dist/web/Alert.web.tsrx.js +79 -0
  124. package/dist/web/Avatar.web.tsrx.js +106 -0
  125. package/dist/web/AvatarGroup.web.tsrx.js +108 -0
  126. package/dist/web/Badge.web.tsrx.js +37 -0
  127. package/dist/web/Banner.web.tsrx.js +79 -0
  128. package/dist/web/Breadcrumb.web.tsrx.js +135 -0
  129. package/dist/web/Button.web.tsrx.js +45 -0
  130. package/dist/web/CameraView.web.tsrx.js +310 -0
  131. package/dist/web/Card.web.tsrx.js +73 -0
  132. package/dist/web/Checkbox.web.tsrx.js +89 -0
  133. package/dist/web/CheckboxGroup.web.tsrx.js +79 -0
  134. package/dist/web/Chip.web.tsrx.js +64 -0
  135. package/dist/web/Collapsible.web.tsrx.js +94 -0
  136. package/dist/web/CommandPalette.web.tsrx.js +125 -0
  137. package/dist/web/ContextMenu.web.tsrx.js +154 -0
  138. package/dist/web/{ui44.js → Drawer.web.tsrx.js} +13 -9
  139. package/dist/web/DropdownMenu.web.tsrx.js +162 -0
  140. package/dist/web/Empty.web.tsrx.js +89 -0
  141. package/dist/web/FieldGroup.web.tsrx.js +57 -0
  142. package/dist/web/FormField.web.tsrx.js +92 -0
  143. package/dist/web/Grid.web.tsrx.js +65 -0
  144. package/dist/web/{ui52.js → Heading.web.tsrx.js} +2 -2
  145. package/dist/web/Icon.web.tsrx.js +273 -0
  146. package/dist/web/{ui25.js → Image.web.tsrx.js} +2 -2
  147. package/dist/web/InputNumber.web.tsrx.js +99 -0
  148. package/dist/web/InputRating.web.tsrx.js +72 -0
  149. package/dist/web/InputTags.web.tsrx.js +122 -0
  150. package/dist/web/Kbd.web.tsrx.js +37 -0
  151. package/dist/web/{ui48.js → Meter.web.tsrx.js} +1 -1
  152. package/dist/web/{ui19.js → NavLink.web.tsrx.js} +1 -1
  153. package/dist/web/NavigationMenu.web.tsrx.js +118 -0
  154. package/dist/web/{ui31.js → Overlay.web.tsrx.js} +2 -2
  155. package/dist/web/Pager.web.tsrx.js +337 -0
  156. package/dist/web/Pagination.web.tsrx.js +80 -0
  157. package/dist/web/PinInput.web.tsrx.js +72 -0
  158. package/dist/web/{ui33.js → Popover.web.tsrx.js} +3 -3
  159. package/dist/web/{ui15.js → Pressable.web.tsrx.js} +68 -95
  160. package/dist/web/ProgressGroup.web.tsrx.js +109 -0
  161. package/dist/web/RadioGroup.web.tsrx.js +69 -0
  162. package/dist/web/{ui14.js → RichText.web.tsrx.js} +2 -2
  163. package/dist/web/Row.web.tsrx.js +250 -0
  164. package/dist/web/{ui42.js → SafeArea.web.tsrx.js} +1 -1
  165. package/dist/web/{ui38.js → Screen.web.tsrx.js} +1 -1
  166. package/dist/web/{ui24.js → ScrollBox.web.tsrx.js} +1 -1
  167. package/dist/web/ScrollView.web.tsrx.js +388 -0
  168. package/dist/web/SearchInput.web.tsrx.js +137 -0
  169. package/dist/web/SegmentedControl.web.tsrx.js +75 -0
  170. package/dist/web/Select.web.tsrx.js +149 -0
  171. package/dist/web/Separator.web.tsrx.js +42 -0
  172. package/dist/web/Sheet.web.tsrx.js +81 -0
  173. package/dist/web/Skeleton.web.tsrx.js +56 -0
  174. package/dist/web/Slider.web.tsrx.js +97 -0
  175. package/dist/web/{ui12.js → Spacer.web.tsrx.js} +1 -1
  176. package/dist/web/Stack.web.tsrx.js +47 -0
  177. package/dist/web/Stepper.web.tsrx.js +65 -0
  178. package/dist/web/Switch.web.tsrx.js +59 -0
  179. package/dist/web/Table.web.tsrx.js +161 -0
  180. package/dist/web/{ui39.js → Tabs.web.tsrx.js} +33 -16
  181. package/dist/web/{ui13.js → Text.web.tsrx.js} +79 -46
  182. package/dist/web/{ui21.js → TextArea.web.tsrx.js} +4 -4
  183. package/dist/web/{ui20.js → TextInput.web.tsrx.js} +8 -8
  184. package/dist/web/Timeline.web.tsrx.js +172 -0
  185. package/dist/web/Tree.web.tsrx.js +146 -0
  186. package/dist/web/User.web.tsrx.js +116 -0
  187. package/dist/web/Video.web.tsrx.js +400 -0
  188. package/dist/web/View.web.tsrx.js +250 -0
  189. package/dist/web/WebView.web.tsrx.js +235 -0
  190. package/dist/web/aliases.web.tsrx.js +24 -0
  191. package/dist/web/{ui35.js → anim.web.tsrx.js} +3 -2
  192. package/dist/web/child-array.js +15 -0
  193. package/dist/web/icons.js +25 -0
  194. package/dist/web/octane-client-build.json +1 -1
  195. package/dist/web/pan.web.tsrx.js +66 -0
  196. package/dist/web/platform.web.js +9 -0
  197. package/dist/web/refresh-metrics.js +9 -0
  198. package/dist/web/refresh.web.js +133 -0
  199. package/dist/web/{ui18.js → route.web.js} +14 -2
  200. package/dist/web/sheet-detents.web.js +103 -0
  201. package/dist/web/{ui58.js → sheet-service.web.js} +5 -1
  202. package/dist/web/sheet-snap.js +35 -0
  203. package/dist/{native/ui31.js → web/theme/theme-scheme.js} +2 -2
  204. package/dist/web/toast-anchor.web.tsrx.js +142 -0
  205. package/dist/web/transform.web.js +43 -0
  206. package/dist/web/translate.web.js +13 -0
  207. package/dist/web/ui.js +91 -51
  208. package/dist/web/use-back.web.tsrx.js +9 -0
  209. package/dist/web/useMeasure.web.tsrx.js +50 -0
  210. package/dist/web/video-chrome.web.tsrx.js +207 -0
  211. package/dist/web/web/Hoverable.web.tsrx.js +150 -0
  212. package/dist/web/web/Tooltip.web.tsrx.js +183 -0
  213. package/dist/web/web/index.js +3 -0
  214. package/package.json +34 -3
  215. package/src/theme/tokens.css +1599 -194
  216. package/types/android.d.ts +53 -0
  217. package/types/index.d.ts +39 -14
  218. package/types/index.native.d.ts +273 -0
  219. package/types/index.web.d.ts +272 -0
  220. package/types/ios.d.ts +59 -0
  221. package/types/native.d.ts +5 -0
  222. package/types/props.d.ts +989 -44
  223. package/types/web.d.ts +17 -0
  224. package/dist/native/ui10.js +0 -32
  225. package/dist/native/ui25.js +0 -141
  226. package/dist/native/ui27.js +0 -61
  227. package/dist/native/ui39.js +0 -105
  228. package/dist/native/ui4.js +0 -24
  229. package/dist/native/ui44.js +0 -267
  230. package/dist/native/ui54.js +0 -17
  231. package/dist/native/ui57.js +0 -14
  232. package/dist/native/ui7.js +0 -52
  233. package/dist/web/ui10.js +0 -46
  234. package/dist/web/ui11.js +0 -42
  235. package/dist/web/ui22.js +0 -108
  236. package/dist/web/ui23.js +0 -96
  237. package/dist/web/ui26.js +0 -45
  238. package/dist/web/ui3.js +0 -31
  239. package/dist/web/ui30.js +0 -34
  240. package/dist/web/ui34.js +0 -70
  241. package/dist/web/ui40.js +0 -43
  242. package/dist/web/ui43.js +0 -42
  243. package/dist/web/ui49.js +0 -47
  244. package/dist/web/ui5.js +0 -168
  245. package/dist/web/ui50.js +0 -17
  246. package/dist/web/ui51.js +0 -149
  247. package/dist/web/ui53.js +0 -17
  248. package/dist/web/ui57.js +0 -44
  249. package/dist/web/ui6.js +0 -94
  250. package/dist/web/ui7.js +0 -62
  251. package/dist/web/ui8.js +0 -46
  252. package/dist/web/ui9.js +0 -46
  253. /package/dist/native/{ui20.js → RouteHost.native.tsrx.js} +0 -0
  254. /package/dist/native/{ui40.js → anim.native.tsrx.js} +0 -0
  255. /package/dist/native/{ui2.js → cx.js} +0 -0
  256. /package/dist/native/{ui5.js → layout-child.native.js} +0 -0
  257. /package/dist/native/{ui51.js → meter-math.js} +0 -0
  258. /package/dist/native/{ui36.js → platformProps.native.js} +0 -0
  259. /package/dist/native/{ui37.js → popover-position.js} +0 -0
  260. /package/dist/native/{ui19.js → route-table.js} +0 -0
  261. /package/dist/native/{ui46.js → safeAreaInsets.native.tsrx.js} +0 -0
  262. /package/dist/native/{ui18.js → stacks.native.js} +0 -0
  263. /package/dist/native/{ui58.js → store.js} +0 -0
  264. /package/dist/native/{ui41.js → styled.native.tsrx.js} +0 -0
  265. /package/dist/native/{ui28.js → svg.native.js} +0 -0
  266. /package/dist/native/{ui30.js → theme/colorScheme.native.js} +0 -0
  267. /package/dist/native/{ui59.js → use-store.native.tsrx.js} +0 -0
  268. /package/dist/native/{ui42.js → windows.native.js} +0 -0
  269. /package/dist/web/{ui16.js → Link.web.tsrx.js} +0 -0
  270. /package/dist/web/{ui28.js → cx.js} +0 -0
  271. /package/dist/web/{ui2.js → escape-props.web.js} +0 -0
  272. /package/dist/web/{ui4.js → layout-child.web.js} +0 -0
  273. /package/dist/web/{ui47.js → meter-math.js} +0 -0
  274. /package/dist/web/{ui45.js → platformProps.web.js} +0 -0
  275. /package/dist/web/{ui32.js → popover-position.js} +0 -0
  276. /package/dist/web/{ui17.js → route-table.js} +0 -0
  277. /package/dist/web/{ui41.js → safeAreaInsets.web.tsrx.js} +0 -0
  278. /package/dist/web/{ui54.js → stacks.web.js} +0 -0
  279. /package/dist/web/{ui55.js → store.js} +0 -0
  280. /package/dist/web/{ui36.js → styled.web.tsrx.js} +0 -0
  281. /package/dist/web/{ui27.js → theme/colorScheme.web.js} +0 -0
  282. /package/dist/web/{ui56.js → use-store.web.tsrx.js} +0 -0
  283. /package/dist/web/{ui37.js → windows.web.js} +0 -0
@@ -0,0 +1,57 @@
1
+ import { applyEscapeProps } from "./escape-props.web.js";
2
+ import { __s, bag10, bag3, child, clone, ifBlock, queueRefAttach, queueRefDetach, setAriaAttribute, setStyle, sibling, template } from "octane";
3
+ import { bindSignalAttribute, bindSignalChild, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
4
+ //#region src/FieldGroup.web.tsrx
5
+ enableSignalBindings(1, true);
6
+ var _t$0 = /* @__PURE__ */ template("<span class=\"vx-fieldgroup-label\"></span>");
7
+ var _t$1 = /* @__PURE__ */ template("<div role=\"group\"><!><!></div>");
8
+ function __then$0(__props, __s, __extra) {
9
+ const props = __extra[0];
10
+ let _b = __s.slots[0];
11
+ if (_b === void 0) {
12
+ let _m0;
13
+ const _root = clone(_t$0);
14
+ _m0 = _root;
15
+ _b = bag3(__s, _root, _m0, null, void 0);
16
+ }
17
+ _b.d = bindSignalChild(__s, _b.d, 1, _b.a, props.label, "b:34af4725", null, void 0, void 0, void 0, true);
18
+ }
19
+ var _rm$4 = [
20
+ "r",
21
+ "b",
22
+ "a"
23
+ ];
24
+ var FieldGroup = /* @__PURE__ */ __s(function FieldGroup(props, __s, __extra) {
25
+ let _b = __s.slots[0];
26
+ if (_b === void 0) {
27
+ let _m0, _m1, _m6, _m7;
28
+ const _root = clone(_t$1);
29
+ queueRefAttach(__s, _m1 = (e) => applyEscapeProps(e, props), _m0 = _root);
30
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
31
+ const _el0 = child(_root);
32
+ _m6 = _el0;
33
+ _m7 = sibling(_el0, 1);
34
+ _b = bag10(__s, _root, _m0, _m1, void 0, void 0, void 0, void 0, _m6, _m7, null, void 0);
35
+ __s.refFields = _rm$4;
36
+ } else {
37
+ const _r = (e) => applyEscapeProps(e, props);
38
+ if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
39
+ }
40
+ _b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:dccc9dcc", setPlainAttribute);
41
+ _b.d = updateFreshClassName(["vx-fieldgroup", props.className], _b.d, _b.a);
42
+ {
43
+ const _v = props.style;
44
+ if (_b.e !== _v) {
45
+ setStyle(_b.a, _v, _b.e);
46
+ _b.e = _v;
47
+ }
48
+ }
49
+ _b.f = bindSignalAttribute(__s, _b.f, _b.a, "aria-label", props.label, "b:8005e911", setAriaAttribute);
50
+ {
51
+ const __ifCondition = props.label != null;
52
+ ifBlock(__s, 1, _b.a, __ifCondition, __then$0, null, _b.g, __ifCondition ? [props] : void 0);
53
+ }
54
+ _b.k = bindSignalChild(__s, _b.k, 2, _b.a, props.children, "b:53b4c437", _b.h, true, void 0, void 0, void 0);
55
+ });
56
+ //#endregion
57
+ export { FieldGroup };
@@ -0,0 +1,92 @@
1
+ import { applyEscapeProps } from "./escape-props.web.js";
2
+ import { __s, bag0, bag10, bag5, child, clone, ifBlock, queueRefAttach, queueRefDetach, setStyle, sibling, template } from "octane";
3
+ import { bindSignalAttribute, bindSignalChild, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
4
+ //#region src/FormField.web.tsrx
5
+ enableSignalBindings(1, true);
6
+ var _t$0 = /* @__PURE__ */ template("<span class=\"vx-field-required\" aria-hidden=\"true\"> *</span>");
7
+ var _t$1 = /* @__PURE__ */ template("<span class=\"vx-field-label\"><!><!></span>");
8
+ var _t$2 = /* @__PURE__ */ template("<span></span>");
9
+ var _t$3 = /* @__PURE__ */ template("<div role=\"group\"><!><!><!></div>");
10
+ function __then$2(__props, __s, __extra) {
11
+ let _b = __s.slots[0];
12
+ if (_b === void 0) {
13
+ const _root = clone(_t$0);
14
+ _b = bag0(__s, _root);
15
+ }
16
+ }
17
+ function __then$0(__props, __s, __extra) {
18
+ const props = __extra[0];
19
+ let _b = __s.slots[0];
20
+ if (_b === void 0) {
21
+ let _m0, _m1, _m2;
22
+ const _root = clone(_t$1);
23
+ _m0 = _root;
24
+ _m1 = sibling(child(_root), 1);
25
+ _m2 = child(_root);
26
+ _b = bag5(__s, _root, _m0, _m1, _m2, null, void 0);
27
+ }
28
+ _b.f = bindSignalChild(__s, _b.f, 1, _b.a, props.label, "b:663cedea", _b.c, true, void 0, void 0, void 0);
29
+ ifBlock(__s, 2, _b.a, props.required, __then$2, null, _b.b);
30
+ }
31
+ function __then$6(__props, __s, __extra) {
32
+ const message = __extra[0];
33
+ const props = __extra[1];
34
+ let _b = __s.slots[0];
35
+ if (_b === void 0) {
36
+ let _m1;
37
+ const _root = clone(_t$2);
38
+ _m1 = _root;
39
+ _b = bag5(__s, _root, void 0, _m1, void 0, null, void 0);
40
+ }
41
+ _b.a = updateFreshClassName(["vx-field-msg", props.error ? "vx-field-msg--error" : void 0], _b.a, _b.b);
42
+ _b.c = bindSignalAttribute(__s, _b.c, _b.b, "role", props.error ? "alert" : void 0, "b:5c00125d", setPlainAttribute);
43
+ _b.f = bindSignalChild(__s, _b.f, 1, _b.b, message, "b:015a2183", null, void 0, void 0, void 0, true);
44
+ }
45
+ var _rm$9 = [
46
+ "r",
47
+ "b",
48
+ "a"
49
+ ];
50
+ var FormField = /* @__PURE__ */ __s(function FormField(props, __s, __extra) {
51
+ const message = props.error ?? props.hint;
52
+ let _b = __s.slots[0];
53
+ if (_b === void 0) {
54
+ let _m0, _m1, _m5, _m6, _m7;
55
+ const _root = clone(_t$3);
56
+ queueRefAttach(__s, _m1 = (e) => applyEscapeProps(e, props), _m0 = _root);
57
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
58
+ const _el0 = child(_root);
59
+ _m5 = _el0;
60
+ _m6 = sibling(_el0, 2);
61
+ _m7 = sibling(_el0, 1);
62
+ _b = bag10(__s, _root, _m0, _m1, void 0, void 0, void 0, _m5, _m6, _m7, null, void 0);
63
+ __s.refFields = _rm$9;
64
+ } else {
65
+ const _r = (e) => applyEscapeProps(e, props);
66
+ if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
67
+ }
68
+ _b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:73984c1b", setPlainAttribute);
69
+ _b.d = updateFreshClassName([
70
+ "vx-field",
71
+ props.error ? "vx-field--error" : void 0,
72
+ props.className
73
+ ], _b.d, _b.a);
74
+ {
75
+ const _v = props.style;
76
+ if (_b.e !== _v) {
77
+ setStyle(_b.a, _v, _b.e);
78
+ _b.e = _v;
79
+ }
80
+ }
81
+ {
82
+ const __ifCondition = props.label != null;
83
+ ifBlock(__s, 1, _b.a, __ifCondition, __then$0, null, _b.f, __ifCondition ? [props] : void 0);
84
+ }
85
+ _b.k = bindSignalChild(__s, _b.k, 2, _b.a, props.children, "b:84d6df3e", _b.h, true, void 0, void 0, void 0);
86
+ {
87
+ const __ifCondition$ = message != null;
88
+ ifBlock(__s, 3, _b.a, __ifCondition$, __then$6, null, _b.g, __ifCondition$ ? [message, props] : void 0);
89
+ }
90
+ });
91
+ //#endregion
92
+ export { FormField };
@@ -0,0 +1,65 @@
1
+ import { applyEscapeProps } from "./escape-props.web.js";
2
+ import { __s, bag16, clone, queueRefAttach, queueRefDetach, setAriaAttribute, setStyle, template } from "octane";
3
+ import { bindSignalAttribute, bindSignalChild, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
4
+ //#region src/Grid.web.tsrx
5
+ enableSignalBindings(1, true);
6
+ var _t$0 = /* @__PURE__ */ template("<div></div>");
7
+ var _rm$1 = [
8
+ "r",
9
+ "e",
10
+ "b"
11
+ ];
12
+ function parseTracks(spec) {
13
+ return spec?.split(",").map((part) => {
14
+ const track = part.trim();
15
+ if (track === "auto") return "auto";
16
+ if (track.endsWith("*")) return `${track.slice(0, -1) || "1"}fr`;
17
+ return /^\d+(?:\.\d+)?$/.test(track) ? `${track}px` : track;
18
+ }).join(" ");
19
+ }
20
+ var warnedAboutGap = false;
21
+ var Grid = /* @__PURE__ */ __s(function Grid(props, __s, __extra) {
22
+ if (props.gap != null && !warnedAboutGap) {
23
+ warnedAboutGap = true;
24
+ console.warn("[Grid] gap was removed; use child margins");
25
+ }
26
+ if (__s.block.pending && !__s.block.crossRenderUpdate) return;
27
+ let _b = __s.slots[0];
28
+ if (_b === void 0) {
29
+ let _m1, _m4;
30
+ const _root = clone(_t$0);
31
+ _m1 = _root;
32
+ queueRefAttach(__s, _m4 = (el) => applyEscapeProps(el, props), _m1);
33
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.e, _b.b));
34
+ _b = bag16(__s, _root, void 0, _m1, void 0, void 0, _m4, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, null, void 0);
35
+ __s.refFields = _rm$1;
36
+ } else {
37
+ const _r = (el) => applyEscapeProps(el, props);
38
+ if (_r !== _b.e) _b.e = replaceRef(__s, _b.e, _r, _b.b);
39
+ }
40
+ _b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:911c4b44", setPlainAttribute);
41
+ _b.c = updateFreshClassName(["vx-grid", props.className], _b.c, _b.b);
42
+ {
43
+ const _v = {
44
+ ...props.style,
45
+ ...props.rows ? { gridTemplateRows: parseTracks(props.rows) } : {},
46
+ ...props.columns ? { gridTemplateColumns: parseTracks(props.columns) } : {}
47
+ };
48
+ if (_b.d !== _v) {
49
+ setStyle(_b.b, _v, _b.d);
50
+ _b.d = _v;
51
+ }
52
+ }
53
+ _b.f = bindSignalAttribute(__s, _b.f, _b.b, "role", props.accessibilityRole, "b:b794a0b7", setPlainAttribute);
54
+ _b.g = bindSignalAttribute(__s, _b.g, _b.b, "aria-label", props.accessibilityLabel, "b:00e1dbaf", setAriaAttribute);
55
+ _b.h = bindSignalAttribute(__s, _b.h, _b.b, "aria-hidden", props.accessible === false ? true : void 0, "b:13bc3ace", setAriaAttribute);
56
+ _b.i = bindSignalAttribute(__s, _b.i, _b.b, "aria-description", props.accessibilityHint, "b:3ed39aab", setAriaAttribute);
57
+ _b.j = bindSignalAttribute(__s, _b.j, _b.b, "aria-valuetext", props.accessibilityValue, "b:aa5afefb", setAriaAttribute);
58
+ _b.k = bindSignalAttribute(__s, _b.k, _b.b, "aria-disabled", props.accessibilityState?.disabled, "b:368249ef", setAriaAttribute);
59
+ _b.l = bindSignalAttribute(__s, _b.l, _b.b, "aria-selected", props.accessibilityState?.selected, "b:17259580", setAriaAttribute);
60
+ _b.m = bindSignalAttribute(__s, _b.m, _b.b, "aria-checked", props.accessibilityState?.checked, "b:b1a9a9d4", setAriaAttribute);
61
+ _b.n = bindSignalAttribute(__s, _b.n, _b.b, "aria-live", props.accessibilityLiveRegion === "none" ? "off" : props.accessibilityLiveRegion, "b:3e20c031", setAriaAttribute);
62
+ _b.q = bindSignalChild(__s, _b.q, 1, _b.b, props.children, "b:fa7b7ee6", null, void 0, void 0, void 0, true);
63
+ });
64
+ //#endregion
65
+ export { Grid };
@@ -1,5 +1,5 @@
1
- import { normStyle } from "./ui4.js";
2
- import { applyWebProps } from "./ui45.js";
1
+ import { normStyle } from "./layout-child.web.js";
2
+ import { applyWebProps } from "./platformProps.web.js";
3
3
  import { bag4, child, clone, componentSlot, drainFrag, markChildrenBlock, template } from "octane";
4
4
  import { textHoleUpdate } from "octane/internal/client";
5
5
  //#region src/Heading.web.tsrx
@@ -0,0 +1,273 @@
1
+ import { applyWebProps } from "./platformProps.web.js";
2
+ import { getIcon } from "./icons.js";
3
+ import { bag10, bag8, bag9, clone, hookSlots, ifBlock, isHydratingStyle, queueRefAttach, queueRefDetach, setStyle, setStyleProperties, setStyleProperty, template } from "octane";
4
+ import { bindSignalAttribute, bindSignalChild, compilerMemoRegion, createElementFromConfig, enableSignalBindings, hookMemoCreate, hookMemoEqual, hookMemoPublish1, replaceRef, setPlainAttribute, setURLAttribute, updateFreshClassAttr, updateFreshClassName } from "octane/internal/client";
5
+ //#region src/Icon.web.tsrx
6
+ enableSignalBindings(1, true);
7
+ var _t$0 = /* @__PURE__ */ template("<svg aria-hidden=\"true\"></svg>", 1);
8
+ var _t$1 = /* @__PURE__ */ template("<svg aria-hidden=\"true\"><path></path></svg>", 1);
9
+ var _t$2 = /* @__PURE__ */ template("<span aria-hidden=\"true\"></span>");
10
+ var _t$3 = /* @__PURE__ */ template("<img/>");
11
+ var _rm$1 = [
12
+ "r",
13
+ "h",
14
+ "b"
15
+ ];
16
+ function __then$0(__props, __s, __extra) {
17
+ const glyph = __extra[0];
18
+ const props = __extra[1];
19
+ const size = __extra[2];
20
+ let _b = __s.slots[0];
21
+ if (_b === void 0) {
22
+ let _m1, _m7;
23
+ const _root = clone(_t$0);
24
+ _m1 = _root;
25
+ queueRefAttach(__s, _m7 = (el) => {
26
+ if (el) el.innerHTML = glyph.markup;
27
+ applyWebProps(el, props.web);
28
+ }, _m1);
29
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.h, _b.b));
30
+ _b = bag8(__s, _root, void 0, _m1, void 0, void 0, void 0, void 0, void 0, _m7);
31
+ __s.refFields = _rm$1;
32
+ } else {
33
+ const _r = (el) => {
34
+ if (el) el.innerHTML = glyph.markup;
35
+ applyWebProps(el, props.web);
36
+ };
37
+ if (_r !== _b.h) _b.h = replaceRef(__s, _b.h, _r, _b.b);
38
+ }
39
+ _b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:3add0cdf", setPlainAttribute);
40
+ _b.c = updateFreshClassAttr(["vx-icon", props.className], _b.c, _b.b);
41
+ _b.d = bindSignalAttribute(__s, _b.d, _b.b, "viewBox", glyph.viewBox ?? "0 0 24 24", "b:c67a6a16", setPlainAttribute);
42
+ _b.e = bindSignalAttribute(__s, _b.e, _b.b, "width", size, "b:fb23295c", setPlainAttribute);
43
+ _b.f = bindSignalAttribute(__s, _b.f, _b.b, "height", size, "b:8d1adcef", setPlainAttribute);
44
+ {
45
+ const _v = props.color ? { color: props.color } : void 0;
46
+ if (_b.g !== _v) {
47
+ setStyle(_b.b, _v, _b.g);
48
+ _b.g = _v;
49
+ }
50
+ }
51
+ }
52
+ var _rm$4 = [
53
+ "r",
54
+ "g",
55
+ "b"
56
+ ];
57
+ function __then$3(__props, __s, __extra) {
58
+ const glyph = __extra[0];
59
+ const props = __extra[1];
60
+ const size = __extra[2];
61
+ let _b = __s.slots[0];
62
+ if (_b === void 0) {
63
+ let _m1, _m6, _m8;
64
+ const _root = clone(_t$1);
65
+ _m1 = _root;
66
+ queueRefAttach(__s, _m6 = (el) => applyWebProps(el, props.web), _m1);
67
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.g, _b.b));
68
+ _m8 = _root.firstChild;
69
+ _b = bag10(__s, _root, void 0, _m1, void 0, void 0, void 0, void 0, _m6, void 0, _m8, void 0);
70
+ __s.refFields = _rm$4;
71
+ } else {
72
+ const _r = (el) => applyWebProps(el, props.web);
73
+ if (_r !== _b.g) _b.g = replaceRef(__s, _b.g, _r, _b.b);
74
+ }
75
+ _b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:9e8c5282", setPlainAttribute);
76
+ _b.c = updateFreshClassAttr(["vx-icon", props.className], _b.c, _b.b);
77
+ _b.d = bindSignalAttribute(__s, _b.d, _b.b, "viewBox", glyph.viewBox ?? "0 0 24 24", "b:43ee4906", setPlainAttribute);
78
+ _b.e = bindSignalAttribute(__s, _b.e, _b.b, "width", size, "b:e7492ac8", setPlainAttribute);
79
+ _b.f = bindSignalAttribute(__s, _b.f, _b.b, "height", size, "b:543c1405", setPlainAttribute);
80
+ _b.h = bindSignalAttribute(__s, _b.h, _b.i, "d", glyph.svg, "b:cdc56533", setPlainAttribute);
81
+ _b.j = bindSignalAttribute(__s, _b.j, _b.i, "fill", props.color ?? "currentColor", "b:fc05dd07", setPlainAttribute);
82
+ }
83
+ var _rm$8 = [
84
+ "r",
85
+ "h",
86
+ "b"
87
+ ];
88
+ function __then$6(__props, __s, __extra) {
89
+ const glyph = __extra[0];
90
+ const props = __extra[1];
91
+ const size = __extra[2];
92
+ let _b = __s.slots[0];
93
+ if (_b === void 0) {
94
+ let _m1, _m7;
95
+ const _root = clone(_t$2);
96
+ _m1 = _root;
97
+ queueRefAttach(__s, _m7 = (el) => applyWebProps(el, props.web), _m1);
98
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.h, _b.b));
99
+ _b = bag10(__s, _root, void 0, _m1, void 0, __s, void 0, void 0, void 0, _m7, null, void 0);
100
+ __s.refFields = _rm$8;
101
+ } else {
102
+ const _r = (el) => applyWebProps(el, props.web);
103
+ if (_r !== _b.h) _b.h = replaceRef(__s, _b.h, _r, _b.b);
104
+ }
105
+ _b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:b2d8391e", setPlainAttribute);
106
+ _b.c = updateFreshClassName(["vx-icon", props.className], _b.c, _b.b);
107
+ {
108
+ const _v0 = glyph.font.family;
109
+ const _v1 = size;
110
+ const _v2 = props.color;
111
+ if (_b.d === __s || isHydratingStyle()) {
112
+ setStyleProperties(_b.b, [
113
+ "fontFamily",
114
+ _v0,
115
+ "fontSize",
116
+ _v1,
117
+ "color",
118
+ _v2
119
+ ], "");
120
+ _b.d = null;
121
+ _b.e = _v0;
122
+ _b.f = _v1;
123
+ _b.g = _v2;
124
+ } else {
125
+ if (_b.e !== _v0) {
126
+ setStyleProperty(_b.b, "fontFamily", _v0, "", _b.e);
127
+ _b.e = _v0;
128
+ }
129
+ if (_b.f !== _v1) {
130
+ setStyleProperty(_b.b, "fontSize", _v1, "", _b.f);
131
+ _b.f = _v1;
132
+ }
133
+ if (_b.g !== _v2) {
134
+ setStyleProperty(_b.b, "color", _v2, "", _b.g);
135
+ _b.g = _v2;
136
+ }
137
+ }
138
+ }
139
+ _b.k = bindSignalChild(__s, _b.k, 1, _b.b, glyph.font.glyph, "b:9acbe14d", null, void 0, void 0, void 0, true);
140
+ }
141
+ var _rm$11 = [
142
+ "r",
143
+ "h",
144
+ "b"
145
+ ];
146
+ function __then$10(__props, __s, __extra) {
147
+ const glyph = __extra[0];
148
+ const props = __extra[1];
149
+ const size = __extra[2];
150
+ let _b = __s.slots[0];
151
+ if (_b === void 0) {
152
+ let _m1, _m7;
153
+ const _root = clone(_t$3);
154
+ _m1 = _root;
155
+ queueRefAttach(__s, _m7 = (el) => applyWebProps(el, props.web), _m1);
156
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.h, _b.b));
157
+ _b = bag8(__s, _root, void 0, _m1, void 0, void 0, void 0, void 0, void 0, _m7);
158
+ __s.refFields = _rm$11;
159
+ } else {
160
+ const _r = (el) => applyWebProps(el, props.web);
161
+ if (_r !== _b.h) _b.h = replaceRef(__s, _b.h, _r, _b.b);
162
+ }
163
+ _b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:64d5b225", setPlainAttribute);
164
+ _b.c = updateFreshClassName(["vx-icon", props.className], _b.c, _b.b);
165
+ _b.d = bindSignalAttribute(__s, _b.d, _b.b, "src", glyph.src, "b:b1335ffd", setURLAttribute);
166
+ _b.e = bindSignalAttribute(__s, _b.e, _b.b, "width", size, "b:4c3cfd41", setPlainAttribute);
167
+ _b.f = bindSignalAttribute(__s, _b.f, _b.b, "height", size, "b:3c1a4d8b", setPlainAttribute);
168
+ _b.g = bindSignalAttribute(__s, _b.g, _b.b, "alt", props.name, "b:49c63153", setPlainAttribute);
169
+ }
170
+ var _rm$15 = [
171
+ "r",
172
+ "g",
173
+ "b"
174
+ ];
175
+ function __then$13(__props, __s, __extra) {
176
+ const glyph = __extra[0];
177
+ const props = __extra[1];
178
+ const size = __extra[2];
179
+ let _b = __s.slots[0];
180
+ if (_b === void 0) {
181
+ let _m1, _m6;
182
+ const _root = clone(_t$2);
183
+ _m1 = _root;
184
+ queueRefAttach(__s, _m6 = (el) => applyWebProps(el, props.web), _m1);
185
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.g, _b.b));
186
+ _b = bag9(__s, _root, void 0, _m1, void 0, __s, void 0, void 0, _m6, null, void 0);
187
+ __s.refFields = _rm$15;
188
+ } else {
189
+ const _r = (el) => applyWebProps(el, props.web);
190
+ if (_r !== _b.g) _b.g = replaceRef(__s, _b.g, _r, _b.b);
191
+ }
192
+ _b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:69ead7e8", setPlainAttribute);
193
+ _b.c = updateFreshClassName(["vx-icon", props.className], _b.c, _b.b);
194
+ {
195
+ const _v0 = size;
196
+ const _v1 = props.color;
197
+ if (_b.d === __s || isHydratingStyle()) {
198
+ setStyleProperties(_b.b, [
199
+ "fontSize",
200
+ _v0,
201
+ "color",
202
+ _v1
203
+ ], "");
204
+ _b.d = null;
205
+ _b.e = _v0;
206
+ _b.f = _v1;
207
+ } else {
208
+ if (_b.e !== _v0) {
209
+ setStyleProperty(_b.b, "fontSize", _v0, "", _b.e);
210
+ _b.e = _v0;
211
+ }
212
+ if (_b.f !== _v1) {
213
+ setStyleProperty(_b.b, "color", _v1, "", _b.f);
214
+ _b.f = _v1;
215
+ }
216
+ }
217
+ }
218
+ _b.j = bindSignalChild(__s, _b.j, 1, _b.b, glyph.text, "b:d3430f0c", null, void 0, void 0, void 0, true);
219
+ }
220
+ function __else$12(__props, __s, __extra) {
221
+ const __block = __s.block;
222
+ const glyph = __extra[0];
223
+ __extra[1];
224
+ __extra[2];
225
+ ifBlock(__s, 0, __block.parentNode, glyph.text, __then$13, null, __block.endMarker, __extra);
226
+ }
227
+ function __else$9(__props, __s, __extra) {
228
+ const __block = __s.block;
229
+ const glyph = __extra[0];
230
+ __extra[1];
231
+ __extra[2];
232
+ ifBlock(__s, 0, __block.parentNode, glyph.src, __then$10, __else$12, __block.endMarker, __extra);
233
+ }
234
+ function __else$5(__props, __s, __extra) {
235
+ const __block = __s.block;
236
+ const glyph = __extra[0];
237
+ __extra[1];
238
+ __extra[2];
239
+ ifBlock(__s, 0, __block.parentNode, glyph.font, __then$6, __else$9, __block.endMarker, __extra);
240
+ }
241
+ function __else$2(__props, __s, __extra) {
242
+ const __block = __s.block;
243
+ const glyph = __extra[0];
244
+ __extra[1];
245
+ __extra[2];
246
+ ifBlock(__s, 0, __block.parentNode, glyph.svg, __then$3, __else$5, __block.endMarker, __extra);
247
+ }
248
+ function _frag$0(props, __s, __extra) {
249
+ const __block = __s.block;
250
+ ifBlock(__s, 0, __block.parentNode, props.h0, props.h1, props.h2, __block.endMarker, props.h3);
251
+ }
252
+ var _hs$ = /* @__PURE__ */ hookSlots(11);
253
+ var Icon = function Icon(props, __s, __extra) {
254
+ const __memoRegion = compilerMemoRegion(__s, _hs$ + 0);
255
+ let __hk = __memoRegion.hooks;
256
+ if (__hk === void 0) __memoRegion.hooks = __hk = hookMemoCreate(3);
257
+ let __hkd0;
258
+ const glyph = (__hkd0 = props, __hk[0] !== true || !hookMemoEqual(__hk[1], __hkd0) ? hookMemoPublish1(__hk, 0, getIcon(props.name), __hkd0) : __hk[2]);
259
+ if (!glyph) return null;
260
+ const size = props.size ?? 24;
261
+ return createElementFromConfig("c:3275b5a7", _frag$0, {
262
+ h0: glyph.markup,
263
+ h1: __then$0,
264
+ h2: __else$2,
265
+ h3: [
266
+ glyph,
267
+ props,
268
+ size
269
+ ]
270
+ });
271
+ };
272
+ //#endregion
273
+ export { Icon };
@@ -1,5 +1,5 @@
1
- import { applyEscapeProps } from "./ui2.js";
2
- import { layoutChildProps } from "./ui4.js";
1
+ import { applyEscapeProps } from "./escape-props.web.js";
2
+ import { layoutChildProps } from "./layout-child.web.js";
3
3
  import { __s, bag8, clone, snapshotSpread, template } from "octane";
4
4
  import { bindSignalHostPropSources, enableSignalBindings } from "octane/internal/client";
5
5
  //#region src/Image.web.tsrx
@@ -0,0 +1,99 @@
1
+ import { applyEscapeProps } from "./escape-props.web.js";
2
+ import { Pressable } from "./Pressable.web.tsrx.js";
3
+ import { TextInput } from "./TextInput.web.tsrx.js";
4
+ import { __s, bag0, bag5, clone, componentSlotVoid, hookSlots, markChildrenBlock, queueRefAttach, queueRefDetach, setStyle, template, useState } from "octane";
5
+ import { bindSignalAttribute, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
6
+ //#region src/InputNumber.web.tsrx
7
+ enableSignalBindings(1, true);
8
+ var _t$0 = /* @__PURE__ */ template("<span>−</span>");
9
+ var _t$1 = /* @__PURE__ */ template("<span>+</span>");
10
+ var _t$2 = /* @__PURE__ */ template("<div></div>");
11
+ var _hs$ = /* @__PURE__ */ hookSlots(3);
12
+ var __childrenBody = {};
13
+ var __childrenBody$ = {};
14
+ var _rm$5 = [
15
+ "r",
16
+ "b",
17
+ "a"
18
+ ];
19
+ var InputNumber = /* @__PURE__ */ __s(function InputNumber(props, __s, __extra) {
20
+ const [internal, setInternal] = useState(props.defaultValue, _hs$ + 0);
21
+ const controlled = props.value !== void 0;
22
+ const value = controlled ? props.value : internal;
23
+ const clamp = (n) => Math.min(props.max ?? Infinity, Math.max(props.min ?? -Infinity, n));
24
+ const setValue = (n) => {
25
+ if (!controlled) setInternal(n);
26
+ props.onValueChange?.(n);
27
+ };
28
+ const stepBy = (dir) => {
29
+ if (props.disabled) return;
30
+ setValue(clamp((value ?? 0) + dir * (props.step ?? 1)));
31
+ };
32
+ if (__s.block.pending && !__s.block.crossRenderUpdate) return;
33
+ function __children$1(__props, __s, __extra) {
34
+ let _b = __s.slots[0];
35
+ if (_b === void 0) {
36
+ const _root = clone(_t$0);
37
+ _b = bag0(__s, _root);
38
+ }
39
+ }
40
+ function __children$4(__props, __s, __extra) {
41
+ let _b = __s.slots[0];
42
+ if (_b === void 0) {
43
+ const _root = clone(_t$1);
44
+ _b = bag0(__s, _root);
45
+ }
46
+ }
47
+ let _b = __s.slots[0];
48
+ if (_b === void 0) {
49
+ let _m0, _m1;
50
+ const _root = clone(_t$2);
51
+ queueRefAttach(__s, _m1 = (e) => applyEscapeProps(e, props), _m0 = _root);
52
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
53
+ _b = bag5(__s, _root, _m0, _m1, void 0, void 0, void 0);
54
+ __s.refFields = _rm$5;
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:46803ab7", setPlainAttribute);
60
+ _b.d = updateFreshClassName([
61
+ "vx-inputnumber",
62
+ props.disabled ? "vx-inputnumber--disabled" : void 0,
63
+ props.className
64
+ ], _b.d, _b.a);
65
+ {
66
+ const _v = props.style;
67
+ if (_b.e !== _v) {
68
+ setStyle(_b.a, _v, _b.e);
69
+ _b.e = _v;
70
+ }
71
+ }
72
+ componentSlotVoid(__s, 1, _b.a, Pressable, {
73
+ "className": "vx-inputnumber-step",
74
+ "disabled": props.disabled,
75
+ "onPress": () => stepBy(-1),
76
+ "accessibilityLabel": "Decrement",
77
+ "children": markChildrenBlock(__children$1, __childrenBody)
78
+ }, void 0, void 0, void 0, void 0, void 0, "c:536aa980");
79
+ componentSlotVoid(__s, 2, _b.a, TextInput, {
80
+ "className": "vx-inputnumber-field",
81
+ "keyboardType": "decimal",
82
+ "editable": !props.disabled,
83
+ "placeholder": props.placeholder,
84
+ "value": value == null ? "" : String(value),
85
+ "onChange": (text) => {
86
+ const n = parseFloat(text);
87
+ if (text === "" || !isNaN(n)) setValue(clamp(text === "" ? 0 : n));
88
+ }
89
+ }, void 0, void 0, 2, void 0, void 0, "c:219cac31");
90
+ componentSlotVoid(__s, 3, _b.a, Pressable, {
91
+ "className": "vx-inputnumber-step",
92
+ "disabled": props.disabled,
93
+ "onPress": () => stepBy(1),
94
+ "accessibilityLabel": "Increment",
95
+ "children": markChildrenBlock(__children$4, __childrenBody$)
96
+ }, void 0, void 0, void 0, void 0, void 0, "c:63ec5d67");
97
+ });
98
+ //#endregion
99
+ export { InputNumber };
@@ -0,0 +1,72 @@
1
+ import { applyEscapeProps } from "./escape-props.web.js";
2
+ import { Icon } from "./Icon.web.tsrx.js";
3
+ import { __s, bag8, clone, createElement, createScopedElement, createScopedValue, hookSlots, queueRefAttach, queueRefDetach, setAriaAttribute, setStyle, template, useState } from "octane";
4
+ import { bindSignalAttribute, bindSignalChild, createElementFromConfig, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
5
+ //#region src/InputRating.web.tsrx
6
+ enableSignalBindings(1, true);
7
+ var _t$0 = /* @__PURE__ */ template("<div role=\"radiogroup\"></div>");
8
+ var _hs$ = /* @__PURE__ */ hookSlots(1);
9
+ var _rm$1 = [
10
+ "r",
11
+ "b",
12
+ "a"
13
+ ];
14
+ var InputRating = /* @__PURE__ */ __s(function InputRating(props, __s, __extra) {
15
+ const max = props.max ?? 5;
16
+ const [internal, setInternal] = useState(props.defaultValue ?? 0, _hs$ + 0);
17
+ const controlled = props.value !== void 0;
18
+ const value = controlled ? props.value : internal;
19
+ const setValue = (n) => {
20
+ if (props.disabled) return;
21
+ if (!controlled) setInternal(n);
22
+ props.onValueChange?.(n);
23
+ };
24
+ if (__s.block.pending && !__s.block.crossRenderUpdate) return;
25
+ let _b = __s.slots[0];
26
+ if (_b === void 0) {
27
+ let _m0, _m1;
28
+ const _root = clone(_t$0);
29
+ queueRefAttach(__s, _m1 = (e) => applyEscapeProps(e, props), _m0 = _root);
30
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
31
+ _b = bag8(__s, _root, _m0, _m1, void 0, void 0, void 0, void 0, null, void 0);
32
+ __s.refFields = _rm$1;
33
+ } else {
34
+ const _r = (e) => applyEscapeProps(e, props);
35
+ if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
36
+ }
37
+ _b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:a2323249", setPlainAttribute);
38
+ _b.d = updateFreshClassName([
39
+ "vx-rating",
40
+ props.disabled ? "vx-rating--disabled" : void 0,
41
+ props.className
42
+ ], _b.d, _b.a);
43
+ {
44
+ const _v = props.style;
45
+ if (_b.e !== _v) {
46
+ setStyle(_b.a, _v, _b.e);
47
+ _b.e = _v;
48
+ }
49
+ }
50
+ _b.f = bindSignalAttribute(__s, _b.f, _b.a, "aria-label", props.accessibilityLabel, "b:995cbbbe", setAriaAttribute);
51
+ _b.i = bindSignalChild(__s, _b.i, 1, _b.a, Array.from({ length: max }, (_, i) => {
52
+ const score = i + 1;
53
+ const on = score <= value;
54
+ return createScopedValue(() => createScopedElement("span", {
55
+ key: i,
56
+ role: "radio",
57
+ "aria-checked": on,
58
+ tabIndex: props.disabled ? void 0 : 0,
59
+ className: ["vx-rating-cell", on ? "vx-rating-cell--on" : void 0],
60
+ onClick: props.disabled ? void 0 : () => setValue(score),
61
+ onKeyDown: (e) => {
62
+ if (props.disabled) return;
63
+ if (e.key === " " || e.key === "Enter") {
64
+ e.preventDefault();
65
+ setValue(score);
66
+ }
67
+ }
68
+ }, () => props.icon ? createScopedValue(() => createElementFromConfig("c:735f7af4", Icon, { name: props.icon })) : createElement("span", { className: "vx-rating-glyph" }, "★")));
69
+ }), "b:7c9fdcbc", null, void 0, void 0, void 0, true);
70
+ });
71
+ //#endregion
72
+ export { InputRating };