@rbxts/uiblox 0.2.0-alpha.3 → 0.2.0-alpha.30

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 (312) hide show
  1. package/README.md +27 -109
  2. package/out/hooks/index.d.ts +1 -0
  3. package/out/hooks/init.luau +3 -0
  4. package/out/hooks/useBreakpoints.luau +2 -11
  5. package/out/hooks/viewportObserver.d.ts +10 -0
  6. package/out/hooks/viewportObserver.luau +75 -0
  7. package/out/theme/interfaces/theme/Theme.d.ts +15 -0
  8. package/out/theme/styles/utilities/componentStyles.luau +45 -3
  9. package/out/theme/styles/utilities/componentTheme.d.ts +15 -0
  10. package/out/theme/styles/utilities/index.d.ts +2 -0
  11. package/out/theme/styles/utilities/init.luau +7 -0
  12. package/out/theme/styles/utilities/resolveStyle.d.ts +10 -2
  13. package/out/theme/styles/utilities/resolveStyle.luau +7 -3
  14. package/out/theme/styles/utilities/resolveSx.d.ts +110 -0
  15. package/out/theme/styles/utilities/resolveSx.luau +479 -0
  16. package/out/theme/styles/utilities/styleCache.d.ts +2 -0
  17. package/out/theme/styles/utilities/styleCache.luau +9 -0
  18. package/out/ui/packages/accordion/components/Accordion.d.ts +2 -0
  19. package/out/ui/packages/accordion/components/Accordion.luau +46 -30
  20. package/out/ui/packages/accordion/components/Accordion.styles.d.ts +1 -0
  21. package/out/ui/packages/accordion/components/Accordion.styles.luau +16 -4
  22. package/out/ui/packages/accordion/components/accordionOpen.d.ts +1 -0
  23. package/out/ui/packages/accordion/components/accordionOpen.luau +4 -0
  24. package/out/ui/packages/alert/components/Alert.d.ts +2 -0
  25. package/out/ui/packages/alert/components/Alert.luau +48 -42
  26. package/out/ui/packages/alert/components/Alert.styles.d.ts +2 -0
  27. package/out/ui/packages/alert/components/Alert.styles.luau +17 -8
  28. package/out/ui/packages/appBar/components/AppBar.d.ts +2 -1
  29. package/out/ui/packages/appBar/components/AppBar.luau +47 -36
  30. package/out/ui/packages/appBar/components/AppBar.styles.d.ts +2 -0
  31. package/out/ui/packages/appBar/components/AppBar.styles.luau +16 -5
  32. package/out/ui/packages/assetField/components/AssetField.luau +12 -16
  33. package/out/ui/packages/autocomplete/components/Autocomplete.luau +8 -0
  34. package/out/ui/packages/avatar/components/Avatar.d.ts +2 -0
  35. package/out/ui/packages/avatar/components/Avatar.luau +27 -26
  36. package/out/ui/packages/avatar/components/Avatar.styles.d.ts +2 -0
  37. package/out/ui/packages/avatar/components/Avatar.styles.luau +5 -1
  38. package/out/ui/packages/backdrop/components/Backdrop.d.ts +10 -0
  39. package/out/ui/packages/backdrop/components/Backdrop.luau +51 -0
  40. package/out/ui/packages/backdrop/components/Backdrop.styles.d.ts +4 -0
  41. package/out/ui/packages/backdrop/components/Backdrop.styles.luau +24 -0
  42. package/out/ui/packages/backdrop/index.d.ts +2 -0
  43. package/out/ui/packages/backdrop/init.luau +5 -0
  44. package/out/ui/packages/badge/components/Badge.d.ts +3 -0
  45. package/out/ui/packages/badge/components/Badge.luau +32 -24
  46. package/out/ui/packages/badge/components/Badge.styles.d.ts +5 -1
  47. package/out/ui/packages/badge/components/Badge.styles.luau +20 -8
  48. package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +1 -0
  49. package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +20 -18
  50. package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.d.ts +3 -1
  51. package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +6 -2
  52. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.d.ts +1 -0
  53. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +67 -40
  54. package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +9 -0
  55. package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +68 -0
  56. package/out/ui/packages/breadcrumbs/index.d.ts +1 -0
  57. package/out/ui/packages/breadcrumbs/init.luau +3 -0
  58. package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +12 -16
  59. package/out/ui/packages/button/components/Button.luau +28 -22
  60. package/out/ui/packages/card/components/Card.d.ts +3 -1
  61. package/out/ui/packages/card/components/Card.luau +10 -0
  62. package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +75 -53
  63. package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +26 -9
  64. package/out/ui/packages/checkbox/components/Checkbox.luau +16 -16
  65. package/out/ui/packages/checkbox/components/checkboxLook.d.ts +1 -1
  66. package/out/ui/packages/chip/components/Chip.d.ts +6 -1
  67. package/out/ui/packages/chip/components/Chip.luau +61 -17
  68. package/out/ui/packages/chip/components/Chip.styles.d.ts +6 -0
  69. package/out/ui/packages/chip/components/Chip.styles.luau +54 -9
  70. package/out/ui/packages/circularProgress/components/CircularProgress.luau +29 -18
  71. package/out/ui/packages/colorPicker/components/ColorPicker.luau +16 -20
  72. package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +34 -20
  73. package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +34 -35
  74. package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +65 -62
  75. package/out/ui/packages/dialog/components/Dialog.d.ts +3 -2
  76. package/out/ui/packages/dialog/components/Dialog.luau +41 -21
  77. package/out/ui/packages/divider/components/Divider.d.ts +1 -0
  78. package/out/ui/packages/divider/components/Divider.luau +52 -17
  79. package/out/ui/packages/divider/components/Divider.styles.luau +32 -0
  80. package/out/ui/packages/divider/components/dividerLabel.d.ts +1 -0
  81. package/out/ui/packages/divider/components/dividerLabel.luau +10 -0
  82. package/out/ui/packages/drawer/components/Drawer.d.ts +3 -1
  83. package/out/ui/packages/drawer/components/Drawer.luau +71 -37
  84. package/out/ui/packages/drawer/components/Drawer.styles.d.ts +3 -1
  85. package/out/ui/packages/drawer/components/Drawer.styles.luau +3 -2
  86. package/out/ui/packages/fab/components/Fab.d.ts +3 -0
  87. package/out/ui/packages/fab/components/Fab.luau +79 -37
  88. package/out/ui/packages/fab/components/Fab.styles.d.ts +3 -0
  89. package/out/ui/packages/fab/components/Fab.styles.luau +39 -3
  90. package/out/ui/packages/fab/components/fabSize.d.ts +1 -0
  91. package/out/ui/packages/fab/components/fabSize.luau +4 -0
  92. package/out/ui/packages/fab/index.d.ts +1 -1
  93. package/out/ui/packages/fab/init.luau +1 -0
  94. package/out/ui/packages/fontEditor/components/FontEditor.luau +12 -16
  95. package/out/ui/packages/formText/components/FormHelperText.d.ts +8 -0
  96. package/out/ui/packages/formText/components/FormHelperText.luau +40 -0
  97. package/out/ui/packages/formText/components/FormLabel.d.ts +9 -0
  98. package/out/ui/packages/formText/components/FormLabel.luau +42 -0
  99. package/out/ui/packages/formText/components/FormText.styles.d.ts +5 -0
  100. package/out/ui/packages/formText/components/FormText.styles.luau +33 -0
  101. package/out/ui/packages/formText/index.d.ts +4 -0
  102. package/out/ui/packages/formText/init.luau +6 -0
  103. package/out/ui/packages/gradientEditor/components/GradientEditor.luau +56 -42
  104. package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +37 -4
  105. package/out/ui/packages/host/components/SxHost.d.ts +18 -0
  106. package/out/ui/packages/host/components/SxHost.luau +202 -0
  107. package/out/ui/packages/host/hostPaint.d.ts +11 -0
  108. package/out/ui/packages/host/hostPaint.luau +33 -0
  109. package/out/ui/packages/host/hostRules.d.ts +15 -0
  110. package/out/ui/packages/host/hostRules.luau +92 -0
  111. package/out/ui/packages/host/index.d.ts +3 -0
  112. package/out/ui/packages/host/init.luau +13 -0
  113. package/out/ui/packages/icon/components/Icon.luau +9 -16
  114. package/out/ui/packages/iconButton/components/IconButton.luau +22 -17
  115. package/out/ui/packages/iconButton/components/IconButton.styles.luau +3 -0
  116. package/out/ui/packages/imageList/components/ImageList.d.ts +14 -0
  117. package/out/ui/packages/imageList/components/ImageList.luau +93 -0
  118. package/out/ui/packages/imageList/components/ImageList.styles.d.ts +6 -0
  119. package/out/ui/packages/imageList/components/ImageList.styles.luau +73 -0
  120. package/out/ui/packages/imageList/components/imageListLayout.d.ts +4 -0
  121. package/out/ui/packages/imageList/components/imageListLayout.luau +31 -0
  122. package/out/ui/packages/imageList/index.d.ts +2 -0
  123. package/out/ui/packages/imageList/init.luau +5 -0
  124. package/out/ui/packages/index.d.ts +8 -0
  125. package/out/ui/packages/init.luau +24 -0
  126. package/out/ui/packages/input/components/Input.d.ts +1 -0
  127. package/out/ui/packages/input/components/Input.luau +22 -19
  128. package/out/ui/packages/layout/components/Box.d.ts +11 -0
  129. package/out/ui/packages/layout/components/Box.luau +40 -0
  130. package/out/ui/packages/layout/components/Box.styles.d.ts +7 -0
  131. package/out/ui/packages/layout/components/Box.styles.luau +34 -0
  132. package/out/ui/packages/layout/components/Container.d.ts +10 -0
  133. package/out/ui/packages/layout/components/Container.luau +45 -0
  134. package/out/ui/packages/layout/components/Container.styles.d.ts +6 -0
  135. package/out/ui/packages/layout/components/Container.styles.luau +41 -0
  136. package/out/ui/packages/layout/components/FlexItem.d.ts +12 -0
  137. package/out/ui/packages/layout/components/FlexItem.luau +40 -0
  138. package/out/ui/packages/layout/components/FlexItem.styles.d.ts +8 -0
  139. package/out/ui/packages/layout/components/FlexItem.styles.luau +66 -0
  140. package/out/ui/packages/layout/components/Grid.d.ts +5 -1
  141. package/out/ui/packages/layout/components/Grid.luau +41 -19
  142. package/out/ui/packages/layout/components/List.luau +9 -16
  143. package/out/ui/packages/layout/components/Stack.d.ts +14 -0
  144. package/out/ui/packages/layout/components/Stack.luau +44 -0
  145. package/out/ui/packages/layout/components/Stack.styles.d.ts +10 -0
  146. package/out/ui/packages/layout/components/Stack.styles.luau +101 -0
  147. package/out/ui/packages/layout/components/boxPad.d.ts +14 -0
  148. package/out/ui/packages/layout/components/boxPad.luau +59 -0
  149. package/out/ui/packages/layout/components/containerWidth.d.ts +2 -0
  150. package/out/ui/packages/layout/components/containerWidth.luau +17 -0
  151. package/out/ui/packages/layout/components/flexItemMode.d.ts +6 -0
  152. package/out/ui/packages/layout/components/flexItemMode.luau +36 -0
  153. package/out/ui/packages/layout/components/gridProps.d.ts +3 -0
  154. package/out/ui/packages/layout/components/gridProps.luau +20 -0
  155. package/out/ui/packages/layout/components/stackAlign.d.ts +10 -0
  156. package/out/ui/packages/layout/components/stackAlign.luau +43 -0
  157. package/out/ui/packages/layout/index.d.ts +14 -0
  158. package/out/ui/packages/layout/init.luau +5 -0
  159. package/out/ui/packages/link/components/Link.d.ts +11 -0
  160. package/out/ui/packages/link/components/Link.luau +80 -0
  161. package/out/ui/packages/link/components/Link.styles.d.ts +8 -0
  162. package/out/ui/packages/link/components/Link.styles.luau +59 -0
  163. package/out/ui/packages/link/index.d.ts +3 -0
  164. package/out/ui/packages/link/init.luau +5 -0
  165. package/out/ui/packages/listItem/components/ListItem.d.ts +4 -1
  166. package/out/ui/packages/listItem/components/ListItem.luau +44 -4
  167. package/out/ui/packages/listItem/components/ListItem.styles.d.ts +1 -0
  168. package/out/ui/packages/listItem/components/ListItem.styles.luau +16 -5
  169. package/out/ui/packages/loadingStroke/components/LoadingStroke.d.ts +7 -1
  170. package/out/ui/packages/loadingStroke/components/LoadingStroke.luau +23 -19
  171. package/out/ui/packages/loadingStroke/components/loadingStrokeSx.d.ts +11 -0
  172. package/out/ui/packages/loadingStroke/components/loadingStrokeSx.luau +2 -0
  173. package/out/ui/packages/markdown/components/Markdown.d.ts +6 -0
  174. package/out/ui/packages/markdown/components/Markdown.luau +221 -0
  175. package/out/ui/packages/markdown/components/Markdown.styles.d.ts +2 -0
  176. package/out/ui/packages/markdown/components/Markdown.styles.luau +101 -0
  177. package/out/ui/packages/markdown/components/MarkdownEditor.d.ts +16 -0
  178. package/out/ui/packages/markdown/components/MarkdownEditor.luau +315 -0
  179. package/out/ui/packages/markdown/components/MarkdownEditor.styles.d.ts +6 -0
  180. package/out/ui/packages/markdown/components/MarkdownEditor.styles.luau +132 -0
  181. package/out/ui/packages/markdown/htmlToMarkdown.d.ts +2 -0
  182. package/out/ui/packages/markdown/htmlToMarkdown.luau +350 -0
  183. package/out/ui/packages/markdown/index.d.ts +8 -0
  184. package/out/ui/packages/markdown/init.luau +11 -0
  185. package/out/ui/packages/markdown/parseMarkdown.d.ts +42 -0
  186. package/out/ui/packages/markdown/parseMarkdown.luau +459 -0
  187. package/out/ui/packages/menu/components/Menu.d.ts +7 -1
  188. package/out/ui/packages/menu/components/Menu.luau +68 -26
  189. package/out/ui/packages/menu/components/Menu.styles.luau +5 -1
  190. package/out/ui/packages/modal/components/Modal.d.ts +2 -1
  191. package/out/ui/packages/modal/components/Modal.luau +79 -37
  192. package/out/ui/packages/motion/index.d.ts +1 -1
  193. package/out/ui/packages/motion/init.luau +1 -0
  194. package/out/ui/packages/motion/unit.d.ts +5 -0
  195. package/out/ui/packages/motion/unit.luau +23 -0
  196. package/out/ui/packages/numberInput/components/NumberInput.d.ts +2 -0
  197. package/out/ui/packages/numberInput/components/NumberInput.luau +16 -3
  198. package/out/ui/packages/numberInput/components/numberValue.d.ts +1 -0
  199. package/out/ui/packages/numberInput/components/numberValue.luau +45 -0
  200. package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +12 -16
  201. package/out/ui/packages/pagination/components/Pagination.d.ts +6 -1
  202. package/out/ui/packages/pagination/components/Pagination.luau +62 -38
  203. package/out/ui/packages/pagination/components/Pagination.styles.d.ts +6 -1
  204. package/out/ui/packages/pagination/components/Pagination.styles.luau +36 -4
  205. package/out/ui/packages/pagination/components/pageRange.d.ts +2 -1
  206. package/out/ui/packages/pagination/components/pageRange.luau +91 -8
  207. package/out/ui/packages/pagination/index.d.ts +1 -0
  208. package/out/ui/packages/pagination/init.luau +1 -0
  209. package/out/ui/packages/paper/components/Paper.d.ts +4 -2
  210. package/out/ui/packages/paper/components/Paper.luau +31 -9
  211. package/out/ui/packages/paper/components/Paper.styles.d.ts +1 -1
  212. package/out/ui/packages/paper/components/Paper.styles.luau +6 -0
  213. package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +63 -38
  214. package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +21 -7
  215. package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +2 -0
  216. package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +14 -0
  217. package/out/ui/packages/popup/components/Popup.d.ts +2 -1
  218. package/out/ui/packages/popup/components/Popup.luau +35 -18
  219. package/out/ui/packages/popup/index.d.ts +1 -0
  220. package/out/ui/packages/popup/init.luau +1 -0
  221. package/out/ui/packages/preloader/components/Preloader.luau +9 -16
  222. package/out/ui/packages/progressBar/components/ProgressBar.luau +12 -16
  223. package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +1 -0
  224. package/out/ui/packages/radioGroup/components/RadioGroup.luau +16 -18
  225. package/out/ui/packages/radioGroup/components/RadioGroup.styles.d.ts +1 -0
  226. package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +4 -1
  227. package/out/ui/packages/rating/components/Rating.d.ts +11 -0
  228. package/out/ui/packages/rating/components/Rating.luau +97 -0
  229. package/out/ui/packages/rating/components/Rating.styles.d.ts +6 -0
  230. package/out/ui/packages/rating/components/Rating.styles.luau +44 -0
  231. package/out/ui/packages/rating/index.d.ts +2 -0
  232. package/out/ui/packages/rating/init.luau +5 -0
  233. package/out/ui/packages/rayEditor/components/RayEditor.luau +12 -16
  234. package/out/ui/packages/rectEditor/components/RectEditor.luau +86 -43
  235. package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +30 -7
  236. package/out/ui/packages/select/components/Select.d.ts +5 -0
  237. package/out/ui/packages/select/components/Select.luau +61 -77
  238. package/out/ui/packages/select/components/Select.styles.luau +1 -1
  239. package/out/ui/packages/shadow/components/Shadow.d.ts +2 -1
  240. package/out/ui/packages/shadow/components/Shadow.luau +39 -17
  241. package/out/ui/packages/shadow/components/Shadow.styles.luau +7 -2
  242. package/out/ui/packages/sidebar/components/Sidebar.luau +9 -16
  243. package/out/ui/packages/skeleton/components/Skeleton.luau +22 -30
  244. package/out/ui/packages/skeleton/components/Skeleton.styles.luau +7 -2
  245. package/out/ui/packages/skeleton/components/skeletonMotion.luau +1 -1
  246. package/out/ui/packages/skeleton/components/skeletonTone.d.ts +20 -0
  247. package/out/ui/packages/skeleton/components/skeletonTone.luau +14 -0
  248. package/out/ui/packages/slider/components/Slider.d.ts +3 -0
  249. package/out/ui/packages/slider/components/Slider.luau +47 -19
  250. package/out/ui/packages/slider/components/Slider.styles.d.ts +2 -0
  251. package/out/ui/packages/slider/components/Slider.styles.luau +14 -1
  252. package/out/ui/packages/slider/components/sliderMarks.d.ts +1 -0
  253. package/out/ui/packages/slider/components/sliderMarks.luau +37 -0
  254. package/out/ui/packages/snackbar/components/Snackbar.d.ts +2 -0
  255. package/out/ui/packages/snackbar/components/Snackbar.luau +5 -0
  256. package/out/ui/packages/snackbar/components/snackbarAction.d.ts +1 -0
  257. package/out/ui/packages/snackbar/components/snackbarAction.luau +10 -0
  258. package/out/ui/packages/speedDial/components/SpeedDial.d.ts +19 -0
  259. package/out/ui/packages/speedDial/components/SpeedDial.luau +97 -0
  260. package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +5 -0
  261. package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +31 -0
  262. package/out/ui/packages/speedDial/index.d.ts +3 -0
  263. package/out/ui/packages/speedDial/init.luau +5 -0
  264. package/out/ui/packages/splitPane/components/SplitPane.luau +13 -17
  265. package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
  266. package/out/ui/packages/stateMatrix.d.ts +2 -0
  267. package/out/ui/packages/stateMatrix.luau +872 -881
  268. package/out/ui/packages/stepper/components/Stepper.d.ts +1 -0
  269. package/out/ui/packages/stepper/components/Stepper.luau +16 -17
  270. package/out/ui/packages/stepper/components/Stepper.styles.d.ts +3 -1
  271. package/out/ui/packages/stepper/components/Stepper.styles.luau +6 -2
  272. package/out/ui/packages/switch/components/Switch.d.ts +2 -0
  273. package/out/ui/packages/switch/components/Switch.luau +21 -16
  274. package/out/ui/packages/switch/components/Switch.styles.d.ts +2 -0
  275. package/out/ui/packages/switch/components/Switch.styles.luau +6 -1
  276. package/out/ui/packages/switch/components/switchLook.d.ts +1 -1
  277. package/out/ui/packages/table/components/Table.d.ts +1 -0
  278. package/out/ui/packages/table/components/Table.luau +15 -19
  279. package/out/ui/packages/table/components/Table.styles.d.ts +3 -1
  280. package/out/ui/packages/table/components/Table.styles.luau +10 -6
  281. package/out/ui/packages/tabs/components/Tabs.d.ts +3 -0
  282. package/out/ui/packages/tabs/components/Tabs.luau +24 -19
  283. package/out/ui/packages/tabs/components/Tabs.styles.d.ts +5 -1
  284. package/out/ui/packages/tabs/components/Tabs.styles.luau +26 -10
  285. package/out/ui/packages/tabs/components/tabsOrientation.d.ts +2 -0
  286. package/out/ui/packages/tabs/components/tabsOrientation.luau +7 -0
  287. package/out/ui/packages/tabs/index.d.ts +1 -0
  288. package/out/ui/packages/tabs/init.luau +1 -0
  289. package/out/ui/packages/toast/components/Toast.d.ts +2 -0
  290. package/out/ui/packages/toast/components/Toast.luau +41 -13
  291. package/out/ui/packages/toast/components/Toast.styles.luau +23 -5
  292. package/out/ui/packages/toggleButton/components/ToggleButton.d.ts +21 -0
  293. package/out/ui/packages/toggleButton/components/ToggleButton.luau +129 -0
  294. package/out/ui/packages/toggleButton/components/ToggleButton.styles.d.ts +9 -0
  295. package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +69 -0
  296. package/out/ui/packages/toggleButton/index.d.ts +2 -0
  297. package/out/ui/packages/toggleButton/init.luau +7 -0
  298. package/out/ui/packages/tooltip/components/Tooltip.luau +9 -16
  299. package/out/ui/packages/treeView/components/TreeView.luau +9 -16
  300. package/out/ui/packages/typography/components/Typography.luau +13 -14
  301. package/out/ui/packages/udimEditor/components/UDimEditor.luau +12 -16
  302. package/out/ui/packages/vectorEditor/components/VectorEditor.luau +12 -16
  303. package/out/ui/packages/virtualList/components/EmptyListHint.d.ts +7 -0
  304. package/out/ui/packages/virtualList/components/EmptyListHint.luau +43 -0
  305. package/out/ui/packages/virtualList/components/EmptyListHint.styles.d.ts +5 -0
  306. package/out/ui/packages/virtualList/components/EmptyListHint.styles.luau +26 -0
  307. package/out/ui/packages/virtualList/components/VirtualList.luau +9 -16
  308. package/out/ui/packages/virtualList/index.d.ts +2 -0
  309. package/out/ui/packages/virtualList/init.luau +1 -0
  310. package/package.json +2 -2
  311. package/out/ui/packages/select/components/selectMotion.d.ts +0 -2
  312. package/out/ui/packages/select/components/selectMotion.luau +0 -12
