@rbxts/uiblox 0.1.53 → 0.2.0-alpha.1

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 (515) hide show
  1. package/README.md +107 -28
  2. package/out/foundation/guard.d.ts +3 -0
  3. package/out/foundation/guard.luau +23 -0
  4. package/out/foundation/index.d.ts +1 -0
  5. package/out/foundation/init.luau +8 -0
  6. package/out/hooks/breakpoints.d.ts +10 -0
  7. package/out/hooks/breakpoints.luau +60 -0
  8. package/out/hooks/index.d.ts +4 -0
  9. package/out/hooks/init.luau +10 -0
  10. package/out/hooks/useBreakpoints.d.ts +6 -0
  11. package/out/hooks/useBreakpoints.luau +39 -0
  12. package/out/hooks/useReducedMotion.d.ts +1 -0
  13. package/out/hooks/useReducedMotion.luau +12 -0
  14. package/out/index.d.ts +3 -0
  15. package/out/init.luau +9 -0
  16. package/out/interaction/index.d.ts +4 -0
  17. package/out/interaction/init.luau +9 -0
  18. package/out/interaction/pointerRoute.d.ts +6 -0
  19. package/out/interaction/pointerRoute.luau +35 -0
  20. package/out/interaction/usePointer.d.ts +11 -0
  21. package/out/interaction/usePointer.luau +99 -0
  22. package/out/theme/constants/ColorConstants.d.ts +0 -3
  23. package/out/theme/constants/ColorConstants.luau +0 -96
  24. package/out/theme/constants/NumberConstants.d.ts +1 -1
  25. package/out/theme/constants/NumberConstants.luau +3 -4
  26. package/out/theme/context/ThemeProvider.d.ts +3 -0
  27. package/out/theme/context/ThemeProvider.luau +15 -8
  28. package/out/theme/context/themeScope.d.ts +5 -0
  29. package/out/theme/context/themeScope.luau +7 -0
  30. package/out/theme/hooks/useTheme.luau +15 -14
  31. package/out/theme/interfaces/density/controlMetrics.d.ts +21 -0
  32. package/out/theme/interfaces/density/controlMetrics.luau +67 -0
  33. package/out/theme/interfaces/density/index.d.ts +1 -0
  34. package/out/theme/interfaces/density/init.luau +7 -0
  35. package/out/theme/interfaces/index.d.ts +1 -0
  36. package/out/theme/interfaces/init.luau +3 -0
  37. package/out/theme/interfaces/palette/Palette.d.ts +39 -18
  38. package/out/theme/interfaces/palette/colors/index.d.ts +0 -1
  39. package/out/theme/interfaces/palette/index.d.ts +1 -0
  40. package/out/theme/interfaces/theme/Theme.d.ts +13 -0
  41. package/out/theme/interfaces/theme/ThemeConstants.d.ts +0 -18
  42. package/out/theme/interfaces/typography/FontSizes.d.ts +1 -1
  43. package/out/theme/interfaces/typography/FontSizes.luau +7 -7
  44. package/out/theme/styles/index.d.ts +1 -2
  45. package/out/theme/styles/init.luau +3 -1
  46. package/out/theme/styles/types/index.d.ts +0 -1
  47. package/out/theme/styles/utilities/classNames.d.ts +3 -2
  48. package/out/theme/styles/utilities/classNames.luau +7 -173
  49. package/out/theme/styles/utilities/componentStyles.d.ts +7 -0
  50. package/out/theme/styles/utilities/componentStyles.luau +31 -0
  51. package/out/theme/styles/utilities/componentTheme.d.ts +20 -0
  52. package/out/theme/styles/utilities/componentTheme.luau +53 -0
  53. package/out/theme/styles/utilities/createStyles.d.ts +1 -2
  54. package/out/theme/styles/utilities/index.d.ts +5 -1
  55. package/out/theme/styles/utilities/init.luau +9 -1
  56. package/out/theme/styles/utilities/makeStyles.luau +14 -15
  57. package/out/theme/styles/utilities/resolveStyle.d.ts +32 -0
  58. package/out/theme/styles/utilities/resolveStyle.luau +66 -0
  59. package/out/theme/styles/utilities/styleCache.d.ts +2 -0
  60. package/out/theme/styles/utilities/styleCache.luau +68 -0
  61. package/out/theme/styles/utilities/variants.d.ts +19 -0
  62. package/out/theme/styles/utilities/variants.luau +59 -0
  63. package/out/theme/themes/DarkTheme.luau +4 -57
  64. package/out/theme/themes/LightTheme.luau +4 -57
  65. package/out/theme/themes/createPalette.d.ts +3 -0
  66. package/out/theme/themes/createPalette.luau +111 -0
  67. package/out/theme/themes/index.d.ts +1 -0
  68. package/out/theme/themes/init.luau +3 -0
  69. package/out/theme/types/types.d.ts +1 -0
  70. package/out/theme/utilites/colorMath.d.ts +8 -0
  71. package/out/theme/utilites/colorMath.luau +35 -0
  72. package/out/theme/utilites/index.d.ts +1 -0
  73. package/out/theme/utilites/init.luau +6 -0
  74. package/out/ui/enums/Icons.d.ts +5 -1
  75. package/out/ui/enums/Icons.luau +4 -0
  76. package/out/ui/index.d.ts +12 -0
  77. package/out/ui/init.luau +5 -0
  78. package/out/ui/packages/accordion/components/Accordion.d.ts +11 -0
  79. package/out/ui/packages/accordion/components/Accordion.luau +93 -0
  80. package/out/ui/packages/accordion/components/Accordion.styles.d.ts +4 -0
  81. package/out/ui/packages/accordion/components/Accordion.styles.luau +65 -0
  82. package/out/ui/packages/accordion/components/accordionOpen.d.ts +1 -0
  83. package/out/ui/packages/accordion/components/accordionOpen.luau +10 -0
  84. package/out/ui/packages/accordion/index.d.ts +2 -0
  85. package/out/ui/packages/accordion/init.luau +5 -0
  86. package/out/ui/packages/appBar/components/AppBar.d.ts +10 -0
  87. package/out/ui/packages/appBar/components/AppBar.luau +77 -0
  88. package/out/ui/packages/appBar/components/AppBar.styles.d.ts +6 -0
  89. package/out/ui/packages/appBar/components/AppBar.styles.luau +66 -0
  90. package/out/ui/packages/appBar/index.d.ts +3 -0
  91. package/out/ui/packages/appBar/init.luau +5 -0
  92. package/out/ui/packages/assetField/components/AssetField.d.ts +10 -0
  93. package/out/ui/packages/assetField/components/AssetField.luau +75 -0
  94. package/out/ui/packages/assetField/components/AssetField.styles.d.ts +2 -0
  95. package/out/ui/packages/assetField/components/AssetField.styles.luau +33 -0
  96. package/out/ui/packages/assetField/components/assetPreviewUri.d.ts +1 -0
  97. package/out/ui/packages/assetField/components/assetPreviewUri.luau +25 -0
  98. package/out/ui/packages/assetField/index.d.ts +2 -0
  99. package/out/ui/packages/assetField/init.luau +5 -0
  100. package/out/ui/packages/autocomplete/components/Autocomplete.d.ts +5 -0
  101. package/out/ui/packages/autocomplete/components/Autocomplete.luau +47 -0
  102. package/out/ui/packages/autocomplete/components/autocompleteSearchable.d.ts +1 -0
  103. package/out/ui/packages/autocomplete/components/autocompleteSearchable.luau +7 -0
  104. package/out/ui/packages/autocomplete/index.d.ts +2 -0
  105. package/out/ui/packages/autocomplete/init.luau +5 -0
  106. package/out/ui/packages/avatar/components/Avatar.d.ts +8 -0
  107. package/out/ui/packages/avatar/components/Avatar.luau +69 -0
  108. package/out/ui/packages/avatar/components/Avatar.styles.d.ts +4 -0
  109. package/out/ui/packages/avatar/components/Avatar.styles.luau +39 -0
  110. package/out/ui/packages/avatar/components/avatarText.d.ts +1 -0
  111. package/out/ui/packages/avatar/components/avatarText.luau +17 -0
  112. package/out/ui/packages/avatar/index.d.ts +3 -0
  113. package/out/ui/packages/avatar/init.luau +6 -0
  114. package/out/ui/packages/badge/components/Badge.d.ts +10 -0
  115. package/out/ui/packages/badge/components/Badge.luau +69 -0
  116. package/out/ui/packages/badge/components/Badge.styles.d.ts +2 -0
  117. package/out/ui/packages/badge/components/Badge.styles.luau +38 -0
  118. package/out/ui/packages/badge/components/badgeValue.d.ts +1 -0
  119. package/out/ui/packages/badge/components/badgeValue.luau +7 -0
  120. package/out/ui/packages/badge/index.d.ts +3 -0
  121. package/out/ui/packages/badge/init.luau +6 -0
  122. package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +10 -0
  123. package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +86 -0
  124. package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.d.ts +2 -0
  125. package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +58 -0
  126. package/out/ui/packages/bottomNavigation/index.d.ts +2 -0
  127. package/out/ui/packages/bottomNavigation/init.luau +5 -0
  128. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.d.ts +11 -0
  129. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +82 -0
  130. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.styles.d.ts +2 -0
  131. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.styles.luau +47 -0
  132. package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +1 -0
  133. package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +7 -0
  134. package/out/ui/packages/breadcrumbs/index.d.ts +2 -0
  135. package/out/ui/packages/breadcrumbs/init.luau +5 -0
  136. package/out/ui/packages/brickColorPicker/components/BrickColorPicker.d.ts +9 -0
  137. package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +234 -0
  138. package/out/ui/packages/brickColorPicker/components/BrickColorPicker.styles.d.ts +2 -0
  139. package/out/ui/packages/brickColorPicker/components/BrickColorPicker.styles.luau +98 -0
  140. package/out/ui/packages/brickColorPicker/components/brickColorCatalog.d.ts +1 -0
  141. package/out/ui/packages/brickColorPicker/components/brickColorCatalog.luau +26 -0
  142. package/out/ui/packages/brickColorPicker/components/brickColorFilter.d.ts +2 -0
  143. package/out/ui/packages/brickColorPicker/components/brickColorFilter.luau +26 -0
  144. package/out/ui/packages/brickColorPicker/index.d.ts +3 -0
  145. package/out/ui/packages/brickColorPicker/init.luau +8 -0
  146. package/out/ui/packages/button/components/Button.d.ts +4 -0
  147. package/out/ui/packages/button/components/Button.luau +86 -34
  148. package/out/ui/packages/button/components/Button.styles.luau +15 -35
  149. package/out/ui/packages/button/components/activation.d.ts +1 -0
  150. package/out/ui/packages/button/components/activation.luau +7 -0
  151. package/out/ui/packages/button/components/buttonLook.d.ts +12 -0
  152. package/out/ui/packages/button/components/buttonLook.luau +55 -0
  153. package/out/ui/packages/button/types/ButtonSize.d.ts +1 -1
  154. package/out/ui/packages/card/components/Card.d.ts +11 -0
  155. package/out/ui/packages/card/components/Card.luau +74 -0
  156. package/out/ui/packages/card/components/Card.styles.d.ts +2 -0
  157. package/out/ui/packages/card/components/Card.styles.luau +66 -0
  158. package/out/ui/packages/card/index.d.ts +2 -0
  159. package/out/ui/packages/card/init.luau +5 -0
  160. package/out/ui/packages/cframeEditor/components/CFrameEditor.d.ts +8 -0
  161. package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +89 -0
  162. package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.d.ts +2 -0
  163. package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +46 -0
  164. package/out/ui/packages/cframeEditor/components/cframeValue.d.ts +3 -0
  165. package/out/ui/packages/cframeEditor/components/cframeValue.luau +15 -0
  166. package/out/ui/packages/cframeEditor/index.d.ts +2 -0
  167. package/out/ui/packages/cframeEditor/init.luau +5 -0
  168. package/out/ui/packages/checkbox/components/Checkbox.d.ts +11 -0
  169. package/out/ui/packages/checkbox/components/Checkbox.luau +136 -0
  170. package/out/ui/packages/checkbox/components/Checkbox.styles.d.ts +6 -0
  171. package/out/ui/packages/checkbox/components/Checkbox.styles.luau +69 -0
  172. package/out/ui/packages/checkbox/components/checkboxLook.d.ts +5 -0
  173. package/out/ui/packages/checkbox/components/checkboxLook.luau +52 -0
  174. package/out/ui/packages/checkbox/components/nextChecked.d.ts +1 -0
  175. package/out/ui/packages/checkbox/components/nextChecked.luau +7 -0
  176. package/out/ui/packages/checkbox/index.d.ts +2 -0
  177. package/out/ui/packages/checkbox/init.luau +5 -0
  178. package/out/ui/packages/chip/components/Chip.d.ts +9 -0
  179. package/out/ui/packages/chip/components/Chip.luau +63 -0
  180. package/out/ui/packages/chip/components/Chip.styles.d.ts +5 -0
  181. package/out/ui/packages/chip/components/Chip.styles.luau +47 -0
  182. package/out/ui/packages/chip/index.d.ts +2 -0
  183. package/out/ui/packages/chip/init.luau +5 -0
  184. package/out/ui/packages/circularProgress/components/CircularProgress.d.ts +11 -0
  185. package/out/ui/packages/circularProgress/components/CircularProgress.luau +109 -0
  186. package/out/ui/packages/circularProgress/index.d.ts +2 -0
  187. package/out/ui/packages/circularProgress/init.luau +5 -0
  188. package/out/ui/packages/colorPicker/components/ColorPicker.d.ts +8 -0
  189. package/out/ui/packages/colorPicker/components/ColorPicker.luau +512 -0
  190. package/out/ui/packages/colorPicker/components/ColorPicker.styles.d.ts +2 -0
  191. package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +145 -0
  192. package/out/ui/packages/colorPicker/components/ColorSequenceEditor.d.ts +8 -0
  193. package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +190 -0
  194. package/out/ui/packages/colorPicker/components/NumberSequenceEditor.d.ts +8 -0
  195. package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +240 -0
  196. package/out/ui/packages/colorPicker/components/colorValue.d.ts +22 -0
  197. package/out/ui/packages/colorPicker/components/colorValue.luau +157 -0
  198. package/out/ui/packages/colorPicker/components/sequenceValue.d.ts +26 -0
  199. package/out/ui/packages/colorPicker/components/sequenceValue.luau +307 -0
  200. package/out/ui/packages/colorPicker/index.d.ts +11 -0
  201. package/out/ui/packages/colorPicker/init.luau +37 -0
  202. package/out/ui/packages/dialog/components/Dialog.d.ts +11 -0
  203. package/out/ui/packages/dialog/components/Dialog.luau +56 -0
  204. package/out/ui/packages/dialog/components/Dialog.styles.d.ts +2 -0
  205. package/out/ui/packages/dialog/components/Dialog.styles.luau +55 -0
  206. package/out/ui/packages/dialog/index.d.ts +2 -0
  207. package/out/ui/packages/dialog/init.luau +5 -0
  208. package/out/ui/packages/divider/components/Divider.luau +6 -0
  209. package/out/ui/packages/divider/components/Divider.styles.luau +4 -4
  210. package/out/ui/packages/drawer/components/Drawer.d.ts +11 -0
  211. package/out/ui/packages/drawer/components/Drawer.luau +77 -0
  212. package/out/ui/packages/drawer/components/Drawer.styles.d.ts +2 -0
  213. package/out/ui/packages/drawer/components/Drawer.styles.luau +40 -0
  214. package/out/ui/packages/drawer/components/drawerPlacement.d.ts +2 -0
  215. package/out/ui/packages/drawer/components/drawerPlacement.luau +7 -0
  216. package/out/ui/packages/drawer/index.d.ts +3 -0
  217. package/out/ui/packages/drawer/init.luau +5 -0
  218. package/out/ui/packages/enumPicker/components/EnumPicker.d.ts +11 -0
  219. package/out/ui/packages/enumPicker/components/EnumPicker.luau +42 -0
  220. package/out/ui/packages/enumPicker/components/enumOptions.d.ts +5 -0
  221. package/out/ui/packages/enumPicker/components/enumOptions.luau +28 -0
  222. package/out/ui/packages/enumPicker/index.d.ts +2 -0
  223. package/out/ui/packages/enumPicker/init.luau +5 -0
  224. package/out/ui/packages/fab/components/Fab.d.ts +13 -0
  225. package/out/ui/packages/fab/components/Fab.luau +128 -0
  226. package/out/ui/packages/fab/components/Fab.styles.d.ts +7 -0
  227. package/out/ui/packages/fab/components/Fab.styles.luau +40 -0
  228. package/out/ui/packages/fab/components/fabSize.d.ts +3 -0
  229. package/out/ui/packages/fab/components/fabSize.luau +29 -0
  230. package/out/ui/packages/fab/index.d.ts +3 -0
  231. package/out/ui/packages/fab/init.luau +8 -0
  232. package/out/ui/packages/fontEditor/components/FontEditor.d.ts +8 -0
  233. package/out/ui/packages/fontEditor/components/FontEditor.luau +223 -0
  234. package/out/ui/packages/fontEditor/components/FontEditor.styles.d.ts +2 -0
  235. package/out/ui/packages/fontEditor/components/FontEditor.styles.luau +56 -0
  236. package/out/ui/packages/fontEditor/components/fontValue.d.ts +10 -0
  237. package/out/ui/packages/fontEditor/components/fontValue.luau +81 -0
  238. package/out/ui/packages/fontEditor/index.d.ts +4 -0
  239. package/out/ui/packages/fontEditor/init.luau +10 -0
  240. package/out/ui/packages/gradientEditor/components/GradientEditor.d.ts +10 -0
  241. package/out/ui/packages/gradientEditor/components/GradientEditor.luau +156 -0
  242. package/out/ui/packages/gradientEditor/components/GradientEditor.styles.d.ts +2 -0
  243. package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +37 -0
  244. package/out/ui/packages/gradientEditor/components/gradientPatch.d.ts +8 -0
  245. package/out/ui/packages/gradientEditor/components/gradientPatch.luau +17 -0
  246. package/out/ui/packages/gradientEditor/components/gradientValue.d.ts +9 -0
  247. package/out/ui/packages/gradientEditor/components/gradientValue.luau +23 -0
  248. package/out/ui/packages/gradientEditor/index.d.ts +2 -0
  249. package/out/ui/packages/gradientEditor/init.luau +5 -0
  250. package/out/ui/packages/icon/components/Icon.luau +6 -0
  251. package/out/ui/packages/icon/components/Icon.styles.luau +7 -7
  252. package/out/ui/packages/iconButton/components/IconButton.d.ts +3 -0
  253. package/out/ui/packages/iconButton/components/IconButton.luau +53 -5
  254. package/out/ui/packages/iconButton/components/IconButton.styles.luau +7 -7
  255. package/out/ui/packages/index.d.ts +49 -0
  256. package/out/ui/packages/init.luau +147 -0
  257. package/out/ui/packages/input/components/Input.d.ts +8 -1
  258. package/out/ui/packages/input/components/Input.luau +180 -60
  259. package/out/ui/packages/input/components/Input.styles.d.ts +3 -1
  260. package/out/ui/packages/input/components/Input.styles.luau +79 -53
  261. package/out/ui/packages/input/components/inputDraft.d.ts +1 -0
  262. package/out/ui/packages/input/components/inputDraft.luau +17 -0
  263. package/out/ui/packages/input/components/inputInsets.d.ts +4 -0
  264. package/out/ui/packages/input/components/inputInsets.luau +10 -0
  265. package/out/ui/packages/layout/components/Grid.luau +8 -2
  266. package/out/ui/packages/layout/components/List.luau +8 -2
  267. package/out/ui/packages/listItem/components/ListItem.d.ts +9 -0
  268. package/out/ui/packages/listItem/components/ListItem.luau +67 -0
  269. package/out/ui/packages/listItem/components/ListItem.styles.d.ts +5 -0
  270. package/out/ui/packages/listItem/components/ListItem.styles.luau +64 -0
  271. package/out/ui/packages/listItem/index.d.ts +2 -0
  272. package/out/ui/packages/listItem/init.luau +5 -0
  273. package/out/ui/packages/loadingStroke/components/LoadingStroke.luau +11 -2
  274. package/out/ui/packages/menu/components/Menu.d.ts +14 -0
  275. package/out/ui/packages/menu/components/Menu.luau +60 -0
  276. package/out/ui/packages/menu/components/Menu.styles.d.ts +2 -0
  277. package/out/ui/packages/menu/components/Menu.styles.luau +26 -0
  278. package/out/ui/packages/menu/index.d.ts +2 -0
  279. package/out/ui/packages/menu/init.luau +5 -0
  280. package/out/ui/packages/modal/components/Modal.d.ts +9 -0
  281. package/out/ui/packages/modal/components/Modal.luau +97 -0
  282. package/out/ui/packages/modal/components/Modal.styles.d.ts +2 -0
  283. package/out/ui/packages/modal/components/Modal.styles.luau +47 -0
  284. package/out/ui/packages/modal/components/dismissInput.d.ts +1 -0
  285. package/out/ui/packages/modal/components/dismissInput.luau +8 -0
  286. package/out/ui/packages/modal/components/focusTrap.d.ts +2 -0
  287. package/out/ui/packages/modal/components/focusTrap.luau +22 -0
  288. package/out/ui/packages/modal/index.d.ts +2 -0
  289. package/out/ui/packages/modal/init.luau +5 -0
  290. package/out/ui/packages/motion/duration.d.ts +2 -0
  291. package/out/ui/packages/motion/duration.luau +17 -0
  292. package/out/ui/packages/motion/index.d.ts +5 -0
  293. package/out/ui/packages/motion/init.luau +16 -0
  294. package/out/ui/packages/motion/loop.d.ts +1 -0
  295. package/out/ui/packages/motion/loop.luau +18 -0
  296. package/out/ui/packages/motion/play.d.ts +1 -0
  297. package/out/ui/packages/motion/play.luau +23 -0
  298. package/out/ui/packages/motion/resolveReduced.d.ts +1 -0
  299. package/out/ui/packages/motion/resolveReduced.luau +10 -0
  300. package/out/ui/packages/motion/unit.d.ts +8 -0
  301. package/out/ui/packages/motion/unit.luau +80 -0
  302. package/out/ui/packages/numberInput/components/NumberInput.d.ts +16 -0
  303. package/out/ui/packages/numberInput/components/NumberInput.luau +48 -0
  304. package/out/ui/packages/numberInput/components/numberValue.d.ts +2 -0
  305. package/out/ui/packages/numberInput/components/numberValue.luau +29 -0
  306. package/out/ui/packages/numberInput/index.d.ts +2 -0
  307. package/out/ui/packages/numberInput/init.luau +5 -0
  308. package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.d.ts +8 -0
  309. package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +96 -0
  310. package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.styles.d.ts +2 -0
  311. package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.styles.luau +41 -0
  312. package/out/ui/packages/numberRangeEditor/components/numberRangeValue.d.ts +4 -0
  313. package/out/ui/packages/numberRangeEditor/components/numberRangeValue.luau +16 -0
  314. package/out/ui/packages/numberRangeEditor/index.d.ts +2 -0
  315. package/out/ui/packages/numberRangeEditor/init.luau +5 -0
  316. package/out/ui/packages/pagination/components/Pagination.d.ts +9 -0
  317. package/out/ui/packages/pagination/components/Pagination.luau +72 -0
  318. package/out/ui/packages/pagination/components/Pagination.styles.d.ts +2 -0
  319. package/out/ui/packages/pagination/components/Pagination.styles.luau +39 -0
  320. package/out/ui/packages/pagination/components/pageRange.d.ts +1 -0
  321. package/out/ui/packages/pagination/components/pageRange.luau +24 -0
  322. package/out/ui/packages/pagination/index.d.ts +2 -0
  323. package/out/ui/packages/pagination/init.luau +5 -0
  324. package/out/ui/packages/paper/components/Paper.d.ts +8 -0
  325. package/out/ui/packages/paper/components/Paper.luau +31 -0
  326. package/out/ui/packages/paper/components/Paper.styles.d.ts +4 -0
  327. package/out/ui/packages/paper/components/Paper.styles.luau +32 -0
  328. package/out/ui/packages/paper/index.d.ts +2 -0
  329. package/out/ui/packages/paper/init.luau +5 -0
  330. package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.d.ts +8 -0
  331. package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +85 -0
  332. package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.d.ts +2 -0
  333. package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +46 -0
  334. package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +3 -0
  335. package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +14 -0
  336. package/out/ui/packages/physicalPropertiesEditor/index.d.ts +2 -0
  337. package/out/ui/packages/physicalPropertiesEditor/init.luau +5 -0
  338. package/out/ui/packages/popup/components/Popup.d.ts +13 -0
  339. package/out/ui/packages/popup/components/Popup.luau +131 -0
  340. package/out/ui/packages/popup/components/Portal.d.ts +7 -0
  341. package/out/ui/packages/popup/components/Portal.luau +15 -0
  342. package/out/ui/packages/popup/components/placement.d.ts +9 -0
  343. package/out/ui/packages/popup/components/placement.luau +41 -0
  344. package/out/ui/packages/popup/components/portalTarget.d.ts +1 -0
  345. package/out/ui/packages/popup/components/portalTarget.luau +13 -0
  346. package/out/ui/packages/popup/index.d.ts +4 -0
  347. package/out/ui/packages/popup/init.luau +6 -0
  348. package/out/ui/packages/preloader/components/Preloader.luau +6 -0
  349. package/out/ui/packages/preloader/components/Preloader.styles.luau +3 -3
  350. package/out/ui/packages/progressBar/components/ProgressBar.d.ts +8 -1
  351. package/out/ui/packages/progressBar/components/ProgressBar.luau +61 -11
  352. package/out/ui/packages/progressBar/components/ProgressBar.styles.luau +2 -2
  353. package/out/ui/packages/progressBar/index.d.ts +2 -3
  354. package/out/ui/packages/progressBar/init.luau +3 -4
  355. package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +16 -0
  356. package/out/ui/packages/radioGroup/components/RadioGroup.luau +112 -0
  357. package/out/ui/packages/radioGroup/components/RadioGroup.styles.d.ts +6 -0
  358. package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +66 -0
  359. package/out/ui/packages/radioGroup/index.d.ts +2 -0
  360. package/out/ui/packages/radioGroup/init.luau +5 -0
  361. package/out/ui/packages/rayEditor/components/RayEditor.d.ts +8 -0
  362. package/out/ui/packages/rayEditor/components/RayEditor.luau +83 -0
  363. package/out/ui/packages/rayEditor/components/RayEditor.styles.d.ts +2 -0
  364. package/out/ui/packages/rayEditor/components/RayEditor.styles.luau +37 -0
  365. package/out/ui/packages/rayEditor/components/rayParts.d.ts +1 -0
  366. package/out/ui/packages/rayEditor/components/rayParts.luau +10 -0
  367. package/out/ui/packages/rayEditor/index.d.ts +2 -0
  368. package/out/ui/packages/rayEditor/init.luau +5 -0
  369. package/out/ui/packages/rectEditor/components/RectEditor.d.ts +8 -0
  370. package/out/ui/packages/rectEditor/components/RectEditor.luau +85 -0
  371. package/out/ui/packages/rectEditor/components/RectEditor.styles.d.ts +2 -0
  372. package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +46 -0
  373. package/out/ui/packages/rectEditor/components/rectValue.d.ts +3 -0
  374. package/out/ui/packages/rectEditor/components/rectValue.luau +14 -0
  375. package/out/ui/packages/rectEditor/index.d.ts +2 -0
  376. package/out/ui/packages/rectEditor/init.luau +5 -0
  377. package/out/ui/packages/scroll/dragScroll.d.ts +8 -0
  378. package/out/ui/packages/scroll/dragScroll.luau +51 -0
  379. package/out/ui/packages/scroll/index.d.ts +2 -0
  380. package/out/ui/packages/scroll/init.luau +5 -0
  381. package/out/ui/packages/scroll/useDragScroll.d.ts +5 -0
  382. package/out/ui/packages/scroll/useDragScroll.luau +127 -0
  383. package/out/ui/packages/select/components/Select.d.ts +16 -0
  384. package/out/ui/packages/select/components/Select.luau +455 -0
  385. package/out/ui/packages/select/components/Select.styles.d.ts +6 -0
  386. package/out/ui/packages/select/components/Select.styles.luau +104 -0
  387. package/out/ui/packages/select/components/optionLabel.d.ts +1 -0
  388. package/out/ui/packages/select/components/optionLabel.luau +7 -0
  389. package/out/ui/packages/select/components/selectFilter.d.ts +4 -0
  390. package/out/ui/packages/select/components/selectFilter.luau +27 -0
  391. package/out/ui/packages/select/components/selectFocus.d.ts +4 -0
  392. package/out/ui/packages/select/components/selectFocus.luau +16 -0
  393. package/out/ui/packages/select/components/selectGroups.d.ts +18 -0
  394. package/out/ui/packages/select/components/selectGroups.luau +38 -0
  395. package/out/ui/packages/select/components/selectKey.d.ts +4 -0
  396. package/out/ui/packages/select/components/selectKey.luau +14 -0
  397. package/out/ui/packages/select/components/selectMotion.d.ts +2 -0
  398. package/out/ui/packages/select/components/selectMotion.luau +12 -0
  399. package/out/ui/packages/select/components/selectMulti.d.ts +5 -0
  400. package/out/ui/packages/select/components/selectMulti.luau +26 -0
  401. package/out/ui/packages/select/components/selectTypeahead.d.ts +4 -0
  402. package/out/ui/packages/select/components/selectTypeahead.luau +58 -0
  403. package/out/ui/packages/select/components/stepChoice.d.ts +3 -0
  404. package/out/ui/packages/select/components/stepChoice.luau +24 -0
  405. package/out/ui/packages/select/index.d.ts +3 -0
  406. package/out/ui/packages/select/init.luau +8 -0
  407. package/out/ui/packages/shadow/components/Shadow.styles.luau +3 -3
  408. package/out/ui/packages/sidebar/components/Sidebar.luau +6 -0
  409. package/out/ui/packages/sidebar/components/Sidebar.styles.luau +5 -5
  410. package/out/ui/packages/skeleton/components/Skeleton.d.ts +15 -0
  411. package/out/ui/packages/skeleton/components/Skeleton.luau +224 -0
  412. package/out/ui/packages/skeleton/components/Skeleton.styles.d.ts +2 -0
  413. package/out/ui/packages/skeleton/components/Skeleton.styles.luau +27 -0
  414. package/out/ui/packages/skeleton/components/skeletonMotion.d.ts +3 -0
  415. package/out/ui/packages/skeleton/components/skeletonMotion.luau +17 -0
  416. package/out/ui/packages/skeleton/index.d.ts +3 -0
  417. package/out/ui/packages/skeleton/init.luau +7 -0
  418. package/out/ui/packages/slider/components/Slider.d.ts +13 -0
  419. package/out/ui/packages/slider/components/Slider.luau +204 -0
  420. package/out/ui/packages/slider/components/Slider.styles.d.ts +6 -0
  421. package/out/ui/packages/slider/components/Slider.styles.luau +47 -0
  422. package/out/ui/packages/slider/components/sliderNudge.d.ts +4 -0
  423. package/out/ui/packages/slider/components/sliderNudge.luau +39 -0
  424. package/out/ui/packages/slider/index.d.ts +2 -0
  425. package/out/ui/packages/slider/init.luau +5 -0
  426. package/out/ui/packages/snackbar/components/Snackbar.d.ts +11 -0
  427. package/out/ui/packages/snackbar/components/Snackbar.luau +41 -0
  428. package/out/ui/packages/snackbar/index.d.ts +2 -0
  429. package/out/ui/packages/snackbar/init.luau +5 -0
  430. package/out/ui/packages/splitPane/components/SplitPane.d.ts +14 -0
  431. package/out/ui/packages/splitPane/components/SplitPane.luau +241 -0
  432. package/out/ui/packages/splitPane/components/SplitPane.styles.d.ts +2 -0
  433. package/out/ui/packages/splitPane/components/SplitPane.styles.luau +59 -0
  434. package/out/ui/packages/splitPane/components/splitLook.d.ts +5 -0
  435. package/out/ui/packages/splitPane/components/splitLook.luau +49 -0
  436. package/out/ui/packages/splitPane/components/splitSize.d.ts +10 -0
  437. package/out/ui/packages/splitPane/components/splitSize.luau +46 -0
  438. package/out/ui/packages/splitPane/index.d.ts +2 -0
  439. package/out/ui/packages/splitPane/init.luau +5 -0
  440. package/out/ui/packages/stateMatrix.d.ts +30 -0
  441. package/out/ui/packages/stateMatrix.luau +1471 -0
  442. package/out/ui/packages/stepper/components/Stepper.d.ts +7 -0
  443. package/out/ui/packages/stepper/components/Stepper.luau +62 -0
  444. package/out/ui/packages/stepper/components/Stepper.styles.d.ts +2 -0
  445. package/out/ui/packages/stepper/components/Stepper.styles.luau +39 -0
  446. package/out/ui/packages/stepper/components/stepState.d.ts +2 -0
  447. package/out/ui/packages/stepper/components/stepState.luau +13 -0
  448. package/out/ui/packages/stepper/index.d.ts +3 -0
  449. package/out/ui/packages/stepper/init.luau +6 -0
  450. package/out/ui/packages/switch/components/Switch.d.ts +11 -0
  451. package/out/ui/packages/switch/components/Switch.luau +170 -0
  452. package/out/ui/packages/switch/components/Switch.styles.d.ts +6 -0
  453. package/out/ui/packages/switch/components/Switch.styles.luau +62 -0
  454. package/out/ui/packages/switch/components/switchLook.d.ts +10 -0
  455. package/out/ui/packages/switch/components/switchLook.luau +63 -0
  456. package/out/ui/packages/switch/index.d.ts +2 -0
  457. package/out/ui/packages/switch/init.luau +5 -0
  458. package/out/ui/packages/table/components/Table.d.ts +9 -0
  459. package/out/ui/packages/table/components/Table.luau +135 -0
  460. package/out/ui/packages/table/components/Table.styles.d.ts +2 -0
  461. package/out/ui/packages/table/components/Table.styles.luau +70 -0
  462. package/out/ui/packages/table/components/rowSelected.d.ts +1 -0
  463. package/out/ui/packages/table/components/rowSelected.luau +7 -0
  464. package/out/ui/packages/table/index.d.ts +2 -0
  465. package/out/ui/packages/table/init.luau +5 -0
  466. package/out/ui/packages/tabs/components/Tabs.d.ts +10 -0
  467. package/out/ui/packages/tabs/components/Tabs.luau +113 -0
  468. package/out/ui/packages/tabs/components/Tabs.styles.d.ts +2 -0
  469. package/out/ui/packages/tabs/components/Tabs.styles.luau +55 -0
  470. package/out/ui/packages/tabs/index.d.ts +2 -0
  471. package/out/ui/packages/tabs/init.luau +5 -0
  472. package/out/ui/packages/toast/components/Toast.luau +6 -0
  473. package/out/ui/packages/toast/components/Toast.styles.luau +23 -10
  474. package/out/ui/packages/tooltip/components/Tooltip.d.ts +7 -0
  475. package/out/ui/packages/tooltip/components/Tooltip.luau +119 -0
  476. package/out/ui/packages/tooltip/components/Tooltip.styles.d.ts +2 -0
  477. package/out/ui/packages/tooltip/components/Tooltip.styles.luau +43 -0
  478. package/out/ui/packages/tooltip/index.d.ts +2 -0
  479. package/out/ui/packages/tooltip/init.luau +5 -0
  480. package/out/ui/packages/treeView/components/TreeView.d.ts +1 -0
  481. package/out/ui/packages/treeView/components/TreeView.luau +201 -225
  482. package/out/ui/packages/treeView/components/TreeView.styles.luau +9 -37
  483. package/out/ui/packages/treeView/components/treeRows.d.ts +23 -0
  484. package/out/ui/packages/treeView/components/treeRows.luau +147 -0
  485. package/out/ui/packages/treeView/interfaces/Branch.d.ts +3 -0
  486. package/out/ui/packages/treeView/interfaces/Leaf.d.ts +2 -0
  487. package/out/ui/packages/typography/components/Typography.luau +6 -0
  488. package/out/ui/packages/typography/components/Typography.styles.luau +8 -11
  489. package/out/ui/packages/udimEditor/components/UDimEditor.d.ts +8 -0
  490. package/out/ui/packages/udimEditor/components/UDimEditor.luau +127 -0
  491. package/out/ui/packages/udimEditor/components/UDimEditor.styles.d.ts +2 -0
  492. package/out/ui/packages/udimEditor/components/UDimEditor.styles.luau +50 -0
  493. package/out/ui/packages/udimEditor/index.d.ts +2 -0
  494. package/out/ui/packages/udimEditor/init.luau +5 -0
  495. package/out/ui/packages/vectorEditor/components/VectorEditor.d.ts +10 -0
  496. package/out/ui/packages/vectorEditor/components/VectorEditor.luau +87 -0
  497. package/out/ui/packages/vectorEditor/components/VectorEditor.styles.d.ts +2 -0
  498. package/out/ui/packages/vectorEditor/components/VectorEditor.styles.luau +41 -0
  499. package/out/ui/packages/vectorEditor/components/vectorValue.d.ts +10 -0
  500. package/out/ui/packages/vectorEditor/components/vectorValue.luau +49 -0
  501. package/out/ui/packages/vectorEditor/index.d.ts +4 -0
  502. package/out/ui/packages/vectorEditor/init.luau +11 -0
  503. package/out/ui/packages/virtualList/components/VirtualList.d.ts +23 -0
  504. package/out/ui/packages/virtualList/components/VirtualList.luau +178 -0
  505. package/out/ui/packages/virtualList/components/VirtualList.styles.d.ts +2 -0
  506. package/out/ui/packages/virtualList/components/VirtualList.styles.luau +29 -0
  507. package/out/ui/packages/virtualList/components/virtualWindow.d.ts +10 -0
  508. package/out/ui/packages/virtualList/components/virtualWindow.luau +66 -0
  509. package/out/ui/packages/virtualList/index.d.ts +2 -0
  510. package/out/ui/packages/virtualList/init.luau +5 -0
  511. package/package.json +7 -3
  512. package/out/theme/interfaces/palette/colors/Colors.d.ts +0 -42
  513. package/out/theme/interfaces/palette/colors/Colors.luau +0 -2
  514. package/out/theme/styles/types/ConditionalStylesMap.d.ts +0 -2
  515. package/out/theme/styles/types/ConditionalStylesMap.luau +0 -2
