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

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 (278) hide show
  1. package/out/theme/styles/utilities/focusRing.d.ts +5 -0
  2. package/out/theme/styles/utilities/focusRing.luau +11 -0
  3. package/out/theme/styles/utilities/index.d.ts +1 -0
  4. package/out/theme/styles/utilities/init.luau +1 -0
  5. package/out/theme/styles/utilities/resolveSx.d.ts +6 -1
  6. package/out/theme/styles/utilities/resolveSx.luau +53 -12
  7. package/out/ui/packages/accordion/components/Accordion.d.ts +1 -0
  8. package/out/ui/packages/accordion/components/Accordion.luau +55 -19
  9. package/out/ui/packages/accordion/components/Accordion.styles.luau +49 -29
  10. package/out/ui/packages/accordion/components/accordionNote.d.ts +2 -0
  11. package/out/ui/packages/accordion/components/accordionNote.luau +11 -0
  12. package/out/ui/packages/alert/components/Alert.d.ts +2 -0
  13. package/out/ui/packages/alert/components/Alert.luau +24 -1
  14. package/out/ui/packages/alert/components/Alert.styles.luau +11 -0
  15. package/out/ui/packages/alert/components/alertAction.d.ts +2 -0
  16. package/out/ui/packages/alert/components/alertAction.luau +11 -0
  17. package/out/ui/packages/appBar/components/AppBar.d.ts +1 -0
  18. package/out/ui/packages/appBar/components/AppBar.luau +59 -15
  19. package/out/ui/packages/appBar/components/AppBar.styles.luau +24 -0
  20. package/out/ui/packages/appBar/components/appBarSubtitle.d.ts +2 -0
  21. package/out/ui/packages/appBar/components/appBarSubtitle.luau +11 -0
  22. package/out/ui/packages/avatarGroup/components/AvatarGroup.d.ts +14 -0
  23. package/out/ui/packages/avatarGroup/components/AvatarGroup.luau +102 -0
  24. package/out/ui/packages/avatarGroup/components/AvatarGroup.styles.d.ts +6 -0
  25. package/out/ui/packages/avatarGroup/components/AvatarGroup.styles.luau +50 -0
  26. package/out/ui/packages/avatarGroup/components/avatarGroupCut.d.ts +2 -0
  27. package/out/ui/packages/avatarGroup/components/avatarGroupCut.luau +11 -0
  28. package/out/ui/packages/avatarGroup/index.d.ts +3 -0
  29. package/out/ui/packages/avatarGroup/init.luau +6 -0
  30. package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +4 -1
  31. package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +19 -1
  32. package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +20 -0
  33. package/out/ui/packages/bottomNavigation/components/navBadge.d.ts +2 -0
  34. package/out/ui/packages/bottomNavigation/components/navBadge.luau +14 -0
  35. package/out/ui/packages/bottomNavigation/index.d.ts +1 -1
  36. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +16 -5
  37. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.styles.luau +6 -0
  38. package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +2 -0
  39. package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +8 -0
  40. package/out/ui/packages/button/components/Button.d.ts +2 -0
  41. package/out/ui/packages/button/components/Button.luau +59 -10
  42. package/out/ui/packages/button/components/Button.styles.luau +2 -0
  43. package/out/ui/packages/button/components/buttonLook.d.ts +2 -0
  44. package/out/ui/packages/button/components/buttonLook.luau +11 -0
  45. package/out/ui/packages/buttonGroup/components/ButtonGroup.d.ts +13 -0
  46. package/out/ui/packages/buttonGroup/components/ButtonGroup.luau +102 -0
  47. package/out/ui/packages/buttonGroup/components/ButtonGroup.styles.d.ts +5 -0
  48. package/out/ui/packages/buttonGroup/components/ButtonGroup.styles.luau +57 -0
  49. package/out/ui/packages/buttonGroup/components/buttonGroupEdge.d.ts +2 -0
  50. package/out/ui/packages/buttonGroup/components/buttonGroupEdge.luau +16 -0
  51. package/out/ui/packages/buttonGroup/index.d.ts +3 -0
  52. package/out/ui/packages/buttonGroup/init.luau +6 -0
  53. package/out/ui/packages/card/components/Card.d.ts +1 -0
  54. package/out/ui/packages/card/components/Card.luau +21 -2
  55. package/out/ui/packages/card/components/Card.styles.d.ts +3 -1
  56. package/out/ui/packages/card/components/Card.styles.luau +16 -7
  57. package/out/ui/packages/card/components/cardWidth.d.ts +10 -0
  58. package/out/ui/packages/card/components/cardWidth.luau +36 -0
  59. package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +9 -4
  60. package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +10 -1
  61. package/out/ui/packages/cframeEditor/components/cframeValue.d.ts +1 -0
  62. package/out/ui/packages/cframeEditor/components/cframeValue.luau +13 -0
  63. package/out/ui/packages/checkbox/components/Checkbox.luau +2 -1
  64. package/out/ui/packages/checkbox/components/Checkbox.styles.luau +2 -0
  65. package/out/ui/packages/chip/components/Chip.styles.d.ts +2 -1
  66. package/out/ui/packages/chip/components/Chip.styles.luau +9 -6
  67. package/out/ui/packages/chip/components/chipTone.d.ts +3 -0
  68. package/out/ui/packages/chip/components/chipTone.luau +11 -0
  69. package/out/ui/packages/collapse/components/Collapse.d.ts +8 -0
  70. package/out/ui/packages/collapse/components/Collapse.luau +34 -0
  71. package/out/ui/packages/collapse/components/Collapse.styles.d.ts +2 -0
  72. package/out/ui/packages/collapse/components/Collapse.styles.luau +20 -0
  73. package/out/ui/packages/collapse/components/collapseOpen.d.ts +1 -0
  74. package/out/ui/packages/collapse/components/collapseOpen.luau +7 -0
  75. package/out/ui/packages/collapse/index.d.ts +3 -0
  76. package/out/ui/packages/collapse/init.luau +6 -0
  77. package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +4 -2
  78. package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +4 -2
  79. package/out/ui/packages/colorPicker/components/sequenceValue.d.ts +2 -0
  80. package/out/ui/packages/colorPicker/components/sequenceValue.luau +8 -0
  81. package/out/ui/packages/colorPicker/index.d.ts +1 -1
  82. package/out/ui/packages/colorPicker/init.luau +2 -0
  83. package/out/ui/packages/copyButton/components/CopyButton.d.ts +8 -0
  84. package/out/ui/packages/copyButton/components/CopyButton.luau +32 -0
  85. package/out/ui/packages/copyButton/components/copyInvoke.d.ts +2 -0
  86. package/out/ui/packages/copyButton/components/copyInvoke.luau +12 -0
  87. package/out/ui/packages/copyButton/index.d.ts +3 -0
  88. package/out/ui/packages/copyButton/init.luau +6 -0
  89. package/out/ui/packages/cover/components/Cover.d.ts +8 -0
  90. package/out/ui/packages/cover/components/Cover.luau +47 -0
  91. package/out/ui/packages/cover/components/coverFill.d.ts +2 -0
  92. package/out/ui/packages/cover/components/coverFill.luau +14 -0
  93. package/out/ui/packages/cover/index.d.ts +3 -0
  94. package/out/ui/packages/cover/init.luau +6 -0
  95. package/out/ui/packages/dateRange/components/DateRangePicker.d.ts +3 -0
  96. package/out/ui/packages/dateRange/components/DateRangePicker.luau +167 -88
  97. package/out/ui/packages/dateRange/dateRangeValue.d.ts +5 -0
  98. package/out/ui/packages/dateRange/dateRangeValue.luau +34 -0
  99. package/out/ui/packages/dateRange/index.d.ts +1 -1
  100. package/out/ui/packages/dateRange/init.luau +3 -0
  101. package/out/ui/packages/dialog/components/Dialog.d.ts +1 -0
  102. package/out/ui/packages/dialog/components/Dialog.luau +55 -6
  103. package/out/ui/packages/dialog/components/Dialog.styles.luau +5 -3
  104. package/out/ui/packages/dialog/components/dialogWidth.d.ts +7 -0
  105. package/out/ui/packages/dialog/components/dialogWidth.luau +35 -0
  106. package/out/ui/packages/divider/components/Divider.luau +57 -12
  107. package/out/ui/packages/divider/components/dividerLabel.d.ts +2 -0
  108. package/out/ui/packages/divider/components/dividerLabel.luau +11 -0
  109. package/out/ui/packages/drawer/components/Drawer.d.ts +1 -0
  110. package/out/ui/packages/drawer/components/Drawer.luau +18 -3
  111. package/out/ui/packages/drawer/components/drawerPlacement.d.ts +13 -1
  112. package/out/ui/packages/drawer/components/drawerPlacement.luau +28 -0
  113. package/out/ui/packages/fab/components/fabSize.d.ts +1 -1
  114. package/out/ui/packages/iconButton/components/IconButton.d.ts +2 -0
  115. package/out/ui/packages/iconButton/components/IconButton.luau +37 -3
  116. package/out/ui/packages/iconButton/components/transportGlyph.d.ts +9 -0
  117. package/out/ui/packages/iconButton/components/transportGlyph.luau +73 -0
  118. package/out/ui/packages/imageList/components/ImageList.d.ts +4 -0
  119. package/out/ui/packages/imageList/components/ImageList.luau +57 -11
  120. package/out/ui/packages/imageList/components/ImageList.styles.d.ts +1 -0
  121. package/out/ui/packages/imageList/components/ImageList.styles.luau +16 -10
  122. package/out/ui/packages/imageList/components/imageListLayout.d.ts +10 -0
  123. package/out/ui/packages/imageList/components/imageListLayout.luau +44 -0
  124. package/out/ui/packages/index.d.ts +11 -0
  125. package/out/ui/packages/init.luau +33 -0
  126. package/out/ui/packages/input/components/Input.d.ts +4 -0
  127. package/out/ui/packages/input/components/Input.luau +29 -9
  128. package/out/ui/packages/input/components/Input.styles.d.ts +1 -0
  129. package/out/ui/packages/input/components/Input.styles.luau +42 -12
  130. package/out/ui/packages/input/components/clampText.d.ts +2 -0
  131. package/out/ui/packages/input/components/clampText.luau +16 -0
  132. package/out/ui/packages/input/components/multilineHeight.d.ts +1 -0
  133. package/out/ui/packages/input/components/multilineHeight.luau +11 -0
  134. package/out/ui/packages/link/components/Link.luau +13 -9
  135. package/out/ui/packages/link/components/Link.styles.d.ts +0 -1
  136. package/out/ui/packages/link/components/Link.styles.luau +1 -12
  137. package/out/ui/packages/listItem/components/ListItem.d.ts +6 -0
  138. package/out/ui/packages/listItem/components/ListItem.luau +97 -39
  139. package/out/ui/packages/listItem/components/ListItem.styles.d.ts +3 -0
  140. package/out/ui/packages/listItem/components/ListItem.styles.luau +52 -30
  141. package/out/ui/packages/listItem/components/listItemInk.d.ts +3 -0
  142. package/out/ui/packages/listItem/components/listItemInk.luau +14 -0
  143. package/out/ui/packages/listItem/components/listItemLayout.d.ts +12 -0
  144. package/out/ui/packages/listItem/components/listItemLayout.luau +41 -0
  145. package/out/ui/packages/markdown/components/Markdown.d.ts +2 -0
  146. package/out/ui/packages/markdown/components/Markdown.luau +91 -6
  147. package/out/ui/packages/markdown/components/Markdown.styles.luau +25 -0
  148. package/out/ui/packages/markdown/index.d.ts +2 -2
  149. package/out/ui/packages/markdown/init.luau +2 -0
  150. package/out/ui/packages/markdown/parseMarkdown.d.ts +21 -1
  151. package/out/ui/packages/markdown/parseMarkdown.luau +109 -2
  152. package/out/ui/packages/menu/components/Menu.d.ts +3 -0
  153. package/out/ui/packages/menu/components/Menu.luau +68 -21
  154. package/out/ui/packages/menu/components/menuIcon.d.ts +6 -0
  155. package/out/ui/packages/menu/components/menuIcon.luau +32 -0
  156. package/out/ui/packages/numberInput/components/NumberInput.d.ts +1 -0
  157. package/out/ui/packages/numberInput/components/NumberInput.luau +67 -1
  158. package/out/ui/packages/numberInput/components/numberValue.d.ts +2 -0
  159. package/out/ui/packages/numberInput/components/numberValue.luau +10 -0
  160. package/out/ui/packages/pager/components/Pager.d.ts +11 -0
  161. package/out/ui/packages/pager/components/Pager.luau +112 -0
  162. package/out/ui/packages/pager/components/Pager.styles.d.ts +2 -0
  163. package/out/ui/packages/pager/components/Pager.styles.luau +61 -0
  164. package/out/ui/packages/pager/components/pagerStep.d.ts +3 -0
  165. package/out/ui/packages/pager/components/pagerStep.luau +24 -0
  166. package/out/ui/packages/pager/index.d.ts +3 -0
  167. package/out/ui/packages/pager/init.luau +9 -0
  168. package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +5 -0
  169. package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +5 -0
  170. package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +22 -0
  171. package/out/ui/packages/popover/components/Popover.d.ts +12 -0
  172. package/out/ui/packages/popover/components/Popover.luau +50 -0
  173. package/out/ui/packages/popover/components/Popover.styles.d.ts +2 -0
  174. package/out/ui/packages/popover/components/Popover.styles.luau +26 -0
  175. package/out/ui/packages/popover/index.d.ts +2 -0
  176. package/out/ui/packages/popover/init.luau +5 -0
  177. package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +4 -1
  178. package/out/ui/packages/radioGroup/components/RadioGroup.luau +51 -8
  179. package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +26 -2
  180. package/out/ui/packages/radioGroup/components/radioHint.d.ts +2 -0
  181. package/out/ui/packages/radioGroup/components/radioHint.luau +11 -0
  182. package/out/ui/packages/radioGroup/index.d.ts +1 -1
  183. package/out/ui/packages/rating/components/Rating.d.ts +1 -1
  184. package/out/ui/packages/rating/components/Rating.luau +4 -2
  185. package/out/ui/packages/rating/components/ratingCommit.d.ts +2 -0
  186. package/out/ui/packages/rating/components/ratingCommit.luau +11 -0
  187. package/out/ui/packages/scroll/components/ScrollView.luau +76 -7
  188. package/out/ui/packages/select/components/Select.luau +18 -1
  189. package/out/ui/packages/select/components/Select.styles.luau +2 -5
  190. package/out/ui/packages/select/components/selectWidth.d.ts +2 -0
  191. package/out/ui/packages/select/components/selectWidth.luau +15 -0
  192. package/out/ui/packages/shadow/components/Shadow.luau +14 -2
  193. package/out/ui/packages/slider/components/RangeSlider.d.ts +16 -0
  194. package/out/ui/packages/slider/components/RangeSlider.luau +231 -0
  195. package/out/ui/packages/slider/components/RangeSlider.styles.d.ts +7 -0
  196. package/out/ui/packages/slider/components/RangeSlider.styles.luau +48 -0
  197. package/out/ui/packages/slider/components/Slider.d.ts +1 -0
  198. package/out/ui/packages/slider/components/Slider.luau +44 -11
  199. package/out/ui/packages/slider/components/Slider.styles.d.ts +1 -0
  200. package/out/ui/packages/slider/components/Slider.styles.luau +19 -5
  201. package/out/ui/packages/slider/components/rangeValue.d.ts +21 -0
  202. package/out/ui/packages/slider/components/rangeValue.luau +77 -0
  203. package/out/ui/packages/slider/components/sliderLabel.d.ts +4 -0
  204. package/out/ui/packages/slider/components/sliderLabel.luau +30 -0
  205. package/out/ui/packages/slider/index.d.ts +3 -0
  206. package/out/ui/packages/slider/init.luau +6 -0
  207. package/out/ui/packages/snackbar/components/Snackbar.d.ts +1 -0
  208. package/out/ui/packages/snackbar/components/Snackbar.luau +2 -0
  209. package/out/ui/packages/sparkline/components/Sparkline.d.ts +3 -0
  210. package/out/ui/packages/sparkline/components/Sparkline.luau +69 -7
  211. package/out/ui/packages/sparkline/index.d.ts +1 -1
  212. package/out/ui/packages/sparkline/init.luau +6 -1
  213. package/out/ui/packages/sparkline/sparklineLayout.d.ts +17 -0
  214. package/out/ui/packages/sparkline/sparklineLayout.luau +132 -8
  215. package/out/ui/packages/speedDial/components/SpeedDial.d.ts +1 -0
  216. package/out/ui/packages/speedDial/components/SpeedDial.luau +56 -9
  217. package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +1 -0
  218. package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +45 -3
  219. package/out/ui/packages/speedDial/components/speedDialLabel.d.ts +4 -0
  220. package/out/ui/packages/speedDial/components/speedDialLabel.luau +16 -0
  221. package/out/ui/packages/stateMatrix.d.ts +1 -0
  222. package/out/ui/packages/stateMatrix.luau +9 -0
  223. package/out/ui/packages/stepper/components/Stepper.d.ts +2 -0
  224. package/out/ui/packages/stepper/components/Stepper.luau +35 -7
  225. package/out/ui/packages/stepper/components/Stepper.styles.luau +3 -0
  226. package/out/ui/packages/stepper/components/stepState.d.ts +4 -2
  227. package/out/ui/packages/stepper/components/stepState.luau +12 -1
  228. package/out/ui/packages/stepper/index.d.ts +1 -1
  229. package/out/ui/packages/stepper/init.luau +3 -1
  230. package/out/ui/packages/switch/components/Switch.styles.luau +2 -5
  231. package/out/ui/packages/table/components/Table.luau +8 -5
  232. package/out/ui/packages/table/components/tableSort.d.ts +2 -0
  233. package/out/ui/packages/table/components/tableSort.luau +95 -0
  234. package/out/ui/packages/table/index.d.ts +1 -0
  235. package/out/ui/packages/table/init.luau +1 -0
  236. package/out/ui/packages/tabs/components/Tabs.luau +70 -2
  237. package/out/ui/packages/tabs/components/tabScroll.d.ts +2 -0
  238. package/out/ui/packages/tabs/components/tabScroll.luau +18 -0
  239. package/out/ui/packages/text/components/Text.d.ts +7 -0
  240. package/out/ui/packages/text/components/Text.luau +54 -0
  241. package/out/ui/packages/text/components/textBox.d.ts +12 -0
  242. package/out/ui/packages/text/components/textBox.luau +21 -0
  243. package/out/ui/packages/text/index.d.ts +2 -0
  244. package/out/ui/packages/text/init.luau +5 -0
  245. package/out/ui/packages/timeField/components/TimeField.d.ts +13 -0
  246. package/out/ui/packages/timeField/components/TimeField.luau +102 -0
  247. package/out/ui/packages/timeField/index.d.ts +4 -0
  248. package/out/ui/packages/timeField/init.luau +9 -0
  249. package/out/ui/packages/timeField/timeValue.d.ts +8 -0
  250. package/out/ui/packages/timeField/timeValue.luau +49 -0
  251. package/out/ui/packages/timeline/components/Timeline.d.ts +12 -0
  252. package/out/ui/packages/timeline/components/Timeline.luau +99 -0
  253. package/out/ui/packages/timeline/components/Timeline.styles.d.ts +2 -0
  254. package/out/ui/packages/timeline/components/Timeline.styles.luau +106 -0
  255. package/out/ui/packages/timeline/components/timelineRail.d.ts +4 -0
  256. package/out/ui/packages/timeline/components/timelineRail.luau +15 -0
  257. package/out/ui/packages/timeline/index.d.ts +3 -0
  258. package/out/ui/packages/timeline/init.luau +8 -0
  259. package/out/ui/packages/toast/components/Toast.d.ts +1 -0
  260. package/out/ui/packages/toast/components/Toast.luau +59 -12
  261. package/out/ui/packages/toast/components/Toast.styles.luau +6 -3
  262. package/out/ui/packages/toast/components/toastPlace.d.ts +12 -0
  263. package/out/ui/packages/toast/components/toastPlace.luau +31 -0
  264. package/out/ui/packages/tooltip/components/Tooltip.d.ts +1 -0
  265. package/out/ui/packages/tooltip/components/Tooltip.luau +109 -31
  266. package/out/ui/packages/tooltip/components/Tooltip.styles.luau +30 -0
  267. package/out/ui/packages/tooltip/components/tooltipBox.d.ts +4 -0
  268. package/out/ui/packages/tooltip/components/tooltipBox.luau +12 -0
  269. package/out/ui/packages/tooltip/components/tooltipPointer.d.ts +2 -0
  270. package/out/ui/packages/tooltip/components/tooltipPointer.luau +11 -0
  271. package/out/ui/packages/vectorEditor/components/VectorEditor.luau +1 -0
  272. package/out/ui/packages/weekGrid/components/WeekGrid.d.ts +24 -0
  273. package/out/ui/packages/weekGrid/components/WeekGrid.luau +187 -0
  274. package/out/ui/packages/weekGrid/components/weekColumns.d.ts +9 -0
  275. package/out/ui/packages/weekGrid/components/weekColumns.luau +25 -0
  276. package/out/ui/packages/weekGrid/index.d.ts +3 -0
  277. package/out/ui/packages/weekGrid/init.luau +8 -0
  278. package/package.json +67 -69
