@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,15 +1,20 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
3
  local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
- local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
4
+ local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
5
+ local controlMetrics = _theme.controlMetrics
6
+ local useTheme = _theme.useTheme
7
+ local fieldChrome = TS.import(script, script.Parent.Parent.Parent, "input", "components", "fieldChrome").fieldChrome
5
8
  local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
6
9
  local _dateRangeValue = TS.import(script, script.Parent.Parent, "dateRangeValue")
7
10
  local dateStamp = _dateRangeValue.dateStamp
8
11
  local daysInMonth = _dateRangeValue.daysInMonth
9
12
  local formatStamp = _dateRangeValue.formatStamp
10
13
  local orderSpan = _dateRangeValue.orderSpan
14
+ local shiftDay = _dateRangeValue.shiftDay
11
15
  local shiftMonth = _dateRangeValue.shiftMonth
12
16
  local weekday = _dateRangeValue.weekday
17
+ local weekStamps = _dateRangeValue.weekStamps
13
18
  local MONTHS = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }
14
19
  local WEEKDAYS = { "S", "M", "T", "W", "T", "F", "S" }
15
20
  local function covers(stamp, value)
@@ -30,12 +35,25 @@ local function DateRangePicker(props)
30
35
  local value = _binding.value
31
36
  local onChange = _binding.onChange
32
37
  local onMonthChange = _binding.onMonthChange
38
+ local view = _binding.view
39
+ local anchor = _binding.anchor
40
+ local onAnchorChange = _binding.onAnchorChange
33
41
  local className = _binding.className
34
42
  local sx = _binding.sx
35
43
  local id = _binding.id
36
44
  local ref = _binding.ref
45
+ local weekMode = view == "week"
46
+ local _condition = anchor
47
+ if _condition == nil then
48
+ _condition = dateStamp(year, month, 1)
49
+ end
50
+ local anchorStamp = _condition
51
+ local week = if weekMode then weekStamps(anchorStamp) else {}
37
52
  local _binding_1 = useTheme()
38
53
  local theme = _binding_1.theme
54
+ local chrome = fieldChrome(controlMetrics(theme.density).height, theme.padding.calc(1))
55
+ local pad = chrome.padX
56
+ local row = chrome.height
39
57
  local lead = weekday(year, month, 1)
40
58
  local count = daysInMonth(year, month)
41
59
  local cells = {}
@@ -87,17 +105,37 @@ local function DateRangePicker(props)
87
105
  end
88
106
  end
89
107
  local move = function(delta)
108
+ if weekMode then
109
+ local moved = shiftDay(anchorStamp, delta * 7)
110
+ local _result = onAnchorChange
111
+ if _result ~= nil then
112
+ _result(moved)
113
+ end
114
+ onMonthChange(math.floor(moved / 10000), math.floor(moved / 100) % 100)
115
+ return nil
116
+ end
90
117
  local shifted = shiftMonth(year, month, delta)
91
118
  onMonthChange(shifted.year, shifted.month)
92
119
  end
120
+ local _result
121
+ if weekMode and #week == 7 then
122
+ _result = `{formatStamp(week[1])} – {formatStamp(week[7])}`
123
+ else
124
+ local _condition_1 = MONTHS[month]
125
+ if _condition_1 == nil then
126
+ _condition_1 = ""
127
+ end
128
+ _result = `{_condition_1} {year}`
129
+ end
130
+ local title = _result
93
131
  local _attributes = {
94
132
  tag = "frame",
95
133
  }
96
- local _condition = id
97
- if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
98
- _condition = "DateRangePicker"
134
+ local _condition_1 = id
135
+ if not (_condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1 ~= "" and _condition_1) then
136
+ _condition_1 = "DateRangePicker"
99
137
  end
100
- _attributes.key = _condition
138
+ _attributes.key = _condition_1
101
139
  _attributes.hostRef = ref