@@ -2,9 +2,17 @@
2
2
  local TS = _G[script]
3
3
  local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
4
  local React = _react
5
+ local useEffect = _react.useEffect
5
6
  local useState = _react.useState
6
- local useButtonStyles = TS.import(script, script.Parent, "Button.styles").default
7
+ local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
8
+ local CircularProgress = TS.import(script, script.Parent.Parent.Parent, "circularProgress").CircularProgress
7
9
  local LoadingStroke = TS.import(script, script.Parent.Parent.Parent, "loadingStroke").LoadingStroke
10
+ local canActivate = TS.import(script, script.Parent, "activation").canActivate
11
+ local _buttonLook = TS.import(script, script.Parent, "buttonLook")
12
+ local buttonFace = _buttonLook.buttonFace
13
+ local spinnerPixels = _buttonLook.spinnerPixels
14
+ local spinnerPlace = _buttonLook.spinnerPlace
15
+ local useButtonStyles = TS.import(script, script.Parent, "Button.styles").default
8
16
  local function Button(props)
9
17
  local _binding = props
10
18
  local text = _binding.text
@@ -23,6 +31,12 @@ local function Button(props)
23
31
  if loading == nil then
24
32
  loading = false
25
33
  end
34
+ local loadingLabel = _binding.loadingLabel
35
+ local loadingPosition = _binding.loadingPosition
36
+ if loadingPosition == nil then
37
+ loadingPosition = "center"
38
+ end
39
+ local reducedMotion = _binding.reducedMotion
26
40
  local rounded = _binding.rounded
