@rbxts/uiblox 0.2.0-alpha.36 → 0.2.0-alpha.5

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 (313) hide show
  1. package/README.md +109 -27
  2. package/out/hooks/index.d.ts +0 -1
  3. package/out/hooks/init.luau +0 -3
  4. package/out/hooks/useBreakpoints.luau +11 -2
  5. package/out/theme/interfaces/theme/Theme.d.ts +0 -15
  6. package/out/theme/styles/utilities/componentStyles.luau +3 -45
  7. package/out/theme/styles/utilities/componentTheme.d.ts +0 -15
  8. package/out/theme/styles/utilities/index.d.ts +0 -2
  9. package/out/theme/styles/utilities/init.luau +0 -7
  10. package/out/theme/styles/utilities/resolveStyle.d.ts +2 -10
  11. package/out/theme/styles/utilities/resolveStyle.luau +3 -7
  12. package/out/theme/styles/utilities/styleCache.d.ts +0 -2
  13. package/out/theme/styles/utilities/styleCache.luau +0 -9
  14. package/out/theme/types/types.d.ts +1 -2
  15. package/out/ui/packages/accordion/components/Accordion.d.ts +0 -2
  16. package/out/ui/packages/accordion/components/Accordion.luau +30 -46
  17. package/out/ui/packages/accordion/components/Accordion.styles.d.ts +0 -1
  18. package/out/ui/packages/accordion/components/Accordion.styles.luau +4 -16
  19. package/out/ui/packages/accordion/components/accordionOpen.d.ts +0 -1
  20. package/out/ui/packages/accordion/components/accordionOpen.luau +0 -4
  21. package/out/ui/packages/alert/components/Alert.d.ts +0 -2
  22. package/out/ui/packages/alert/components/Alert.luau +42 -48
  23. package/out/ui/packages/alert/components/Alert.styles.d.ts +0 -2
  24. package/out/ui/packages/alert/components/Alert.styles.luau +8 -17
  25. package/out/ui/packages/appBar/components/AppBar.d.ts +1 -2
  26. package/out/ui/packages/appBar/components/AppBar.luau +36 -47
  27. package/out/ui/packages/appBar/components/AppBar.styles.d.ts +0 -2
  28. package/out/ui/packages/appBar/components/AppBar.styles.luau +5 -16
  29. package/out/ui/packages/assetField/components/AssetField.luau +16 -12
  30. package/out/ui/packages/avatar/components/Avatar.d.ts +0 -2
  31. package/out/ui/packages/avatar/components/Avatar.luau +26 -27
  32. package/out/ui/packages/avatar/components/Avatar.styles.d.ts +0 -2
  33. package/out/ui/packages/avatar/components/Avatar.styles.luau +1 -5
  34. package/out/ui/packages/badge/components/Badge.d.ts +0 -3
  35. package/out/ui/packages/badge/components/Badge.luau +24 -32
  36. package/out/ui/packages/badge/components/Badge.styles.d.ts +1 -5
  37. package/out/ui/packages/badge/components/Badge.styles.luau +8 -20
  38. package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +0 -1
  39. package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +18 -20
  40. package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.d.ts +1 -3
  41. package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +2 -6
  42. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.d.ts +0 -1
  43. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +40 -67
  44. package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +0 -9
  45. package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +0 -68
  46. package/out/ui/packages/breadcrumbs/index.d.ts +0 -1
  47. package/out/ui/packages/breadcrumbs/init.luau +0 -3
  48. package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +16 -12
  49. package/out/ui/packages/button/components/Button.luau +18 -20
  50. package/out/ui/packages/card/components/Card.d.ts +1 -3
  51. package/out/ui/packages/card/components/Card.luau +0 -10
  52. package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +53 -75
  53. package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +9 -26
  54. package/out/ui/packages/checkbox/components/Checkbox.luau +16 -16
  55. package/out/ui/packages/checkbox/components/checkboxLook.d.ts +1 -1
  56. package/out/ui/packages/chip/components/Chip.d.ts +1 -5
  57. package/out/ui/packages/chip/components/Chip.luau +16 -25
  58. package/out/ui/packages/chip/components/Chip.styles.d.ts +0 -5
  59. package/out/ui/packages/chip/components/Chip.styles.luau +13 -30
  60. package/out/ui/packages/circularProgress/components/CircularProgress.luau +18 -29
  61. package/out/ui/packages/colorPicker/components/ColorPicker.luau +20 -16
  62. package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +20 -34
  63. package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +35 -34
  64. package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +62 -65
  65. package/out/ui/packages/dialog/components/Dialog.d.ts +2 -3
  66. package/out/ui/packages/dialog/components/Dialog.luau +21 -41
  67. package/out/ui/packages/divider/components/Divider.d.ts +0 -1
  68. package/out/ui/packages/divider/components/Divider.luau +17 -52
  69. package/out/ui/packages/divider/components/Divider.styles.luau +0 -32
  70. package/out/ui/packages/drawer/components/Drawer.d.ts +1 -3
  71. package/out/ui/packages/drawer/components/Drawer.luau +37 -71
  72. package/out/ui/packages/drawer/components/Drawer.styles.d.ts +1 -3
  73. package/out/ui/packages/drawer/components/Drawer.styles.luau +2 -3
  74. package/out/ui/packages/fab/components/Fab.d.ts +0 -3
  75. package/out/ui/packages/fab/components/Fab.luau +37 -79
  76. package/out/ui/packages/fab/components/Fab.styles.d.ts +0 -3
  77. package/out/ui/packages/fab/components/Fab.styles.luau +3 -39
  78. package/out/ui/packages/fab/components/fabSize.d.ts +0 -1
  79. package/out/ui/packages/fab/components/fabSize.luau +0 -4
  80. package/out/ui/packages/fab/index.d.ts +1 -1
  81. package/out/ui/packages/fab/init.luau +0 -1
  82. package/out/ui/packages/fontEditor/components/FontEditor.luau +16 -12
  83. package/out/ui/packages/formText/components/FormHelperText.luau +16 -12
  84. package/out/ui/packages/formText/components/FormLabel.luau +16 -12
  85. package/out/ui/packages/gradientEditor/components/GradientEditor.luau +42 -56
  86. package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +4 -37
  87. package/out/ui/packages/icon/components/Icon.luau +16 -9
  88. package/out/ui/packages/iconButton/components/IconButton.luau +16 -16
  89. package/out/ui/packages/index.d.ts +0 -6
  90. package/out/ui/packages/init.luau +0 -18
  91. package/out/ui/packages/input/components/Input.d.ts +0 -1
  92. package/out/ui/packages/input/components/Input.luau +18 -21
  93. package/out/ui/packages/layout/components/Grid.d.ts +1 -5
  94. package/out/ui/packages/layout/components/Grid.luau +19 -41
  95. package/out/ui/packages/layout/components/List.luau +16 -9
  96. package/out/ui/packages/layout/components/Stack.d.ts +0 -2
  97. package/out/ui/packages/layout/components/Stack.luau +15 -10
  98. package/out/ui/packages/layout/components/Stack.styles.d.ts +0 -2
  99. package/out/ui/packages/layout/components/Stack.styles.luau +5 -34
  100. package/out/ui/packages/layout/components/stackAlign.d.ts +2 -4
  101. package/out/ui/packages/layout/components/stackAlign.luau +2 -16
  102. package/out/ui/packages/layout/index.d.ts +0 -11
  103. package/out/ui/packages/layout/init.luau +0 -4
  104. package/out/ui/packages/link/components/Link.luau +16 -13
  105. package/out/ui/packages/listItem/components/ListItem.d.ts +1 -4
  106. package/out/ui/packages/listItem/components/ListItem.luau +4 -44
  107. package/out/ui/packages/listItem/components/ListItem.styles.d.ts +0 -1
  108. package/out/ui/packages/listItem/components/ListItem.styles.luau +5 -16
  109. package/out/ui/packages/loadingStroke/components/LoadingStroke.d.ts +1 -5
  110. package/out/ui/packages/menu/components/Menu.d.ts +1 -4
  111. package/out/ui/packages/menu/components/Menu.luau +15 -32
  112. package/out/ui/packages/modal/components/Modal.d.ts +1 -2
  113. package/out/ui/packages/modal/components/Modal.luau +37 -79
  114. package/out/ui/packages/motion/index.d.ts +1 -1
  115. package/out/ui/packages/motion/init.luau +0 -1
  116. package/out/ui/packages/motion/unit.d.ts +0 -5
  117. package/out/ui/packages/motion/unit.luau +0 -23
  118. package/out/ui/packages/numberInput/components/NumberInput.d.ts +0 -2
  119. package/out/ui/packages/numberInput/components/NumberInput.luau +3 -16
  120. package/out/ui/packages/numberInput/components/numberValue.d.ts +0 -1
  121. package/out/ui/packages/numberInput/components/numberValue.luau +0 -45
  122. package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +16 -12
  123. package/out/ui/packages/pagination/components/Pagination.d.ts +1 -6
  124. package/out/ui/packages/pagination/components/Pagination.luau +38 -62
  125. package/out/ui/packages/pagination/components/Pagination.styles.d.ts +1 -6
  126. package/out/ui/packages/pagination/components/Pagination.styles.luau +4 -36
  127. package/out/ui/packages/pagination/components/pageRange.d.ts +1 -2
  128. package/out/ui/packages/pagination/components/pageRange.luau +8 -91
  129. package/out/ui/packages/pagination/index.d.ts +0 -1
  130. package/out/ui/packages/pagination/init.luau +0 -1
  131. package/out/ui/packages/paper/components/Paper.d.ts +2 -4
  132. package/out/ui/packages/paper/components/Paper.luau +9 -31
  133. package/out/ui/packages/paper/components/Paper.styles.d.ts +1 -1
  134. package/out/ui/packages/paper/components/Paper.styles.luau +0 -6
  135. package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +38 -63
  136. package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +7 -21
  137. package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +0 -2
  138. package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +0 -14
  139. package/out/ui/packages/popup/components/Popup.d.ts +1 -2
  140. package/out/ui/packages/popup/components/Popup.luau +18 -35
  141. package/out/ui/packages/popup/index.d.ts +0 -1
  142. package/out/ui/packages/popup/init.luau +0 -1
  143. package/out/ui/packages/preloader/components/Preloader.luau +16 -9
  144. package/out/ui/packages/progressBar/components/ProgressBar.luau +16 -12
  145. package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +0 -1
  146. package/out/ui/packages/radioGroup/components/RadioGroup.luau +18 -16
  147. package/out/ui/packages/radioGroup/components/RadioGroup.styles.d.ts +0 -1
  148. package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +1 -4
  149. package/out/ui/packages/rating/components/Rating.d.ts +1 -3
  150. package/out/ui/packages/rating/components/Rating.luau +17 -19
  151. package/out/ui/packages/rating/components/Rating.styles.d.ts +0 -2
  152. package/out/ui/packages/rating/components/Rating.styles.luau +2 -7
  153. package/out/ui/packages/rayEditor/components/RayEditor.luau +16 -12
  154. package/out/ui/packages/rectEditor/components/RectEditor.luau +43 -86
  155. package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +7 -30
  156. package/out/ui/packages/scroll/index.d.ts +0 -2
  157. package/out/ui/packages/scroll/init.luau +0 -1
  158. package/out/ui/packages/select/components/Select.luau +55 -15
  159. package/out/ui/packages/select/components/selectMotion.d.ts +2 -0
  160. package/out/ui/packages/select/components/selectMotion.luau +12 -0
  161. package/out/ui/packages/shadow/components/Shadow.d.ts +1 -2
  162. package/out/ui/packages/shadow/components/Shadow.luau +17 -39
  163. package/out/ui/packages/shadow/components/Shadow.styles.luau +2 -7
  164. package/out/ui/packages/sidebar/components/Sidebar.luau +16 -9
  165. package/out/ui/packages/skeleton/components/Skeleton.luau +28 -19
  166. package/out/ui/packages/skeleton/components/Skeleton.styles.luau +3 -7
  167. package/out/ui/packages/slider/components/Slider.d.ts +0 -3
  168. package/out/ui/packages/slider/components/Slider.luau +19 -47
  169. package/out/ui/packages/slider/components/Slider.styles.d.ts +0 -2
  170. package/out/ui/packages/slider/components/Slider.styles.luau +1 -14
  171. package/out/ui/packages/snackbar/components/Snackbar.d.ts +0 -2
  172. package/out/ui/packages/snackbar/components/Snackbar.luau +0 -5
  173. package/out/ui/packages/speedDial/components/SpeedDial.d.ts +0 -2
  174. package/out/ui/packages/speedDial/components/SpeedDial.luau +20 -25
  175. package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +1 -4
  176. package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +4 -9
  177. package/out/ui/packages/speedDial/index.d.ts +0 -1
  178. package/out/ui/packages/splitPane/components/SplitPane.luau +17 -13
  179. package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
  180. package/out/ui/packages/stateMatrix.d.ts +0 -2
  181. package/out/ui/packages/stateMatrix.luau +997 -793
  182. package/out/ui/packages/stepper/components/Stepper.d.ts +0 -1
  183. package/out/ui/packages/stepper/components/Stepper.luau +17 -16
  184. package/out/ui/packages/stepper/components/Stepper.styles.d.ts +1 -3
  185. package/out/ui/packages/stepper/components/Stepper.styles.luau +2 -6
  186. package/out/ui/packages/switch/components/Switch.d.ts +0 -2
  187. package/out/ui/packages/switch/components/Switch.luau +16 -21
  188. package/out/ui/packages/switch/components/Switch.styles.d.ts +0 -2
  189. package/out/ui/packages/switch/components/Switch.styles.luau +1 -6
  190. package/out/ui/packages/switch/components/switchLook.d.ts +1 -1
  191. package/out/ui/packages/table/components/Table.d.ts +2 -16
  192. package/out/ui/packages/table/components/Table.luau +53 -136
  193. package/out/ui/packages/table/components/Table.styles.d.ts +1 -3
  194. package/out/ui/packages/table/components/Table.styles.luau +6 -10
  195. package/out/ui/packages/table/index.d.ts +1 -2
  196. package/out/ui/packages/tabs/components/Tabs.d.ts +0 -3
  197. package/out/ui/packages/tabs/components/Tabs.luau +19 -24
  198. package/out/ui/packages/tabs/components/Tabs.styles.d.ts +1 -5
  199. package/out/ui/packages/tabs/components/Tabs.styles.luau +10 -26
  200. package/out/ui/packages/tabs/index.d.ts +0 -1
  201. package/out/ui/packages/tabs/init.luau +0 -1
  202. package/out/ui/packages/toast/components/Toast.d.ts +0 -2
  203. package/out/ui/packages/toast/components/Toast.luau +13 -41
  204. package/out/ui/packages/toast/components/Toast.styles.luau +5 -23
  205. package/out/ui/packages/toggleButton/components/ToggleButton.d.ts +1 -5
  206. package/out/ui/packages/toggleButton/components/ToggleButton.luau +33 -36
  207. package/out/ui/packages/toggleButton/components/ToggleButton.styles.d.ts +0 -4
  208. package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +5 -16
  209. package/out/ui/packages/tooltip/components/Tooltip.luau +16 -9
  210. package/out/ui/packages/treeView/components/TreeView.luau +16 -9
  211. package/out/ui/packages/typography/components/Typography.luau +14 -13
  212. package/out/ui/packages/udimEditor/components/UDimEditor.luau +16 -12
  213. package/out/ui/packages/vectorEditor/components/VectorEditor.luau +16 -12
  214. package/out/ui/packages/virtualList/components/EmptyListHint.d.ts +1 -2
  215. package/out/ui/packages/virtualList/components/EmptyListHint.luau +4 -15
  216. package/out/ui/packages/virtualList/components/VirtualList.luau +16 -9
  217. package/package.json +2 -2
  218. package/out/hooks/viewportObserver.d.ts +0 -10
  219. package/out/hooks/viewportObserver.luau +0 -75
  220. package/out/theme/styles/utilities/resolveSx.d.ts +0 -120
  221. package/out/theme/styles/utilities/resolveSx.luau +0 -524
  222. package/out/ui/packages/backdrop/components/Backdrop.d.ts +0 -10
  223. package/out/ui/packages/backdrop/components/Backdrop.luau +0 -51
  224. package/out/ui/packages/backdrop/components/Backdrop.styles.d.ts +0 -4
  225. package/out/ui/packages/backdrop/components/Backdrop.styles.luau +0 -24
  226. package/out/ui/packages/backdrop/index.d.ts +0 -2
  227. package/out/ui/packages/backdrop/init.luau +0 -5
  228. package/out/ui/packages/dateRange/components/DateRangePicker.d.ts +0 -11
  229. package/out/ui/packages/dateRange/components/DateRangePicker.luau +0 -253
  230. package/out/ui/packages/dateRange/dateRangeValue.d.ts +0 -18
  231. package/out/ui/packages/dateRange/dateRangeValue.luau +0 -121
  232. package/out/ui/packages/dateRange/index.d.ts +0 -3
  233. package/out/ui/packages/dateRange/init.luau +0 -16
  234. package/out/ui/packages/divider/components/dividerLabel.d.ts +0 -1
  235. package/out/ui/packages/divider/components/dividerLabel.luau +0 -10
  236. package/out/ui/packages/host/components/SxHost.d.ts +0 -18
  237. package/out/ui/packages/host/components/SxHost.luau +0 -210
  238. package/out/ui/packages/host/hostPaint.d.ts +0 -12
  239. package/out/ui/packages/host/hostPaint.luau +0 -34
  240. package/out/ui/packages/host/hostRules.d.ts +0 -15
  241. package/out/ui/packages/host/hostRules.luau +0 -92
  242. package/out/ui/packages/host/index.d.ts +0 -3
  243. package/out/ui/packages/host/init.luau +0 -13
  244. package/out/ui/packages/imageList/components/ImageList.d.ts +0 -14
  245. package/out/ui/packages/imageList/components/ImageList.luau +0 -93
  246. package/out/ui/packages/imageList/components/ImageList.styles.d.ts +0 -6
  247. package/out/ui/packages/imageList/components/ImageList.styles.luau +0 -73
  248. package/out/ui/packages/imageList/components/imageListLayout.d.ts +0 -4
  249. package/out/ui/packages/imageList/components/imageListLayout.luau +0 -31
  250. package/out/ui/packages/imageList/index.d.ts +0 -2
  251. package/out/ui/packages/imageList/init.luau +0 -5
  252. package/out/ui/packages/layout/components/Box.d.ts +0 -11
  253. package/out/ui/packages/layout/components/Box.luau +0 -40
  254. package/out/ui/packages/layout/components/Box.styles.d.ts +0 -7
  255. package/out/ui/packages/layout/components/Box.styles.luau +0 -34
  256. package/out/ui/packages/layout/components/Container.d.ts +0 -10
  257. package/out/ui/packages/layout/components/Container.luau +0 -45
  258. package/out/ui/packages/layout/components/Container.styles.d.ts +0 -6
  259. package/out/ui/packages/layout/components/Container.styles.luau +0 -41
  260. package/out/ui/packages/layout/components/FlexItem.d.ts +0 -12
  261. package/out/ui/packages/layout/components/FlexItem.luau +0 -40
  262. package/out/ui/packages/layout/components/FlexItem.styles.d.ts +0 -8
  263. package/out/ui/packages/layout/components/FlexItem.styles.luau +0 -66
  264. package/out/ui/packages/layout/components/boxPad.d.ts +0 -14
  265. package/out/ui/packages/layout/components/boxPad.luau +0 -59
  266. package/out/ui/packages/layout/components/containerWidth.d.ts +0 -2
  267. package/out/ui/packages/layout/components/containerWidth.luau +0 -17
  268. package/out/ui/packages/layout/components/flexItemMode.d.ts +0 -6
  269. package/out/ui/packages/layout/components/flexItemMode.luau +0 -36
  270. package/out/ui/packages/layout/components/gridProps.d.ts +0 -3
  271. package/out/ui/packages/layout/components/gridProps.luau +0 -20
  272. package/out/ui/packages/loadingStroke/components/loadingStrokeSx.d.ts +0 -11
  273. package/out/ui/packages/loadingStroke/components/loadingStrokeSx.luau +0 -2
  274. package/out/ui/packages/markdown/components/Markdown.d.ts +0 -6
  275. package/out/ui/packages/markdown/components/Markdown.luau +0 -221
  276. package/out/ui/packages/markdown/components/Markdown.styles.d.ts +0 -2
  277. package/out/ui/packages/markdown/components/Markdown.styles.luau +0 -101
  278. package/out/ui/packages/markdown/components/MarkdownEditor.d.ts +0 -22
  279. package/out/ui/packages/markdown/components/MarkdownEditor.luau +0 -433
  280. package/out/ui/packages/markdown/components/MarkdownEditor.styles.d.ts +0 -6
  281. package/out/ui/packages/markdown/components/MarkdownEditor.styles.luau +0 -161
  282. package/out/ui/packages/markdown/components/markdownEditorHeight.d.ts +0 -1
  283. package/out/ui/packages/markdown/components/markdownEditorHeight.luau +0 -13
  284. package/out/ui/packages/markdown/htmlToMarkdown.d.ts +0 -2
  285. package/out/ui/packages/markdown/htmlToMarkdown.luau +0 -350
  286. package/out/ui/packages/markdown/index.d.ts +0 -8
  287. package/out/ui/packages/markdown/init.luau +0 -11
  288. package/out/ui/packages/markdown/parseMarkdown.d.ts +0 -42
  289. package/out/ui/packages/markdown/parseMarkdown.luau +0 -459
  290. package/out/ui/packages/reorder/index.d.ts +0 -2
  291. package/out/ui/packages/reorder/init.luau +0 -14
  292. package/out/ui/packages/reorder/reorder.d.ts +0 -24
  293. package/out/ui/packages/reorder/reorder.luau +0 -178
  294. package/out/ui/packages/reorder/useReorderDrag.d.ts +0 -15
  295. package/out/ui/packages/reorder/useReorderDrag.luau +0 -129
  296. package/out/ui/packages/scroll/components/ScrollView.d.ts +0 -7
  297. package/out/ui/packages/scroll/components/ScrollView.luau +0 -42
  298. package/out/ui/packages/skeleton/components/skeletonTone.d.ts +0 -20
  299. package/out/ui/packages/skeleton/components/skeletonTone.luau +0 -14
  300. package/out/ui/packages/slider/components/sliderMarks.d.ts +0 -1
  301. package/out/ui/packages/slider/components/sliderMarks.luau +0 -37
  302. package/out/ui/packages/snackbar/components/snackbarAction.d.ts +0 -1
  303. package/out/ui/packages/snackbar/components/snackbarAction.luau +0 -10
  304. package/out/ui/packages/sparkline/components/Sparkline.d.ts +0 -9
  305. package/out/ui/packages/sparkline/components/Sparkline.luau +0 -66
  306. package/out/ui/packages/sparkline/index.d.ts +0 -3
  307. package/out/ui/packages/sparkline/init.luau +0 -6
  308. package/out/ui/packages/sparkline/sparklineLayout.d.ts +0 -8
  309. package/out/ui/packages/sparkline/sparklineLayout.luau +0 -75
  310. package/out/ui/packages/table/components/tableColumns.d.ts +0 -26
  311. package/out/ui/packages/table/components/tableColumns.luau +0 -92
  312. package/out/ui/packages/tabs/components/tabsOrientation.d.ts +0 -2
  313. package/out/ui/packages/tabs/components/tabsOrientation.luau +0 -7
