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

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 (395) hide show
  1. package/README.md +1 -18
  2. package/out/theme/constants/NumberConstants.d.ts +10 -0
  3. package/out/theme/constants/NumberConstants.luau +12 -0
  4. package/out/theme/interfaces/density/controlMetrics.luau +2 -2
  5. package/out/theme/interfaces/palette/Palette.d.ts +7 -0
  6. package/out/theme/interfaces/spacing/Shape.d.ts +6 -0
  7. package/out/theme/interfaces/theme/Theme.d.ts +6 -0
  8. package/out/theme/interfaces/typography/FontFamilies.luau +1 -0
  9. package/out/theme/interfaces/typography/FontFamilyOptions.d.ts +1 -1
  10. package/out/theme/interfaces/typography/FontSizeOptions.d.ts +1 -1
  11. package/out/theme/interfaces/typography/FontSizes.luau +2 -0
  12. package/out/theme/interfaces/typography/Variants.d.ts +3 -1
  13. package/out/theme/interfaces/typography/Variants.luau +25 -1
  14. package/out/theme/styles/utilities/focusRing.d.ts +7 -0
  15. package/out/theme/styles/utilities/focusRing.luau +14 -0
  16. package/out/theme/styles/utilities/index.d.ts +1 -0
  17. package/out/theme/styles/utilities/init.luau +3 -0
  18. package/out/theme/styles/utilities/resolveSx.d.ts +6 -1
  19. package/out/theme/styles/utilities/resolveSx.luau +53 -12
  20. package/out/theme/themes/DarkTheme.luau +4 -0
  21. package/out/theme/themes/LightTheme.luau +4 -0
  22. package/out/theme/themes/createPalette.luau +15 -0
  23. package/out/ui/packages/accordion/components/Accordion.d.ts +1 -0
  24. package/out/ui/packages/accordion/components/Accordion.luau +112 -32
  25. package/out/ui/packages/accordion/components/Accordion.styles.luau +70 -32
  26. package/out/ui/packages/accordion/components/accordionNote.d.ts +2 -0
  27. package/out/ui/packages/accordion/components/accordionNote.luau +11 -0
  28. package/out/ui/packages/alert/components/Alert.d.ts +2 -0
  29. package/out/ui/packages/alert/components/Alert.luau +39 -12
  30. package/out/ui/packages/alert/components/Alert.styles.luau +44 -22
  31. package/out/ui/packages/alert/components/alertAction.d.ts +2 -0
  32. package/out/ui/packages/alert/components/alertAction.luau +11 -0
  33. package/out/ui/packages/appBar/components/AppBar.d.ts +1 -0
  34. package/out/ui/packages/appBar/components/AppBar.luau +88 -22
  35. package/out/ui/packages/appBar/components/AppBar.styles.luau +41 -11
  36. package/out/ui/packages/appBar/components/appBarSubtitle.d.ts +2 -0
  37. package/out/ui/packages/appBar/components/appBarSubtitle.luau +11 -0
  38. package/out/ui/packages/autocomplete/components/Autocomplete.luau +4 -0
  39. package/out/ui/packages/avatar/components/Avatar.d.ts +2 -0
  40. package/out/ui/packages/avatar/components/Avatar.luau +9 -2
  41. package/out/ui/packages/avatar/components/Avatar.styles.luau +7 -0
  42. package/out/ui/packages/avatarGroup/components/AvatarGroup.d.ts +14 -0
  43. package/out/ui/packages/avatarGroup/components/AvatarGroup.luau +107 -0
  44. package/out/ui/packages/avatarGroup/components/AvatarGroup.styles.d.ts +6 -0
  45. package/out/ui/packages/avatarGroup/components/AvatarGroup.styles.luau +55 -0
  46. package/out/ui/packages/avatarGroup/components/avatarGroupCut.d.ts +2 -0
  47. package/out/ui/packages/avatarGroup/components/avatarGroupCut.luau +11 -0
  48. package/out/ui/packages/avatarGroup/index.d.ts +3 -0
  49. package/out/ui/packages/avatarGroup/init.luau +6 -0
  50. package/out/ui/packages/badge/components/Badge.luau +14 -11
  51. package/out/ui/packages/badge/components/Badge.styles.luau +5 -1
  52. package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +4 -1
  53. package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +19 -1
  54. package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +24 -3
  55. package/out/ui/packages/bottomNavigation/components/navBadge.d.ts +2 -0
  56. package/out/ui/packages/bottomNavigation/components/navBadge.luau +14 -0
  57. package/out/ui/packages/bottomNavigation/index.d.ts +1 -1
  58. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +21 -6
  59. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.styles.luau +10 -0
  60. package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +2 -0
  61. package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +8 -0
  62. package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +20 -2
  63. package/out/ui/packages/brickColorPicker/components/BrickColorPicker.styles.luau +72 -66
  64. package/out/ui/packages/button/components/Button.d.ts +2 -0
  65. package/out/ui/packages/button/components/Button.luau +112 -36
  66. package/out/ui/packages/button/components/Button.styles.luau +2 -0
  67. package/out/ui/packages/button/components/buttonLook.d.ts +2 -0
  68. package/out/ui/packages/button/components/buttonLook.luau +11 -0
  69. package/out/ui/packages/button/components/buttonPaint.d.ts +16 -0
  70. package/out/ui/packages/button/components/buttonPaint.luau +70 -0
  71. package/out/ui/packages/buttonGroup/components/ButtonGroup.d.ts +14 -0
  72. package/out/ui/packages/buttonGroup/components/ButtonGroup.luau +117 -0
  73. package/out/ui/packages/buttonGroup/components/ButtonGroup.styles.d.ts +5 -0
  74. package/out/ui/packages/buttonGroup/components/ButtonGroup.styles.luau +57 -0
  75. package/out/ui/packages/buttonGroup/components/buttonGroupEdge.d.ts +2 -0
  76. package/out/ui/packages/buttonGroup/components/buttonGroupEdge.luau +16 -0
  77. package/out/ui/packages/buttonGroup/index.d.ts +3 -0
  78. package/out/ui/packages/buttonGroup/init.luau +6 -0
  79. package/out/ui/packages/card/components/Card.d.ts +1 -0
  80. package/out/ui/packages/card/components/Card.luau +21 -2
  81. package/out/ui/packages/card/components/Card.styles.d.ts +3 -1
  82. package/out/ui/packages/card/components/Card.styles.luau +20 -9
  83. package/out/ui/packages/card/components/cardWidth.d.ts +10 -0
  84. package/out/ui/packages/card/components/cardWidth.luau +36 -0
  85. package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +18 -5
  86. package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +50 -32
  87. package/out/ui/packages/cframeEditor/components/cframeValue.d.ts +1 -0
  88. package/out/ui/packages/cframeEditor/components/cframeValue.luau +13 -0
  89. package/out/ui/packages/checkbox/components/Checkbox.luau +7 -5
  90. package/out/ui/packages/checkbox/components/Checkbox.styles.luau +2 -0
  91. package/out/ui/packages/checkbox/components/checkboxLook.d.ts +2 -2
  92. package/out/ui/packages/checkbox/components/checkboxLook.luau +2 -2
  93. package/out/ui/packages/chip/components/Chip.luau +16 -14
  94. package/out/ui/packages/chip/components/Chip.styles.d.ts +2 -1
  95. package/out/ui/packages/chip/components/Chip.styles.luau +15 -9
  96. package/out/ui/packages/chip/components/chipTone.d.ts +3 -0
  97. package/out/ui/packages/chip/components/chipTone.luau +11 -0
  98. package/out/ui/packages/circularProgress/components/CircularProgress.luau +10 -3
  99. package/out/ui/packages/codeEditor/components/CodeEditor.d.ts +12 -0
  100. package/out/ui/packages/codeEditor/components/CodeEditor.luau +262 -0
  101. package/out/ui/packages/codeEditor/components/CodeEditor.styles.d.ts +6 -0
  102. package/out/ui/packages/codeEditor/components/CodeEditor.styles.luau +124 -0
  103. package/out/ui/packages/codeEditor/highlightCode.d.ts +11 -0
  104. package/out/ui/packages/codeEditor/highlightCode.luau +503 -0
  105. package/out/ui/packages/codeEditor/index.d.ts +2 -0
  106. package/out/ui/packages/codeEditor/init.luau +5 -0
  107. package/out/ui/packages/collapse/components/Collapse.d.ts +8 -0
  108. package/out/ui/packages/collapse/components/Collapse.luau +34 -0
  109. package/out/ui/packages/collapse/components/Collapse.styles.d.ts +2 -0
  110. package/out/ui/packages/collapse/components/Collapse.styles.luau +20 -0
  111. package/out/ui/packages/collapse/components/collapseOpen.d.ts +1 -0
  112. package/out/ui/packages/collapse/components/collapseOpen.luau +7 -0
  113. package/out/ui/packages/collapse/index.d.ts +3 -0
  114. package/out/ui/packages/collapse/init.luau +6 -0
  115. package/out/ui/packages/colorPicker/components/ColorPicker.luau +9 -1
  116. package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +74 -67
  117. package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +16 -6
  118. package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +16 -6
  119. package/out/ui/packages/colorPicker/components/sequenceValue.d.ts +2 -0
  120. package/out/ui/packages/colorPicker/components/sequenceValue.luau +8 -0
  121. package/out/ui/packages/colorPicker/index.d.ts +1 -1
  122. package/out/ui/packages/colorPicker/init.luau +2 -0
  123. package/out/ui/packages/copyButton/components/CopyButton.d.ts +8 -0
  124. package/out/ui/packages/copyButton/components/CopyButton.luau +32 -0
  125. package/out/ui/packages/copyButton/components/copyInvoke.d.ts +2 -0
  126. package/out/ui/packages/copyButton/components/copyInvoke.luau +12 -0
  127. package/out/ui/packages/copyButton/index.d.ts +3 -0
  128. package/out/ui/packages/copyButton/init.luau +6 -0
  129. package/out/ui/packages/cover/components/Cover.d.ts +8 -0
  130. package/out/ui/packages/cover/components/Cover.luau +47 -0
  131. package/out/ui/packages/cover/components/coverFill.d.ts +2 -0
  132. package/out/ui/packages/cover/components/coverFill.luau +14 -0
  133. package/out/ui/packages/cover/index.d.ts +3 -0
  134. package/out/ui/packages/cover/init.luau +6 -0
  135. package/out/ui/packages/dateRange/components/DateRangePicker.d.ts +3 -0
  136. package/out/ui/packages/dateRange/components/DateRangePicker.luau +186 -95
  137. package/out/ui/packages/dateRange/dateRangeValue.d.ts +5 -0
  138. package/out/ui/packages/dateRange/dateRangeValue.luau +34 -0
  139. package/out/ui/packages/dateRange/index.d.ts +1 -1
  140. package/out/ui/packages/dateRange/init.luau +3 -0
  141. package/out/ui/packages/dialog/components/Dialog.d.ts +1 -0
  142. package/out/ui/packages/dialog/components/Dialog.luau +55 -6
  143. package/out/ui/packages/dialog/components/Dialog.styles.luau +9 -5
  144. package/out/ui/packages/dialog/components/dialogWidth.d.ts +7 -0
  145. package/out/ui/packages/dialog/components/dialogWidth.luau +35 -0
  146. package/out/ui/packages/divider/components/Divider.luau +60 -13
  147. package/out/ui/packages/divider/components/Divider.styles.luau +1 -0
  148. package/out/ui/packages/divider/components/dividerLabel.d.ts +2 -0
  149. package/out/ui/packages/divider/components/dividerLabel.luau +11 -0
  150. package/out/ui/packages/drawer/components/Drawer.d.ts +2 -0
  151. package/out/ui/packages/drawer/components/Drawer.luau +51 -7
  152. package/out/ui/packages/drawer/components/Drawer.styles.luau +13 -5
  153. package/out/ui/packages/drawer/components/drawerPlacement.d.ts +15 -1
  154. package/out/ui/packages/drawer/components/drawerPlacement.luau +46 -0
  155. package/out/ui/packages/editorFace.d.ts +22 -0
  156. package/out/ui/packages/editorFace.luau +49 -0
  157. package/out/ui/packages/fab/components/Fab.luau +19 -6
  158. package/out/ui/packages/fab/components/Fab.styles.luau +4 -3
  159. package/out/ui/packages/fontEditor/components/FontEditor.luau +13 -3
  160. package/out/ui/packages/fontEditor/components/FontEditor.styles.luau +36 -27
  161. package/out/ui/packages/gradientEditor/components/GradientEditor.luau +21 -13
  162. package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +52 -44
  163. package/out/ui/packages/icon/components/DrawnGlyph.d.ts +11 -0
  164. package/out/ui/packages/icon/components/DrawnGlyph.luau +87 -0
  165. package/out/ui/packages/icon/components/Icon.d.ts +6 -2
  166. package/out/ui/packages/icon/components/Icon.luau +23 -3
  167. package/out/ui/packages/icon/components/Icon.styles.luau +3 -0
  168. package/out/ui/packages/icon/components/glyphs.d.ts +28 -0
  169. package/out/ui/packages/icon/components/glyphs.luau +64 -0
  170. package/out/ui/packages/icon/index.d.ts +1 -0
  171. package/out/ui/packages/iconButton/components/IconButton.d.ts +6 -1
  172. package/out/ui/packages/iconButton/components/IconButton.luau +112 -11
  173. package/out/ui/packages/iconButton/components/IconButton.styles.luau +4 -27
  174. package/out/ui/packages/iconButton/components/iconButtonBox.d.ts +11 -0
  175. package/out/ui/packages/iconButton/components/iconButtonBox.luau +48 -0
  176. package/out/ui/packages/iconButton/components/transportGlyph.d.ts +10 -0
  177. package/out/ui/packages/iconButton/components/transportGlyph.luau +77 -0
  178. package/out/ui/packages/imageList/components/ImageList.d.ts +4 -0
  179. package/out/ui/packages/imageList/components/ImageList.luau +28 -7
  180. package/out/ui/packages/imageList/components/ImageList.styles.d.ts +1 -0
  181. package/out/ui/packages/imageList/components/ImageList.styles.luau +17 -10
  182. package/out/ui/packages/imageList/components/imageListLayout.d.ts +8 -0
  183. package/out/ui/packages/imageList/components/imageListLayout.luau +36 -0
  184. package/out/ui/packages/index.d.ts +12 -0
  185. package/out/ui/packages/init.luau +36 -0
  186. package/out/ui/packages/input/components/Input.d.ts +4 -0
  187. package/out/ui/packages/input/components/Input.luau +74 -37
  188. package/out/ui/packages/input/components/Input.styles.d.ts +1 -0
  189. package/out/ui/packages/input/components/Input.styles.luau +45 -18
  190. package/out/ui/packages/input/components/clampText.d.ts +2 -0
  191. package/out/ui/packages/input/components/clampText.luau +16 -0
  192. package/out/ui/packages/input/components/fieldChrome.d.ts +5 -0
  193. package/out/ui/packages/input/components/fieldChrome.luau +11 -0
  194. package/out/ui/packages/input/components/multilineHeight.d.ts +1 -0
  195. package/out/ui/packages/input/components/multilineHeight.luau +11 -0
  196. package/out/ui/packages/layout/components/Box.luau +92 -13
  197. package/out/ui/packages/layout/components/Box.styles.d.ts +0 -2
  198. package/out/ui/packages/layout/components/Box.styles.luau +0 -9
  199. package/out/ui/packages/layout/components/Grid.luau +81 -16
  200. package/out/ui/packages/layout/components/Pad.d.ts +24 -0
  201. package/out/ui/packages/layout/components/Pad.luau +88 -0
  202. package/out/ui/packages/layout/components/Stack.luau +79 -13
  203. package/out/ui/packages/link/components/Link.luau +17 -7
  204. package/out/ui/packages/link/components/Link.styles.d.ts +0 -1
  205. package/out/ui/packages/link/components/Link.styles.luau +3 -5
  206. package/out/ui/packages/listItem/components/ListItem.d.ts +6 -0
  207. package/out/ui/packages/listItem/components/ListItem.luau +155 -40
  208. package/out/ui/packages/listItem/components/ListItem.styles.d.ts +4 -0
  209. package/out/ui/packages/listItem/components/ListItem.styles.luau +70 -31
  210. package/out/ui/packages/listItem/components/listItemInk.d.ts +3 -0
  211. package/out/ui/packages/listItem/components/listItemInk.luau +14 -0
  212. package/out/ui/packages/listItem/components/listItemLayout.d.ts +22 -0
  213. package/out/ui/packages/listItem/components/listItemLayout.luau +68 -0
  214. package/out/ui/packages/markdown/components/Markdown.d.ts +2 -0
  215. package/out/ui/packages/markdown/components/Markdown.luau +244 -46
  216. package/out/ui/packages/markdown/components/Markdown.styles.luau +125 -51
  217. package/out/ui/packages/markdown/components/MarkdownEditor.luau +215 -146
  218. package/out/ui/packages/markdown/components/MarkdownEditor.styles.d.ts +1 -0
  219. package/out/ui/packages/markdown/components/MarkdownEditor.styles.luau +153 -83
  220. package/out/ui/packages/markdown/index.d.ts +2 -2
  221. package/out/ui/packages/markdown/init.luau +2 -0
  222. package/out/ui/packages/markdown/parseMarkdown.d.ts +30 -2
  223. package/out/ui/packages/markdown/parseMarkdown.luau +453 -25
  224. package/out/ui/packages/menu/components/Menu.d.ts +4 -1
  225. package/out/ui/packages/menu/components/Menu.luau +76 -28
  226. package/out/ui/packages/menu/components/Menu.styles.luau +6 -1
  227. package/out/ui/packages/menu/components/menuIcon.d.ts +6 -0
  228. package/out/ui/packages/menu/components/menuIcon.luau +32 -0
  229. package/out/ui/packages/numberInput/components/NumberInput.d.ts +1 -0
  230. package/out/ui/packages/numberInput/components/NumberInput.luau +82 -1
  231. package/out/ui/packages/numberInput/components/numberValue.d.ts +2 -0
  232. package/out/ui/packages/numberInput/components/numberValue.luau +10 -0
  233. package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +9 -1
  234. package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.styles.luau +23 -16
  235. package/out/ui/packages/pager/components/Pager.d.ts +11 -0
  236. package/out/ui/packages/pager/components/Pager.luau +114 -0
  237. package/out/ui/packages/pager/components/Pager.styles.d.ts +2 -0
  238. package/out/ui/packages/pager/components/Pager.styles.luau +66 -0
  239. package/out/ui/packages/pager/components/pagerStep.d.ts +3 -0
  240. package/out/ui/packages/pager/components/pagerStep.luau +24 -0
  241. package/out/ui/packages/pager/index.d.ts +3 -0
  242. package/out/ui/packages/pager/init.luau +9 -0
  243. package/out/ui/packages/pagination/components/Pagination.styles.luau +4 -1
  244. package/out/ui/packages/paper/components/Paper.luau +17 -11
  245. package/out/ui/packages/paper/components/Paper.styles.luau +12 -5
  246. package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +14 -1
  247. package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +24 -19
  248. package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +5 -0
  249. package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +22 -0
  250. package/out/ui/packages/popover/components/Popover.d.ts +12 -0
  251. package/out/ui/packages/popover/components/Popover.luau +52 -0
  252. package/out/ui/packages/popover/components/Popover.styles.d.ts +2 -0
  253. package/out/ui/packages/popover/components/Popover.styles.luau +32 -0
  254. package/out/ui/packages/popover/index.d.ts +2 -0
  255. package/out/ui/packages/popover/init.luau +5 -0
  256. package/out/ui/packages/popup/components/Popup.d.ts +2 -0
  257. package/out/ui/packages/popup/components/Popup.luau +64 -2
  258. package/out/ui/packages/popup/components/placement.luau +6 -4
  259. package/out/ui/packages/progressBar/components/ProgressBar.luau +1 -1
  260. package/out/ui/packages/progressBar/components/ProgressBar.styles.luau +3 -2
  261. package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +4 -1
  262. package/out/ui/packages/radioGroup/components/RadioGroup.luau +53 -9
  263. package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +26 -2
  264. package/out/ui/packages/radioGroup/components/radioHint.d.ts +2 -0
  265. package/out/ui/packages/radioGroup/components/radioHint.luau +11 -0
  266. package/out/ui/packages/radioGroup/index.d.ts +1 -1
  267. package/out/ui/packages/rating/components/Rating.d.ts +1 -1
  268. package/out/ui/packages/rating/components/Rating.luau +48 -4
  269. package/out/ui/packages/rating/components/Rating.styles.luau +1 -1
  270. package/out/ui/packages/rating/components/ratingCommit.d.ts +2 -0
  271. package/out/ui/packages/rating/components/ratingCommit.luau +11 -0
  272. package/out/ui/packages/rayEditor/components/RayEditor.luau +9 -1
  273. package/out/ui/packages/rayEditor/components/RayEditor.styles.luau +17 -11
  274. package/out/ui/packages/rectEditor/components/RectEditor.luau +9 -1
  275. package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +49 -42
  276. package/out/ui/packages/scroll/components/ScrollView.luau +76 -7
  277. package/out/ui/packages/select/components/Select.d.ts +2 -0
  278. package/out/ui/packages/select/components/Select.luau +164 -105
  279. package/out/ui/packages/select/components/Select.styles.d.ts +2 -0
  280. package/out/ui/packages/select/components/Select.styles.luau +30 -9
  281. package/out/ui/packages/select/components/selectWidth.d.ts +2 -0
  282. package/out/ui/packages/select/components/selectWidth.luau +15 -0
  283. package/out/ui/packages/shadow/components/Shadow.luau +202 -21
  284. package/out/ui/packages/sidebar/components/Sidebar.styles.luau +1 -0
  285. package/out/ui/packages/skeleton/components/Skeleton.luau +4 -0
  286. package/out/ui/packages/slider/components/RangeSlider.d.ts +16 -0
  287. package/out/ui/packages/slider/components/RangeSlider.luau +232 -0
  288. package/out/ui/packages/slider/components/RangeSlider.styles.d.ts +7 -0
  289. package/out/ui/packages/slider/components/RangeSlider.styles.luau +48 -0
  290. package/out/ui/packages/slider/components/Slider.d.ts +1 -0
  291. package/out/ui/packages/slider/components/Slider.luau +53 -25
  292. package/out/ui/packages/slider/components/Slider.styles.d.ts +1 -0
  293. package/out/ui/packages/slider/components/Slider.styles.luau +19 -5
  294. package/out/ui/packages/slider/components/rangeValue.d.ts +21 -0
  295. package/out/ui/packages/slider/components/rangeValue.luau +77 -0
  296. package/out/ui/packages/slider/components/sliderLabel.d.ts +4 -0
  297. package/out/ui/packages/slider/components/sliderLabel.luau +30 -0
  298. package/out/ui/packages/slider/index.d.ts +3 -0
  299. package/out/ui/packages/slider/init.luau +6 -0
  300. package/out/ui/packages/snackbar/components/Snackbar.d.ts +1 -0
  301. package/out/ui/packages/snackbar/components/Snackbar.luau +2 -0
  302. package/out/ui/packages/sparkline/components/Sparkline.d.ts +3 -0
  303. package/out/ui/packages/sparkline/components/Sparkline.luau +72 -8
  304. package/out/ui/packages/sparkline/index.d.ts +1 -1
  305. package/out/ui/packages/sparkline/init.luau +6 -1
  306. package/out/ui/packages/sparkline/sparklineLayout.d.ts +17 -0
  307. package/out/ui/packages/sparkline/sparklineLayout.luau +132 -8
  308. package/out/ui/packages/speedDial/components/SpeedDial.d.ts +1 -0
  309. package/out/ui/packages/speedDial/components/SpeedDial.luau +59 -9
  310. package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +1 -0
  311. package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +50 -3
  312. package/out/ui/packages/speedDial/components/speedDialLabel.d.ts +4 -0
  313. package/out/ui/packages/speedDial/components/speedDialLabel.luau +16 -0
  314. package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
  315. package/out/ui/packages/stateMatrix.d.ts +1 -0
  316. package/out/ui/packages/stateMatrix.luau +9 -0
  317. package/out/ui/packages/stepper/components/Stepper.d.ts +2 -0
  318. package/out/ui/packages/stepper/components/Stepper.luau +35 -7
  319. package/out/ui/packages/stepper/components/Stepper.styles.luau +12 -6
  320. package/out/ui/packages/stepper/components/stepState.d.ts +4 -2
  321. package/out/ui/packages/stepper/components/stepState.luau +12 -1
  322. package/out/ui/packages/stepper/index.d.ts +1 -1
  323. package/out/ui/packages/stepper/init.luau +3 -1
  324. package/out/ui/packages/switch/components/Switch.luau +2 -2
  325. package/out/ui/packages/switch/components/Switch.styles.luau +2 -5
  326. package/out/ui/packages/switch/components/switchLook.d.ts +3 -3
  327. package/out/ui/packages/switch/components/switchLook.luau +4 -10
  328. package/out/ui/packages/table/components/Table.d.ts +1 -0
  329. package/out/ui/packages/table/components/Table.luau +99 -57
  330. package/out/ui/packages/table/components/Table.styles.luau +23 -6
  331. package/out/ui/packages/table/components/tableColumns.d.ts +2 -0
  332. package/out/ui/packages/table/components/tableColumns.luau +2 -0
  333. package/out/ui/packages/table/components/tableSort.d.ts +2 -0
  334. package/out/ui/packages/table/components/tableSort.luau +95 -0
  335. package/out/ui/packages/table/index.d.ts +1 -0
  336. package/out/ui/packages/table/init.luau +1 -0
  337. package/out/ui/packages/tabs/components/Tabs.luau +77 -6
  338. package/out/ui/packages/tabs/components/Tabs.styles.luau +12 -11
  339. package/out/ui/packages/tabs/components/tabIndicator.d.ts +7 -0
  340. package/out/ui/packages/tabs/components/tabIndicator.luau +21 -0
  341. package/out/ui/packages/tabs/components/tabScroll.d.ts +2 -0
  342. package/out/ui/packages/tabs/components/tabScroll.luau +18 -0
  343. package/out/ui/packages/text/components/Text.d.ts +9 -0
  344. package/out/ui/packages/text/components/Text.luau +64 -0
  345. package/out/ui/packages/text/components/textBox.d.ts +12 -0
  346. package/out/ui/packages/text/components/textBox.luau +21 -0
  347. package/out/ui/packages/text/index.d.ts +2 -0
  348. package/out/ui/packages/text/init.luau +5 -0
  349. package/out/ui/packages/timeField/components/TimeField.d.ts +13 -0
  350. package/out/ui/packages/timeField/components/TimeField.luau +106 -0
  351. package/out/ui/packages/timeField/index.d.ts +4 -0
  352. package/out/ui/packages/timeField/init.luau +9 -0
  353. package/out/ui/packages/timeField/timeValue.d.ts +8 -0
  354. package/out/ui/packages/timeField/timeValue.luau +49 -0
  355. package/out/ui/packages/timeline/components/Timeline.d.ts +12 -0
  356. package/out/ui/packages/timeline/components/Timeline.luau +102 -0
  357. package/out/ui/packages/timeline/components/Timeline.styles.d.ts +2 -0
  358. package/out/ui/packages/timeline/components/Timeline.styles.luau +115 -0
  359. package/out/ui/packages/timeline/components/timelineRail.d.ts +4 -0
  360. package/out/ui/packages/timeline/components/timelineRail.luau +15 -0
  361. package/out/ui/packages/timeline/index.d.ts +3 -0
  362. package/out/ui/packages/timeline/init.luau +8 -0
  363. package/out/ui/packages/toast/components/Toast.d.ts +1 -0
  364. package/out/ui/packages/toast/components/Toast.luau +200 -57
  365. package/out/ui/packages/toast/components/Toast.styles.luau +40 -20
  366. package/out/ui/packages/toast/components/toastPlace.d.ts +16 -0
  367. package/out/ui/packages/toast/components/toastPlace.luau +44 -0
  368. package/out/ui/packages/toast/enums/ToastVariants.d.ts +2 -1
  369. package/out/ui/packages/toast/enums/ToastVariants.luau +1 -0
  370. package/out/ui/packages/toggleButton/components/ToggleButton.luau +43 -4
  371. package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +1 -1
  372. package/out/ui/packages/tooltip/components/Tooltip.d.ts +1 -0
  373. package/out/ui/packages/tooltip/components/Tooltip.luau +109 -31
  374. package/out/ui/packages/tooltip/components/Tooltip.styles.luau +31 -1
  375. package/out/ui/packages/tooltip/components/tooltipBox.d.ts +4 -0
  376. package/out/ui/packages/tooltip/components/tooltipBox.luau +12 -0
  377. package/out/ui/packages/tooltip/components/tooltipPointer.d.ts +2 -0
  378. package/out/ui/packages/tooltip/components/tooltipPointer.luau +11 -0
  379. package/out/ui/packages/treeView/components/TreeView.luau +12 -13
  380. package/out/ui/packages/treeView/components/TreeView.styles.luau +6 -0
  381. package/out/ui/packages/typography/components/Typography.d.ts +2 -0
  382. package/out/ui/packages/typography/components/Typography.luau +8 -0
  383. package/out/ui/packages/typography/components/Typography.styles.luau +3 -1
  384. package/out/ui/packages/udimEditor/components/UDimEditor.luau +9 -1
  385. package/out/ui/packages/udimEditor/components/UDimEditor.styles.luau +25 -18
  386. package/out/ui/packages/vectorEditor/components/VectorEditor.luau +18 -3
  387. package/out/ui/packages/vectorEditor/components/VectorEditor.styles.luau +30 -16
  388. package/out/ui/packages/virtualList/components/VirtualList.styles.luau +1 -0
  389. package/out/ui/packages/weekGrid/components/WeekGrid.d.ts +24 -0
  390. package/out/ui/packages/weekGrid/components/WeekGrid.luau +187 -0
  391. package/out/ui/packages/weekGrid/components/weekColumns.d.ts +9 -0
  392. package/out/ui/packages/weekGrid/components/weekColumns.luau +25 -0
  393. package/out/ui/packages/weekGrid/index.d.ts +3 -0
  394. package/out/ui/packages/weekGrid/init.luau +8 -0
  395. package/package.json +2 -2