@@ -0,0 +1,31 @@
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
+ return {
29
+ toastPlace = toastPlace,
30
+ toastWrap = toastWrap,
31
+ }
@@ -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;
@@ -10,9 +10,12 @@ local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "t
10
10
  local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
11
11
  local Popup = TS.import(script, script.Parent.Parent.Parent, "popup").Popup
12
12
  local useTooltipStyles = TS.import(script, script.Parent, "Tooltip.styles").default
13
+ local tooltipBox = TS.import(script, script.Parent, "tooltipBox").tooltipBox
14
+ local pointerInside = TS.import(script, script.Parent, "tooltipPointer").pointerInside
13
15
  local function Tooltip(props)
14
16
  local _binding = props
15
17
  local text = _binding.text
18
+ local title = _binding.title
16
19
  local delay = _binding.delay
17
20
  if delay == nil then
18
21
  delay = 0.4
@@ -36,9 +39,36 @@ local function Tooltip(props)
36
39
  end
37
40
  local textSize = _condition
38
41
  local font = theme.typography.fontFamilies.default or Enum.Font.SourceSans
39
- local textBounds = TextService:GetTextSize(text, textSize, font, Vector2.new(theme.spacing.calc(24), 10000))
40
- local tipWidth = textBounds.X + padX * 2
41
- local tipHeight = textBounds.Y + padY * 2
42
+ local _condition_1 = title
43
+ if _condition_1 == nil then
44
+ _condition_1 = ""
45
+ end
46
+ local heading = _condition_1
47
+ local limit = Vector2.new(theme.spacing.calc(24), 10000)
48
+ local textBounds = TextService:GetTextSize(text, textSize, font, limit)
49
+ local titleFont = theme.typography.fontFamilies.semibold or font
50
+ local titleBounds = if heading ~= "" then TextService:GetTextSize(heading, textSize, titleFont, limit) else nil
51
+ local _exp = textBounds.X
52
+ local _exp_1 = textBounds.Y
53
+ local _result = titleBounds
54
+ if _result ~= nil then
55
+ _result = _result.X
56
+ end
57
+ local _condition_2 = _result
58
+ if _condition_2 == nil then
59
+ _condition_2 = 0
60
+ end
61
+ local _result_1 = titleBounds
62
+ if _result_1 ~= nil then
63
+ _result_1 = _result_1.Y
64
+ end
65
+ local _condition_3 = _result_1
66
+ if _condition_3 == nil then
67
+ _condition_3 = 0
68
+ end
69
+ local box = tooltipBox(_exp, _exp_1, _condition_2, _condition_3, padX, padY, if heading ~= "" then padY else 0)
70
+ local tipWidth = box.width
71
+ local tipHeight = box.height
42
72
  local anchor, setAnchor = useState()
