@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,6 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local TS = _G[script]
3
+ local exports = {}
4
+ exports.Collapse = TS.import(script, script, "components", "Collapse").default
5
+ exports.collapseOpen = TS.import(script, script, "components", "collapseOpen").collapseOpen
6
+ return exports
@@ -14,6 +14,8 @@ local insertColorStop = _sequenceValue.insertColorStop
14
14
  local patchColorStop = _sequenceValue.patchColorStop
15
15
  local readColorStops = _sequenceValue.readColorStops
16
16
  local removeColorStop = _sequenceValue.removeColorStop
17
+ local sequenceMove = _sequenceValue.sequenceMove
18
+ local sequencePress = _sequenceValue.sequencePress
17
19
  local writeColorStops = _sequenceValue.writeColorStops
18
20
  local function ColorSequenceEditor(props)
19
21
  local _binding = props
@@ -73,7 +75,7 @@ local function ColorSequenceEditor(props)
73
75
  _attributes_2.Active = active
74
76
  _attributes_2.Event = {
75
77
  InputBegan = function(rbx, input)
76
- if not active or input.UserInputType ~= Enum.UserInputType.MouseButton1 then
78
+ if not active or not sequencePress(input.UserInputType.Name) then
77
79
  return nil
78
80
  end
79
81
  local alpha = atAlpha(rbx, input.Position)
@@ -106,7 +108,7 @@ local function ColorSequenceEditor(props)
106
108
  setSelected(hitStop(_newValue_1, alpha, 1))
107
109
  end,
108
110
  InputChanged = function(rbx, input)
109
- if not dragging.current or input.UserInputType ~= Enum.UserInputType.MouseMovement then
111
+ if not dragging.current or not sequenceMove(input.UserInputType.Name) then
110
112
  return nil
111
113
  end
112
114
  commit(patchColorStop(stops, index, {
@@ -14,6 +14,8 @@ local insertNumberStop = _sequenceValue.insertNumberStop
14
14
  local patchNumberStop = _sequenceValue.patchNumberStop
15
15
  local readNumberStops = _sequenceValue.readNumberStops
16
16
  local removeNumberStop = _sequenceValue.removeNumberStop
17
+ local sequenceMove = _sequenceValue.sequenceMove
18
+ local sequencePress = _sequenceValue.sequencePress
17
19
  local writeNumberStops = _sequenceValue.writeNumberStops
18
20
  local function NumberSequenceEditor(props)
19
21
  local _binding = props
@@ -75,7 +77,7 @@ local function NumberSequenceEditor(props)
75
77
  _attributes_2.Active = active
76
78
  _attributes_2.Event = {
77
79
  InputBegan = function(rbx, input)
78
- if not active or input.UserInputType ~= Enum.UserInputType.MouseButton1 then
80
+ if not active or not sequencePress(input.UserInputType.Name) then
79
81
  return nil
80
82
  end
81
83
  local alpha = atAlpha(rbx, input.Position)
@@ -108,7 +110,7 @@ local function NumberSequenceEditor(props)
108
110
  setSelected(hitStop(_newValue_1, alpha, 1))
109
111
  end,
110
112
  InputChanged = function(rbx, input)
111
- if not dragging.current or input.UserInputType ~= Enum.UserInputType.MouseMovement then
113
+ if not dragging.current or not sequenceMove(input.UserInputType.Name) then
112
114
  return nil
113
115
  end
114
116
  commit(patchNumberStop(stops, index, {
@@ -23,4 +23,6 @@ export declare function sampleNumber(stops: NumberStop[], time: number): {
23
23
  export declare function insertNumberStop(stops: NumberStop[], time: number): NumberStop[];
24
24
  export declare function patchNumberStop(stops: NumberStop[], index: number, patch: Partial<NumberStop>): NumberStop[];
25
25
  export declare function removeNumberStop(stops: NumberStop[], index: number): NumberStop[];
26
+ export declare function sequencePress(kind: string): kind is "MouseButton1" | "Touch";
27
+ export declare function sequenceMove(kind: string): kind is "MouseMovement" | "Touch";
26
28
  export declare function hitStop(times: number[], alpha: number, threshold: number): number;
@@ -277,6 +277,12 @@ local function removeNumberStop(stops, index)
277
277
  end
278
278
  return updated
279
279
  end
280
+ local function sequencePress(kind)
281
+ return kind == "MouseButton1" or kind == "Touch"
282
+ end
283
+ local function sequenceMove(kind)
284
+ return kind == "MouseMovement" or kind == "Touch"
285
+ end
280
286
  local function hitStop(times, alpha, threshold)
281
287
  local best = -1
282
288
  local distance = threshold
@@ -303,5 +309,7 @@ return {
303
309
  insertNumberStop = insertNumberStop,
304
310
  patchNumberStop = patchNumberStop,
305
311
  removeNumberStop = removeNumberStop,
312
+ sequencePress = sequencePress,
313
+ sequenceMove = sequenceMove,
306
314
  hitStop = hitStop,
307
315
  }
@@ -6,6 +6,6 @@ export { default as NumberSequenceEditor } from "./components/NumberSequenceEdit
6
6
  export { NumberSequenceEditorProps } from "./components/NumberSequenceEditor";
7
7
  export { byteToUnit, channelToByte, colorToHex, hsvToColor3, hsvToRgb, parseByte, parseHex, resolveHsv, rgbToHsv, sameColor, } from "./components/colorValue";
8
8
  export { Hsv } from "./components/colorValue";
9
- export { hitStop, insertColorStop, insertNumberStop, lerpColor, patchColorStop, patchNumberStop, readColorStops, readNumberStops, removeColorStop, removeNumberStop, sampleColor, sampleNumber, writeColorStops, writeNumberStops, } from "./components/sequenceValue";
9
+ export { hitStop, insertColorStop, insertNumberStop, lerpColor, patchColorStop, patchNumberStop, readColorStops, readNumberStops, removeColorStop, removeNumberStop, sampleColor, sampleNumber, sequenceMove, sequencePress, writeColorStops, writeNumberStops, } from "./components/sequenceValue";
10
10
  export { ColorStop, NumberStop } from "./components/sequenceValue";
11
11
  export { colorBytes, recentColors, rememberColor } from "./components/colorValue";
@@ -28,6 +28,8 @@ exports.removeColorStop = _sequenceValue.removeColorStop
28
28
  exports.removeNumberStop = _sequenceValue.removeNumberStop
29
29
  exports.sampleColor = _sequenceValue.sampleColor
30
30
  exports.sampleNumber = _sequenceValue.sampleNumber
31
+ exports.sequenceMove = _sequenceValue.sequenceMove
32
+ exports.sequencePress = _sequenceValue.sequencePress
31
33
  exports.writeColorStops = _sequenceValue.writeColorStops
32
34
  exports.writeNumberStops = _sequenceValue.writeNumberStops
33
35
  local _colorValue_1 = TS.import(script, script, "components", "colorValue")
@@ -0,0 +1,8 @@
1
+ import { CustomizedProps } from "../../../../theme/index";
2
+ export interface CopyButtonProps {
3
+ text: string;
4
+ onCopy?: (text: string) => void;
5
+ disabled?: boolean;
6
+ }
7
+ declare function CopyButton(props: CustomizedProps<TextButton, CopyButtonProps>): JSX.Element;
8
+ export default CopyButton;
@@ -0,0 +1,32 @@
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 Button = TS.import(script, script.Parent.Parent.Parent, "button").Button
5
+ local copyInvoke = TS.import(script, script.Parent, "copyInvoke").copyInvoke
6
+ local function CopyButton(props)
7
+ local _binding = props
8
+ local text = _binding.text
9
+ local onCopy = _binding.onCopy
10
+ local disabled = _binding.disabled
11
+ local className = _binding.className
12
+ local sx = _binding.sx
13
+ local id = _binding.id
14
+ local ref = _binding.ref
15
+ return React.createElement(Button, {
16
+ id = id,
17
+ ref = ref,
18
+ className = className,
19
+ sx = sx,
20
+ text = "Copy",
21
+ size = "small",
22
+ variant = "text",
23
+ disabled = disabled,
24
+ onLeftClick = function()
25
+ return copyInvoke(text, onCopy)
26
+ end,
27
+ })
28
+ end
29
+ local default = CopyButton
30
+ return {
31
+ default = default,
32
+ }
@@ -0,0 +1,2 @@
1
+ /** Hands the string to the caller. Does nothing when there is no callback. */
2
+ export declare function copyInvoke(text: string, onCopy?: (text: string) => void): string | undefined;
@@ -0,0 +1,12 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ --* Hands the string to the caller. Does nothing when there is no callback.
3
+ local function copyInvoke(text, onCopy)
4
+ if onCopy == nil then
5
+ return nil
6
+ end
7
+ onCopy(text)
8
+ return text
9
+ end
10
+ return {
11
+ copyInvoke = copyInvoke,
12
+ }
@@ -0,0 +1,3 @@
1
+ export { default as CopyButton } from "./components/CopyButton";
2
+ export { CopyButtonProps } from "./components/CopyButton";
3
+ export { copyInvoke } from "./components/copyInvoke";
@@ -0,0 +1,6 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local TS = _G[script]
3
+ local exports = {}
4
+ exports.CopyButton = TS.import(script, script, "components", "CopyButton").default
5
+ exports.copyInvoke = TS.import(script, script, "components", "copyInvoke").copyInvoke
6
+ return exports
@@ -0,0 +1,8 @@
1
+ import React from "@rbxts/react";
2
+ import { CustomizedProps } from "../../../../theme/index";
3
+ export interface CoverProps {
4
+ value?: number;
5
+ children?: React.ReactNode;
6
+ }
7
+ declare function Cover(props: CustomizedProps<Frame, CoverProps>): JSX.Element;
8
+ export default Cover;
@@ -0,0 +1,47 @@
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 coverFill = TS.import(script, script.Parent, "coverFill").coverFill
7
+ local function Cover(props)
8
+ local _binding = props
9
+ local value = _binding.value
10
+ local children = _binding.children
11
+ local className = _binding.className
12
+ local sx = _binding.sx
13
+ local id = _binding.id
14
+ local ref = _binding.ref
15
+ local _binding_1 = useTheme()
16
+ local theme = _binding_1.theme
17
+ local fill = coverFill(value)
18
+ local _attributes = {
19
+ tag = "frame",
20
+ }
21
+ local _condition = id
22
+ if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
23
+ _condition = "Cover"
24
+ end
25
+ _attributes.key = _condition
26
+ _attributes.hostRef = ref
27
+ _attributes.base = {
28
+ Size = UDim2.new(1, 0, 1, 0),
29
+ BackgroundTransparency = 1,
30
+ BorderSizePixel = 0,
31
+ ClipsDescendants = true,
32
+ }
33
+ _attributes.className = className
34
+ _attributes.sx = sx
35
+ return React.createElement(SxHost, _attributes, children, if fill > 0 then (React.createElement("frame", {
36
+ key = "Shade",
37
+ Size = UDim2.new(1, 0, fill, 0),
38
+ BackgroundColor3 = theme.palette.backdrop,
39
+ BackgroundTransparency = 0.35,
40
+ BorderSizePixel = 0,
41
+ ZIndex = 2,
42
+ })) else nil)
43
+ end
44
+ local default = Cover
45
+ return {
46
+ default = default,
47
+ }
@@ -0,0 +1,2 @@
1
+ /** Remaining fraction of the child to shade. Zero when there is nothing left. */
2
+ export declare function coverFill(value?: number): number;
@@ -0,0 +1,14 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ --* Remaining fraction of the child to shade. Zero when there is nothing left.
3
+ local function coverFill(value)
4
+ if value == nil or value <= 0 then
5
+ return 0
6
+ end
7
+ if value >= 1 then
8
+ return 1
9
+ end
10
+ return value
11
+ end
12
+ return {
13
+ coverFill = coverFill,
14
+ }
@@ -0,0 +1,3 @@
1
+ export { default as Cover } from "./components/Cover";
2
+ export { CoverProps } from "./components/Cover";
3
+ export { coverFill } from "./components/coverFill";
@@ -0,0 +1,6 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local TS = _G[script]
3
+ local exports = {}
4
+ exports.Cover = TS.import(script, script, "components", "Cover").default
5
+ exports.coverFill = TS.import(script, script, "components", "coverFill").coverFill
6
+ return exports
@@ -6,6 +6,9 @@ export interface DateRangePickerProps {
6
6
  value: DateSpan;
7
7
  onChange: (value: DateSpan) => void;
8
8
  onMonthChange: (year: number, month: number) => void;
9
+ view?: "month" | "week";
10
+ anchor?: number;
11
+ onAnchorChange?: (stamp: number) => void;
9
12
  }
10
13
  declare function DateRangePicker(props: CustomizedProps<Frame, DateRangePickerProps>): JSX.Element;
11
14
  export default DateRangePicker;
@@ -8,8 +8,10 @@ local dateStamp = _dateRangeValue.dateStamp
8
8
  local daysInMonth = _dateRangeValue.daysInMonth
9
9
  local formatStamp = _dateRangeValue.formatStamp
10
10
  local orderSpan = _dateRangeValue.orderSpan
11
+ local shiftDay = _dateRangeValue.shiftDay
11
12
  local shiftMonth = _dateRangeValue.shiftMonth
12
13
  local weekday = _dateRangeValue.weekday
14
+ local weekStamps = _dateRangeValue.weekStamps
13
15
  local MONTHS = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }
14
16
  local WEEKDAYS = { "S", "M", "T", "W", "T", "F", "S" }
15
17
  local function covers(stamp, value)
@@ -30,10 +32,20 @@ local function DateRangePicker(props)
30
32
  local value = _binding.value
31
33
  local onChange = _binding.onChange
32
34
  local onMonthChange = _binding.onMonthChange
35
+ local view = _binding.view
36
+ local anchor = _binding.anchor
37
+ local onAnchorChange = _binding.onAnchorChange
33
38
  local className = _binding.className
34
39
  local sx = _binding.sx
35
40
  local id = _binding.id
36
41
  local ref = _binding.ref
42
+ local weekMode = view == "week"
43
+ local _condition = anchor
44
+ if _condition == nil then
45
+ _condition = dateStamp(year, month, 1)
46
+ end
47
+ local anchorStamp = _condition
48
+ local week = if weekMode then weekStamps(anchorStamp) else {}
37
49
  local _binding_1 = useTheme()
38
50
  local theme = _binding_1.theme
39
51
  local lead = weekday(year, month, 1)
@@ -87,17 +99,37 @@ local function DateRangePicker(props)
87
99
  end
88
100
  end
89
101
  local move = function(delta)
102
+ if weekMode then
103
+ local moved = shiftDay(anchorStamp, delta * 7)
104
+ local _result = onAnchorChange
105
+ if _result ~= nil then
106
+ _result(moved)
107
+ end
108
+ onMonthChange(math.floor(moved / 10000), math.floor(moved / 100) % 100)
109
+ return nil
110
+ end
90
111
  local shifted = shiftMonth(year, month, delta)
91
112
  onMonthChange(shifted.year, shifted.month)
92
113
  end
114
+ local _result
115
+ if weekMode and #week == 7 then
116
+ _result = `{formatStamp(week[1])} – {formatStamp(week[7])}`
117
+ else
118
+ local _condition_1 = MONTHS[month]
119
+ if _condition_1 == nil then
120
+ _condition_1 = ""
121
+ end
122
+ _result = `{_condition_1} {year}`
123
+ end
124
+ local title = _result
93
125
  local _attributes = {
94
126
  tag = "frame",
95
127
  }
96
- local _condition = id
97
- if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
98
- _condition = "DateRangePicker"
128
+ local _condition_1 = id
129
+ if not (_condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1 ~= "" and _condition_1) then
130
+ _condition_1 = "DateRangePicker"
99
131
  end
100
- _attributes.key = _condition
132
+ _attributes.key = _condition_1
101
133
  _attributes.hostRef = ref
102
134
  _attributes.base = {
103
135
  Size = UDim2.new(1, 0, 0, 0),
@@ -118,9 +150,14 @@ local function DateRangePicker(props)
118
150
  Padding = UDim.new(0, 8),
119
151
  SortOrder = Enum.SortOrder.LayoutOrder,
120
152
  })
121
- local _exp_2 = React.createElement("textbutton", {
122
- Text = "Prev",
123
- Size = UDim2.fromOffset(56, 28),
153
+ local _exp_2 = React.createElement("frame", {
154
+ Size = UDim2.new(1, 0, 0, 28),
155
+ BackgroundTransparency = 1,
156
+ BorderSizePixel = 0,
157
+ LayoutOrder = 0,
158
+ }, React.createElement("textbutton", {
159
+ Text = if weekMode then "Earlier" else "Prev",
160
+ Size = UDim2.fromOffset(if weekMode then 72 else 56, 28),
124
161
  BackgroundTransparency = 1,
125
162
  BorderSizePixel = 0,
126
163
  TextColor3 = theme.palette.text.secondary,
@@ -131,31 +168,21 @@ local function DateRangePicker(props)
131
168
  return move(-1)
132
169
  end,
133
170
  },
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),
171
+ }), React.createElement("textlabel", {
172
+ Text = title,
173
+ AnchorPoint = Vector2.new(0.5, 0),
174
+ Position = UDim2.fromScale(0.5, 0),
175
+ Size = UDim2.fromOffset(if weekMode then 200 else 140, 28),
151
176
  BackgroundTransparency = 1,
152
177
  BorderSizePixel = 0,
153
- LayoutOrder = 0,
154
- }, _exp_2, React.createElement("textlabel", _attributes_1), React.createElement("textbutton", {
155
- Text = "Next",
178
+ TextColor3 = theme.palette.text.primary,
179
+ Font = theme.typography.fontFamilies.semibold,
180
+ TextSize = theme.typography.fontSizes.body,
181
+ }), React.createElement("textbutton", {
182
+ Text = if weekMode then "Later" else "Next",
156
183
  AnchorPoint = Vector2.new(1, 0),
157
184
  Position = UDim2.fromScale(1, 0),
158
- Size = UDim2.fromOffset(56, 28),
185
+ Size = UDim2.fromOffset(if weekMode then 72 else 56, 28),
159
186
  BackgroundTransparency = 1,
160
187
  BorderSizePixel = 0,
161
188
  TextColor3 = theme.palette.text.secondary,
@@ -167,7 +194,7 @@ local function DateRangePicker(props)
167
194
  end,
168
195
  },
169
196
  }))
170
- local _exp_4 = React.createElement("textlabel", {
197
+ local _exp_3 = React.createElement("textlabel", {
171
198
  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
199
  Size = UDim2.new(1, 0, 0, 16),
173
200
  BackgroundTransparency = 1,
@@ -178,74 +205,126 @@ local function DateRangePicker(props)
178
205
  TextSize = theme.typography.fontSizes.caption,
179
206
  LayoutOrder = 1,
180
207
  })
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,
208
+ local _result_1
209
+ if weekMode then
210
+ local _exp_4 = React.createElement("uilistlayout", {
211
+ FillDirection = Enum.FillDirection.Horizontal,
212
+ Padding = UDim.new(0, 4),
213
+ SortOrder = Enum.SortOrder.LayoutOrder,
214
+ })
215
+ -- ▼ ReadonlyArray.map ▼
216
+ local _newValue = table.create(#week)
217
+ local _callback = function(stamp, index)
218
+ local chosen = covers(stamp, value)
219
+ local endpoint = stamp == value.start or stamp == value.finish
220
+ local _attributes_1 = {
221
+ key = `week-{stamp}`,
222
+ }
223
+ local _condition_2 = WEEKDAYS[index + 1]
224
+ if _condition_2 == nil then
225
+ _condition_2 = ""
226
+ end
227
+ _attributes_1.Text = `{_condition_2}\n{stamp % 100}`
228
+ _attributes_1.LayoutOrder = index
229
+ _attributes_1.Size = UDim2.new(1 / 7, -4, 1, 0)
230
+ _attributes_1.BackgroundColor3 = if chosen then theme.palette.primary.main else theme.palette.surface.input
231
+ _attributes_1.BackgroundTransparency = if chosen and not endpoint then 0.55 else 0
232
+ _attributes_1.BorderSizePixel = 0
233
+ _attributes_1.TextColor3 = if endpoint then theme.palette.primary.on else theme.palette.text.primary
234
+ _attributes_1.Font = theme.typography.fontFamilies.default
235
+ _attributes_1.TextSize = theme.typography.fontSizes.caption
236
+ _attributes_1.TextWrapped = true
237
+ _attributes_1.AutoButtonColor = false
238
+ _attributes_1.Event = {
239
+ Activated = function()
240
+ return pick(stamp)
241
+ end,
242
+ }
243
+ return React.createElement("textbutton", _attributes_1, React.createElement("uicorner", {
244
+ CornerRadius = UDim.new(0, 4),
245
+ }))
246
+ end
247
+ for _k, _v in week do
248
+ _newValue[_k] = _callback(_v, _k - 1, week)
249
+ end
250
+ -- ▲ ReadonlyArray.map ▲
251
+ _result_1 = (React.createElement("frame", {
252
+ Size = UDim2.new(1, 0, 0, 56),
194
253
  BackgroundTransparency = 1,
195
254
  BorderSizePixel = 0,
196
- TextColor3 = theme.palette.text.secondary,
197
- Font = theme.typography.fontFamilies.default,
198
- TextSize = theme.typography.fontSizes.caption,
255
+ LayoutOrder = 2,
256
+ }, _exp_4, _newValue))
257
+ else
258
+ local _exp_4 = React.createElement("uigridlayout", {
259
+ CellSize = UDim2.fromOffset(36, 28),
260
+ CellPadding = UDim2.fromOffset(4, 4),
261
+ FillDirectionMaxCells = 7,
262
+ SortOrder = Enum.SortOrder.LayoutOrder,
199
263
  })
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,
264
+ -- ▼ ReadonlyArray.map ▼
265
+ local _newValue = table.create(#WEEKDAYS)
266
+ local _callback = function(label, index)
267
+ return React.createElement("textlabel", {
268
+ key = `week-{index}`,
269
+ Text = label,
270
+ LayoutOrder = index,
215
271
  BackgroundTransparency = 1,
216
272
  BorderSizePixel = 0,
273
+ TextColor3 = theme.palette.text.secondary,
274
+ Font = theme.typography.fontFamilies.default,
275
+ TextSize = theme.typography.fontSizes.caption,
217
276
  })
218
277
  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,
278
+ for _k, _v in WEEKDAYS do
279
+ _newValue[_k] = _callback(_v, _k - 1, WEEKDAYS)
280
+ end
281
+ -- ▲ ReadonlyArray.map ▲
282
+ -- ▼ ReadonlyArray.map ▼
283
+ local _newValue_1 = table.create(#cells)
284
+ local _callback_1 = function(cell)
285
+ local stamp = cell.stamp
286
+ local chosen = stamp ~= nil and covers(stamp, value)
287
+ local endpoint = stamp ~= nil and (stamp == value.start or stamp == value.finish)
288
+ if stamp == nil or cell.day == nil then
289
+ return React.createElement("frame", {
290
+ key = `blank-{cell.order}`,
291
+ LayoutOrder = 10 + cell.order,
292
+ BackgroundTransparency = 1,
293
+ BorderSizePixel = 0,
294
+ })
295
+ end
296
+ return React.createElement("textbutton", {
297
+ key = `day-{stamp}`,
298
+ Text = tostring(cell.day),
299
+ LayoutOrder = 10 + cell.order,
300
+ BackgroundColor3 = if chosen then theme.palette.primary.main else theme.palette.surface.input,
301
+ BackgroundTransparency = if chosen and not endpoint then 0.55 else 0,
302
+ BorderSizePixel = 0,
303
+ TextColor3 = if endpoint then theme.palette.primary.on else theme.palette.text.primary,
304
+ Font = theme.typography.fontFamilies.default,
305
+ TextSize = theme.typography.fontSizes.body,
306
+ AutoButtonColor = false,
307
+ Event = {
308
+ Activated = function()
309
+ return pick(stamp)
310
+ end,
311
+ },
312
+ }, React.createElement("uicorner", {
313
+ CornerRadius = UDim.new(0, 4),
314
+ }))
315
+ end
316
+ for _k, _v in cells do
317
+ _newValue_1[_k] = _callback_1(_v, _k - 1, cells)
318
+ end
319
+ -- ▲ ReadonlyArray.map ▲
320
+ _result_1 = (React.createElement("frame", {
321
+ Size = UDim2.new(1, 0, 0, 248),
322
+ BackgroundTransparency = 1,
225
323
  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)
324
+ LayoutOrder = 2,
325
+ }, _exp_4, _newValue, _newValue_1))
241
326
  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))
327
+ return React.createElement(SxHost, _attributes, _exp, _exp_1, _exp_2, _exp_3, _result_1)
249
328
  end
250
329
  local default = DateRangePicker
251
330
  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[];