@@ -0,0 +1,459 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local function trimEnd(value)
3
+ local stop = #value
4
+ while stop > 0 do
5
+ local _value = value
6
+ local _stop = stop
7
+ local _stop_1 = stop
8
+ local ch = string.sub(_value, _stop, _stop_1)
9
+ if ch ~= " " and ch ~= "\t" and ch ~= "\r" then
10
+ break
11
+ end
12
+ stop -= 1
13
+ end
14
+ local _value = value
15
+ local _stop = stop
16
+ return string.sub(_value, 1, _stop)
17
+ end
18
+ local function trim(value)
19
+ local start = 1
20
+ local stop = #value
21
+ while start <= stop do
22
+ local _value = value
23
+ local _start = start
24
+ local _start_1 = start
25
+ local ch = string.sub(_value, _start, _start_1)
26
+ if ch ~= " " and ch ~= "\t" and ch ~= "\r" then
27
+ break
28
+ end
29
+ start += 1
30
+ end
31
+ while stop >= start do
32
+ local _value = value
33
+ local _stop = stop
34
+ local _stop_1 = stop
35
+ local ch = string.sub(_value, _stop, _stop_1)
36
+ if ch ~= " " and ch ~= "\t" and ch ~= "\r" then
37
+ break
38
+ end
39
+ stop -= 1
40
+ end
41
+ if start > stop then
42
+ return ""
43
+ end
44
+ local _value = value
45
+ local _start = start
46
+ local _stop = stop
47
+ return string.sub(_value, _start, _stop)
48
+ end
49
+ local function headingLevel(line)
50
+ local n = 0
51
+ while true do
52
+ local _condition = n < #line and n < 6
53
+ if _condition then
54
+ local _line = line
55
+ local _arg0 = n + 1
56
+ local _arg1 = n + 1
57
+ _condition = string.sub(_line, _arg0, _arg1) == "#"
58
+ end
59
+ if not _condition then
60
+ break
61
+ end
62
+ n += 1
63
+ end
64
+ if n == 0 then
65
+ return nil
66
+ end
67
+ local _condition = n < #line
68
+ if _condition then
69
+ local _line = line
70
+ local _arg0 = n + 1
71
+ local _arg1 = n + 1
72
+ _condition = string.sub(_line, _arg0, _arg1) ~= " "
73
+ end
74
+ if _condition then
75
+ return nil
76
+ end
77
+ return n
78
+ end
79
+ local function parseInlines(source)
80
+ local out = {}
81
+ local i = 1
82
+ local n = #source
83
+ local buf = ""
84
+ local flush = function()
85
+ if #buf > 0 then
86
+ local _arg0 = {
87
+ kind = "text",
88
+ text = buf,
89
+ }
90
+ table.insert(out, _arg0)
91
+ buf = ""
92
+ end
93
+ end
94
+ while i <= n do
95
+ local _source = source
96
+ local _i = i
97
+ local _i_1 = i
98
+ local ch = string.sub(_source, _i, _i_1)
99
+ if ch == "`" then
100
+ local _source_1 = source
101
+ local _arg1 = i + 1
102
+ local close = { string.find(_source_1, "`", _arg1, true) }
103
+ local endAt = close[1]
104
+ if endAt ~= nil then
105
+ flush()
106
+ local _object = {
107
+ kind = "code",
108
+ }
109
+ local _left = "text"
110
+ local _source_2 = source
111
+ local _arg0 = i + 1
112
+ local _arg1_1 = endAt - 1
113
+ _object[_left] = string.sub(_source_2, _arg0, _arg1_1)
114
+ table.insert(out, _object)
115
+ i = endAt + 1
116
+ continue
117
+ end
118
+ end
119
+ if ch == "[" then
120
+ local _source_1 = source
121
+ local _arg1 = i + 1
122
+ local mid = { string.find(_source_1, "](", _arg1, true) }
123
+ local midAt = mid[1]
124
+ if midAt ~= nil then
125
+ local _source_2 = source
126
+ local _arg1_1 = midAt + 2
127
+ local closeParen = { string.find(_source_2, ")", _arg1_1, true) }
128
+ local endAt = closeParen[1]
129
+ if endAt ~= nil then
130
+ flush()
131
+ local _object = {
132
+ kind = "link",
133
+ }
134
+ local _left = "text"
135
+ local _source_3 = source
136
+ local _arg0 = i + 1
137
+ local _arg1_2 = midAt - 1
138
+ _object[_left] = string.sub(_source_3, _arg0, _arg1_2)
139
+ local _left_1 = "href"
140
+ local _source_4 = source
141
+ local _arg0_1 = midAt + 2
142
+ local _arg1_3 = endAt - 1
143
+ _object[_left_1] = string.sub(_source_4, _arg0_1, _arg1_3)
144
+ table.insert(out, _object)
145
+ i = endAt + 1
146
+ continue
147
+ end
148
+ end
149
+ end
150
+ local _condition = ch == "*" and i + 1 <= n
151
+ if _condition then
152
+ local _source_1 = source
153
+ local _arg0 = i + 1
154
+ local _arg1 = i + 1
155
+ _condition = string.sub(_source_1, _arg0, _arg1) == "*"
156
+ end
157
+ if _condition then
158
+ local _source_1 = source
159
+ local _arg1 = i + 2
160
+ local close = { string.find(_source_1, "**", _arg1, true) }
161
+ local endAt = close[1]
162
+ if endAt ~= nil then
163
+ flush()
164
+ local _object = {
165
+ kind = "bold",
166
+ }
167
+ local _left = "text"
168
+ local _source_2 = source
169
+ local _arg0 = i + 2
170
+ local _arg1_1 = endAt - 1
171
+ _object[_left] = string.sub(_source_2, _arg0, _arg1_1)
172
+ table.insert(out, _object)
173
+ i = endAt + 2
174
+ continue
175
+ end
176
+ end
177
+ local _condition_1 = ch == "*"
178
+ if _condition_1 then
179
+ local _condition_2 = i == 1
180
+ if not _condition_2 then
181
+ local _source_1 = source
182
+ local _arg0 = i - 1
183
+ local _arg1 = i - 1
184
+ _condition_2 = string.sub(_source_1, _arg0, _arg1) ~= "*"
185
+ end
186
+ _condition_1 = _condition_2
187
+ end
188
+ if _condition_1 then
189
+ local _source_1 = source
190
+ local _arg1 = i + 1
191
+ local close = { string.find(_source_1, "*", _arg1, true) }
192
+ local endAt = close[1]
193
+ local _condition_2 = endAt ~= nil
194
+ if _condition_2 then
195
+ local _source_2 = source
196
+ local _arg0 = endAt + 1
197
+ local _arg1_1 = endAt + 1
198
+ _condition_2 = string.sub(_source_2, _arg0, _arg1_1) ~= "*"
199
+ end
200
+ if _condition_2 then
201
+ flush()
202
+ local _object = {
203
+ kind = "italic",
204
+ }
205
+ local _left = "text"
206
+ local _source_2 = source
207
+ local _arg0 = i + 1
208
+ local _arg1_1 = endAt - 1
209
+ _object[_left] = string.sub(_source_2, _arg0, _arg1_1)
210
+ table.insert(out, _object)
211
+ i = endAt + 1
212
+ continue
213
+ end
214
+ end
215
+ buf = `{buf}{ch}`
216
+ i += 1
217
+ end
218
+ flush()
219
+ return if #out > 0 then out else { {
220
+ kind = "text",
221
+ text = "",
222
+ } }
223
+ end
224
+ local function isHr(line)
225
+ local t = trim(line)
226
+ if #t < 3 then
227
+ return false
228
+ end
229
+ local ch = string.sub(t, 1, 1)
230
+ if ch ~= "-" and ch ~= "*" and ch ~= "_" then
231
+ return false
232
+ end
233
+ for i = 1, #t do
234
+ local _i = i
235
+ local _i_1 = i
236
+ local c = string.sub(t, _i, _i_1)
237
+ if c ~= ch and c ~= " " then
238
+ return false
239
+ end
240
+ end
241
+ return true
242
+ end
243
+ local function listMarker(line)
244
+ local t = trim(line)
245
+ if #t >= 2 and (string.sub(t, 1, 2) == "- " or string.sub(t, 1, 2) == "* ") then
246
+ return {
247
+ ordered = false,
248
+ rest = string.sub(t, 3),
249
+ }
250
+ end
251
+ local i = 1
252
+ while i <= #t do
253
+ local _i = i
254
+ local _i_1 = i
255
+ local c = string.sub(t, _i, _i_1)
256
+ if c < "0" or c > "9" then
257
+ break
258
+ end
259
+ i += 1
260
+ end
261
+ local _condition = i > 1 and i + 1 <= #t
262
+ if _condition then
263
+ local _i = i
264
+ local _arg1 = i + 1
265
+ _condition = string.sub(t, _i, _arg1) == ". "
266
+ end
267
+ if _condition then
268
+ local _object = {
269
+ ordered = true,
270
+ }
271
+ local _left = "rest"
272
+ local _arg0 = i + 2
273
+ _object[_left] = string.sub(t, _arg0)
274
+ return _object
275
+ end
276
+ return nil
277
+ end
278
+ --* Small markdown subset → blocks. Unsupported syntax stays plain text.
279
+ local function parseMarkdown(source)
280
+ local lines = string.split(source, "\n")
281
+ local blocks = {}
282
+ local i = 0
283
+ while i < #lines do
284
+ local raw = lines[i + 1]
285
+ local line = trimEnd(raw)
286
+ if trim(line) == "" then
287
+ i += 1
288
+ continue
289
+ end
290
+ if #line >= 3 and string.sub(line, 1, 3) == "```" then
291
+ local body = {}
292
+ i += 1
293
+ while i < #lines and not (#lines[i + 1] >= 3 and string.sub(trim(lines[i + 1]), 1, 3) == "```") do
294
+ local _arg0 = lines[i + 1]
295
+ table.insert(body, _arg0)
296
+ i += 1
297
+ end
298
+ if i < #lines then
299
+ i += 1
300
+ end
301
+ local _arg0 = {
302
+ kind = "code",
303
+ text = table.concat(body, "\n"),
304
+ }
305
+ table.insert(blocks, _arg0)
306
+ continue
307
+ end
308
+ if isHr(line) then
309
+ table.insert(blocks, {
310
+ kind = "hr",
311
+ })
312
+ i += 1
313
+ continue
314
+ end
315
+ local level = headingLevel(line)
316
+ if level ~= nil then
317
+ local _object = {
318
+ kind = "heading",
319
+ level = level,
320
+ }
321
+ local _left = "inlines"
322
+ local _arg0 = level + 1
323
+ _object[_left] = parseInlines(trim(string.sub(line, _arg0)))
324
+ table.insert(blocks, _object)
325
+ i += 1
326
+ continue
327
+ end
328
+ if string.sub(line, 1, 1) == ">" and (#line == 1 or string.sub(line, 2, 2) == " ") then
329
+ local parts = {}
330
+ while i < #lines do
331
+ local cur = trimEnd(lines[i + 1])
332
+ if not (string.sub(cur, 1, 1) == ">" and (#cur == 1 or string.sub(cur, 2, 2) == " ")) then
333
+ break
334
+ end
335
+ local _arg0 = if #cur >= 2 then string.sub(cur, 3) else ""
336
+ table.insert(parts, _arg0)
337
+ i += 1
338
+ end
339
+ local _arg0 = {
340
+ kind = "blockquote",
341
+ inlines = parseInlines(table.concat(parts, " ")),
342
+ }
343
+ table.insert(blocks, _arg0)
344
+ continue
345
+ end
346
+ local marker = listMarker(line)
347
+ if marker ~= nil then
348
+ local ordered = marker.ordered
349
+ local items = { parseInlines(marker.rest) }
350
+ i += 1
351
+ while i < #lines do
352
+ local following = listMarker(trimEnd(lines[i + 1]))
353
+ if following == nil or following.ordered ~= ordered then
354
+ break
355
+ end
356
+ local _arg0 = parseInlines(following.rest)
357
+ table.insert(items, _arg0)
358
+ i += 1
359
+ end
360
+ local _arg0 = {
361
+ kind = "list",
362
+ ordered = ordered,
363
+ items = items,
364
+ }
365
+ table.insert(blocks, _arg0)
366
+ continue
367
+ end
368
+ local para = { line }
369
+ i += 1
370
+ while i < #lines do
371
+ local cur = trimEnd(lines[i + 1])
372
+ if trim(cur) == "" then
373
+ break
374
+ end
375
+ if #cur >= 3 and string.sub(cur, 1, 3) == "```" then
376
+ break
377
+ end
378
+ if isHr(cur) then
379
+ break
380
+ end
381
+ if headingLevel(cur) ~= nil then
382
+ break
383
+ end
384
+ if string.sub(cur, 1, 1) == ">" and (#cur == 1 or string.sub(cur, 2, 2) == " ") then
385
+ break
386
+ end
387
+ if listMarker(cur) ~= nil then
388
+ break
389
+ end
390
+ -- two trailing spaces = hard break
391
+ local prev = para[#para]
392
+ local _condition = #prev >= 2
393
+ if _condition then
394
+ local _arg0 = #prev - 1
395
+ _condition = string.sub(prev, _arg0) == " "
396
+ end
397
+ if _condition then
398
+ local _arg1 = #prev - 2
399
+ para[#para] = trimEnd(string.sub(prev, 1, _arg1))
400
+ table.insert(para, cur)
401
+ else
402
+ para[#para] = `{prev} {cur}`
403
+ end
404
+ i += 1
405
+ end
406
+ local _arg0 = {
407
+ kind = "paragraph",
408
+ inlines = parseInlines(table.concat(para, "\n")),
409
+ }
410
+ table.insert(blocks, _arg0)
411
+ end
412
+ return blocks
413
+ end
414
+ local function inlinesToPlain(inlines)
415
+ local out = ""
416
+ for _, part in inlines do
417
+ if part.kind == "link" then
418
+ out = `{out}{part.text}`
419
+ else
420
+ out = `{out}{part.text}`
421
+ end
422
+ end
423
+ return out
424
+ end
425
+ local function escapeRich(text)
426
+ local out = text
427
+ for _, _binding in { { "&", "&amp;" }, { "<", "&lt;" }, { ">", "&gt;" } } do
428
+ local from = _binding[1]
429
+ local to = _binding[2]
430
+ local replaced = string.gsub(out, from, to)
431
+ out = replaced
432
+ end
433
+ return out
434
+ end
435
+ --* Turn inline nodes into Roblox RichText. Links become colored label + (url).
436
+ local function inlinesToRichText(inlines)
437
+ local out = ""
438
+ for _, part in inlines do
439
+ if part.kind == "text" then
440
+ local chunk = escapeRich(part.text)
441
+ local withBreaks = string.gsub(chunk, "\n", "<br/>")
442
+ out = `{out}{withBreaks}`
443
+ elseif part.kind == "bold" then
444
+ out = `{out}<b>{escapeRich(part.text)}</b>`
445
+ elseif part.kind == "italic" then
446
+ out = `{out}<i>{escapeRich(part.text)}</i>`
447
+ elseif part.kind == "code" then
448
+ out = `{out}<font face="RobotoMono">{escapeRich(part.text)}</font>`
449
+ elseif part.kind == "link" then
450
+ out = `{out}<font color="#4C9AFF">{escapeRich(part.text)}</font> ({escapeRich(part.href)})`
451
+ end
452
+ end
453
+ return out
454
+ end
455
+ return {
456
+ parseMarkdown = parseMarkdown,
457
+ inlinesToPlain = inlinesToPlain,
458
+ inlinesToRichText = inlinesToRichText,
459
+ }
@@ -1,3 +1,5 @@
1
+ import React from "@rbxts/react";
2
+ import { CustomizedProps } from "../../../../theme/index";
1
3
  export interface MenuItem {
2
4
  id: string;
3
5
  text: string;
@@ -9,6 +11,10 @@ export interface MenuProps {
9
11
  items: MenuItem[];
10
12
  onSelect: (id: string) => void;
11
13
  onClose: () => void;
14
+ emptyText?: string;
15
+ empty?: React.Element;
16
+ dense?: boolean;
17
+ selected?: string;
12
18
  }
13
- declare function Menu(props: MenuProps): JSX.Element | undefined;
19
+ declare function Menu(props: CustomizedProps<Frame, MenuProps>): JSX.Element | undefined;
14
20
  export default Menu;
@@ -1,10 +1,13 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
3
  local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
+ local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
4
5
  local ListItem = TS.import(script, script.Parent.Parent.Parent, "listItem").ListItem
5
6
  local Popup = TS.import(script, script.Parent.Parent.Parent, "popup").Popup
7
+ local EmptyListHint = TS.import(script, script.Parent.Parent.Parent, "virtualList").EmptyListHint
6
8
  local useMenuStyles = TS.import(script, script.Parent, "Menu.styles").default
7
9
  local ROW = 28
10
+ local ROW_DENSE = 22
8
11
  local function Menu(props)
9
12
  local _binding = props
10
13
  local anchor = _binding.anchor
@@ -12,47 +15,86 @@ local function Menu(props)
12
15
  local items = _binding.items
13
16
  local onSelect = _binding.onSelect
14
17
  local onClose = _binding.onClose
18
+ local emptyText = _binding.emptyText
19
+ local empty = _binding.empty
20
+ local dense = _binding.dense
21
+ local selected = _binding.selected
22
+ local className = _binding.className
23
+ local sx = _binding.sx
24
+ local id = _binding.id
25
+ local ref = _binding.ref
15
26
  local styles = useMenuStyles()
16
27
  if not open then
17
28
  return nil
18
29
  end
30
+ local vacant = #items == 0
31
+ local row = if dense == true then ROW_DENSE else ROW
32
+ local height = if vacant then row else #items * row
19
33
  local _attributes = {
20
- key = "Surface",
34
+ tag = "frame",
21
35
  }
22
- for _k, _v in styles.surface do
23
- _attributes[_k] = _v
36
+ local _condition = id
37
+ if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
38
+ _condition = "Surface"
24
39
  end
40
+ _attributes.key = _condition
41
+ _attributes.hostRef = ref
42
+ _attributes.base = styles.surface
43
+ _attributes.className = className
44
+ _attributes.sx = sx
25
45
  local _attributes_1 = table.clone(styles.corner)
26
46
  setmetatable(_attributes_1, nil)
27
47
  local _exp = React.createElement("uicorner", _attributes_1)
28
- local _attributes_2 = table.clone(styles.list)
48
+ local _attributes_2 = table.clone(styles.stroke)
29
49
  setmetatable(_attributes_2, nil)
30
- local _exp_1 = React.createElement("uilistlayout", _attributes_2)
31
- -- ▼ ReadonlyArray.map ▼
32
- local _newValue = table.create(#items)
33
- local _callback = function(item)
34
- return React.createElement(ListItem, {
35
- key = item.id,
36
- text = item.text,
37
- disabled = item.disabled,
38
- onActivated = function()
39
- if item.disabled == true then
40
- return nil
41
- end
42
- onSelect(item.id)
43
- onClose()
44
- end,
45
- })
50
+ local _exp_1 = React.createElement("uistroke", _attributes_2)
51
+ local _attributes_3 = table.clone(styles.list)
52
+ setmetatable(_attributes_3, nil)
53
+ local _exp_2 = React.createElement("uilistlayout", _attributes_3)
54
+ local _result
55
+ if vacant then
56
+ local _condition_1 = empty
57
+ if _condition_1 == nil then
58
+ local _attributes_4 = {}
59
+ local _condition_2 = emptyText
60
+ if _condition_2 == nil then
61
+ _condition_2 = "No options"
62
+ end
63
+ _attributes_4.text = _condition_2
64
+ _attributes_4.height = row
65
+ _condition_1 = React.createElement(EmptyListHint, _attributes_4)
66
+ end
67
+ _result = _condition_1
68
+ else
69
+ -- ▼ ReadonlyArray.map ▼
70
+ local _newValue = table.create(#items)
71
+ local _callback = function(item)
72
+ return React.createElement(ListItem, {
73
+ key = item.id,
74
+ text = item.text,
75
+ disabled = item.disabled,
76
+ dense = dense,
77
+ selected = item.id == selected,
78
+ onActivated = function()
79
+ if item.disabled == true then
80
+ return nil
81
+ end
82
+ onSelect(item.id)
83
+ onClose()
84
+ end,
85
+ })
86
+ end
87
+ for _k, _v in items do
88
+ _newValue[_k] = _callback(_v, _k - 1, items)
89
+ end
90
+ -- ▲ ReadonlyArray.map ▲
91
+ _result = (React.createElement(React.Fragment, nil, _newValue))
46
92
  end
47
- for _k, _v in items do
48
- _newValue[_k] = _callback(_v, _k - 1, items)
49
- end
50
- -- ▲ ReadonlyArray.map ▲
51
93
  return React.createElement(Popup, {
52
94
  anchor = anchor,
53
- preferredHeight = #items * ROW,
95
+ preferredHeight = height,
54
96
  onDismiss = onClose,
55
- }, React.createElement("frame", _attributes, _exp, _exp_1, _newValue))
97
+ }, React.createElement(SxHost, _attributes, _exp, _exp_1, _exp_2, _result))
56
98
  end
57
99
  local default = Menu
58
100
  return {
@@ -8,12 +8,16 @@ local useMenuStyles = componentStyles("Menu", function(theme)
8
8
  surface = {
9
9
  Size = UDim2.new(1, 0, 0, 0),
10
10
  AutomaticSize = Enum.AutomaticSize.Y,
11
- BackgroundColor3 = theme.palette.surface.paper,
11
+ BackgroundColor3 = theme.palette.surface.elevated,
12
12
  BorderSizePixel = 0,
13
13
  },
14
14
  corner = {
15
15
  CornerRadius = UDim.new(0, theme.shape.borderRadius),
16
16
  },
17
+ stroke = {
18
+ Color = theme.palette.border,
19
+ ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
20
+ },
17
21
  list = {
18
22
  FillDirection = Enum.FillDirection.Vertical,
19
23
  SortOrder = Enum.SortOrder.LayoutOrder,
@@ -1,9 +1,10 @@
1
1
  import React from "@rbxts/react";
2
+ import { CustomizedProps } from "../../../../theme/index";
2
3
  export interface ModalProps {
3
4
  host?: Instance;
4
5
  open: boolean;
5
6
  onClose: () => void;
6
7
  children?: React.ReactNode;
7
8
  }
8
- declare function Modal(props: ModalProps): JSX.Element | undefined;
9
+ declare function Modal(props: CustomizedProps<Frame, ModalProps>): JSX.Element;
9
10
  export default Modal;