43
73
  local shown, setShown = useState(false)
44
74
  local pending = useRef()
@@ -54,11 +84,11 @@ local function Tooltip(props)
54
84
  local _attributes = {
55
85
  tag = "frame",
56
86
  }
57
- local _condition_1 = id
58
- if not (_condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1 ~= "" and _condition_1) then
59
- _condition_1 = "Tooltip"
87
+ local _condition_4 = id
88
+ if not (_condition_4 ~= 0 and _condition_4 == _condition_4 and _condition_4 ~= "" and _condition_4) then
89
+ _condition_4 = "Tooltip"
60
90
  end
61
- _attributes.key = _condition_1
91
+ _attributes.key = _condition_4
62
92
  _attributes.hostRef = ref
63
93
  _attributes.base = styles.root
64
94
  _attributes.className = className
@@ -72,39 +102,87 @@ local function Tooltip(props)
72
102
  setShown(true)
73
103
  end)
74
104
  end,
75
- MouseLeave = function()
105
+ MouseLeave = function(rbx, x, y)
106
+ if pointerInside(rbx.AbsolutePosition.X, rbx.AbsolutePosition.Y, rbx.AbsoluteSize.X, rbx.AbsoluteSize.Y, x, y) then
107
+ return nil
108
+ end
76
109
  cancel()