@@ -1,16 +1,32 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
- local BoatTween = TS.import(script, TS.getModule(script, "@rbxts", "boat-tween").src).BoatTween
4
3
  local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
5
4
  local React = _react
6
5
  local useEffect = _react.useEffect
7
6
  local useRef = _react.useRef
8
- local DEFAULT_THEME = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").DEFAULT_THEME
9
- local Directions = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Directions
7
+ local TextService = TS.import(script, TS.getModule(script, "@rbxts", "services")).TextService
8
+ local useReducedMotion = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "hooks").useReducedMotion
9
+ local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
10
10
  local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
11
+ local Icon = TS.import(script, script.Parent.Parent.Parent, "icon").Icon
12
+ local IconButton = TS.import(script, script.Parent.Parent.Parent, "iconButton").IconButton
13
+ local motionDuration = TS.import(script, script.Parent.Parent.Parent, "motion", "duration").motionDuration
14
+ local playProperty = TS.import(script, script.Parent.Parent.Parent, "motion", "play").playProperty
11
15
  local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
12
16
  local useToastStyles = TS.import(script, script.Parent, "Toast.styles").default
13
- local TWEEN_DURATION = 0.5
17
+ local _toastPlace = TS.import(script, script.Parent, "toastPlace")
18
+ local toastGlyph = _toastPlace.toastGlyph
19
+ local toastHold = _toastPlace.toastHold
20
+ local toastWrap = _toastPlace.toastWrap
21
+ local function withoutPosition(style)
22
+ local body = {}
23
+ for key, value in pairs(style) do
24
+ if key ~= "Position" then
25
+ body[key] = value
26
+ end
27
+ end
28
+ return body
29
+ end
14
30
  local function Toast(props)