package/README.md CHANGED
@@ -2,35 +2,13 @@
2
2
 
3
3
  # uiblox-rbxts
4
4
 
5
- > This package is a work in progress.
6
-
7
5
  UI library and theming for roblox-ts projects.
8
6
 
9
- ## Background
10
-
11
- Roblox has their own internal design system, coined "uiblox-web", that it uses for its new
12
- web-facing products. This system offers reusable components, implemented in
13
- React Typescript, that are derived from material UI (MUI). As well, it offers a
14
- common theme/pallete for consistent UI/UX.
15
-
16
- Anyone is able to view their design system as
17
- [UIBlox-Web](https://uiblox.roblox.com). You can see that they leverage
18
- [Storybook](https://storybook.js.org), a UI component explorer for frontend
19
- developers, to render component previews.
20
-
21
- Design systems all help engineers cut down on implementation time and ensure
22
- consitent UX across products.
23
-
24
7
  ## Overview
25
8
 
26
- So what is uiblox-rbxts? Simply put, its my stab at a design system that mimics
27
- uiblox-web for games written using roblox-ts.
9
+ Uiblox is a roblox-ts UI kit: semantic themes, `makeStyles` / `createStyles`, and typed React components for Studio and games. Public APIs aim for familiar Material UI–style capability (props and behavior), implemented independently for Roblox Instances, input modes, and performance.
28
10
 
29
- UIBlox-rbxts aims to provide extensible components that can be reusable by
30
- anyone who installs this npm package. It also offers a theme and styling system
31
- that aids UI/UX consistentency.
32
-
33
- How does it do this? Well, there are two main exports from this package:
11
+ Main exports from `@rbxts/uiblox`:
34
12
 
35
13
  - @rbxts/uiblox -> theme
36
14
  - An extensible Theme type + default Dark (default) and Light themes
@@ -46,11 +24,47 @@ How does it do this? Well, there are two main exports from this package:
46
24
 
47
25
  ### Installation
48
26
 
49
- Install the package to get started.
27
+ ```
28
+ npm install @rbxts/uiblox
29
+ ```
30
+
31
+ ## Quickstart
50
32
 
51
- `npm install @rbxts/uiblox`
33
+ 1. Wrap your app (or a subtree) in `ThemeProvider` with `DarkTheme` or `LightTheme`.
34
+ 2. Build styles with `makeStyles` / `createStyles` (or `componentStyles`) and spread them onto Instances.
35
+ 3. For hover/press/focus/disabled (and list `_first` / `_last`), put `_hover`-style keys on the style table and call `resolveStyle(style, state)` before spreading.
36
+ 4. Use packaged components from `@rbxts/uiblox` (`Button`, `Input`, `Select`, …).
37
+ 5. Preview components in [Storyblox](https://github.com/bjlarouche/storyblox) with `*.stories` modules.
52
38
 
53
- Spacing, density, and sx notes are in [docs/STYLING.md](docs/STYLING.md).
39
+ Token reference (spacing, density, typography, shape, palette, `resolveStyle`): [docs/STYLING.md](docs/STYLING.md).
40
+
41
+ ```tsx
42
+ import React from "@rbxts/react";
43
+ import { Button, DarkTheme, ThemeProvider } from "@rbxts/uiblox";
44
+
45
+ export function App() {
46
+ return (
47
+ <ThemeProvider theme={DarkTheme}>
48
+ <Button text="Continue" onLeftClick={() => {}} />
49
+ </ThemeProvider>
50
+ );
51
+ }
52
+ ```
53
+
54
+ ## Parity checklist
55
+
56
+ Capability parity, not pixel parity. For each public component, expect:
57
+
58
+ - [ ] Typed controlled props where interaction needs state
59
+ - [ ] Theme tokens (light/dark) via `ThemeProvider`
60
+ - [ ] Style slots / variants through the styling helpers
61
+ - [ ] Disabled / loading / error when the control type warrants it
62
+ - [ ] Mouse, touch, and gamepad-friendly activation where interactive
63
+ - [ ] Cleanup and focused unit checks in-repo
64
+ - [ ] `stateMatrix` rows for visual capture planning
65
+ - [ ] A Storyblox story (dev fixtures OK)
66
+
67
+ Skipped on purpose: browser-only addons (MDX, iframes, hosted visual-review clouds).
54
68
 
55
69
  ## Example
56
70
 
@@ -197,6 +211,74 @@ const useMyComponentStyles = makeStyles<MyComponentProps>((theme: Theme, props:
197
211
  export default useMyComponentStyles;
198
212
  ```
199
213
 
214
+ ### Style precedence
215
+
216
+ Components spread their own styles first, then `className`, then the props that
217
+ carry state. Later always wins:
218
+
219
+ 1. Component styles from the theme
220
+ 2. `className` (merge several with `cx(a, condition && b)`; later args win, falsy
221
+ args are skipped)
222
+ 3. State props the component owns: `Active`, `Selectable`, `Text`, and the
223
+ value-driven sizes/positions of Slider, SplitPane, and so on
224
+
225
+ So `className` can restyle anything except a control's state. Pass `disabled`
226
+ instead of overriding `Active`.
227
+
228
+ ### Controls
229
+
230
+ Inputs are controlled: `{ value, onChange, disabled? }`. They call `onChange`
231
+ only when the value actually changes, and never while disabled.
232
+
233
+ | Component | Value | Notes |
234
+ | --- | --- | --- |
235
+ | Checkbox | `boolean` | `mixed` shows indeterminate; activating commits `true` |
236
+ | Switch | `boolean` | |
237
+ | RadioGroup / Select / Tabs | `T` from `options: { label, value: T, disabled? }[]` | compared by identity; disabled options are skipped |
238
+ | NumberInput | `number` | commits on focus lost or Enter; clamps to `min`/`max`, snaps to `step` |
239
+ | Slider | `number` | `onChange` while dragging, `onCommit` on release |
240
+ | SplitPane | first pane size (px) | display clamps to `min`/`max`; Escape cancels a drag |
241
+ | Input | `text` | `onInput` while typing, `onTextChanged` on commit |
242
+
243
+ Select and Tooltip render through `Popup`, which portals into the nearest
244
+ `LayerCollector` so clipping parents do not cut them off. The popup follows its
245
+ anchor when that anchor moves or resizes, and Select closes if the anchor leaves
246
+ the layer. Select handles Up, Down, Enter, and Escape while it is open or
247
+ selected, including when the pointer is not over it.
248
+
249
+ ### Loading
250
+
251
+ `Skeleton` covers a block that is still loading. `variant` is `text`,
252
+ `rectangular`, `rounded`, or `circular`. `width` and `height` are pixels.
253
+ `lines` and `gap` stack text rows. `SkeletonText` is the text variant.
254
+ `animation` is `pulse`, `shimmer`, or `false`. `reducedMotion` holds the block
255
+ still. A later theme preference can set that prop for you.
256
+
257
+ `CircularProgress` spins while `value` is omitted. A `value` from 0 to 1 draws
258
+ an arc and stops the spin. `size`, `thickness`, and `color` restyle the ring.
259
+ `LinearProgress` is the existing `ProgressBar`: pass `value` from 0 to 1 or
260
+ `progress` from 0 to 100. `indeterminate` slides the bar. `disabled` and
261
+ `reducedMotion` stop the motion and fade the fill.
262
+
263
+ `Button` and `IconButton` take `loading`. The control ignores clicks, hover,
264
+ and focus while loading, and its size stays put. `loadingLabel` replaces the
265
+ caption. `loadingPosition` is `start`, `center`, or `end`. `reducedMotion`
266
+ keeps the spinner still.
267
+
268
+ ### State captures
269
+
270
+ `stateMatrix` is the gallery list for Storyblox. Each row is one shot: `theme`
271
+ (`Dark` or `Light`), `width`, and `pointer` (`rest`, `hover`, `press`, or
272
+ `focus`). Rows are built in small helper functions and concatenated so the
273
+ compiled Luau chunk stays under the 200-local register limit. `open` means the
274
+ Select list is showing. `options` and `disabledOption` build RadioGroup, Select,
275
+ and Tabs. `selected` and `filter` are TreeView. `value`, `text`, `disabled`,
276
+ `loading`, `mixed`, `hasError`, and `placeholder` are that control's props.
277
+ `variant`, `animation` (`pulse`, `shimmer`, or `false`), `reducedMotion`, and
278
+ `indeterminate` cover skeleton and progress shots. Those shots stay still when
279
+ `animation` is `false` or `reducedMotion` is set. Hover, press, and focus rows
280
+ are only there when the control actually changes.
281
+
200
282
  ### Client
201
283
 
202
284
  Some sample logic for mounting app when player spawns (on client).
@@ -1,5 +1,4 @@
1
1
  export { breakpointName, orientationName, resolveResponsive } from "./breakpoints";
2
2
  export { BreakpointName, OrientationName, Responsive } from "./breakpoints";
3
3
  export { useBreakpoints } from "./useBreakpoints";
4
- export { clearViewportObservers, observeViewport } from "./viewportObserver";
5
4
  export { useReducedMotion } from "./useReducedMotion";
@@ -6,8 +6,5 @@ exports.breakpointName = _breakpoints.breakpointName
6
6
  exports.orientationName = _breakpoints.orientationName
7
7
  exports.resolveResponsive = _breakpoints.resolveResponsive
8
8
  exports.useBreakpoints = TS.import(script, script, "useBreakpoints").useBreakpoints
9
- local _viewportObserver = TS.import(script, script, "viewportObserver")
10
- exports.clearViewportObservers = _viewportObserver.clearViewportObservers
11
- exports.observeViewport = _viewportObserver.observeViewport
12
9
  exports.useReducedMotion = TS.import(script, script, "useReducedMotion").useReducedMotion
13
10
  return exports
@@ -6,7 +6,6 @@ local useState = _react.useState
6
6
  local _breakpoints = TS.import(script, script.Parent, "breakpoints")
7
7
  local breakpointName = _breakpoints.breakpointName
8
8
  local orientationName = _breakpoints.orientationName
9
- local observeViewport = TS.import(script, script.Parent, "viewportObserver").observeViewport
10
9
  local function useBreakpoints(host)
11
10
  local size, setSize = useState({
12
11
  width = 0,
@@ -16,7 +15,17 @@ local function useBreakpoints(host)
16
15
  if host == nil then
17
16
  return nil
18
17
  end
19
- return observeViewport(host, setSize)
18
+ local read = function()
19
+ return setSize({
20
+ width = host.AbsoluteSize.X,
21
+ height = host.AbsoluteSize.Y,
22
+ })
23
+ end
24
+ read()
25
+ local connection = host:GetPropertyChangedSignal("AbsoluteSize"):Connect(read)
26
+ return function()
27
+ return connection:Disconnect()
28
+ end
20
29
  end, { host })
21
30
  return {
22
31
  width = size.width,
@@ -21,21 +21,6 @@ interface Theme {
21
21
  styleOverrides?: {
22
22
  [slot: string]: object;
23
23
  };
24
- variants?: {
25
- [prop: string]: {
26
- [value: string]: {
27
- [slot: string]: object;
28
- };
29
- };
30
- };
31
- compoundVariants?: Array<{
32
- when: {
33
- [prop: string]: unknown;
34
- };
35
- styles: {
36
- [slot: string]: object;
37
- };
38
- }>;
39
24
  };
40
25
  };
41
26
  }
@@ -4,7 +4,6 @@ local _componentTheme = TS.import(script, script.Parent, "componentTheme")
4
4
  local propsWithDefaults = _componentTheme.propsWithDefaults
5
5
  local slotsWithOverrides = _componentTheme.slotsWithOverrides
6
6
  local makeStyles = TS.import(script, script.Parent, "makeStyles").default
7
- local applyVariants = TS.import(script, script.Parent, "variants").applyVariants
8
7
  local componentStyles = function(name, factory)
9
8
  return makeStyles((function(theme, props)
10
9
  local _spec = theme.components
@@ -18,53 +17,12 @@ local componentStyles = function(name, factory)
18
17
  end
19
18
  local merged = propsWithDefaults(_result, props)
20
19
  local paint = factory
21
- local slots = paint(theme, merged)
20
+ local _exp = paint(theme, merged)
22
21
  local _result_1 = spec
23
22
  if _result_1 ~= nil then
24
- _result_1 = _result_1.variants
23
+ _result_1 = _result_1.styleOverrides
25
24
  end
26
- local _condition = _result_1 ~= nil
27
- if not _condition then
28
- local _result_2 = spec
29
- if _result_2 ~= nil then
30
- _result_2 = _result_2.compoundVariants
31
- if _result_2 ~= nil then
32
- _result_2 = #_result_2
33
- end
34
- end
35
- local _condition_1 = _result_2
36
- if _condition_1 == nil then
37
- _condition_1 = 0
38
- end
39
- _condition = _condition_1 > 0
40
- end
41
- if _condition then
42
- local _exp = slots
43
- local _exp_1 = merged
44
- local _result_2 = spec
45
- if _result_2 ~= nil then
46
- _result_2 = _result_2.variants
47
- end
48
- local _condition_1 = _result_2
49
- if _condition_1 == nil then
50
- _condition_1 = {}
51
- end
52
- local _result_3 = spec
53
- if _result_3 ~= nil then
54
- _result_3 = _result_3.compoundVariants
55
- end
56
- local _condition_2 = _result_3
57
- if _condition_2 == nil then
58
- _condition_2 = {}
59
- end
60
- slots = applyVariants(_exp, _exp_1, _condition_1, _condition_2)
61
- end
62
- local _exp = slots
63
- local _result_2 = spec
64
- if _result_2 ~= nil then
65
- _result_2 = _result_2.styleOverrides
66
- end
67
- return slotsWithOverrides(_exp, _result_2)
25
+ return slotsWithOverrides(_exp, _result_1)
68
26
  end))
69
27
  end
70
28
  local default = componentStyles
@@ -5,21 +5,6 @@ export interface ComponentSpec {
5
5
  styleOverrides?: {
6
6
  [slot: string]: object;
7
7
  };
8
- variants?: {
9
- [prop: string]: {
10
- [value: string]: {
11
- [slot: string]: object;
12
- };
13
- };
14
- };
15
- compoundVariants?: Array<{
16
- when: {
17
- [prop: string]: unknown;
18
- };
19
- styles: {
20
- [slot: string]: object;
21
- };
22
- }>;
23
8
  }
24
9
  export declare function propsWithDefaults(defaults: {
25
10
  [key: string]: unknown;
@@ -4,6 +4,4 @@ export { default as classNames, cx } from "./classNames";
4
4
  export { applyVariants, CompoundVariant } from "./variants";
5
5
  export { default as componentStyles } from "./componentStyles";
6
6
  export { resolveResponsive, Responsive } from "../../../hooks/breakpoints";
7
- export { clearStyleCaches, createStyleCache, styleDepsKey } from "./styleCache";
8
- export { resolveSx, resolvePaletteToken, PaletteToken, ResolvedSx, SxColor, SxGradient, SxInput } from "./resolveSx";
9
7
  export { interactionStyle, InteractionSlots, InteractionState, resolveStyle, StyleSelectorKey, StyleState, StyleWithSelectors, } from "./resolveStyle";
@@ -9,13 +9,6 @@ exports.cx = _classNames.cx
9
9
  exports.applyVariants = TS.import(script, script, "variants").applyVariants
10
10
  exports.componentStyles = TS.import(script, script, "componentStyles").default
11
11
  exports.resolveResponsive = TS.import(script, script.Parent.Parent.Parent, "hooks", "breakpoints").resolveResponsive
12
- local _styleCache = TS.import(script, script, "styleCache")
13
- exports.clearStyleCaches = _styleCache.clearStyleCaches
14
- exports.createStyleCache = _styleCache.createStyleCache
15
- exports.styleDepsKey = _styleCache.styleDepsKey
16
- local _resolveSx = TS.import(script, script, "resolveSx")
17
- exports.resolveSx = _resolveSx.resolveSx
18
- exports.resolvePaletteToken = _resolveSx.resolvePaletteToken
19
12
  local _resolveStyle = TS.import(script, script, "resolveStyle")
20
13
  exports.interactionStyle = _resolveStyle.interactionStyle
21
14
  exports.resolveStyle = _resolveStyle.resolveStyle
@@ -1,31 +1,23 @@
1
- export type StyleSelectorKey = "_hover" | "_pressed" | "_focus" | "_focusVisible" | "_disabled" | "_selected" | "_checked" | "_loading" | "_first" | "_last" | "_odd" | "_even";
1
+ export type StyleSelectorKey = "_hover" | "_pressed" | "_focus" | "_disabled" | "_selected" | "_checked" | "_first" | "_last";
2
2
  export interface StyleState {
3
3
  hover?: boolean;
4
4
  pressed?: boolean;
5
5
  focused?: boolean;
6
- focusVisible?: boolean;
7
6
  disabled?: boolean;
8
7
  selected?: boolean;
9
8
  checked?: boolean;
10
- loading?: boolean;
11
9
  first?: boolean;
12
10
  last?: boolean;
13
- odd?: boolean;
14
- even?: boolean;
15
11
  }
16
12
  export type StyleWithSelectors<T extends object = object> = T & {
17
13
  _hover?: Partial<T>;
18
14
  _pressed?: Partial<T>;
19
15
  _focus?: Partial<T>;
20
- _focusVisible?: Partial<T>;
21
16
  _disabled?: Partial<T>;
22
17
  _selected?: Partial<T>;
23
18
  _checked?: Partial<T>;
24
- _loading?: Partial<T>;
25
19
  _first?: Partial<T>;
26
20
  _last?: Partial<T>;
27
- _odd?: Partial<T>;
28
- _even?: Partial<T>;
29
21
  };
30
22
  export interface InteractionSlots<T extends object = object> {
31
23
  hover?: T;
@@ -34,7 +26,7 @@ export interface InteractionSlots<T extends object = object> {
34
26
  disabled?: T;
35
27
  }
36
28
  export type InteractionState = Pick<StyleState, "hover" | "pressed" | "focused" | "disabled">;
37
- /** Peels selector keys and merges active ones onto the Instance props. */
29
+ /** Peels `_hover` / `_pressed` / `_focus` / … and merges active ones onto the Instance props. */
38
30
  export declare function resolveStyle<T extends object>(style: StyleWithSelectors<T>, state?: StyleState): T;
39
31
  /** Prefer `resolveStyle` with `_hover` keys. Kept for existing call sites. */
40
32
  export declare function interactionStyle<T extends object>(base: T, slots: InteractionSlots<T>, state: InteractionState): T;
@@ -1,21 +1,17 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
- --* Order matters: later keys win. Structural → selection → interaction; `_disabled` last.
3
- local SELECTORS = { { "_first", "first" }, { "_last", "last" }, { "_odd", "odd" }, { "_even", "even" }, { "_selected", "selected" }, { "_checked", "checked" }, { "_loading", "loading" }, { "_hover", "hover" }, { "_pressed", "pressed" }, { "_focus", "focused" }, { "_focusVisible", "focusVisible" }, { "_disabled", "disabled" } }
2
+ --* Order matters: later keys win. Structural first, then interaction; `_disabled` last.
3
+ local SELECTORS = { { "_first", "first" }, { "_last", "last" }, { "_selected", "selected" }, { "_checked", "checked" }, { "_hover", "hover" }, { "_pressed", "pressed" }, { "_focus", "focused" }, { "_disabled", "disabled" } }
4
4
  local SELECTOR_FLAGS = {
5
5
  _hover = true,
6
6
  _pressed = true,
7
7
  _focus = true,
8
- _focusVisible = true,
9
8
  _selected = true,
10
9
  _checked = true,
11
- _loading = true,
12
10
  _first = true,
13
11
  _last = true,
14
- _odd = true,
15
- _even = true,
16
12
  _disabled = true,
17
13
  }
18
- --* Peels selector keys and merges active ones onto the Instance props.
14
+ --* Peels `_hover` / `_pressed` / `_focus` / … and merges active ones onto the Instance props.
19
15
  local function resolveStyle(style, state)
20
16
  if state == nil then
21
17
  state = {}
@@ -1,4 +1,2 @@
1
1
  export declare function styleDepsKey(props: object | undefined): string;
2
2
  export declare function createStyleCache<T extends defined>(): (theme: object, key: string, create: () => T) => T;
3
- /** Drop all makeStyles memo buckets (theme hot-reload / tests). */
4
- export declare function clearStyleCaches(): void;
@@ -9,7 +9,6 @@ local KEYED = {
9
9
  CFrame = true,
10
10
  BrickColor = true,
11
11
  }
12
- local caches = {}
13
12
  local function styleDepsKey(props)
14
13
  if props == nil then
15
14
  return ""
@@ -41,7 +40,6 @@ local function styleDepsKey(props)
41
40
  end
42
41
  local function createStyleCache()
43
42
  local byTheme = {}
44
- table.insert(caches, byTheme)
45
43
  return function(theme, key, create)
46
44
  local _theme = theme
47
45
  local bucket = byTheme[_theme]
@@ -64,14 +62,7 @@ local function createStyleCache()
64
62
  return value
65
63
  end
66
64
  end
67
- --* Drop all makeStyles memo buckets (theme hot-reload / tests).
68
- local function clearStyleCaches()
69
- for _, cache in caches do
70
- table.clear(cache)
71
- end
72
- end
73
65
  return {
74
66
  styleDepsKey = styleDepsKey,
75
67
  createStyleCache = createStyleCache,
76
- clearStyleCaches = clearStyleCaches,
77
68
  }
@@ -1,9 +1,8 @@
1
1
  import React, { PropsWithChildren } from "@rbxts/react";
2
2
  import { WriteableStyle } from "../styles/index";
3
- import { SxInput } from "../styles/utilities/resolveSx";
4
3
  export interface CommonProps<T extends Instance> extends PropsWithChildren {
5
4
  className?: WriteableStyle<T>;
6
- sx?: WriteableStyle<T> & SxInput;
5
+ sx?: WriteableStyle<T>;
7
6
  component?: T;
8
7
  id?: React.Key;
9
8
  ref?: React.Ref<T>;
@@ -4,8 +4,6 @@ export interface AccordionProps {
4
4
  title: string;
5
5
  open?: boolean;
6
6
  defaultOpen?: boolean;
7
- disabled?: boolean;
8
- square?: boolean;
9
7
  onChange?: (open: boolean) => void;
10
8
  children?: React.ReactNode;
11
9
  }
@@ -3,19 +3,13 @@ local TS = _G[script]
3
3
  local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
4
  local React = _react
5
5
  local useState = _react.useState
6
- local Icons = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Icons
7
- local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
8
- local _accordionOpen = TS.import(script, script.Parent, "accordionOpen")
9
- local accordionGlyph = _accordionOpen.accordionGlyph
10
- local accordionOpen = _accordionOpen.accordionOpen
6
+ local accordionOpen = TS.import(script, script.Parent, "accordionOpen").accordionOpen
11
7
  local useAccordionStyles = TS.import(script, script.Parent, "Accordion.styles").default
12
8
  local function Accordion(props)
13
9
  local _binding = props
14
10
  local title = _binding.title
15
11
  local controlled = _binding.open
16
12
  local defaultOpen = _binding.defaultOpen
17
- local disabled = _binding.disabled
18
- local square = _binding.square
19
13
  local onChange = _binding.onChange
20
14
  local children = _binding.children
21
15
  local className = _binding.className
@@ -26,12 +20,8 @@ local function Accordion(props)
26
20
  local open = accordionOpen(localOpen, controlled)
27
21
  local styles = useAccordionStyles({
28
22
  open = open,
29
- disabled = disabled,
30
23
  })
31
24
  local toggle = function()
32
- if disabled == true then
33
- return nil
34
- end
35
25
  local nextOpen = not open
36
26
  if controlled == nil then
37
27
  setLocalOpen(nextOpen)
@@ -41,58 +31,52 @@ local function Accordion(props)
41
31
  _result(nextOpen)
42
32
  end
43
33
  end
44
- local _attributes = {
45
- tag = "frame",
46
- }
34
+ local _attributes = {}
47
35
  local _condition = id
48
36
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
49
37
  _condition = "Accordion"
50
38
  end
51
39
  _attributes.key = _condition
52
- _attributes.hostRef = ref
53
- _attributes.base = styles.root
54
- _attributes.className = className
55
- _attributes.sx = sx
56
- _attributes.state = {
57
- disabled = disabled,
58
- }
59
- local _condition_1 = square ~= true
60
- if _condition_1 then
61
- local _attributes_1 = table.clone(styles.corner)
62
- setmetatable(_attributes_1, nil)
63
- _condition_1 = React.createElement("uicorner", _attributes_1)
40
+ _attributes.ref = ref
41
+ for _k, _v in styles.root do
42
+ _attributes[_k] = _v
64
43
  end
65
- local _attributes_1 = table.clone(styles.list)
44
+ if className then
45
+ for _k, _v in className do
46
+ _attributes[_k] = _v
47
+ end
48
+ end
49
+ if sx then
50
+ for _k, _v in sx do
51
+ _attributes[_k] = _v
52
+ end
53
+ end
54
+ local _attributes_1 = table.clone(styles.corner)
66
55
  setmetatable(_attributes_1, nil)
67
- local _exp = React.createElement("uilistlayout", _attributes_1)
68
- local _attributes_2 = {
56
+ local _exp = React.createElement("uicorner", _attributes_1)
57
+ local _attributes_2 = table.clone(styles.list)
58
+ setmetatable(_attributes_2, nil)
59
+ local _exp_1 = React.createElement("uilistlayout", _attributes_2)
60
+ local _attributes_3 = {
69
61
  key = "Header",
70
62
  }
71
63
  for _k, _v in styles.header do
72
- _attributes_2[_k] = _v
64
+ _attributes_3[_k] = _v
73
65
  end
74
- _attributes_2.Event = {
66
+ _attributes_3.Event = {
75
67
  Activated = toggle,
76
68
  }
77
- local _attributes_3 = table.clone(styles.padding)
78
- setmetatable(_attributes_3, nil)
79
- local _exp_1 = React.createElement("uipadding", _attributes_3)
80
- local _attributes_4 = {
69
+ local _attributes_4 = table.clone(styles.padding)
70
+ setmetatable(_attributes_4, nil)
71
+ local _exp_2 = React.createElement("uipadding", _attributes_4)
72
+ local _attributes_5 = {
81
73
  key = "Title",
82
74
  }
83
75
  for _k, _v in styles.title do
84
- _attributes_4[_k] = _v
85
- end
86
- _attributes_4.Text = title
87
- local _exp_2 = React.createElement("textlabel", _attributes_4)
88
- local _attributes_5 = {
89
- key = "Icon",
90
- }
91
- for _k, _v in styles.icon do
92
76
  _attributes_5[_k] = _v
93
77
  end
94
- _attributes_5.Image = if accordionGlyph(open) == "expanded" then Icons.Expanded else Icons.Collapsed
95
- local _exp_3 = React.createElement("textbutton", _attributes_2, _exp_1, _exp_2, React.createElement("imagelabel", _attributes_5))
78
+ _attributes_5.Text = title
79
+ local _exp_3 = React.createElement("textbutton", _attributes_3, _exp_2, React.createElement("textlabel", _attributes_5))
96
80
  local _attributes_6 = {
97
81
  key = "Body",
98
82
  }
@@ -101,7 +85,7 @@ local function Accordion(props)
101
85
  end
102
86
  local _attributes_7 = table.clone(styles.padding)
103
87
  setmetatable(_attributes_7, nil)
104
- return React.createElement(SxHost, _attributes, _condition_1, _exp, _exp_3, React.createElement("frame", _attributes_6, React.createElement("uipadding", _attributes_7), children))
88
+ return React.createElement("frame", _attributes, _exp, _exp_1, _exp_3, React.createElement("frame", _attributes_6, React.createElement("uipadding", _attributes_7), children))
105
89
  end
106
90
  local default = Accordion
107
91
  return {
@@ -1,5 +1,4 @@
1
1
  declare const useAccordionStyles: (props: {
2
2
  open?: boolean;
3
- disabled?: boolean;
4
3
  }) => import("../../../../theme/index").ClassNameMap<string>;
5
4
  export default useAccordionStyles;
@@ -8,7 +8,6 @@ local useAccordionStyles = componentStyles("Accordion", function(theme, _param)
8
8
  if open == nil then
9
9
  open = false
10
10
  end
11
- local disabled = _param.disabled
12
11
  return createStyles({
13
12
  root = {
14
13
  AutomaticSize = Enum.AutomaticSize.Y,
@@ -28,30 +27,19 @@ local useAccordionStyles = componentStyles("Accordion", function(theme, _param)
28
27
  BorderSizePixel = 0,
29
28
  AutoButtonColor = false,
30
29
  Text = "",
31
- Active = disabled ~= true,
32
- Selectable = disabled ~= true,
30
+ Active = true,
31
+ Selectable = true,
33
32
  },
34
33
  title = {
35
- AutomaticSize = Enum.AutomaticSize.Y,
36
- Size = UDim2.new(1, -theme.spacing.calc(4), 0, 0),
34
+ AutomaticSize = Enum.AutomaticSize.XY,
35
+ Size = UDim2.fromScale(0, 0),
37
36
  BackgroundTransparency = 1,
38
37
  BorderSizePixel = 0,
39
38
  Font = theme.typography.fontFamilies.default,
40
39
  TextSize = theme.typography.fontSizes.body,
41
40
  TextColor3 = theme.palette.text.primary,
42
- TextTransparency = if disabled == true then 0.5 else 0,
43
41
  TextXAlignment = Enum.TextXAlignment.Left,
44
42
  },
45
- icon = {
46
- Size = UDim2.fromOffset(theme.options.constants.iconSizes.small, theme.options.constants.iconSizes.small),
47
- Position = UDim2.new(1, -theme.padding.calc(1.5), 0.5, 0),
48
- AnchorPoint = Vector2.new(1, 0.5),
49
- BackgroundTransparency = 1,
50
- BorderSizePixel = 0,
51
- ScaleType = Enum.ScaleType.Fit,
52
- ImageColor3 = theme.palette.text.primary,
53
- ImageTransparency = if disabled == true then 0.5 else 0,
54
- },
55
43
  padding = {
56
44
  PaddingTop = UDim.new(0, theme.padding.calc(1)),
57
45
  PaddingBottom = UDim.new(0, theme.padding.calc(1)),
@@ -1,2 +1 @@
1
1
  export declare function accordionOpen(expanded: boolean | undefined, controlled: boolean | undefined): boolean;
2
- export declare function accordionGlyph(open?: boolean): "expanded" | "collapsed";
@@ -5,10 +5,6 @@ local function accordionOpen(expanded, controlled)
5
5
  end
6
6
  return expanded == true
7
7
  end
8
- local function accordionGlyph(open)
9
- return if open == true then "expanded" else "collapsed"
10
- end
11
8
  return {
12
9
  accordionOpen = accordionOpen,
13
- accordionGlyph = accordionGlyph,
14
10
  }