77
110
  setShown(false)
78
111
  end,
79
112
  }
80
- local _exp = children
81
- local _condition_2 = shown and text ~= ""
82
- if _condition_2 then
83
- local _attributes_1 = {
84
- key = "Tip",
85
- }
86
- for _k, _v in styles.label do
87
- _attributes_1[_k] = _v
113
+ local _exp_2 = children
114
+ local _condition_5 = shown and (text ~= "" or heading ~= "")
115
+ if _condition_5 then
116
+ local _result_2
117
+ if heading == "" then
118
+ local _attributes_1 = {
119
+ key = "Tip",
120
+ }
121
+ for _k, _v in styles.label do
122
+ _attributes_1[_k] = _v
123
+ end
124
+ _attributes_1.Text = text
125
+ _attributes_1.Size = UDim2.fromScale(1, 1)
126
+ _attributes_1.AutomaticSize = Enum.AutomaticSize.None
127
+ _attributes_1.TextWrapped = true
128
+ local _attributes_2 = table.clone(styles.padding)
129
+ setmetatable(_attributes_2, nil)
130
+ local _exp_3 = React.createElement("uipadding", _attributes_2)
131
+ local _attributes_3 = table.clone(styles.corner)
132
+ setmetatable(_attributes_3, nil)
133
+ local _exp_4 = React.createElement("uicorner", _attributes_3)
134
+ local _attributes_4 = table.clone(styles.stroke)
135
+ setmetatable(_attributes_4, nil)
136
+ _result_2 = (React.createElement("textlabel", _attributes_1, _exp_3, _exp_4, React.createElement("uistroke", _attributes_4)))
137
+ else
138
+ local _attributes_1 = {
139
+ key = "Tip",
140
+ }
141
+ for _k, _v in styles.shell do
142
+ _attributes_1[_k] = _v
143
+ end
144
+ local _attributes_2 = table.clone(styles.padding)
145
+ setmetatable(_attributes_2, nil)
146
+ local _exp_3 = React.createElement("uipadding", _attributes_2)
147
+ local _attributes_3 = table.clone(styles.corner)
148
+ setmetatable(_attributes_3, nil)
149
+ local _exp_4 = React.createElement("uicorner", _attributes_3)
150
+ local _attributes_4 = table.clone(styles.stroke)
151
+ setmetatable(_attributes_4, nil)
152
+ local _exp_5 = React.createElement("uistroke", _attributes_4)
153
+ local _attributes_5 = table.clone(styles.stack)
154
+ setmetatable(_attributes_5, nil)
155
+ local _exp_6 = React.createElement("uilistlayout", _attributes_5)
156
+ local _attributes_6 = {
157
+ key = "Title",
158
+ }
159
+ for _k, _v in styles.title do
160
+ _attributes_6[_k] = _v
161
+ end
162
+ _attributes_6.Text = heading
163
+ _attributes_6.LayoutOrder = 0
164
+ local _exp_7 = React.createElement("textlabel", _attributes_6)
165
+ local _condition_6 = text ~= ""
166
+ if _condition_6 then
167
+ local _attributes_7 = {
168
+ key = "Body",
169
+ }
170
+ for _k, _v in styles.body do
171
+ _attributes_7[_k] = _v
172
+ end
173
+ _attributes_7.Text = text
174
+ _attributes_7.LayoutOrder = 1
175
+ _condition_6 = React.createElement("textlabel", _attributes_7)
176
+ end
177
+ _result_2 = (React.createElement("frame", _attributes_1, _exp_3, _exp_4, _exp_5, _exp_6, _exp_7, _condition_6))
88
178
  end