27
41
  if rounded == nil then
28
42
  rounded = false
@@ -44,6 +58,7 @@ local function Button(props)
44
58
  local mouseEnter = _binding.mouseEnter
45
59
  local mouseLeave = _binding.mouseLeave
46
60
  local className = _binding.className
61
+ local sx = _binding.sx
47
62
  local children = _binding.children
48
63
  local id = _binding.id
49
64
  local ref = _binding.ref
@@ -52,7 +67,23 @@ local function Button(props)
52
67
  local font = _binding_1.font
53
68
  local corner = _binding_1.corner
54
69
  local stroke = _binding_1.stroke
70
+ local _binding_2 = useTheme()
71
+ local theme = _binding_2.theme
55
72
  local hovering, setHovering = useState(false)
73
+ local focused, setFocused = useState(false)
74
+ local active = canActivate(disabled, loading)
75
+ local pressed = disabled or (not hoveringDisabled and active and (hovering or focused))
76
+ local face = buttonFace(text, loading, loadingLabel)
77
+ local place = spinnerPlace(loadingPosition)
78
+ local branded = (props.color or "primary") == "primary"
79
+ local spinnerColor = if variant == "contained" then if branded then theme.palette.primary.on else theme.palette.text.inverse elseif branded then theme.palette.primary.main else theme.palette.text.primary
80
+ useEffect(function()
81
+ if active then
82
+ return nil
83
+ end
84
+ setHovering(false)
85
+ setFocused(false)
86
+ end, { active })
56
87
  local _attributes = {}