15
31
  local _binding = props
16
32
  local text = _binding.text
@@ -21,6 +37,7 @@ local function Toast(props)
21
37
  end
22
38
  local action = _binding.action
23
39
  local onAction = _binding.onAction
40
+ local toggledAt = _binding.toggledAt
24
41
  local className = _binding.className
25
42
  local sx = _binding.sx
26
43
  local id = _binding.id
@@ -29,48 +46,166 @@ local function Toast(props)
29
46
  local container = _binding_1.container
30
47
  local label = _binding_1.label
31
48
  local close = _binding_1.close
49
+ local closeGlyph = _binding_1.closeGlyph
50
+ local mark = _binding_1.mark
32
51
  local actionStyle = _binding_1.action
33
52
  local activePosition = _binding_1.activePosition
34
53
  local inActivePosition = _binding_1.inActivePosition
54
+ local _binding_2 = useTheme()
55
+ local theme = _binding_2.theme
56
+ local reduced = useReducedMotion()
35
57
  local frameRef = useRef()
36
- local tween = function(direction)
37
- local frame = frameRef.current
38
- if not frame then
58
+ local dismiss = useRef(onDismiss)
59
+ dismiss.current = onDismiss
60
+ local timer = useRef()
61
+ local exitTimer = useRef()
62
+ local stopMotion = useRef(function() end)
63
+ local leaving = useRef(false)
64
+ local font = theme.typography.fontFamilies.default or Enum.Font.SourceSans
65
+ local _condition = theme.typography.fontSizes.body
66
+ if _condition == nil then
67
+ _condition = 14
68
+ end
69
+ local textSize = _condition
70
+ local glyph = toastGlyph(props.variant)
71
+ local _exp = (if action ~= nil and #action > 0 then theme.spacing.calc(8) else 0)
72
+ local _condition_1 = theme.typography.fontSizes.caption
73
+ if _condition_1 == nil then
74
+ _condition_1 = 12
75
+ end
76
+ local actionSlot = _exp + _condition_1 + theme.padding.calc(1)
77
+ local _result = closeGlyph.Size
78
+ if _result ~= nil then
79
+ _result = _result.X.Offset
80
+ end
81
+ local _condition_2 = _result
82
+ if _condition_2 == nil then
83
+ _condition_2 = 16
84
+ end
85
+ local iconSize = _condition_2
86
+ local lead = if glyph ~= nil then iconSize + theme.padding.calc(1) else 0
87
+ local box = theme.spacing.calc(20) - theme.padding.calc(4) - actionSlot - lead
88
+ local bounds = TextService:GetTextSize(text, textSize, font, Vector2.new(10000, 100))
89
+ local wrap = toastWrap(bounds.X, box)
90
+ local pad = theme.padding.calc(2)
91
+ local _result_1
92
+ if wrap then
93
+ local _object = table.clone(container)
94
+ setmetatable(_object, nil)
95
+ _object.AutomaticSize = Enum.AutomaticSize.Y
96
+ _result_1 = _object
97
+ else
98
+ _result_1 = container
99
+ end
100
+ local boxStyle = _result_1
101
+ local _result_2
102
+ if wrap then
103
+ local _object = table.clone(label)
104
+ setmetatable(_object, nil)
105
+ _object.TextWrapped = true
106
+ _object.TextTruncate = Enum.TextTruncate.None
107
+ _object.AutomaticSize = Enum.AutomaticSize.Y
108
+ _object.Size = UDim2.new(1, -(theme.padding.calc(4) + actionSlot + lead), 0, 0)
109
+ _object.AnchorPoint = Vector2.new(0, 0)
110
+ _object.Position = UDim2.new(0, pad + lead, 0, pad)
111
+ _object.TextXAlignment = Enum.TextXAlignment.Left
112
+ _object.TextYAlignment = Enum.TextYAlignment.Top
113
+ _result_2 = _object
114
+ else
115
+ _result_2 = label
116
+ end
117
+ local labelStyle = _result_2
118
+ local active = activePosition.Position
119
+ local idle = inActivePosition.Position
120
+ local clock = useRef({
121
+ active = active,
122
+ idle = idle,
123
+ enter = theme.motion.slow,
124
+ exit = theme.motion.default,
125
+ reduced = reduced,
126
+ duration = duration,
127
+ })
128
+ clock.current = {
129
+ active = active,
130
+ idle = idle,
131
+ enter = theme.motion.slow,
132
+ exit = theme.motion.default,
133
+ reduced = reduced,
134
+ duration = duration,
135
+ }
136
+ local leave = function()
137
+ if leaving.current then
39
138
  return nil
40
139
  end
41
- local tween = BoatTween:Create(frame, {
42
- Time = TWEEN_DURATION,
43
- DelayTime = 0,
44
- EasingStyle = "Linear",
45
- EasingDirection = "InOut",
46
- RepeatCount = 0,
47
- Reverses = false,
48
- StepType = "Stepped",
49
- Goal = {
50
- Position = if direction == Directions.In then activePosition.Position else inActivePosition.Position,
51
- },
52
- })
53
- tween:Play()
54
- wait(TWEEN_DURATION)
140
+ leaving.current = true
141
+ if timer.current then
142
+ task.cancel(timer.current)
143
+ timer.current = nil
144
+ end
145
+ stopMotion.current()
146
+ local frame = frameRef.current
147
+ local now = clock.current
148
+ if frame and now.idle then
149
+ stopMotion.current = playProperty(frame, {
150
+ Position = now.idle,
151
+ GroupTransparency = 1,
152
+ }, now.exit, now.reduced)
153
+ end
154
+ exitTimer.current = task.delay(motionDuration(now.exit, now.reduced), function()
155
+ exitTimer.current = nil
156
+ dismiss.current()
157
+ end)
55
158
  end
56
159
  useEffect(function()
57
- tween(Directions.In)
58
- wait(duration)
59
- tween(Directions.Out)
60
- if onDismiss then
61
- onDismiss()
160
+ local frame = frameRef.current
161
+ if not frame then
162
+ return nil
163
+ end
164
+ leaving.current = false
165
+ local now = clock.current
166
+ if now.idle then
167
+ frame.Position = now.idle
168
+ end
169
+ frame.GroupTransparency = 1
170
+ stopMotion.current()
171
+ if now.active then
172
+ stopMotion.current = playProperty(frame, {
173
+ Position = now.active,
174
+ GroupTransparency = 0,
175
+ }, now.enter, now.reduced)
176
+ end
177
+ local hold = task.delay(toastHold(now.enter, now.duration, now.reduced), function()
178
+ timer.current = nil
179
+ leave()
180
+ end)
181
+ timer.current = hold
182
+ return function()
183
+ if timer.current == hold then
184
+ task.cancel(hold)
185
+ end
186
+ if exitTimer.current then
187
+ task.cancel(exitTimer.current)
188
+ end
189
+ exitTimer.current = nil
190
+ stopMotion.current()
62
191
  end
63
- end, {})
192
+ end, { duration, text, toggledAt, reduced })
64
193
  local _attributes = {
65
- tag = "frame",
194
+ tag = "canvasgroup",
66
195
  }