89
- _attributes_1.Text = text
90
- _attributes_1.Size = UDim2.fromScale(1, 1)
91
- _attributes_1.AutomaticSize = Enum.AutomaticSize.None
92
- _attributes_1.TextWrapped = true
93
- local _attributes_2 = table.clone(styles.padding)
94
- setmetatable(_attributes_2, nil)
95
- local _exp_1 = React.createElement("uipadding", _attributes_2)
96
- local _attributes_3 = table.clone(styles.corner)
97
- setmetatable(_attributes_3, nil)
98
- local _exp_2 = React.createElement("uicorner", _attributes_3)
99
- local _attributes_4 = table.clone(styles.stroke)
100
- setmetatable(_attributes_4, nil)
101
- _condition_2 = (React.createElement(Popup, {
179
+ _condition_5 = (React.createElement(Popup, {
102
180
  anchor = anchor,
103
181
  preferredWidth = tipWidth,
104
182
  preferredHeight = tipHeight,
105
- }, React.createElement("textlabel", _attributes_1, _exp_1, _exp_2, React.createElement("uistroke", _attributes_4))))
183
+ }, _result_2))
106
184
  end
107
- return React.createElement(SxHost, _attributes, _exp, _condition_2)
185
+ return React.createElement(SxHost, _attributes, _exp_2, _condition_5)
108
186
  end
