@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,137 @@
1
+ import { normStyle } from "./layout-child.web.js";
2
+ import { applyWebProps } from "./platformProps.web.js";
3
+ import { Icon } from "./Icon.web.tsrx.js";
4
+ import { __s, bag1, bag13, child, clone, componentSlot, delegateEvents, hookSlots, ifBlock, queueRefAttach, queueRefDetach, setAriaAttribute, setEventHandler, setStyle, sibling, template, useState } from "octane";
5
+ import { bindSignalAttribute, bindSignalValue, enableSignalBindings, replaceRef, setBooleanAttributeIfChanged, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
6
+ //#region src/SearchInput.web.tsrx
7
+ enableSignalBindings(1, true);
8
+ delegateEvents([
9
+ "click",
10
+ "focusin",
11
+ "focusout",
12
+ "input",
13
+ "keydown"
14
+ ]);
15
+ var _t$0 = /* @__PURE__ */ template("<button type=\"button\" class=\"vx-search-clear\" aria-label=\"Clear search\"></button>");
16
+ var _t$1 = /* @__PURE__ */ template("<div><!><input type=\"search\" class=\"vx-search-field\" data-octane-input=\"i:ae1a301c\" enterKeyHint=\"search\"/><!></div>");
17
+ var _hs$ = /* @__PURE__ */ hookSlots(3);
18
+ function __then$0(__props, __s, __extra) {
19
+ const __block = __s.block;
20
+ const props = __extra[0];
21
+ componentSlot(__s, 0, __block.parentNode, Icon, {
22
+ "name": props.icon ?? "xplat-search",
23
+ "size": 16,
24
+ "className": "vx-search-icon"
25
+ }, __block.endMarker, void 0, 2, void 0, void 0, "c:f0530e5b");
26
+ }
27
+ function __then$3(__props, __s, __extra) {
28
+ const clear = __extra[0];
29
+ let _b = __s.slots[0];
30
+ if (_b === void 0) {
31
+ let _m0;
32
+ const _root = clone(_t$0);
33
+ _m0 = _root;
34
+ setEventHandler(_root, "$$click", clear);
35
+ _b = bag1(__s, _root, _m0);
36
+ } else setEventHandler(_b.a, "$$click", clear);
37
+ componentSlot(__s, 1, _b.a, Icon, {
38
+ "name": "xplat-clear",
39
+ "size": 12
40
+ }, void 0, void 0, 2, void 0, void 0, "c:599c661e");
41
+ }
42
+ var _rm$6 = [
43
+ "r",
44
+ "b",
45
+ "a",
46
+ "r",
47
+ "g",
48
+ "f"
49
+ ];
50
+ var SearchInput = /* @__PURE__ */ __s(function SearchInput(props, __s, __extra) {
51
+ const [internal, setInternal] = useState(props.defaultValue ?? "", _hs$ + 0);
52
+ const value = props.value ?? internal;
53
+ const setValue = (next) => {
54
+ if (props.value === void 0) setInternal(next);
55
+ props.onChange?.(next);
56
+ };
57
+ const clear = () => {
58
+ setValue("");
59
+ props.onClear?.();
60
+ };
61
+ if (__s.block.pending && !__s.block.crossRenderUpdate) return;
62
+ let _b = __s.slots[0];
63
+ if (_b === void 0) {
64
+ let _m0, _m1, _m5, _m6, _m7, _m11, _m12;
65
+ const _root = clone(_t$1);
66
+ queueRefAttach(__s, _m1 = (el) => applyWebProps(el, props.web), _m0 = _root);
67
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
68
+ const _el0 = sibling(child(_root), 1);
69
+ queueRefAttach(__s, _m6 = (el) => {
70
+ if (el) props.bind?.({
71
+ focus: () => el.focus(),
72
+ blur: () => el.blur(),
73
+ native: el
74
+ });
75
+ }, _m5 = _el0);
76
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.g, _b.f));
77
+ _m7 = bindSignalValue(__s, void 0, _el0, value, "i:ae1a301c");
78
+ setEventHandler(_el0, "$$input", (e) => setValue(e.target.value));
79
+ setEventHandler(_el0, "$$keydown", (e) => {
80
+ if (e.key === "Enter" && !e.shiftKey) props.onSubmit?.();
81
+ });
82
+ setEventHandler(_el0, "$$focusin", props.onFocus);
83
+ setEventHandler(_el0, "$$focusout", props.onBlur);
84
+ _m11 = child(_root);
85
+ _m12 = sibling(_el0, 1);
86
+ _b = bag13(__s, _root, _m0, _m1, void 0, void 0, void 0, _m5, _m6, _m7, void 0, void 0, void 0, _m11, _m12);
87
+ __s.refFields = _rm$6;
88
+ } else {
89
+ {
90
+ const _r = (el) => applyWebProps(el, props.web);
91
+ if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
92
+ }
93
+ {
94
+ const _r = (el) => {
95
+ if (el) props.bind?.({
96
+ focus: () => el.focus(),
97
+ blur: () => el.blur(),
98
+ native: el
99
+ });
100
+ };
101
+ if (_r !== _b.g) _b.g = replaceRef(__s, _b.g, _r, _b.f);
102
+ }
103
+ _b.h = bindSignalValue(__s, _b.h, _b.f, value, "i:ae1a301c");
104
+ setEventHandler(_b.f, "$$input", (e) => setValue(e.target.value));
105
+ setEventHandler(_b.f, "$$keydown", (e) => {
106
+ if (e.key === "Enter" && !e.shiftKey) props.onSubmit?.();
107
+ });
108
+ setEventHandler(_b.f, "$$focusin", props.onFocus);
109
+ setEventHandler(_b.f, "$$focusout", props.onBlur);
110
+ }
111
+ _b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:d2d13dd9", setPlainAttribute);
112
+ _b.d = updateFreshClassName([
113
+ "vx-search",
114
+ props.editable === false ? "vx-search--disabled" : void 0,
115
+ props.className
116
+ ], _b.d, _b.a);
117
+ {
118
+ const _v = normStyle(props.style);
119
+ if (_b.e !== _v) {
120
+ setStyle(_b.a, _v, _b.e);
121
+ _b.e = _v;
122
+ }
123
+ }
124
+ _b.i = bindSignalAttribute(__s, _b.i, _b.f, "placeholder", props.placeholder, "b:040640fd", setPlainAttribute);
125
+ _b.j = bindSignalAttribute(__s, _b.j, _b.f, "aria-label", props.accessibilityLabel ?? props.placeholder, "b:ce6ea1a5", setAriaAttribute);
126
+ _b.k = setBooleanAttributeIfChanged(props.editable === false, _b.k, _b.f, "readonly");
127
+ {
128
+ const __ifCondition = props.icon !== false;
129
+ ifBlock(__s, 1, _b.a, __ifCondition, __then$0, null, _b.l, __ifCondition ? [props] : void 0);
130
+ }
131
+ {
132
+ const __ifCondition$ = value !== "" && props.editable !== false;
133
+ ifBlock(__s, 2, _b.a, __ifCondition$, __then$3, null, _b.m, __ifCondition$ ? [clear] : void 0);
134
+ }
135
+ });
136
+ //#endregion
137
+ export { SearchInput };
@@ -0,0 +1,75 @@
1
+ import { applyWebProps } from "./platformProps.web.js";
2
+ import { __s, bag10, child, clone, createScopedElement, hookSlots, queueRefAttach, queueRefDetach, setAriaAttribute, setStyle, template, useState } from "octane";
3
+ import { bindSignalAttribute, bindSignalChild, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
4
+ //#region src/SegmentedControl.web.tsrx
5
+ enableSignalBindings(1, true);
6
+ var _t$0 = /* @__PURE__ */ template("<div role=\"radiogroup\"><!></div>");
7
+ var _hs$ = /* @__PURE__ */ hookSlots(1);
8
+ var _rm$1 = [
9
+ "r",
10
+ "b",
11
+ "a"
12
+ ];
13
+ var SegmentedControl = /* @__PURE__ */ __s(function SegmentedControl(props, __s, __extra) {
14
+ const [internal, setInternal] = useState(props.defaultValue, _hs$ + 0);
15
+ const current = props.value ?? internal;
16
+ const select = (value) => {
17
+ if (props.value === void 0) setInternal(value);
18
+ props.onValueChange?.(value);
19
+ };
20
+ if (__s.block.pending && !__s.block.crossRenderUpdate) return;
21
+ let _b = __s.slots[0];
22
+ if (_b === void 0) {
23
+ let _m0, _m1, _m7;
24
+ const _root = clone(_t$0);
25
+ queueRefAttach(__s, _m1 = (e) => applyWebProps(e, props.web), _m0 = _root);
26
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
27
+ _m7 = child(_root);
28
+ _b = bag10(__s, _root, _m0, _m1, void 0, void 0, void 0, void 0, void 0, _m7, null, void 0);
29
+ __s.refFields = _rm$1;
30
+ } else {
31
+ const _r = (e) => applyWebProps(e, props.web);
32
+ if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
33
+ }
34
+ _b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:7962f239", setPlainAttribute);
35
+ _b.d = bindSignalAttribute(__s, _b.d, _b.a, "aria-label", props.accessibilityLabel, "b:0963f8ba", setAriaAttribute);
36
+ _b.e = bindSignalAttribute(__s, _b.e, _b.a, "aria-disabled", props.disabled || void 0, "b:7e55726c", setAriaAttribute);
37
+ _b.f = updateFreshClassName([
38
+ "vx-segmented",
39
+ props.disabled ? "vx-segmented--disabled" : void 0,
40
+ props.className
41
+ ], _b.f, _b.a);
42
+ {
43
+ const _v = props.style;
44
+ if (_b.g !== _v) {
45
+ setStyle(_b.a, _v, _b.g);
46
+ _b.g = _v;
47
+ }
48
+ }
49
+ _b.k = bindSignalChild(__s, _b.k, 1, _b.a, props.options.map((opt) => {
50
+ const selected = current === opt.value;
51
+ const disabled = props.disabled || opt.disabled;
52
+ return createScopedElement("div", {
53
+ key: opt.value,
54
+ role: "radio",
55
+ "aria-checked": selected,
56
+ "aria-disabled": disabled || void 0,
57
+ tabIndex: disabled ? void 0 : 0,
58
+ className: [
59
+ "vx-segment",
60
+ selected ? "vx-segment--on" : void 0,
61
+ disabled ? "vx-segment--disabled" : void 0
62
+ ],
63
+ onClick: disabled ? void 0 : () => select(opt.value),
64
+ onKeyDown: (e) => {
65
+ if (disabled) return;
66
+ if (e.key === " " || e.key === "Enter") {
67
+ e.preventDefault();
68
+ select(opt.value);
69
+ }
70
+ }
71
+ }, () => createScopedElement("span", { className: "vx-segment-label" }, () => opt.label ?? opt.value));
72
+ }), "b:5dbdf197", _b.h, true, void 0, void 0, void 0);
73
+ });
74
+ //#endregion
75
+ export { SegmentedControl };
@@ -0,0 +1,149 @@
1
+ import { Pressable } from "./Pressable.web.tsrx.js";
2
+ import { Popover } from "./Popover.web.tsrx.js";
3
+ import { TextInput } from "./TextInput.web.tsrx.js";
4
+ import { bag4, bag9, child, clone, componentSlotVoid, createScopedElement, createScopedValue, drainFrag, hookSlots, markChildrenBlock, positionalChildren, setAriaAttribute, sibling, template, useEffect, useRef, useState } from "octane";
5
+ import { bindSignalAttribute, bindSignalChild, childTextHoleUpdate, compilerMemoRegion, createElementFromConfig, enableSignalBindings, hookMemoCreate, hookMemoPublishInvariant, updateFreshClassName } from "octane/internal/client";
6
+ //#region src/Select.web.tsrx
7
+ enableSignalBindings(1, true);
8
+ var _t$0 = /* @__PURE__ */ template("<span></span><span class=\"vx-select-caret\" aria-hidden=\"true\">▾</span>", 0, 1);
9
+ var _t$1 = /* @__PURE__ */ template("<!><div role=\"listbox\" class=\"vx-menu-list vx-select-list\"><!></div>", 0, 1);
10
+ var _hs$ = /* @__PURE__ */ hookSlots(5);
11
+ var __childrenBody = {};
12
+ var __childrenBody$ = {};
13
+ var Select = function Select(props, __s, __extra) {
14
+ const __block = __s.block;
15
+ const __memoRegion = compilerMemoRegion(__s, _hs$ + 0);
16
+ let __hk = __memoRegion.hooks;
17
+ if (__hk === void 0) __memoRegion.hooks = __hk = hookMemoCreate(1);
18
+ const anchor = useRef(null, _hs$ + 0);
19
+ const [internalOpen, setInternalOpen] = useState(props.defaultOpen ?? false, _hs$ + 1);
20
+ const openControlled = props.open !== void 0;
21
+ const open = openControlled ? props.open : internalOpen;
22
+ const norm = __hk[0] ?? hookMemoPublishInvariant(__hk, 0, (v) => v === void 0 ? [] : Array.isArray(v) ? v : [v]);
23
+ const [internalValue, setInternalValue] = useState(norm(props.defaultValue), _hs$ + 2);
24
+ const valueControlled = props.value !== void 0;
25
+ const selected = valueControlled ? norm(props.value) : internalValue;
26
+ const [query, setQuery] = useState("", _hs$ + 3);
27
+ const setOpen = (next) => {
28
+ if (props.disabled && next) return;
29
+ if (!openControlled) setInternalOpen(next);
30
+ if (!next) setQuery("");
31
+ props.onOpenChange?.(next);
32
+ };
33
+ useEffect(() => {
34
+ if (!open) return;
35
+ const onKey = (e) => {
36
+ if (e.key === "Escape") setOpen(false);
37
+ };
38
+ window.addEventListener("keydown", onKey);
39
+ return () => window.removeEventListener("keydown", onKey);
40
+ }, [open], _hs$ + 4);
41
+ const report = (keys) => {
42
+ if (!valueControlled) setInternalValue(keys);
43
+ props.onValueChange?.(props.multiple ? keys : keys[0]);
44
+ };
45
+ const pick = (opt) => {
46
+ if (opt.disabled) return;
47
+ if (props.multiple) report(selected.includes(opt.value) ? selected.filter((v) => v !== opt.value) : [...selected, opt.value]);
48
+ else {
49
+ report([opt.value]);
50
+ setOpen(false);
51
+ }
52
+ };
53
+ const labelFor = (v) => props.options.find((o) => o.value === v)?.label ?? v;
54
+ const triggerText = selected.length ? selected.map(labelFor).join(", ") : props.placeholder ?? "";
55
+ const shown = props.searchable && query ? props.options.filter((o) => (o.label ?? o.value).toLowerCase().includes(query.toLowerCase())) : props.options;
56
+ if (__s.block.pending && !__s.block.crossRenderUpdate) return;
57
+ function __children$1(__props, __s, __extra) {
58
+ const __block = __s.block;
59
+ let _b = __s.slots[0];
60
+ if (_b === void 0) {
61
+ let _m1;
62
+ const _root = clone(_t$0);
63
+ _m1 = child(_root);
64
+ drainFrag(_root, __block.parentNode, __block.endMarker);
65
+ _b = bag4(__s, null, void 0, _m1, null, void 0);
66
+ }
67
+ _b.a = updateFreshClassName(["vx-select-value", selected.length ? void 0 : "vx-select-placeholder"], _b.a, _b.b);
68
+ {
69
+ const _v = triggerText;
70
+ _b.c = childTextHoleUpdate(__s, 1, _b.b, _v, _b.c, _b.d);
71
+ _b.d = _v;
72
+ }
73
+ }
74
+ function __children$4(__props, __s, __extra) {
75
+ const __block = __s.block;
76
+ let _b = __s.slots[0];
77
+ if (_b === void 0) {
78
+ let _m1, _m2, _m3, _m6;
79
+ const _root = clone(_t$1);
80
+ const _el0 = sibling(child(_root), 1);
81
+ _m1 = _el0;
82
+ _m2 = __block.parentNode;
83
+ _m3 = child(_root);
84
+ _m6 = child(_el0);
85
+ drainFrag(_root, __block.parentNode, __block.endMarker);
86
+ _b = bag9(__s, null, void 0, _m1, _m2, _m3, null, void 0, _m6, null, void 0);
87
+ }
88
+ _b.a = bindSignalAttribute(__s, _b.a, _b.b, "aria-multiselectable", props.multiple || void 0, "b:1676b9fd", setAriaAttribute);
89
+ _b.j = bindSignalChild(__s, _b.j, 1, _b.c, props.searchable ? createScopedValue(() => createElementFromConfig("c:e798cc60", TextInput, {
90
+ className: "vx-select-search",
91
+ placeholder: "Search…",
92
+ value: query,
93
+ onChange: setQuery
94
+ })) : null, "b:b4422ae5", _b.d, true, void 0, void 0, void 0);
95
+ _b.k = bindSignalChild(__s, _b.k, 2, _b.b, shown.map((opt) => {
96
+ const isSelected = selected.includes(opt.value);
97
+ return createScopedElement("div", {
98
+ key: opt.value,
99
+ role: "option",
100
+ "aria-selected": isSelected,
101
+ "aria-disabled": opt.disabled || void 0,
102
+ tabIndex: opt.disabled ? void 0 : 0,
103
+ className: [
104
+ "vx-menu-item",
105
+ "vx-select-option",
106
+ isSelected ? "vx-select-option--on" : void 0,
107
+ opt.disabled ? "vx-menu-item--disabled" : void 0
108
+ ],
109
+ onClick: opt.disabled ? void 0 : () => pick(opt),
110
+ onKeyDown: (e) => {
111
+ if (!opt.disabled && (e.key === " " || e.key === "Enter")) {
112
+ e.preventDefault();
113
+ pick(opt);
114
+ }
115
+ }
116
+ }, () => positionalChildren([createScopedElement("span", {
117
+ className: "vx-select-check",
118
+ "aria-hidden": "true"
119
+ }, () => isSelected ? "✓" : ""), createScopedElement("span", { className: "vx-menu-item-label" }, () => opt.label ?? opt.value)]));
120
+ }), "b:8cf65141", _b.g, true, void 0, void 0, void 0);
121
+ }
122
+ componentSlotVoid(__s, 0, __block.parentNode, Pressable, {
123
+ "bind": (e) => {
124
+ anchor.current = e;
125
+ },
126
+ "id": props.id,
127
+ "className": [
128
+ "vx-select-trigger",
129
+ props.disabled ? "vx-select--disabled" : void 0,
130
+ props.className
131
+ ],
132
+ "style": props.style,
133
+ "disabled": props.disabled,
134
+ "onPress": () => setOpen(!open),
135
+ "accessibilityLabel": props.accessibilityLabel,
136
+ "accessibilityState": { disabled: props.disabled },
137
+ "children": markChildrenBlock(__children$1, __childrenBody)
138
+ }, __block.endMarker, void 0, void 0, void 0, void 0, "c:427396d8");
139
+ componentSlotVoid(__s, 1, __block.parentNode, Popover, {
140
+ "anchor": anchor,
141
+ "open": open,
142
+ "placement": props.placement ?? "bottom",
143
+ "onDismiss": () => setOpen(false),
144
+ "className": "vx-menu",
145
+ "children": markChildrenBlock(__children$4, __childrenBody$)
146
+ }, __block.endMarker, void 0, void 0, void 0, void 0, "c:3dd5c3b4");
147
+ };
148
+ //#endregion
149
+ export { Select };
@@ -0,0 +1,42 @@
1
+ import { applyEscapeProps } from "./escape-props.web.js";
2
+ import { __s, bag6, clone, queueRefAttach, queueRefDetach, setStyle, template } from "octane";
3
+ import { bindSignalAttribute, enableSignalBindings, replaceRef, setAriaAttributeIfChanged, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
4
+ //#region src/Separator.web.tsrx
5
+ enableSignalBindings(1, true);
6
+ var _t$0 = /* @__PURE__ */ template("<div role=\"separator\"></div>");
7
+ var _rm$0 = [
8
+ "r",
9
+ "b",
10
+ "a"
11
+ ];
12
+ var Separator = /* @__PURE__ */ __s(function Separator(props, __s, __extra) {
13
+ const vertical = props.orientation === "vertical";
14
+ let _b = __s.slots[0];
15
+ if (_b === void 0) {
16
+ let _m0, _m1;
17
+ const _root = clone(_t$0);
18
+ queueRefAttach(__s, _m1 = (e) => applyEscapeProps(e, props), _m0 = _root);
19
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
20
+ _b = bag6(__s, _root, _m0, _m1, void 0, void 0, void 0, void 0);
21
+ __s.refFields = _rm$0;
22
+ } else {
23
+ const _r = (e) => applyEscapeProps(e, props);
24
+ if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
25
+ }
26
+ _b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:5c0bbcd9", setPlainAttribute);
27
+ _b.d = setAriaAttributeIfChanged(vertical ? "vertical" : "horizontal", _b.d, _b.a, "aria-orientation");
28
+ _b.e = updateFreshClassName([
29
+ "vx-separator",
30
+ vertical ? "vx-separator--v" : "vx-separator--h",
31
+ props.className
32
+ ], _b.e, _b.a);
33
+ {
34
+ const _v = props.style;
35
+ if (_b.f !== _v) {
36
+ setStyle(_b.a, _v, _b.f);
37
+ _b.f = _v;
38
+ }
39
+ }
40
+ });
41
+ //#endregion
42
+ export { Separator };
@@ -0,0 +1,81 @@
1
+ import { cx } from "./cx.js";
2
+ import { useThemeScheme } from "./theme/theme-scheme.js";
3
+ import { normalizeDetents } from "./sheet-snap.js";
4
+ import { attachSheetDetents } from "./sheet-detents.web.js";
5
+ import { bag4, child, clone, createElement, createPortal, createScopedElement, createScopedValue, drainFrag, hookSlots, ifBlock, positionalChildren, template, useEffect, useRef, withSlot } from "octane";
6
+ import { compilerMemoRegion, hookMemoCreate, hookMemoEqual, hookMemoPublish1, textHoleUpdate } from "octane/internal/client";
7
+ //#region src/Sheet.web.tsrx
8
+ var _t$0 = /* @__PURE__ */ template("<!>", 0, 1);
9
+ var _hs$ = /* @__PURE__ */ hookSlots(4);
10
+ var _h$0 = /* @__PURE__ */ Symbol(_hs$);
11
+ function __then$0(__props, __s, __extra) {
12
+ const __block = __s.block;
13
+ const dark = __extra[0];
14
+ const detents = __extra[1];
15
+ const maxDetent = __extra[2];
16
+ const panel = __extra[3];
17
+ const props = __extra[4];
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
+ {
28
+ const _v = /* @__PURE__ */ createPortal(createScopedValue(() => createScopedElement("div", { className: cx("vx-sheet-layer", dark && "dark") }, () => positionalChildren([(props.shadeCover ?? true) && createScopedValue(() => createElement("div", {
29
+ className: "vx-sheet-backdrop",
30
+ onClick: props.onDismiss
31
+ })), createScopedValue(() => createScopedElement("div", {
32
+ ref: (el) => {
33
+ panel.current = el;
34
+ },
35
+ className: cx("vx-sheet", detents.length && "vx-sheet-detents", props.className),
36
+ style: {
37
+ ...props.style,
38
+ ...detents.length ? {
39
+ height: `${maxDetent * 100}%`,
40
+ transform: "translateY(100%)"
41
+ } : {}
42
+ },
43
+ ...props.web
44
+ }, () => props.children))]))), document.body);
45
+ _b.c = textHoleUpdate(__s, 1, _b.a, _v, _b.c, _b.d, _b.b, true, true);
46
+ _b.d = _v;
47
+ }
48
+ }
49
+ var Sheet = function Sheet(props, __s, __extra) {
50
+ const __block = __s.block;
51
+ const __memoRegion = compilerMemoRegion(__s, _hs$ + 0);
52
+ let __hk = __memoRegion.hooks;
53
+ if (__hk === void 0) __memoRegion.hooks = __hk = hookMemoCreate(3);
54
+ let __hkd0;
55
+ const dark = withSlot(_h$0, useThemeScheme) === "dark";
56
+ const panel = useRef(null, _hs$ + 1);
57
+ const dismiss = useRef(props.onDismiss, _hs$ + 2);
58
+ dismiss.current = props.onDismiss;
59
+ const detents = (__hkd0 = props, __hk[0] !== true || !hookMemoEqual(__hk[1], __hkd0) ? hookMemoPublish1(__hk, 0, normalizeDetents(props.detents), __hkd0) : __hk[2]);
60
+ const maxDetent = detents.length ? detents[detents.length - 1] : 0;
61
+ const detentsKey = detents.join(",");
62
+ useEffect(() => {
63
+ const el = panel.current;
64
+ if (!props.open || !el || !detents.length) return;
65
+ const ctl = attachSheetDetents(el, detents, () => dismiss.current?.());
66
+ return () => ctl.detach();
67
+ }, [props.open, detentsKey], _hs$ + 3);
68
+ if (__s.block.pending && !__s.block.crossRenderUpdate) return;
69
+ {
70
+ const __ifCondition = props.open;
71
+ ifBlock(__s, 0, __block.parentNode, __ifCondition, __then$0, null, __block.endMarker, __ifCondition ? [
72
+ dark,
73
+ detents,
74
+ maxDetent,
75
+ panel,
76
+ props
77
+ ] : void 0);
78
+ }
79
+ };
80
+ //#endregion
81
+ export { Sheet };
@@ -0,0 +1,56 @@
1
+ import { applyEscapeProps } from "./escape-props.web.js";
2
+ import { __s, bag8, clone, queueRefAttach, queueRefDetach, setStyle, setStyleProperty, template } from "octane";
3
+ import { bindSignalAttribute, canSplitStyleProperties, enableSignalBindings, replaceRef, setPlainAttribute, styleObjectPrototype, updateFreshClassName } from "octane/internal/client";
4
+ //#region src/Skeleton.web.tsrx
5
+ enableSignalBindings(1, true);
6
+ var _t$0 = /* @__PURE__ */ template("<div aria-busy=\"true\"></div>");
7
+ var _rm$0 = [
8
+ "r",
9
+ "b",
10
+ "a"
11
+ ];
12
+ var Skeleton = /* @__PURE__ */ __s(function Skeleton(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 = bag8(__s, _root, _m0, _m1, void 0, void 0, __s, void 0, void 0, void 0);
20
+ __s.refFields = _rm$0;
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:6a1aae76", setPlainAttribute);
26
+ _b.d = updateFreshClassName(["vx-skeleton", props.className], _b.d, _b.a);
27
+ {
28
+ const __styleSpread = { ...props.style };
29
+ const __styleValue = props.width;
30
+ const __styleValue$ = props.height;
31
+ const __styleFull = "width" in __styleSpread || "height" in __styleSpread || !canSplitStyleProperties();
32
+ if (_b.e === __s || __styleFull || _b.f) {
33
+ const __styleObject = __styleFull && !("width" in styleObjectPrototype || "height" in styleObjectPrototype) ? (__styleSpread["width"] = __styleValue, __styleSpread["height"] = __styleValue$, __styleSpread) : {
34
+ ...__styleSpread,
35
+ "width": __styleValue,
36
+ "height": __styleValue$
37
+ };
38
+ setStyle(_b.a, __styleObject, _b.e === __s ? void 0 : _b.f ? _b.e : {
39
+ ..._b.e,
40
+ "width": _b.g,
41
+ "height": _b.h
42
+ });
43
+ _b.e = __styleFull ? __styleObject : __styleSpread;
44
+ } else {
45
+ setStyle(_b.a, __styleSpread, _b.e);
46
+ if (_b.g !== __styleValue) setStyleProperty(_b.a, "width", __styleValue, "", _b.g);
47
+ if (_b.h !== __styleValue$) setStyleProperty(_b.a, "height", __styleValue$, "", _b.h);
48
+ _b.e = __styleSpread;
49
+ }
50
+ _b.f = __styleFull;
51
+ _b.g = __styleValue;
52
+ _b.h = __styleValue$;
53
+ }
54
+ });
55
+ //#endregion
56
+ export { Skeleton };
@@ -0,0 +1,97 @@
1
+ import { usePan } from "./pan.web.tsrx.js";
2
+ import { applyWebProps } from "./platformProps.web.js";
3
+ import { useMeasure } from "./useMeasure.web.tsrx.js";
4
+ import { __s, bag13, clone, hookSlots, queueRefAttach, queueRefDetach, setAriaAttribute, setStyle, setStyleProperty, template, useRef, useState, withSlot } from "octane";
5
+ import { bindSignalAttribute, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
6
+ //#region src/Slider.web.tsrx
7
+ enableSignalBindings(1, true);
8
+ var _t$0 = /* @__PURE__ */ template("<div role=\"slider\"><div class=\"vx-slider-track\" aria-hidden=\"true\"></div><div class=\"vx-slider-fill\" aria-hidden=\"true\"></div><div class=\"vx-slider-thumb\" aria-hidden=\"true\"></div></div>");
9
+ var _hs$ = /* @__PURE__ */ hookSlots(5);
10
+ var _h$1 = /* @__PURE__ */ Symbol(_hs$ + 1);
11
+ var _h$4 = /* @__PURE__ */ Symbol(_hs$ + 4);
12
+ var _rm$0 = [
13
+ "r",
14
+ "i",
15
+ "b"
16
+ ];
17
+ var Slider = /* @__PURE__ */ __s(function Slider(props, __s, __extra) {
18
+ const host = useRef(null, _hs$ + 0);
19
+ const measure = withSlot(_h$1, useMeasure);
20
+ const drag = useRef(null, _hs$ + 2);
21
+ const [dragValue, setDragValue] = useState(null, _hs$ + 3);
22
+ const min = props.minValue ?? 0;
23
+ const max = props.maxValue ?? 100;
24
+ const value = dragValue ?? props.value ?? min;
25
+ const ratio = Math.min(1, Math.max(0, (value - min) / (max - min)));
26
+ const width = measure.bounds?.width ?? 0;
27
+ withSlot(_h$4, usePan, host, (e) => {
28
+ if (props.disabled) return;
29
+ if (e.state === "began") {
30
+ drag.current = { value0: value };
31
+ return;
32
+ }
33
+ if (!drag.current || !width) return;
34
+ if (e.state === "moved") {
35
+ const next = Math.min(max, Math.max(min, drag.current.value0 + e.dx / width * (max - min)));
36
+ setDragValue(next);
37
+ props.onValueChange?.(next);
38
+ } else {
39
+ drag.current = null;
40
+ setDragValue(null);
41
+ }
42
+ });
43
+ if (__s.block.pending && !__s.block.crossRenderUpdate) return;
44
+ let _b = __s.slots[0];
45
+ if (_b === void 0) {
46
+ let _m1, _m8, _m10, _m12;
47
+ const _root = clone(_t$0);
48
+ _m1 = _root;
49
+ queueRefAttach(__s, _m8 = (el) => {
50
+ host.current = el;
51
+ measure.bind(el);
52
+ applyWebProps(el, props.web);
53
+ }, _m1);
54
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.i, _b.b));
55
+ const _el0 = _root.firstChild.nextSibling;
56
+ _m10 = _el0;
57
+ _m12 = _el0.nextSibling;
58
+ _b = bag13(__s, _root, void 0, _m1, void 0, void 0, void 0, void 0, void 0, void 0, _m8, __s, _m10, __s, _m12);
59
+ __s.refFields = _rm$0;
60
+ } else {
61
+ const _r = (el) => {
62
+ host.current = el;
63
+ measure.bind(el);
64
+ applyWebProps(el, props.web);
65
+ };
66
+ if (_r !== _b.i) _b.i = replaceRef(__s, _b.i, _r, _b.b);
67
+ }
68
+ _b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:eaceea6c", setPlainAttribute);
69
+ _b.c = bindSignalAttribute(__s, _b.c, _b.b, "aria-valuemin", min, "b:cf2fbd7f", setAriaAttribute);
70
+ _b.d = bindSignalAttribute(__s, _b.d, _b.b, "aria-valuemax", max, "b:432fcc4b", setAriaAttribute);
71
+ _b.e = bindSignalAttribute(__s, _b.e, _b.b, "aria-valuenow", value, "b:44fb3550", setAriaAttribute);
72
+ _b.f = bindSignalAttribute(__s, _b.f, _b.b, "aria-disabled", props.disabled ? true : void 0, "b:27dcd081", setAriaAttribute);
73
+ _b.g = updateFreshClassName(["vx-slider", props.className], _b.g, _b.b);
74
+ {
75
+ const _v = props.style;
76
+ if (_b.h !== _v) {
77
+ setStyle(_b.b, _v, _b.h);
78
+ _b.h = _v;
79
+ }
80
+ }
81
+ {
82
+ const _v = ratio * width;
83
+ if (_b.j !== _v) {
84
+ setStyleProperty(_b.k, "width", _v, "", _b.j);
85
+ _b.j = _v;
86
+ }
87
+ }
88
+ {
89
+ const _v = ratio * width;
90
+ if (_b.l !== _v) {
91
+ setStyleProperty(_b.m, "left", _v, "", _b.l);
92
+ _b.l = _v;
93
+ }
94
+ }
95
+ });
96
+ //#endregion
97
+ export { Slider };
@@ -1,4 +1,4 @@
1
- import { applyEscapeProps } from "./ui2.js";
1
+ import { applyEscapeProps } from "./escape-props.web.js";
2
2
  import { __s, bag5, clone, queueRefAttach, queueRefDetach, setStyle, template } from "octane";
3
3
  import { bindSignalAttribute, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
4
4
  //#region src/Spacer.web.tsrx