67
- local _condition = id
68
- if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
69
- _condition = "Toast"
196
+ local _condition_3 = id
197
+ if not (_condition_3 ~= 0 and _condition_3 == _condition_3 and _condition_3 ~= "" and _condition_3) then
198
+ _condition_3 = "Toast"
70
199
  end
71
- _attributes.key = _condition
200
+ _attributes.key = _condition_3
72
201
  _attributes.hostRef = function(instance)
73
202
  frameRef.current = instance
203
+ if instance and clock.current.idle then
204
+ instance.Position = clock.current.idle
205
+ end
206
+ if instance then
207
+ instance.GroupTransparency = 1
208
+ end
74
209
  if ref == nil then
75
210
  return nil
76
211
  end
@@ -80,24 +215,33 @@ local function Toast(props)
80
215
  end
81
216
  ref.current = instance
82
217
  end
83
- _attributes.base = container
218
+ _attributes.base = withoutPosition(boxStyle)
84
219
  _attributes.className = className
85
220
  _attributes.sx = sx
86
- local _exp = React.createElement("uicorner", {
221
+ local _exp_1 = React.createElement("uicorner", {
87
222
  key = "Corner",
88
- CornerRadius = UDim.new(0, DEFAULT_THEME.shape.borderRadius),
223
+ CornerRadius = UDim.new(0, theme.shape.borderRadius),
89
224
  })
90
- local _exp_1 = React.createElement(Shadow)
225
+ local _exp_2 = React.createElement(Shadow)
226
+ local _exp_3 = wrap and React.createElement("uipadding", {
227
+ PaddingBottom = UDim.new(0, pad),
228
+ })
229
+ local _exp_4 = glyph ~= nil and (React.createElement(Icon, {
230
+ glyph = glyph,
231
+ size = iconSize,
232
+ tint = closeGlyph.ImageColor3,
233
+ className = mark,
234
+ }))
91
235
  local _attributes_1 = {
92
236
  key = "Label",
93
237
  }
94
- for _k, _v in label do
238
+ for _k, _v in labelStyle do
95
239
  _attributes_1[_k] = _v
96
240
  end
97
241
  _attributes_1.Text = text
98
- local _exp_2 = React.createElement("textlabel", _attributes_1)
99
- local _condition_1 = action ~= nil and #action > 0
100
- if _condition_1 then
242
+ local _exp_5 = React.createElement("textlabel", _attributes_1)
243
+ local _condition_4 = action ~= nil and #action > 0
244
+ if _condition_4 then
101
245
  local _attributes_2 = {
102
246
  key = "Action",
103
247
  }
@@ -110,29 +254,28 @@ local function Toast(props)
110
254
  if onAction then
111
255
  onAction()
112
256
  end
113
- tween(Directions.Out)
114
- if onDismiss then
115
- onDismiss()
116
- end
257
+ leave()
117
258
  end,
118
259
  }
119
- _condition_1 = (React.createElement("textbutton", _attributes_2))
260
+ _condition_4 = (React.createElement("textbutton", _attributes_2))
120
261
  end
121
262
  local _attributes_2 = {
122
- key = "Close",
263
+ id = "Close",
264
+ glyph = "close",
123
265
  }
124
- for _k, _v in close do
125
- _attributes_2[_k] = _v
266
+ local _result_3 = closeGlyph.Size
267
+ if _result_3 ~= nil then
268
+ _result_3 = _result_3.X.Offset
126
269
  end
127
- _attributes_2.Event = {
128
- MouseButton1Click = function()
129
- tween(Directions.Out)
130
- if onDismiss then
131
- onDismiss()
132
- end
133
- end,
134
- }
135
- return React.createElement(SxHost, _attributes, _exp, _exp_1, _exp_2, _condition_1, React.createElement("imagebutton", _attributes_2))
270
+ local _condition_5 = _result_3
271
+ if _condition_5 == nil then
272
+ _condition_5 = 16
273
+ end
274
+ _attributes_2.iconSize = _condition_5
275
+ _attributes_2.tint = closeGlyph.ImageColor3
276
+ _attributes_2.className = close
277
+ _attributes_2.onClick = leave
278
+ return React.createElement(SxHost, _attributes, _exp_1, _exp_2, _exp_3, _exp_4, _exp_5, _condition_4, React.createElement(IconButton, _attributes_2))
136
279
  end
137
280
  local default = Toast
138
281
  return {
@@ -3,15 +3,18 @@ local TS = _G[script]
3
3
  local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
4
4
  local createStyles = _theme.createStyles
5
5
  local componentStyles = _theme.componentStyles
6
- local DEFAULT_THEME = _theme.DEFAULT_THEME
7
- local Icons = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Icons
6
+ local controlMetrics = _theme.controlMetrics
8
7
  local ToastVariants = TS.import(script, script.Parent.Parent, "enums", "ToastVariants").default
8
+ local _toastPlace = TS.import(script, script.Parent, "toastPlace")
9
+ local toastGlyph = _toastPlace.toastGlyph
10
+ local toastPlace = _toastPlace.toastPlace
9
11
  local useToastStyles = componentStyles("Toast", function(theme, _param)
10
12
  local variant = _param.variant
11
13
  if variant == nil then
12
14
  variant = ToastVariants.default
13
15
  end
14
16
  local action = _param.action
17
+ local edge = _param.edge
15
18
  local getToastColors = function()
16
19
  repeat
17
20
  if variant == (ToastVariants.success) then
@@ -32,6 +35,12 @@ local useToastStyles = componentStyles("Toast", function(theme, _param)
32
35
  content = theme.palette.status.warning.on,
33
36
  }
34
37
  end
38
+ if variant == (ToastVariants.info) then
39
+ return {
40
+ background = theme.palette.status.info.main,
41
+ content = theme.palette.status.info.on,
42
+ }
43
+ end
35
44
  return {
36
45
  background = theme.palette.surface.overlay,
37
46
  content = theme.palette.text.primary,
@@ -40,36 +49,43 @@ local useToastStyles = componentStyles("Toast", function(theme, _param)
40
49
  end
41
50
  local toastColors = getToastColors()
42
51
  local hasAction = action ~= nil and #action > 0
43
- local actionSlot = if hasAction then theme.spacing.calc(8) else 0
44
- local ACTIVE_POSITION = UDim2.new(0.5, 0, 1, -DEFAULT_THEME.padding.calc(2))
45
- local INACTIVE_POSITION = UDim2.new(0.5, 0, 1, DEFAULT_THEME.spacing.calc(20) + DEFAULT_THEME.padding.calc(2))
52
+ local glyph = controlMetrics(theme.density).icon
53
+ local hit = glyph + theme.padding.calc(2)
54
+ local marked = toastGlyph(variant) ~= nil
55
+ local lead = if marked then glyph + theme.padding.calc(1) else 0
56
+ local pinLeft = hasAction or marked
57
+ local actionSlot = (if hasAction then theme.spacing.calc(8) else 0) + hit
58
+ local place = toastPlace(edge, theme.padding.calc(2), theme.spacing.calc(20) + theme.padding.calc(2))
59
+ local ACTIVE_POSITION = UDim2.new(0.5, 0, place.activeY, place.activeOffset)
60
+ local INACTIVE_POSITION = UDim2.new(0.5, 0, place.idleY, place.idleOffset)
46
61
  return createStyles({
47
62
  container = {
48
63
  Size = UDim2.new(0, theme.spacing.calc(20), 0, theme.spacing.calc(4)),
49
64
  Position = ACTIVE_POSITION,
50
65
  BackgroundColor3 = toastColors.background,
51
- AnchorPoint = Vector2.new(0.5, 1),
66
+ AnchorPoint = Vector2.new(0.5, place.anchorY),
52
67
  BorderSizePixel = 0,
53
68
  ZIndex = 50000,
54
69
  },
55
70
  label = {
56
- Size = UDim2.new(1, -(theme.padding.calc(4) + actionSlot), 1, -theme.padding.calc(4)),
57
- Position = if hasAction then UDim2.new(0, theme.padding.calc(2), 0.5, 0) else UDim2.new(0.5, 0, 0.5, 0),
58
- AnchorPoint = if hasAction then Vector2.new(0, 0.5) else Vector2.new(0.5, 0.5),
71
+ Size = UDim2.new(1, -(theme.padding.calc(4) + actionSlot + lead), 1, -theme.padding.calc(4)),
72
+ Position = if pinLeft then UDim2.new(0, theme.padding.calc(2) + lead, 0.5, 0) else UDim2.new(0.5, 0, 0.5, 0),
73
+ AnchorPoint = if pinLeft then Vector2.new(0, 0.5) else Vector2.new(0.5, 0.5),
59
74
  BackgroundTransparency = 1,
60
75
  BorderSizePixel = 0,
61
76
  TextSize = theme.typography.fontSizes.body,
62
77
  TextColor3 = toastColors.content,
63
78
  Font = theme.typography.fontFamilies.default,
64
- TextXAlignment = if hasAction then Enum.TextXAlignment.Left else Enum.TextXAlignment.Center,
65
- TextTruncate = Enum.TextTruncate.AtEnd,
79
+ TextXAlignment = if pinLeft then Enum.TextXAlignment.Left else Enum.TextXAlignment.Center,
80
+ TextWrapped = true,
81
+ TextTruncate = Enum.TextTruncate.None,
66
82
  TextScaled = false,
67
83
  ZIndex = 50001,
68
84
  },
69
85
  action = {
70
86
  AutomaticSize = Enum.AutomaticSize.X,
71
87
  Size = UDim2.new(0, 0, 0, theme.spacing.calc(3)),
72
- Position = UDim2.new(1, -(theme.padding.calc(2) + theme.options.constants.iconSizes.small + theme.padding.calc(1)), 0.5, 0),
88
+ Position = UDim2.new(1, -(theme.padding.calc(1) + hit), 0.5, 0),
73
89
  AnchorPoint = Vector2.new(1, 0.5),
74
90
  BackgroundTransparency = 1,
75
91
  BorderSizePixel = 0,
@@ -80,17 +96,21 @@ local useToastStyles = componentStyles("Toast", function(theme, _param)
80
96
  ZIndex = 50001,
81
97
  },
82
98
  close = {
83
- Size = UDim2.new(0, theme.options.constants.iconSizes.small, 0, theme.options.constants.iconSizes.small),
84
- Position = UDim2.new(1, -theme.padding.calc(2), 0, theme.padding.calc(2)),
85
- AnchorPoint = Vector2.new(1, 0),
86
- ImageColor3 = toastColors.content,
87
- Image = Icons.Close,
99
+ Size = UDim2.fromOffset(hit, hit),
100
+ Position = UDim2.new(1, -theme.padding.calc(1), 0.5, 0),
101
+ AnchorPoint = Vector2.new(1, 0.5),
102
+ ZIndex = 50001,
103
+ },
104
+ mark = {
105
+ Position = UDim2.new(0, theme.padding.calc(2), 0.5, 0),
106
+ AnchorPoint = Vector2.new(0, 0.5),
88
107
  BackgroundTransparency = 1,
89
- AutoButtonColor = false,
90
- BorderSizePixel = 0,
91
- Active = true,
92
108
  ZIndex = 50001,
93
109
  },
110
+ closeGlyph = {
111
+ Size = UDim2.fromOffset(glyph, glyph),
112
+ ImageColor3 = toastColors.content,
113
+ },
94
114
  activePosition = {
95
115
  Position = ACTIVE_POSITION,
96
116
  },
@@ -0,0 +1,16 @@
1
+ export type ToastEdge = "top" | "bottom";
2
+ export interface ToastPlace {
3
+ anchorY: number;
4
+ activeY: number;
5
+ activeOffset: number;
6
+ idleY: number;
7
+ idleOffset: number;
8
+ }
9
+ /** Bottom stays the default. Top sits on the upper edge and hides above the frame. */
10
+ export declare function toastPlace(edge: ToastEdge | undefined, inset: number, hidden: number): ToastPlace;
11
+ /** A line wider than the toast wraps. A short line stays one row. */
12
+ export declare function toastWrap(textWidth: number, box: number): boolean;
13
+ export type ToastGlyph = "success" | "error" | "warning" | "info";
14
+ export declare function toastGlyph(variant?: string): ToastGlyph | undefined;
15
+ /** Enter slide, then the visible duration. Reduced motion skips the slide. */
16
+ export declare function toastHold(enter: number, visible: number, reduced?: boolean): number;
@@ -0,0 +1,44 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ --* Bottom stays the default. Top sits on the upper edge and hides above the frame.
3
+ local function toastPlace(edge, inset, hidden)
4
+ if edge == "top" then
5
+ return {
6
+ anchorY = 0,
7
+ activeY = 0,
8
+ activeOffset = inset,
9
+ idleY = 0,
10
+ idleOffset = -hidden,
11
+ }
12
+ end
13
+ return {
14
+ anchorY = 1,
15
+ activeY = 1,
16
+ activeOffset = -inset,
17
+ idleY = 1,
18
+ idleOffset = hidden,
19
+ }
20
+ end
21
+ --* A line wider than the toast wraps. A short line stays one row.
22
+ local function toastWrap(textWidth, box)
23
+ if box <= 0 then
24
+ return false
25
+ end
26
+ return textWidth > box
27
+ end
28
+ local function toastGlyph(variant)
29
+ if variant == "success" or variant == "error" or variant == "warning" or variant == "info" then
30
+ return variant
31
+ end
32
+ return nil
33
+ end
34
+ --* Enter slide, then the visible duration. Reduced motion skips the slide.
35
+ local function toastHold(enter, visible, reduced)
36
+ local slide = if reduced == true then 0 else enter
37
+ return slide + visible
38
+ end
39
+ return {
40
+ toastPlace = toastPlace,
41
+ toastWrap = toastWrap,
42
+ toastGlyph = toastGlyph,
43
+ toastHold = toastHold,
44
+ }
@@ -2,6 +2,7 @@ declare enum ToastVariants {
2
2
  default = "default",
3
3
  success = "success",
4
4
  error = "error",
5
- warning = "warning"
5
+ warning = "warning",
6
+ info = "info"
6
7
  }
7
8
  export default ToastVariants;
@@ -4,6 +4,7 @@ local ToastVariants = {
4
4
  success = "success",
5
5
  error = "error",
6
6
  warning = "warning",
7
+ info = "info",
7
8
  }
8
9
  local default = ToastVariants
9
10
  return {
@@ -1,6 +1,12 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
- local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
3
+ local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
+ local React = _react
5
+ local useState = _react.useState
6
+ local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
7
+ local controlFade = _theme.controlFade
8
+ local focusRing = _theme.focusRing
9
+ local useTheme = _theme.useTheme
4
10
  local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
5
11
  local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
6
12
  local useToggleButtonStyles = TS.import(script, script.Parent, "ToggleButton.styles").default
@@ -23,7 +29,12 @@ local function ToggleButton(props)
23
29
  disabled = disabled,
24
30
  size = size,
25
31
  })
32
+ local _binding_1 = useTheme()
33
+ local theme = _binding_1.theme
26
34
  local active = canActivate(disabled)
35
+ local hovering, setHovering = useState(false)
36
+ local focused, setFocused = useState(false)
37
+ local face = if selected == true then theme.palette.action.selected elseif hovering and active then theme.palette.action.hover else theme.palette.surface.input
27
38
  local _attributes = {
28
39
  tag = "textbutton",
29
40
  }
@@ -39,10 +50,14 @@ local function ToggleButton(props)
39
50
  _attributes.state = {
40
51
  disabled = disabled,
41
52
  selected = selected,
53
+ hover = hovering,
54
+ focused = focused,
42
55
  }
43
56
  _attributes.Text = label
44
57
  _attributes.Active = active
45
58
  _attributes.Selectable = active
59
+ _attributes.BackgroundColor3 = face
60
+ _attributes.BackgroundTransparency = if disabled == true then controlFade else 0
46
61
  _attributes.Event = {
47
62
  Activated = function()
48
63
  if active then
@@ -52,6 +67,22 @@ local function ToggleButton(props)
52
67
  end
53
68
  end
54
69
  end,
70
+ MouseEnter = function()
71
+ if active then
72
+ setHovering(true)
73
+ end
74
+ end,
75
+ MouseLeave = function()
76
+ return setHovering(false)
77
+ end,
78
+ SelectionGained = function()
79
+ if active then
80
+ setFocused(true)
81
+ end
82
+ end,
83
+ SelectionLost = function()
84
+ return setFocused(false)
85
+ end,
55
86
  }
56
87
  local _attributes_1 = table.clone(styles.padding)
57
88
  setmetatable(_attributes_1, nil)
@@ -59,9 +90,17 @@ local function ToggleButton(props)
59
90
  local _attributes_2 = table.clone(styles.corner)
60
91
  setmetatable(_attributes_2, nil)
61
92
  local _exp_1 = React.createElement("uicorner", _attributes_2)
62
- local _attributes_3 = table.clone(styles.stroke)
63
- setmetatable(_attributes_3, nil)
64
- return React.createElement(SxHost, _attributes, _exp, _exp_1, React.createElement("uistroke", _attributes_3))
93
+ local _result
94
+ if focused and active then
95
+ local _attributes_3 = table.clone(focusRing(theme.palette.focus))
96
+ setmetatable(_attributes_3, nil)
97
+ _result = React.createElement("uistroke", _attributes_3)
98
+ else
99
+ local _attributes_3 = table.clone(styles.stroke)
100
+ setmetatable(_attributes_3, nil)
101
+ _result = React.createElement("uistroke", _attributes_3)
102
+ end
103
+ return React.createElement(SxHost, _attributes, _exp, _exp_1, _result)
65
104
  end
66
105
  local function ToggleButtonGroup(props)
67
106
  local _binding = props
@@ -32,7 +32,7 @@ local useToggleButtonStyles = componentStyles("ToggleButton", function(theme, _p
32
32
  AutoButtonColor = false,
33
33
  Active = not disabled,
34
34
  Selectable = not disabled,
35
- TextColor3 = if disabled then theme.palette.text.disabled elseif selected then theme.palette.primary.main else theme.palette.text.primary,
35
+ TextColor3 = if selected then theme.palette.primary.main else theme.palette.text.primary,
36
36
  Font = theme.typography.fontFamilies.default,
37
37
  TextSize = textSize,
38
38
  },
@@ -1,6 +1,7 @@
1
1
  import { CustomizedProps } from "../../../../theme/index";
2
2
  export interface TooltipProps {
3
3
  text: string;
4
+ title?: string;
4
5
  delay?: number;
5
6
  }
6
7
  declare function Tooltip(props: CustomizedProps<Frame, TooltipProps>): JSX.Element;