109
187
  local default = Tooltip
110
188
  return {
@@ -35,6 +35,36 @@ local useTooltipStyles = componentStyles("Tooltip", function(theme)
35
35
  Color = theme.palette.border,
36
36
  ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
37
37
  },
38
+ shell = {
39
+ Size = UDim2.fromScale(1, 1),
40
+ BackgroundColor3 = theme.palette.surface.overlay,
41
+ BorderSizePixel = 0,
42
+ },
43
+ stack = {
44
+ FillDirection = Enum.FillDirection.Vertical,
45
+ Padding = UDim.new(0, theme.padding.default),
46
+ SortOrder = Enum.SortOrder.LayoutOrder,
47
+ },
48
+ title = {
49
+ Size = UDim2.new(1, 0, 0, 0),
50
+ AutomaticSize = Enum.AutomaticSize.Y,
51
+ BackgroundTransparency = 1,
52
+ TextColor3 = theme.palette.text.primary,
53
+ Font = theme.typography.fontFamilies.semibold,
54
+ TextSize = theme.typography.fontSizes.caption,
55
+ TextWrapped = true,
56
+ TextXAlignment = Enum.TextXAlignment.Left,
57
+ },
58
+ body = {
59
+ Size = UDim2.new(1, 0, 0, 0),
60
+ AutomaticSize = Enum.AutomaticSize.Y,
61
+ BackgroundTransparency = 1,
62
+ TextColor3 = theme.palette.text.primary,
63
+ Font = theme.typography.fontFamilies.default,
64
+ TextSize = theme.typography.fontSizes.caption,
65
+ TextWrapped = true,
66
+ TextXAlignment = Enum.TextXAlignment.Left,
67
+ },
38
68
  })
39
69
  end)
40
70
  local default = useTooltipStyles
@@ -0,0 +1,4 @@
1
+ export declare function tooltipBox(textWidth: number, textHeight: number, titleWidth: number, titleHeight: number, padX: number, padY: number, gap: number): {
2
+ width: number;
3
+ height: number;
4
+ };
@@ -0,0 +1,12 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local function tooltipBox(textWidth, textHeight, titleWidth, titleHeight, padX, padY, gap)
3
+ local width = math.max(textWidth, titleWidth) + padX * 2
4
+ local height = textHeight + (if titleHeight > 0 then titleHeight + gap else 0) + padY * 2
5
+ return {
6
+ width = width,
7
+ height = height,
8
+ }
9
+ end
10
+ return {
11
+ tooltipBox = tooltipBox,
12
+ }
@@ -0,0 +1,2 @@
1
+ /** True when the pointer is still over the host, including a child pin. */
2
+ export declare function pointerInside(originX: number, originY: number, width: number, height: number, x: number, y: number): boolean;
@@ -0,0 +1,11 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ --* True when the pointer is still over the host, including a child pin.
3
+ local function pointerInside(originX, originY, width, height, x, y)
4
+ if x ~= x or y ~= y then
5
+ return false
6
+ end
7
+ return x >= originX and y >= originY and x <= originX + width and y <= originY + height
8
+ end
9
+ return {
10
+ pointerInside = pointerInside,
11
+ }
@@ -60,6 +60,7 @@ local function VectorEditor(props)
60
60
  setmetatable(_attributes_5, nil)