102
140
  _attributes.base = {
103
141
  Size = UDim2.new(1, 0, 0, 0),
@@ -108,19 +146,24 @@ local function DateRangePicker(props)
108
146
  _attributes.className = className
109
147
  _attributes.sx = sx
110
148
  local _exp = React.createElement("uipadding", {
111
- PaddingTop = UDim.new(0, 8),
112
- PaddingBottom = UDim.new(0, 8),
113
- PaddingLeft = UDim.new(0, 8),
114
- PaddingRight = UDim.new(0, 8),
149
+ PaddingTop = UDim.new(0, pad),
150
+ PaddingBottom = UDim.new(0, pad),
151
+ PaddingLeft = UDim.new(0, pad),
152
+ PaddingRight = UDim.new(0, pad),
115
153
  })
116
154
  local _exp_1 = React.createElement("uilistlayout", {
117
155
  FillDirection = Enum.FillDirection.Vertical,
118
- Padding = UDim.new(0, 8),
156
+ Padding = UDim.new(0, pad),
119
157
  SortOrder = Enum.SortOrder.LayoutOrder,
120
158
  })
121
- local _exp_2 = React.createElement("textbutton", {
122
- Text = "Prev",
123
- Size = UDim2.fromOffset(56, 28),
159
+ local _exp_2 = React.createElement("frame", {
160
+ Size = UDim2.new(1, 0, 0, row),
161
+ BackgroundTransparency = 1,
162
+ BorderSizePixel = 0,
163
+ LayoutOrder = 0,
164
+ }, React.createElement("textbutton", {
165
+ Text = if weekMode then "Earlier" else "Prev",
166
+ Size = UDim2.fromOffset(if weekMode then 72 else 56, row),
124
167
  BackgroundTransparency = 1,
125
168
  BorderSizePixel = 0,
126
169
  TextColor3 = theme.palette.text.secondary,
@@ -131,31 +174,23 @@ local function DateRangePicker(props)
131
174
  return move(-1)
132
175
  end,
133
176
  },
134
- })
135
- local _attributes_1 = {}
136
- local _condition_1 = MONTHS[month]
137
- if _condition_1 == nil then
138
- _condition_1 = ""
139
- end
140
- _attributes_1.Text = `{_condition_1} {year}`
141
- _attributes_1.AnchorPoint = Vector2.new(0.5, 0)
142
- _attributes_1.Position = UDim2.fromScale(0.5, 0)
143
- _attributes_1.Size = UDim2.fromOffset(140, 28)
144
- _attributes_1.BackgroundTransparency = 1
145
- _attributes_1.BorderSizePixel = 0
146
- _attributes_1.TextColor3 = theme.palette.text.primary
147
- _attributes_1.Font = theme.typography.fontFamilies.semibold
148
- _attributes_1.TextSize = theme.typography.fontSizes.body
149
- local _exp_3 = React.createElement("frame", {
150
- Size = UDim2.new(1, 0, 0, 28),
177
+ }), React.createElement("textlabel", {
178
+ Text = title,
179
+ AnchorPoint = Vector2.new(0.5, 0),
180
+ Position = UDim2.fromScale(0.5, 0),
181
+ Size = UDim2.new(1, -(if weekMode then 72 else 56) * 2, 1, 0),
151
182
  BackgroundTransparency = 1,
152
183
  BorderSizePixel = 0,
153
- LayoutOrder = 0,
154
- }, _exp_2, React.createElement("textlabel", _attributes_1), React.createElement("textbutton", {
155
- Text = "Next",
184
+ TextTruncate = Enum.TextTruncate.AtEnd,
185
+ TextWrapped = false,
186
+ TextColor3 = theme.palette.text.primary,
187
+ Font = theme.typography.fontFamilies.semibold,
188
+ TextSize = theme.typography.fontSizes.body,
189
+ }), React.createElement("textbutton", {
190
+ Text = if weekMode then "Later" else "Next",
156
191
  AnchorPoint = Vector2.new(1, 0),
157
192
  Position = UDim2.fromScale(1, 0),
158
- Size = UDim2.fromOffset(56, 28),
193
+ Size = UDim2.fromOffset(if weekMode then 72 else 56, row),
159
194
  BackgroundTransparency = 1,
160
195
  BorderSizePixel = 0,
161
196
  TextColor3 = theme.palette.text.secondary,
@@ -167,85 +202,141 @@ local function DateRangePicker(props)
167
202
  end,
168
203
  },
169
204
  }))
170
- local _exp_4 = React.createElement("textlabel", {
205
+ local _exp_3 = React.createElement("textlabel", {
171
206
  Text = if value.start == nil then "Choose a start and finish" elseif value.finish == nil then formatStamp(value.start) else `{formatStamp(value.start)} – {formatStamp(value.finish)}`,
172
- Size = UDim2.new(1, 0, 0, 16),
207
+ Size = UDim2.new(1, 0, 0, row),
173
208
  BackgroundTransparency = 1,
174
209
  BorderSizePixel = 0,
210
+ TextTruncate = Enum.TextTruncate.AtEnd,
211
+ TextWrapped = false,
175
212
  TextXAlignment = Enum.TextXAlignment.Left,
176
213
  TextColor3 = theme.palette.text.secondary,
177
214
  Font = theme.typography.fontFamilies.default,
178
215
  TextSize = theme.typography.fontSizes.caption,
179
216
  LayoutOrder = 1,
180
217
  })
181
- local _exp_5 = React.createElement("uigridlayout", {
182
- CellSize = UDim2.fromOffset(36, 28),
183
- CellPadding = UDim2.fromOffset(4, 4),
184
- FillDirectionMaxCells = 7,
185
- SortOrder = Enum.SortOrder.LayoutOrder,
186
- })
187
- -- ▼ ReadonlyArray.map ▼
188
- local _newValue = table.create(#WEEKDAYS)
189
- local _callback = function(label, index)
190
- return React.createElement("textlabel", {
191
- key = `week-{index}`,
192
- Text = label,
193
- LayoutOrder = index,
218
+ local _result_1
219
+ if weekMode then
220
+ local _exp_4 = React.createElement("uilistlayout", {
221
+ FillDirection = Enum.FillDirection.Horizontal,
222
+ HorizontalAlignment = Enum.HorizontalAlignment.Center,
223
+ Padding = UDim.new(0, pad),
224
+ SortOrder = Enum.SortOrder.LayoutOrder,
225
+ })
226
+ -- ▼ ReadonlyArray.map ▼
227
+ local _newValue = table.create(#week)
228
+ local _callback = function(stamp, index)
229
+ local chosen = covers(stamp, value)
230
+ local endpoint = stamp == value.start or stamp == value.finish
231
+ local _attributes_1 = {
232
+ key = `week-{stamp}`,
233
+ }
234
+ local _condition_2 = WEEKDAYS[index + 1]
235
+ if _condition_2 == nil then
236
+ _condition_2 = ""
237
+ end
238
+ _attributes_1.Text = `{_condition_2}\n{stamp % 100}`
239
+ _attributes_1.LayoutOrder = index
240
+ _attributes_1.Size = UDim2.new(1 / 7, -math.ceil((pad * 6) / 7), 1, 0)
241
+ _attributes_1.BackgroundColor3 = if chosen then theme.palette.primary.main else theme.palette.surface.input
242
+ _attributes_1.BackgroundTransparency = if chosen and not endpoint then 0.55 else 0
243
+ _attributes_1.BorderSizePixel = 0
244
+ _attributes_1.TextColor3 = if endpoint then theme.palette.primary.on else theme.palette.text.primary
245
+ _attributes_1.Font = theme.typography.fontFamilies.default
246
+ _attributes_1.TextSize = theme.typography.fontSizes.caption
247
+ _attributes_1.TextWrapped = true
248
+ _attributes_1.AutoButtonColor = false
249
+ _attributes_1.Event = {
250
+ Activated = function()
251
+ return pick(stamp)
252
+ end,
253
+ }
254
+ return React.createElement("textbutton", _attributes_1, React.createElement("uicorner", {
255
+ CornerRadius = UDim.new(0, theme.shape.borderRadius),
256
+ }))
257
+ end
258
+ for _k, _v in week do
259
+ _newValue[_k] = _callback(_v, _k - 1, week)
260
+ end
261
+ -- ▲ ReadonlyArray.map ▲
262
+ _result_1 = (React.createElement("frame", {
263
+ Size = UDim2.new(1, 0, 0, row * 2),
194
264
  BackgroundTransparency = 1,
195
265
  BorderSizePixel = 0,
196
- TextColor3 = theme.palette.text.secondary,
197
- Font = theme.typography.fontFamilies.default,
198
- TextSize = theme.typography.fontSizes.caption,
266
+ LayoutOrder = 2,
267
+ }, _exp_4, _newValue))
268
+ else
269
+ local _exp_4 = React.createElement("uigridlayout", {
270
+ CellSize = UDim2.new(1 / 7, -math.ceil((pad * 6) / 7), 0, row),
271
+ CellPadding = UDim2.fromOffset(pad, pad),
272
+ FillDirectionMaxCells = 7,
273
+ HorizontalAlignment = Enum.HorizontalAlignment.Center,
274
+ SortOrder = Enum.SortOrder.LayoutOrder,
199
275
  })
200
- end
201
- for _k, _v in WEEKDAYS do
202
- _newValue[_k] = _callback(_v, _k - 1, WEEKDAYS)
203
- end
204
- -- ▲ ReadonlyArray.map ▲
205
- -- ▼ ReadonlyArray.map ▼
206
- local _newValue_1 = table.create(#cells)
207
- local _callback_1 = function(cell)
208
- local stamp = cell.stamp
209
- local chosen = stamp ~= nil and covers(stamp, value)
210
- local endpoint = stamp ~= nil and (stamp == value.start or stamp == value.finish)
211
- if stamp == nil or cell.day == nil then
212
- return React.createElement("frame", {
213
- key = `blank-{cell.order}`,
214
- LayoutOrder = 10 + cell.order,
276
+ -- ▼ ReadonlyArray.map ▼
277
+ local _newValue = table.create(#WEEKDAYS)
278
+ local _callback = function(label, index)
279
+ return React.createElement("textlabel", {
280
+ key = `week-{index}`,
281
+ Text = label,
282
+ LayoutOrder = index,
215
283
  BackgroundTransparency = 1,
216
284
  BorderSizePixel = 0,
285
+ TextColor3 = theme.palette.text.secondary,
286
+ Font = theme.typography.fontFamilies.default,
287
+ TextSize = theme.typography.fontSizes.caption,
217
288
  })
218
289
  end
219
- return React.createElement("textbutton", {
220
- key = `day-{stamp}`,
221
- Text = tostring(cell.day),
222
- LayoutOrder = 10 + cell.order,
223
- BackgroundColor3 = if chosen then theme.palette.primary.main else theme.palette.surface.input,
224
- BackgroundTransparency = if chosen and not endpoint then 0.55 else 0,
290
+ for _k, _v in WEEKDAYS do
291
+ _newValue[_k] = _callback(_v, _k - 1, WEEKDAYS)
292
+ end
293
+ -- ▲ ReadonlyArray.map ▲
294
+ -- ▼ ReadonlyArray.map ▼
295
+ local _newValue_1 = table.create(#cells)
296
+ local _callback_1 = function(cell)
297
+ local stamp = cell.stamp
298
+ local chosen = stamp ~= nil and covers(stamp, value)
299
+ local endpoint = stamp ~= nil and (stamp == value.start or stamp == value.finish)
300
+ if stamp == nil or cell.day == nil then
301
+ return React.createElement("frame", {
302
+ key = `blank-{cell.order}`,
303
+ LayoutOrder = 10 + cell.order,
304
+ BackgroundTransparency = 1,
305
+ BorderSizePixel = 0,
306
+ })
307
+ end
308
+ return React.createElement("textbutton", {
309
+ key = `day-{stamp}`,
310
+ Text = tostring(cell.day),
311
+ LayoutOrder = 10 + cell.order,
312
+ BackgroundColor3 = if chosen then theme.palette.primary.main else theme.palette.surface.input,
313
+ BackgroundTransparency = if chosen and not endpoint then 0.55 else 0,
314
+ BorderSizePixel = 0,
315
+ TextColor3 = if endpoint then theme.palette.primary.on else theme.palette.text.primary,
316
+ Font = theme.typography.fontFamilies.default,
317
+ TextSize = theme.typography.fontSizes.body,
318
+ AutoButtonColor = false,
319
+ Event = {
320
+ Activated = function()
321
+ return pick(stamp)
322
+ end,
323
+ },
324
+ }, React.createElement("uicorner", {
325
+ CornerRadius = UDim.new(0, theme.shape.borderRadius),
326
+ }))
327
+ end
328
+ for _k, _v in cells do
329
+ _newValue_1[_k] = _callback_1(_v, _k - 1, cells)
330
+ end
331
+ -- ▲ ReadonlyArray.map ▲
332
+ _result_1 = (React.createElement("frame", {
333
+ Size = UDim2.new(1, 0, 0, row * 7 + pad * 6),
334
+ BackgroundTransparency = 1,
225
335
  BorderSizePixel = 0,
226
- TextColor3 = if endpoint then theme.palette.primary.on else theme.palette.text.primary,
227
- Font = theme.typography.fontFamilies.default,
228
- TextSize = theme.typography.fontSizes.body,
229
- AutoButtonColor = false,
230
- Event = {
231
- Activated = function()
232
- return pick(stamp)
233
- end,
234
- },
235
- }, React.createElement("uicorner", {
236
- CornerRadius = UDim.new(0, 4),
237
- }))
238
- end
239
- for _k, _v in cells do
240
- _newValue_1[_k] = _callback_1(_v, _k - 1, cells)
336
+ LayoutOrder = 2,
337
+ }, _exp_4, _newValue, _newValue_1))
241
338
  end
242
- -- ▲ ReadonlyArray.map ▲
243
- return React.createElement(SxHost, _attributes, _exp, _exp_1, _exp_3, _exp_4, React.createElement("frame", {
244
- Size = UDim2.new(1, 0, 0, 248),
245
- BackgroundTransparency = 1,
246
- BorderSizePixel = 0,
247
- LayoutOrder = 2,
248
- }, _exp_5, _newValue, _newValue_1))
339
+ return React.createElement(SxHost, _attributes, _exp, _exp_1, _exp_2, _exp_3, _result_1)
249
340
  end
250
341
  local default = DateRangePicker
251
342
  return {
@@ -16,3 +16,8 @@ export declare function dayIndex(stamp: number): number;
16
16
  export declare function nightsBetween(start: number, finish: number): number;
17
17
  export declare function formatStamp(stamp: number): string;
18
18
  export declare function formatSpan(value: DateSpan): string;
19
+ /** Inverse of dayIndex. Day 1 is 1 Jan of year 1. */
20
+ export declare function stampFromIndex(index: number): number;
21
+ export declare function shiftDay(stamp: number, delta: number): number;
22
+ /** Seven stamps, Sunday through Saturday, containing the day. */
23
+ export declare function weekStamps(stamp: number): number[];
@@ -107,6 +107,37 @@ local function formatSpan(value)
107
107
  end
108
108
  return `{formatStamp(value.start)} – {formatStamp(value.finish)}`
109
109
  end
110
+ --* Inverse of dayIndex. Day 1 is 1 Jan of year 1.
111
+ local function stampFromIndex(index)
112
+ local left = index
113
+ local year = 1
114
+ while left > (if isLeapYear(year) then 366 else 365) do
115
+ left -= if isLeapYear(year) then 366 else 365
116
+ year += 1
117
+ end
118
+ local month = 1
119
+ while month < 12 and left > daysInMonth(year, month) do
120
+ left -= daysInMonth(year, month)
121
+ month += 1
122
+ end
123
+ return dateStamp(year, month, left)
124
+ end
125
+ local function shiftDay(stamp, delta)
126
+ return stampFromIndex(dayIndex(stamp) + delta)
127
+ end
128
+ --* Seven stamps, Sunday through Saturday, containing the day.
129
+ local function weekStamps(stamp)
130
+ local year = math.floor(stamp / 10000)
131
+ local month = math.floor(stamp / 100) % 100
132
+ local day = stamp % 100
133
+ local origin = dayIndex(stamp) - weekday(year, month, day)
134
+ local week = {}
135
+ for offset = 0, 6 do
136
+ local _arg0 = stampFromIndex(origin + offset)
137
+ table.insert(week, _arg0)
138
+ end
139
+ return week
140
+ end
110
141
  return {
111
142
  isLeapYear = isLeapYear,
112
143
  daysInMonth = daysInMonth,
@@ -118,4 +149,7 @@ return {
118
149
  nightsBetween = nightsBetween,
119
150
  formatStamp = formatStamp,
120
151
  formatSpan = formatSpan,
152
+ stampFromIndex = stampFromIndex,
153
+ shiftDay = shiftDay,
154
+ weekStamps = weekStamps,
121
155
  }
@@ -1,3 +1,3 @@
1
1
  export { default as DateRangePicker } from "./components/DateRangePicker";
2
2
  export { DateRangePickerProps } from "./components/DateRangePicker";
3
- export { DateSpan, dateStamp, dayIndex, daysInMonth, formatSpan, formatStamp, isLeapYear, nightsBetween, orderSpan, shiftMonth, weekday, } from "./dateRangeValue";
3
+ export { DateSpan, dateStamp, dayIndex, daysInMonth, formatSpan, formatStamp, isLeapYear, nightsBetween, orderSpan, shiftDay, shiftMonth, stampFromIndex, weekday, weekStamps, } from "./dateRangeValue";
@@ -11,6 +11,9 @@ exports.formatStamp = _dateRangeValue.formatStamp
11
11
  exports.isLeapYear = _dateRangeValue.isLeapYear
12
12
  exports.nightsBetween = _dateRangeValue.nightsBetween
13
13
  exports.orderSpan = _dateRangeValue.orderSpan
14
+ exports.shiftDay = _dateRangeValue.shiftDay
14
15
  exports.shiftMonth = _dateRangeValue.shiftMonth
16
+ exports.stampFromIndex = _dateRangeValue.stampFromIndex
15
17
  exports.weekday = _dateRangeValue.weekday
18
+ exports.weekStamps = _dateRangeValue.weekStamps
16
19
  return exports
@@ -5,6 +5,7 @@ export interface DialogProps {
5
5
  open: boolean;
6
6
  title?: string;
7
7
  onClose: () => void;
8
+ fullWidth?: boolean;
8
9
  children?: React.ReactNode;
9
10
  actions?: React.ReactNode;
10
11
  }
@@ -1,8 +1,15 @@
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 useEffect = _react.useEffect
6
+ local useRef = _react.useRef
7
+ local useState = _react.useState
8
+ local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
4
9
  local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
5
10
  local Modal = TS.import(script, script.Parent.Parent.Parent, "modal").Modal
11
+ local portalTarget = TS.import(script, script.Parent.Parent.Parent, "popup").portalTarget
12
+ local dialogWidth = TS.import(script, script.Parent, "dialogWidth").dialogWidth
6
13
  local useDialogStyles = TS.import(script, script.Parent, "Dialog.styles").default
7
14
  local function Dialog(props)
8
15
  local _binding = props
@@ -10,15 +17,57 @@ local function Dialog(props)
10
17
  local open = _binding.open
11
18
  local title = _binding.title
12
19
  local onClose = _binding.onClose
20
+ local fullWidth = _binding.fullWidth
13
21
  local children = _binding.children
14
22
  local actions = _binding.actions
15
23
  local className = _binding.className
16
24
  local sx = _binding.sx
17
25
  local id = _binding.id
18
26
  local ref = _binding.ref
27
+ local _binding_1 = useTheme()
28
+ local theme = _binding_1.theme
19
29
  local styles = useDialogStyles()
30
+ local probe = useRef()
31
+ local room, setRoom = useState(0)
20
32
  local hasTitle = title ~= nil and title ~= ""
21
33
  local hasActions = actions ~= nil
34
+ local fill = fullWidth == true
35
+ useEffect(function()
36
+ if not fill then
37
+ return nil
38
+ end
39
+ local layer = portalTarget(host or probe.current)
40
+ if layer == nil or not layer:IsA("GuiBase2d") then
41
+ return nil
42
+ end
43
+ local read = function()
44
+ return setRoom(layer.AbsoluteSize.X)
45
+ end
46
+ read()
47
+ local connection = layer:GetPropertyChangedSignal("AbsoluteSize"):Connect(read)
48
+ return function()
49
+ return connection:Disconnect()
50
+ end
51
+ end, { fill, host, open })
52
+ local width = dialogWidth(fullWidth, room - theme.padding.calc(2) * 2, theme.padding.calc(36))
53
+ local _result
54
+ if fill then
55
+ local _object = table.clone(styles.column)
56
+ setmetatable(_object, nil)
57
+ _object.AutomaticSize = Enum.AutomaticSize.Y
58
+ _object.Size = UDim2.fromOffset(width, 0)
59
+ _result = _object
60
+ else
61
+ _result = styles.column
62
+ end
63
+ local column = _result
64
+ local _exp = React.createElement("frame", {
65
+ key = "Probe",
66
+ ref = probe,
67
+ Size = UDim2.fromOffset(0, 0),
68
+ BackgroundTransparency = 1,
69
+ BorderSizePixel = 0,
70
+ })
22
71
  local _attributes = {
23
72
  tag = "frame",
24
73
  }
@@ -28,12 +77,12 @@ local function Dialog(props)
28
77
  end
29
78
  _attributes.key = _condition
30
79
  _attributes.hostRef = ref
31
- _attributes.base = styles.column
80
+ _attributes.base = column
32
81
  _attributes.className = className
33
82
  _attributes.sx = sx
34
83
  local _attributes_1 = table.clone(styles.columnList)
35
84
  setmetatable(_attributes_1, nil)
36
- local _exp = React.createElement("uilistlayout", _attributes_1)
85
+ local _exp_1 = React.createElement("uilistlayout", _attributes_1)
37
86
  local _condition_1 = hasTitle
38
87
  if _condition_1 then
39
88
  local _attributes_2 = {
@@ -51,7 +100,7 @@ local function Dialog(props)
51
100
  for _k, _v in styles.body do
52
101
  _attributes_2[_k] = _v
53
102
  end
54
- local _exp_1 = React.createElement("frame", _attributes_2, children)
103
+ local _exp_2 = React.createElement("frame", _attributes_2, children)
55
104
  local _condition_2 = hasActions
56
105
  if _condition_2 then
57
106
  local _attributes_3 = {
@@ -64,11 +113,11 @@ local function Dialog(props)
64
113
  setmetatable(_attributes_4, nil)
65
114
  _condition_2 = (React.createElement("frame", _attributes_3, React.createElement("uilistlayout", _attributes_4), actions))
66
115
  end
67
- return React.createElement(Modal, {
116
+ return React.createElement(React.Fragment, nil, _exp, React.createElement(Modal, {
68
117
  host = host,
69
118
  open = open,
70
119
  onClose = onClose,
71
- }, React.createElement(SxHost, _attributes, _exp, _condition_1, _exp_1, _condition_2))
120
+ }, React.createElement(SxHost, _attributes, _exp_1, _condition_1, _exp_2, _condition_2)))
72
121
  end
73
122
  local default = Dialog
74
123
  return {
@@ -4,9 +4,10 @@ local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "the
4
4
  local createStyles = _theme.createStyles
5
5
  local componentStyles = _theme.componentStyles
6
6
  local useDialogStyles = componentStyles("Dialog", function(theme)
7
+ local heading = theme.typography.variants.h6
7
8
  return createStyles({
8
9
  column = {
9
- AutomaticSize = Enum.AutomaticSize.XY,
10
+ AutomaticSize = Enum.AutomaticSize.Y,
10
11
  Size = UDim2.fromOffset(theme.padding.calc(36), 0),
11
12
  BackgroundTransparency = 1,
12
13
  BorderSizePixel = 0,
@@ -18,14 +19,16 @@ local useDialogStyles = componentStyles("Dialog", function(theme)
18
19
  },
19
20
  title = {
20
21
  LayoutOrder = 1,
21
- AutomaticSize = Enum.AutomaticSize.XY,
22
- Size = UDim2.fromScale(0, 0),
22
+ AutomaticSize = Enum.AutomaticSize.Y,
23
+ Size = UDim2.new(1, 0, 0, 0),
23
24
  BackgroundTransparency = 1,
24
25
  BorderSizePixel = 0,
25
- Font = theme.typography.fontFamilies.default,
26
- TextSize = theme.typography.fontSizes.h6,
26
+ Font = theme.typography.fontFamilies[heading.family],
27
+ TextSize = heading.size,
28
+ LineHeight = heading.leading,
27
29
  TextColor3 = theme.palette.text.primary,
28
30
  TextXAlignment = Enum.TextXAlignment.Left,
31
+ TextWrapped = true,
29
32
  },
30
33
  body = {
31
34
  LayoutOrder = 2,
@@ -46,6 +49,7 @@ local useDialogStyles = componentStyles("Dialog", function(theme)
46
49
  HorizontalAlignment = Enum.HorizontalAlignment.Right,
47
50
  Padding = UDim.new(0, theme.padding.calc(1)),
48
51
  SortOrder = Enum.SortOrder.LayoutOrder,
52
+ Wraps = true,
49
53
  },
50
54
  })
51
55
  end)
@@ -0,0 +1,7 @@
1
+ /** Desktop forms stay a column. Phone uses the room instead of the fixed width. */
2
+ export declare const DIALOG_FILL_MAX = 480;
3
+ export declare function dialogWidth(fill: boolean | undefined, available: number, fixed: number, max?: number): number;
4
+ /** Two small actions are wider than the fixed column, so the row wraps at every width. */
5
+ export declare function dialogActionWrap(fixed: number, button: number, count: number, gap?: number): boolean;
6
+ /** A title wider than the column wraps. A short title stays one line. */
7
+ export declare function dialogTitleWrap(textWidth: number, column: number): boolean;
@@ -0,0 +1,35 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ --* Desktop forms stay a column. Phone uses the room instead of the fixed width.
3
+ local DIALOG_FILL_MAX = 480
4
+ local function dialogWidth(fill, available, fixed, max)
5
+ if max == nil then
6
+ max = DIALOG_FILL_MAX
7
+ end
8
+ if fill ~= true or available <= 0 then
9
+ return fixed
10
+ end
11
+ return if available < max then available else max
12
+ end
13
+ --* Two small actions are wider than the fixed column, so the row wraps at every width.
14
+ local function dialogActionWrap(fixed, button, count, gap)
15
+ if gap == nil then
16
+ gap = 0
17
+ end
18
+ if count < 2 or fixed <= 0 then
19
+ return false
20
+ end
21
+ return button * count + gap * (count - 1) > fixed
22
+ end
23
+ --* A title wider than the column wraps. A short title stays one line.
24
+ local function dialogTitleWrap(textWidth, column)
25
+ if column <= 0 then
26
+ return false
27
+ end
28
+ return textWidth > column
29
+ end
30
+ return {
31
+ dialogWidth = dialogWidth,
32
+ dialogActionWrap = dialogActionWrap,
33
+ dialogTitleWrap = dialogTitleWrap,
34
+ DIALOG_FILL_MAX = DIALOG_FILL_MAX,
35
+ }