57
88
  local _condition = id
58
89
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
@@ -66,10 +97,27 @@ local function Button(props)
66
97
  for _k, _v in font do
67
98
  _attributes[_k] = _v
68
99
  end
69
- _attributes.Active = not disabled
70
- _attributes.Text = text
100
+ if className then
101
+ for _k, _v in className do
102
+ _attributes[_k] = _v
103
+ end
104
+ end
105
+ if sx then
106
+ for _k, _v in sx do
107
+ _attributes[_k] = _v
108
+ end
109
+ end
110
+ _attributes.Active = active
111
+ _attributes.AutoButtonColor = active
112
+ _attributes.Selectable = active
113
+ _attributes.Text = face.text
114
+ for _k, _v in (if face.hideText then {
115
+ TextTransparency = 1,
116
+ } else {}) do
117
+ _attributes[_k] = _v
118
+ end
71
119
  local _result
72
- if (not hoveringDisabled and hovering) or disabled then
120
+ if pressed then
73
121
  _result = 0.75
74
122
  else
75
123
  local _result_1 = className
@@ -85,6 +133,9 @@ local function Button(props)
85
133
  _attributes.BackgroundTransparency = _result
86
134
  _attributes.Event = {
87
135
  MouseEnter = function()
136
+ if not active then
137
+ return nil
138
+ end
88
139
  setHovering(true)
89
140
  if mouseEnter then
90
141
  mouseEnter()
@@ -96,54 +147,45 @@ local function Button(props)
96
147
  mouseLeave()
97
148
  end
98
149
  end,
150
+ SelectionGained = function()
151
+ if active then
152
+ setFocused(true)
153
+ end
154
+ end,
155
+ SelectionLost = function()
156
+ return setFocused(false)
157
+ end,
99
158
  MouseButton1Click = function()
100
- if not disabled and not loading then
101
- if onLeftClick then
102
- onLeftClick()
103
- end
159
+ if active and onLeftClick then
160
+ onLeftClick()
104
161
  end
105
162
  end,
106
163
  MouseButton1Down = function()
107
- if not disabled and not loading then
108
- if onLeftDown then
109
- onLeftDown()
110
- end
164
+ if active and onLeftDown then
165
+ onLeftDown()
111
166
  end
112
167
  end,
113
168
  MouseButton1Up = function()
114
- if not disabled and not loading then
115
- if onLeftUp then
116
- onLeftUp()
117
- end
169
+ if active and onLeftUp then
170
+ onLeftUp()
118
171
  end
119
172
  end,
120
173
  MouseButton2Click = function()
121
- if not disabled and not loading then
122
- if onRightClick then
123
- onRightClick()
124
- end
174
+ if active and onRightClick then
175
+ onRightClick()
125
176
  end
126
177
  end,
127
178
  MouseButton2Down = function()
128
- if not disabled and not loading then
129
- if onRightDown then
130
- onRightDown()
131
- end
179
+ if active and onRightDown then
180
+ onRightDown()
132
181
  end
133
182
  end,
134
183
  MouseButton2Up = function()
135
- if not disabled and not loading then
136
- if onRightUp then
137
- onRightUp()
138
- end
184
+ if active and onRightUp then
185
+ onRightUp()
139
186
  end
140
187
  end,
141
188
  }