61
61
  return React.createElement("frame", _attributes_2, _exp_1, _exp_2, React.createElement("frame", _attributes_5, React.createElement(NumberInput, {
62
62
  value = readAxis(value, axis),
63
+ places = 3,
63
64
  disabled = disabled,
64
65
  width = UDim.new(1, 0),
65
66
  onChange = function(amount)
@@ -0,0 +1,24 @@
1
+ import { CustomizedProps } from "../../../../theme/index";
2
+ export interface WeekGridColumn {
3
+ id: string;
4
+ label: string;
5
+ }
6
+ export interface WeekGridCell {
7
+ columnId: string;
8
+ text?: string;
9
+ }
10
+ export interface WeekGridRow {
11
+ id: string;
12
+ label: string;
13
+ cells: WeekGridCell[];
14
+ }
15
+ export interface WeekGridProps {
16
+ columns: WeekGridColumn[];
17
+ rows: WeekGridRow[];
18
+ narrow?: boolean;
19
+ day?: number;
20
+ empty?: string;
21
+ onCell?: (rowId: string, columnId: string) => void;
22
+ }
23
+ declare function WeekGrid(props: CustomizedProps<Frame, WeekGridProps>): JSX.Element;
24
+ export default WeekGrid;
@@ -0,0 +1,187 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local TS = _G[script]
3
+ local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
+ local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
5
+ local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
6
+ local weekCellScales = TS.import(script, script.Parent, "weekColumns").weekCellScales
7
+ local function shownColumns(columns, narrow, day)
8
+ if narrow ~= true then
9
+ return columns
10
+ end
11
+ local index = if day ~= nil and day >= 0 and day < #columns then day else 0
12
+ local column = columns[index + 1]
13
+ return if column ~= nil then { column } else {}
14
+ end
15
+ local function readCell(row, columnId)
16
+ for _, cell in row.cells do
17
+ if cell.columnId == columnId and cell.text ~= nil and cell.text ~= "" then
18
+ return cell.text
19
+ end
20
+ end
21
+ return nil
22
+ end
23
+ local function WeekLine(props)
24
+ local _binding = useTheme()
25
+ local theme = _binding.theme
26
+ local font = theme.typography.fontFamilies.default
27
+ local size = if props.header == true then theme.typography.fontSizes.caption else theme.typography.fontSizes.body
28
+ local color = if props.header == true then theme.palette.text.secondary else theme.palette.text.primary
29
+ local _exp = React.createElement("uilistlayout", {
30
+ FillDirection = Enum.FillDirection.Horizontal,
31
+ SortOrder = Enum.SortOrder.LayoutOrder,
32
+ })
33
+ local _exp_1 = React.createElement("textlabel", {
34
+ LayoutOrder = 0,
35
+ Size = UDim2.new(props.nameScale, 0, 1, 0),
36
+ BackgroundTransparency = 1,
37
+ BorderSizePixel = 0,
38
+ Font = font,
39
+ TextSize = size,
40
+ TextColor3 = color,
41
+ TextXAlignment = Enum.TextXAlignment.Left,
42
+ TextTruncate = Enum.TextTruncate.AtEnd,
43
+ Text = props.name,
44
+ })
45
+ local _exp_2 = props.cells
46
+ -- ▼ ReadonlyArray.map ▼
47
+ local _newValue = table.create(#_exp_2)
48
+ local _callback = function(cell, index)
49
+ return React.createElement("textbutton", {
50
+ key = cell.id,
51
+ LayoutOrder = index + 1,
52
+ Size = UDim2.new(props.dayScale, 0, 1, 0),
53
+ BackgroundColor3 = theme.palette.surface.paper,
54
+ BackgroundTransparency = if cell.blank or props.header == true then 1 else 0,
55
+ BorderSizePixel = 0,
56
+ Font = font,
57
+ TextSize = size,
58
+ TextColor3 = if cell.blank then theme.palette.text.secondary else color,
59
+ TextTruncate = Enum.TextTruncate.AtEnd,
60
+ Text = cell.text,
61
+ AutoButtonColor = props.onCell ~= nil,
62
+ Event = {
63
+ Activated = function()
64
+ local _result = props.onCell
65
+ if _result ~= nil then
66
+ _result = _result(cell.id)
67
+ end
68
+ return _result
69
+ end,
70
+ },
71
+ })
72
+ end
73
+ for _k, _v in _exp_2 do
74
+ _newValue[_k] = _callback(_v, _k - 1, _exp_2)
75
+ end
76
+ -- ▲ ReadonlyArray.map ▲
77
+ return React.createElement("frame", {
78
+ Size = UDim2.new(1, 0, 0, if props.header == true then 28 else 40),
79
+ BackgroundTransparency = 1,
80
+ BorderSizePixel = 0,
81
+ }, _exp, _exp_1, _newValue)
82
+ end
83
+ local function WeekGrid(props)
84
+ local _binding = props
85
+ local columns = _binding.columns
86
+ local rows = _binding.rows
87
+ local narrow = _binding.narrow
88
+ local day = _binding.day
89
+ local empty = _binding.empty
90
+ if empty == nil then
91
+ empty = "Off"
92
+ end
93
+ local onCell = _binding.onCell
94
+ local className = _binding.className
95
+ local sx = _binding.sx
96
+ local id = _binding.id
97
+ local ref = _binding.ref
98
+ local visible = shownColumns(columns, narrow, day)
99
+ local scales = weekCellScales(#columns, narrow)
100
+ -- ▼ ReadonlyArray.map ▼
101
+ local _newValue = table.create(#visible)
102
+ local _callback = function(column)
103
+ return {
104
+ id = column.id,
105
+ text = column.label,
106
+ blank = true,
107
+ }
108
+ end
109
+ for _k, _v in visible do
110
+ _newValue[_k] = _callback(_v, _k - 1, visible)
111
+ end
112
+ -- ▲ ReadonlyArray.map ▲
113
+ local headerCells = _newValue
114
+ local _attributes = {
115
+ tag = "frame",
116
+ }
117
+ local _condition = id
118
+ if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
119
+ _condition = "WeekGrid"
120
+ end
121
+ _attributes.key = _condition
122
+ _attributes.hostRef = ref
123
+ _attributes.base = {
124
+ Size = UDim2.new(1, 0, 0, 0),
125
+ AutomaticSize = Enum.AutomaticSize.Y,
126
+ BackgroundTransparency = 1,
127
+ BorderSizePixel = 0,
128
+ }
129
+ _attributes.className = className
130
+ _attributes.sx = sx
131
+ local _exp = React.createElement("uilistlayout", {
132
+ FillDirection = Enum.FillDirection.Vertical,
133
+ Padding = UDim.new(0, 4),
134
+ SortOrder = Enum.SortOrder.LayoutOrder,
135
+ })
136
+ local _exp_1 = React.createElement(WeekLine, {
137
+ name = "Crew",
138
+ nameScale = scales.name,
139
+ dayScale = scales.day,
140
+ header = true,
141
+ cells = headerCells,
142
+ })
143
+ -- ▼ ReadonlyArray.map ▼
144
+ local _newValue_1 = table.create(#rows)
145
+ local _callback_1 = function(row)
146
+ local _attributes_1 = {
147
+ key = row.id,
148
+ name = row.label,
149
+ nameScale = scales.name,
150
+ dayScale = scales.day,
151
+ }
152
+ -- ▼ ReadonlyArray.map ▼
153
+ local _newValue_2 = table.create(#visible)
154
+ local _callback_2 = function(column)
155
+ local text = readCell(row, column.id)
156
+ local _object = {
157
+ id = column.id,
158
+ }
159
+ local _left = "text"
160
+ local _condition_1 = text
161
+ if _condition_1 == nil then
162
+ _condition_1 = empty
163
+ end
164
+ _object[_left] = _condition_1
165
+ _object.blank = text == nil
166
+ return _object
167
+ end
168
+ for _k, _v in visible do
169
+ _newValue_2[_k] = _callback_2(_v, _k - 1, visible)
170
+ end
171
+ -- ▲ ReadonlyArray.map ▲
172
+ _attributes_1.cells = _newValue_2
173
+ _attributes_1.onCell = if onCell ~= nil then function(columnId)
174
+ return onCell(row.id, columnId)
175
+ end else nil
176
+ return React.createElement(WeekLine, _attributes_1)
177
+ end
178
+ for _k, _v in rows do
179
+ _newValue_1[_k] = _callback_1(_v, _k - 1, rows)
180
+ end
181
+ -- ▲ ReadonlyArray.map ▲
182
+ return React.createElement(SxHost, _attributes, _exp, _exp_1, _newValue_1)
183
+ end
184
+ local default = WeekGrid
185
+ return {
186
+ default = default,
187
+ }
@@ -0,0 +1,9 @@
1
+ export interface WeekCellScales {
2
+ name: number;
3
+ day: number;
4
+ count: number;
5
+ }
6
+ /** Narrow keeps one day. A full week uses every column. */
7
+ export declare function weekColumnCount(count: number, narrow?: boolean): number;
8
+ /** Name plus equal day columns. The scales sum to 1 so the row fits its parent. */
9
+ export declare function weekCellScales(count: number, narrow?: boolean): WeekCellScales;
@@ -0,0 +1,25 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ --* Narrow keeps one day. A full week uses every column.
3
+ local function weekColumnCount(count, narrow)
4
+ if narrow == true then
5
+ return 1
6
+ end
7
+ if count < 1 then
8
+ return 1
9
+ end
10
+ return count
11
+ end
12
+ --* Name plus equal day columns. The scales sum to 1 so the row fits its parent.
13
+ local function weekCellScales(count, narrow)
14
+ local days = weekColumnCount(count, narrow)
15
+ local name = if narrow == true then 0.46 else 0.2
16
+ return {
17
+ name = name,
18
+ day = (1 - name) / days,
19
+ count = days,
20
+ }
21
+ end
22
+ return {
23
+ weekColumnCount = weekColumnCount,
24
+ weekCellScales = weekCellScales,
25
+ }
@@ -0,0 +1,3 @@
1
+ export { default as WeekGrid } from "./components/WeekGrid";
2
+ export { WeekGridCell, WeekGridColumn, WeekGridProps, WeekGridRow } from "./components/WeekGrid";
3
+ export { weekCellScales, weekColumnCount } from "./components/weekColumns";
@@ -0,0 +1,8 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local TS = _G[script]
3
+ local exports = {}
4
+ exports.WeekGrid = TS.import(script, script, "components", "WeekGrid").default
5
+ local _weekColumns = TS.import(script, script, "components", "weekColumns")
6
+ exports.weekCellScales = _weekColumns.weekCellScales
7
+ exports.weekColumnCount = _weekColumns.weekColumnCount
8
+ return exports