142
- if className then
143
- for _k, _v in className do
144
- _attributes[_k] = _v
145
- end
146
- end
147
189
  local _condition_1 = variant == "outlined" and not animating
148
190
  if _condition_1 then
149
191
  local _attributes_1 = table.clone(stroke)
@@ -159,7 +201,17 @@ local function Button(props)
159
201
  setmetatable(_attributes_1, nil)
160
202
  _condition_2 = React.createElement("uicorner", _attributes_1)
161
203
  end
162
- return React.createElement("textbutton", _attributes, _condition_1, _exp, _condition_2, children)
204
+ return React.createElement("textbutton", _attributes, _condition_1, _exp, _condition_2, loading and (React.createElement(CircularProgress, {
205
+ size = spinnerPixels(props.size),
206
+ thickness = 2,
207
+ color = spinnerColor,
208
+ reducedMotion = reducedMotion,
209
+ className = {
210
+ AnchorPoint = Vector2.new(place.anchorX, 0.5),
211
+ Position = UDim2.new(place.xScale, place.xOffset, 0.5, 0),
212
+ ZIndex = 10001,
213
+ },
214
+ })), children)
163
215
  end
164
216
  local default = Button
165
217
  return {
@@ -1,37 +1,19 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
3
  local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
4
+ local controlMetrics = _theme.controlMetrics
4
5
  local createStyles = _theme.createStyles
5
- local makeStyles = _theme.makeStyles
6
+ local componentStyles = _theme.componentStyles
6
7
  local makeRootStyles = function(theme, _param)
7
8
  local size = _param.size
8
9
  local color = _param.color
9
10
  local fullWidth = _param.fullWidth
10
11
  local variant = _param.variant
11
- --[[
12
- *
13
- * Default style override
14
-
15
- ]]
16
- local defaultStyles = {}
17
- repeat
18
- if size == "small" then
19
- defaultStyles.Size = UDim2.new(0, theme.spacing.calc(8), 0, theme.spacing.calc(2))
20
- break
21
- end
22
- if size == "medium" then
23
- defaultStyles.Size = UDim2.new(0, theme.spacing.calc(12), 0, theme.spacing.calc(3))
24
- break
25
- end
26
- if size == "large" then
27
- defaultStyles.Size = UDim2.new(0, theme.spacing.calc(16), 0, theme.spacing.calc(4))
28
- break
29
- end
30
- defaultStyles.Size = UDim2.new(0, theme.spacing.calc(8), 0, theme.spacing.calc(2))
31
- break
32
- until true
12
+ local metrics = controlMetrics(theme.density, size)
13
+ local defaultStyles = {
14
+ Size = UDim2.new(0, metrics.buttonWidth, 0, metrics.buttonHeight),
15
+ }
33
16
  if fullWidth then
34
- -- Make full width minus padding
35
17
  local _exp = -theme.padding.calc(4)
36
18
  local _result = defaultStyles.Size
37
19
  if _result ~= nil then
@@ -50,7 +32,6 @@ local makeRootStyles = function(theme, _param)
50
32
  _condition_1 = 0
51
33
  end
52
34
  defaultStyles.Size = UDim2.new(1, _exp, _condition, _condition_1)
53
- -- And center it horizontally
54
35
  defaultStyles.AnchorPoint = Vector2.new(0.5, 0)
55
36
  local _result_2 = defaultStyles.Position
56
37
  if _result_2 ~= nil then
@@ -78,8 +59,9 @@ local makeRootStyles = function(theme, _param)
78
59
  end
79
60
  defaultStyles.Position = UDim2.new(0.5, _condition_2, _condition_3, _condition_4)
80
61
  end
81
- defaultStyles.BackgroundColor3 = if color == "primary" then theme.palette.secondary.main else theme.palette.text.primary
82
- defaultStyles.TextColor3 = theme.palette.background.default
62
+ local brand = if color == "primary" then theme.palette.primary else nil
63
+ defaultStyles.BackgroundColor3 = if brand then brand.main else theme.palette.text.primary
64
+ defaultStyles.TextColor3 = if brand then brand.on else theme.palette.text.inverse
83
65
  repeat
84
66
  if variant == "contained" then
85
67
  defaultStyles.BackgroundTransparency = 0
@@ -87,13 +69,13 @@ local makeRootStyles = function(theme, _param)
87
69
  break
88
70
  end
89
71
  if variant == "outlined" then
90
- defaultStyles.TextColor3 = if color == "primary" then theme.palette.secondary.main else theme.palette.text.primary
72
+ defaultStyles.TextColor3 = if brand then brand.main else theme.palette.text.primary
91
73
  defaultStyles.BackgroundTransparency = 1
92
74
  defaultStyles.BorderSizePixel = theme.options.constants.borders.default
93
75
  break
94
76
  end
95
77
  if variant == "text" then
96
- defaultStyles.TextColor3 = if color == "primary" then theme.palette.secondary.main else theme.palette.text.primary
78
+ defaultStyles.TextColor3 = if brand then brand.main else theme.palette.text.primary
97
79
  defaultStyles.BackgroundTransparency = 1
98
80
  defaultStyles.BorderSizePixel = 0
99
81
  break
@@ -105,11 +87,8 @@ local makeRootStyles = function(theme, _param)
105
87
  defaultStyles.ZIndex = 10000
106
88
  return defaultStyles
107
89
  end
108
- local useButtonStyles = makeStyles(function(theme, _param)
90
+ local useButtonStyles = componentStyles("Button", function(theme, _param)
109
91
  local size = _param.size
110
- if size == nil then
111
- size = "small"
112
- end
113
92
  local color = _param.color
114
93
  if color == nil then
115
94
  color = "primary"
@@ -122,6 +101,7 @@ local useButtonStyles = makeStyles(function(theme, _param)
122
101
  if variant == nil then
123
102
  variant = "contained"
124
103
  end
104
+ local metrics = controlMetrics(theme.density, size)
125
105
  return createStyles({
126
106
  root = makeRootStyles(theme, {
127
107
  size = size,
@@ -130,14 +110,14 @@ local useButtonStyles = makeStyles(function(theme, _param)
130
110
  variant = variant,
131
111
  }),
132
112
  font = {
133
- TextSize = theme.typography.fontSizes.button,
113
+ TextSize = metrics.font,
134
114
  Font = theme.typography.fontFamilies.default,
135
115
  },
136
116
  corner = {
137
117
  CornerRadius = UDim.new(0, theme.shape.borderRadius),
138
118
  },
139
119
  stroke = {
140
- Color = if color == "primary" then theme.palette.secondary.main else theme.palette.text.primary,
120
+ Color = if color == "primary" then theme.palette.primary.main else theme.palette.text.primary,
141
121
  Transparency = 0,
142
122
  ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
143
123
  },
@@ -0,0 +1 @@
1
+ export declare function canActivate(disabled?: boolean, loading?: boolean): boolean;
@@ -0,0 +1,7 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local function canActivate(disabled, loading)
3
+ return disabled ~= true and loading ~= true
4
+ end
5
+ return {
6
+ canActivate = canActivate,
7
+ }
@@ -0,0 +1,12 @@
1
+ export type LoadingPosition = "start" | "center" | "end";
2
+ export declare function buttonFace(text: string, loading: boolean, loadingLabel?: string): {
3
+ text: string;
4
+ hideText: boolean;
5
+ };
6
+ export declare function spinnerPlace(position?: LoadingPosition): {
7
+ xScale: number;
8
+ xOffset: number;
9
+ anchorX: number;
10
+ };
11
+ export declare function spinnerPixels(size?: "small" | "medium" | "large"): 16 | 14 | 12;
12
+ export declare function iconSpinnerPixels(size?: string): 16 | 12 | 8;
@@ -0,0 +1,55 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local function buttonFace(text, loading, loadingLabel)
3
+ return {
4
+ text = if loading and loadingLabel ~= nil then loadingLabel else text,
5
+ hideText = loading and loadingLabel == nil,
6
+ }
7
+ end
8
+ local function spinnerPlace(position)
9
+ if position == nil then
10
+ position = "center"
11
+ end
12
+ if position == "start" then
13
+ return {
14
+ xScale = 0,
15
+ xOffset = 8,
16
+ anchorX = 0,
17
+ }
18
+ end
19
+ if position == "end" then
20
+ return {
21
+ xScale = 1,
22
+ xOffset = -8,
23
+ anchorX = 1,
24
+ }
25
+ end
26
+ return {
27
+ xScale = 0.5,
28
+ xOffset = 0,
29
+ anchorX = 0.5,
30
+ }
31
+ end
32
+ local function spinnerPixels(size)
33
+ if size == "large" then
34
+ return 16
35
+ end
36
+ if size == "medium" then
37
+ return 14
38
+ end
39
+ return 12
40
+ end
41
+ local function iconSpinnerPixels(size)
42
+ if size == "xxs" or size == "xs" then
43
+ return 8
44
+ end
45
+ if size == "lg" or size == "xl" then
46
+ return 16
47
+ end
48
+ return 12
49
+ end
50
+ return {
51
+ buttonFace = buttonFace,
52
+ spinnerPlace = spinnerPlace,
53
+ spinnerPixels = spinnerPixels,
54
+ iconSpinnerPixels = iconSpinnerPixels,
55
+ }
@@ -1 +1 @@
1
- export type ButtonSize = "small" | "medium" | "large";
1
+ export type { ControlSize as ButtonSize } from "../../../../theme/index";
@@ -0,0 +1,11 @@
1
+ import React from "@rbxts/react";
2
+ import { PaperElevation } from "../../paper/index";
3
+ export interface CardProps {
4
+ title?: string;
5
+ subtitle?: string;
6
+ elevation?: PaperElevation;
7
+ actions?: React.ReactNode;
8
+ children?: React.ReactNode;
9
+ }
10
+ declare function Card(props: CardProps): JSX.Element;
11
+ export default Card;
@@ -0,0 +1,74 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local TS = _G[script]
3
+ local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
+ local Paper = TS.import(script, script.Parent.Parent.Parent, "paper").Paper
5
+ local useCardStyles = TS.import(script, script.Parent, "Card.styles").default
6
+ local function Card(props)
7
+ local _binding = props
8
+ local title = _binding.title
9
+ local subtitle = _binding.subtitle
10
+ local elevation = _binding.elevation
11
+ if elevation == nil then
12
+ elevation = "flat"
13
+ end
14
+ local actions = _binding.actions
15
+ local children = _binding.children
16
+ local styles = useCardStyles()
17
+ local _attributes = {
18
+ key = "Column",
19
+ }
20
+ for _k, _v in styles.column do
21
+ _attributes[_k] = _v
22
+ end
23
+ local _attributes_1 = table.clone(styles.list)
24
+ setmetatable(_attributes_1, nil)
25
+ local _exp = React.createElement("uilistlayout", _attributes_1)
26
+ local _condition = title ~= nil
27
+ if _condition then
28
+ local _attributes_2 = {
29
+ key = "Title",
30
+ }
31
+ for _k, _v in styles.title do
32
+ _attributes_2[_k] = _v
33
+ end
34
+ _attributes_2.Text = title
35
+ _condition = (React.createElement("textlabel", _attributes_2))
36
+ end
37
+ local _condition_1 = subtitle ~= nil
38
+ if _condition_1 then
39
+ local _attributes_2 = {
40
+ key = "Subtitle",
41
+ }
42
+ for _k, _v in styles.subtitle do
43
+ _attributes_2[_k] = _v
44
+ end
45
+ _attributes_2.Text = subtitle
46
+ _condition_1 = (React.createElement("textlabel", _attributes_2))
47
+ end
48
+ local _attributes_2 = {
49
+ key = "Body",
50
+ }
51
+ for _k, _v in styles.body do
52
+ _attributes_2[_k] = _v
53
+ end
54
+ local _exp_1 = React.createElement("frame", _attributes_2, children)
55
+ local _condition_2 = actions ~= nil
56
+ if _condition_2 then
57
+ local _attributes_3 = {
58
+ key = "Actions",
59
+ }
60
+ for _k, _v in styles.actions do
61
+ _attributes_3[_k] = _v
62
+ end
63
+ local _attributes_4 = table.clone(styles.actionList)
64
+ setmetatable(_attributes_4, nil)
65
+ _condition_2 = (React.createElement("frame", _attributes_3, React.createElement("uilistlayout", _attributes_4), actions))
66
+ end
67
+ return React.createElement(Paper, {
68
+ elevation = elevation,
69
+ }, React.createElement("frame", _attributes, _exp, _condition, _condition_1, _exp_1, _condition_2))
70
+ end
71
+ local default = Card
72
+ return {
73
+ default = default,
74
+ }
@@ -0,0 +1,2 @@
1
+ declare const useCardStyles: () => import("../../../../theme/index").ClassNameMap<string>;
2
+ export default useCardStyles;
@@ -0,0 +1,66 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local TS = _G[script]
3
+ local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
4
+ local componentStyles = _theme.componentStyles
5
+ local createStyles = _theme.createStyles
6
+ local useCardStyles = componentStyles("Card", function(theme)
7
+ return createStyles({
8
+ column = {
9
+ AutomaticSize = Enum.AutomaticSize.XY,
10
+ Size = UDim2.fromOffset(theme.padding.calc(32), 0),
11
+ BackgroundTransparency = 1,
12
+ BorderSizePixel = 0,
13
+ },
14
+ list = {
15
+ FillDirection = Enum.FillDirection.Vertical,
16
+ Padding = UDim.new(0, theme.padding.calc(1)),
17
+ SortOrder = Enum.SortOrder.LayoutOrder,
18
+ },
19
+ title = {
20
+ LayoutOrder = 1,
21
+ AutomaticSize = Enum.AutomaticSize.XY,
22
+ Size = UDim2.fromScale(0, 0),
23
+ BackgroundTransparency = 1,
24
+ BorderSizePixel = 0,
25
+ Font = theme.typography.fontFamilies.default,
26
+ TextSize = theme.typography.fontSizes.h6,
27
+ TextColor3 = theme.palette.text.primary,
28
+ TextXAlignment = Enum.TextXAlignment.Left,
29
+ },
30
+ subtitle = {
31
+ LayoutOrder = 2,
32
+ AutomaticSize = Enum.AutomaticSize.XY,
33
+ Size = UDim2.fromScale(0, 0),
34
+ BackgroundTransparency = 1,
35
+ BorderSizePixel = 0,
36
+ Font = theme.typography.fontFamilies.default,
37
+ TextSize = theme.typography.fontSizes.body,
38
+ TextColor3 = theme.palette.text.secondary,
39
+ TextXAlignment = Enum.TextXAlignment.Left,
40
+ },
41
+ body = {
42
+ LayoutOrder = 3,
43
+ AutomaticSize = Enum.AutomaticSize.Y,
44
+ Size = UDim2.new(1, 0, 0, 0),
45
+ BackgroundTransparency = 1,
46
+ BorderSizePixel = 0,
47
+ },
48
+ actions = {
49
+ LayoutOrder = 4,
50
+ AutomaticSize = Enum.AutomaticSize.Y,
51
+ Size = UDim2.new(1, 0, 0, 0),
52
+ BackgroundTransparency = 1,
53
+ BorderSizePixel = 0,
54
+ },
55
+ actionList = {
56
+ FillDirection = Enum.FillDirection.Horizontal,
57
+ HorizontalAlignment = Enum.HorizontalAlignment.Right,
58
+ Padding = UDim.new(0, theme.padding.calc(1)),
59
+ SortOrder = Enum.SortOrder.LayoutOrder,
60
+ },
61
+ })
62
+ end)
63
+ local default = useCardStyles
64
+ return {
65
+ default = default,
66
+ }
@@ -0,0 +1,2 @@
1
+ export { default as Card } from "./components/Card";
2
+ export { CardProps } from "./components/Card";
@@ -0,0 +1,5 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local TS = _G[script]
3
+ local exports = {}
4
+ exports.Card = TS.import(script, script, "components", "Card").default
5
+ return exports
@@ -0,0 +1,8 @@
1
+ import { CustomizedProps } from "../../../../theme/index";
2
+ export interface CFrameEditorProps {
3
+ value: CFrame;
4
+ onChange: (value: CFrame) => void;
5
+ disabled?: boolean;
6
+ }
7
+ declare function CFrameEditor(props: CustomizedProps<Frame, CFrameEditorProps>): JSX.Element;
8
+ export default CFrameEditor;
@@ -0,0 +1,89 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local TS = _G[script]
3
+ local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
+ local NumberInput = TS.import(script, script.Parent.Parent.Parent, "numberInput").NumberInput
5
+ local useCFrameEditorStyles = TS.import(script, script.Parent, "CFrameEditor.styles").default
6
+ local _cframeValue = TS.import(script, script.Parent, "cframeValue")
7
+ local cframeFields = _cframeValue.cframeFields
8
+ local nextCFrameParts = _cframeValue.nextCFrameParts
9
+ local function CFrameEditor(props)
10
+ local _binding = props
11
+ local value = _binding.value
12
+ local onChange = _binding.onChange
13
+ local disabled = _binding.disabled
14
+ local className = _binding.className
15
+ local sx = _binding.sx
16
+ local id = _binding.id
17
+ local ref = _binding.ref
18
+ local styles = useCFrameEditorStyles()
19
+ local rx, ry, rz = value:ToEulerAnglesXYZ()
20
+ local degrees = { math.deg(rx), math.deg(ry), math.deg(rz) }
21
+ local amounts = { value.X, value.Y, value.Z, degrees[1], degrees[2], degrees[3] }
22
+ local commit = function(field, amount)
23
+ local parts = nextCFrameParts(value.X, value.Y, value.Z, degrees[1], degrees[2], degrees[3], field, amount)
24
+ local _cFrame = CFrame.new(parts[1], parts[2], parts[3])
25
+ local _arg0 = CFrame.Angles(math.rad(parts[4]), math.rad(parts[5]), math.rad(parts[6]))
26
+ onChange(_cFrame * _arg0)
27
+ end
28
+ local _attributes = {}
29
+ local _condition = id
30
+ if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
31
+ _condition = "CFrameEditor"
32
+ end
33
+ _attributes.key = _condition
34
+ _attributes.ref = ref
35
+ for _k, _v in styles.root do
36
+ _attributes[_k] = _v
37
+ end
38
+ if className then
39
+ for _k, _v in className do
40
+ _attributes[_k] = _v
41
+ end
42
+ end
43
+ if sx then
44
+ for _k, _v in sx do
45
+ _attributes[_k] = _v
46
+ end
47
+ end
48
+ local _attributes_1 = table.clone(styles.wrap)
49
+ setmetatable(_attributes_1, nil)
50
+ local _exp = React.createElement("uilistlayout", _attributes_1)
51
+ local _exp_1 = cframeFields()
52
+ -- ▼ ReadonlyArray.map ▼
53
+ local _newValue = table.create(#_exp_1)
54
+ local _callback = function(field, index)
55
+ local _attributes_2 = {
56
+ key = field,
57
+ }
58
+ for _k, _v in styles.axis do
59
+ _attributes_2[_k] = _v
60
+ end
61
+ _attributes_2.LayoutOrder = index + 1
62
+ local _attributes_3 = table.clone(styles.row)
63
+ setmetatable(_attributes_3, nil)
64
+ local _exp_2 = React.createElement("uilistlayout", _attributes_3)
65
+ local _attributes_4 = table.clone(styles.label)
66
+ setmetatable(_attributes_4, nil)
67
+ _attributes_4.Text = field
68
+ local _exp_3 = React.createElement("textlabel", _attributes_4)
69
+ local _attributes_5 = table.clone(styles.field)
70
+ setmetatable(_attributes_5, nil)
71
+ return React.createElement("frame", _attributes_2, _exp_2, _exp_3, React.createElement("frame", _attributes_5, React.createElement(NumberInput, {
72
+ value = amounts[index + 1],
73
+ disabled = disabled,
74
+ width = UDim.new(1, 0),
75
+ onChange = function(amount)
76
+ return commit(field, amount)
77
+ end,
78
+ })))
79
+ end
80
+ for _k, _v in _exp_1 do
81
+ _newValue[_k] = _callback(_v, _k - 1, _exp_1)
82
+ end
83
+ -- ▲ ReadonlyArray.map ▲
84
+ return React.createElement("frame", _attributes, _exp, _newValue)
85
+ end
86
+ local default = CFrameEditor
87
+ return {
88
+ default = default,
89
+ }
@@ -0,0 +1,2 @@
1
+ declare const useCFrameEditorStyles: () => import("../../../../theme/index").ClassNameMap<string>;
2
+ export default useCFrameEditorStyles;