@rbxts/uiblox 0.2.0-alpha.35 → 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 (284) 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 +12 -0
  125. package/out/ui/packages/init.luau +36 -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/reorder/index.d.ts +2 -0
  188. package/out/ui/packages/reorder/init.luau +14 -0
  189. package/out/ui/packages/reorder/reorder.d.ts +24 -0
  190. package/out/ui/packages/reorder/reorder.luau +178 -0
  191. package/out/ui/packages/reorder/useReorderDrag.d.ts +15 -0
  192. package/out/ui/packages/reorder/useReorderDrag.luau +129 -0
  193. package/out/ui/packages/scroll/components/ScrollView.luau +76 -7
  194. package/out/ui/packages/select/components/Select.luau +18 -1
  195. package/out/ui/packages/select/components/Select.styles.luau +2 -5
  196. package/out/ui/packages/select/components/selectWidth.d.ts +2 -0
  197. package/out/ui/packages/select/components/selectWidth.luau +15 -0
  198. package/out/ui/packages/shadow/components/Shadow.luau +14 -2
  199. package/out/ui/packages/slider/components/RangeSlider.d.ts +16 -0
  200. package/out/ui/packages/slider/components/RangeSlider.luau +231 -0
  201. package/out/ui/packages/slider/components/RangeSlider.styles.d.ts +7 -0
  202. package/out/ui/packages/slider/components/RangeSlider.styles.luau +48 -0
  203. package/out/ui/packages/slider/components/Slider.d.ts +1 -0
  204. package/out/ui/packages/slider/components/Slider.luau +44 -11
  205. package/out/ui/packages/slider/components/Slider.styles.d.ts +1 -0
  206. package/out/ui/packages/slider/components/Slider.styles.luau +19 -5
  207. package/out/ui/packages/slider/components/rangeValue.d.ts +21 -0
  208. package/out/ui/packages/slider/components/rangeValue.luau +77 -0
  209. package/out/ui/packages/slider/components/sliderLabel.d.ts +4 -0
  210. package/out/ui/packages/slider/components/sliderLabel.luau +30 -0
  211. package/out/ui/packages/slider/index.d.ts +3 -0
  212. package/out/ui/packages/slider/init.luau +6 -0
  213. package/out/ui/packages/snackbar/components/Snackbar.d.ts +1 -0
  214. package/out/ui/packages/snackbar/components/Snackbar.luau +2 -0
  215. package/out/ui/packages/sparkline/components/Sparkline.d.ts +3 -0
  216. package/out/ui/packages/sparkline/components/Sparkline.luau +69 -7
  217. package/out/ui/packages/sparkline/index.d.ts +1 -1
  218. package/out/ui/packages/sparkline/init.luau +6 -1
  219. package/out/ui/packages/sparkline/sparklineLayout.d.ts +17 -0
  220. package/out/ui/packages/sparkline/sparklineLayout.luau +132 -8
  221. package/out/ui/packages/speedDial/components/SpeedDial.d.ts +1 -0
  222. package/out/ui/packages/speedDial/components/SpeedDial.luau +56 -9
  223. package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +1 -0
  224. package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +45 -3
  225. package/out/ui/packages/speedDial/components/speedDialLabel.d.ts +4 -0
  226. package/out/ui/packages/speedDial/components/speedDialLabel.luau +16 -0
  227. package/out/ui/packages/stateMatrix.d.ts +1 -0
  228. package/out/ui/packages/stateMatrix.luau +9 -0
  229. package/out/ui/packages/stepper/components/Stepper.d.ts +2 -0
  230. package/out/ui/packages/stepper/components/Stepper.luau +35 -7
  231. package/out/ui/packages/stepper/components/Stepper.styles.luau +3 -0
  232. package/out/ui/packages/stepper/components/stepState.d.ts +4 -2
  233. package/out/ui/packages/stepper/components/stepState.luau +12 -1
  234. package/out/ui/packages/stepper/index.d.ts +1 -1
  235. package/out/ui/packages/stepper/init.luau +3 -1
  236. package/out/ui/packages/switch/components/Switch.styles.luau +2 -5
  237. package/out/ui/packages/table/components/Table.luau +8 -5
  238. package/out/ui/packages/table/components/tableSort.d.ts +2 -0
  239. package/out/ui/packages/table/components/tableSort.luau +95 -0
  240. package/out/ui/packages/table/index.d.ts +1 -0
  241. package/out/ui/packages/table/init.luau +1 -0
  242. package/out/ui/packages/tabs/components/Tabs.luau +70 -2
  243. package/out/ui/packages/tabs/components/tabScroll.d.ts +2 -0
  244. package/out/ui/packages/tabs/components/tabScroll.luau +18 -0
  245. package/out/ui/packages/text/components/Text.d.ts +7 -0
  246. package/out/ui/packages/text/components/Text.luau +54 -0
  247. package/out/ui/packages/text/components/textBox.d.ts +12 -0
  248. package/out/ui/packages/text/components/textBox.luau +21 -0
  249. package/out/ui/packages/text/index.d.ts +2 -0
  250. package/out/ui/packages/text/init.luau +5 -0
  251. package/out/ui/packages/timeField/components/TimeField.d.ts +13 -0
  252. package/out/ui/packages/timeField/components/TimeField.luau +102 -0
  253. package/out/ui/packages/timeField/index.d.ts +4 -0
  254. package/out/ui/packages/timeField/init.luau +9 -0
  255. package/out/ui/packages/timeField/timeValue.d.ts +8 -0
  256. package/out/ui/packages/timeField/timeValue.luau +49 -0
  257. package/out/ui/packages/timeline/components/Timeline.d.ts +12 -0
  258. package/out/ui/packages/timeline/components/Timeline.luau +99 -0
  259. package/out/ui/packages/timeline/components/Timeline.styles.d.ts +2 -0
  260. package/out/ui/packages/timeline/components/Timeline.styles.luau +106 -0
  261. package/out/ui/packages/timeline/components/timelineRail.d.ts +4 -0
  262. package/out/ui/packages/timeline/components/timelineRail.luau +15 -0
  263. package/out/ui/packages/timeline/index.d.ts +3 -0
  264. package/out/ui/packages/timeline/init.luau +8 -0
  265. package/out/ui/packages/toast/components/Toast.d.ts +1 -0
  266. package/out/ui/packages/toast/components/Toast.luau +59 -12
  267. package/out/ui/packages/toast/components/Toast.styles.luau +6 -3
  268. package/out/ui/packages/toast/components/toastPlace.d.ts +12 -0
  269. package/out/ui/packages/toast/components/toastPlace.luau +31 -0
  270. package/out/ui/packages/tooltip/components/Tooltip.d.ts +1 -0
  271. package/out/ui/packages/tooltip/components/Tooltip.luau +109 -31
  272. package/out/ui/packages/tooltip/components/Tooltip.styles.luau +30 -0
  273. package/out/ui/packages/tooltip/components/tooltipBox.d.ts +4 -0
  274. package/out/ui/packages/tooltip/components/tooltipBox.luau +12 -0
  275. package/out/ui/packages/tooltip/components/tooltipPointer.d.ts +2 -0
  276. package/out/ui/packages/tooltip/components/tooltipPointer.luau +11 -0
  277. package/out/ui/packages/vectorEditor/components/VectorEditor.luau +1 -0
  278. package/out/ui/packages/weekGrid/components/WeekGrid.d.ts +24 -0
  279. package/out/ui/packages/weekGrid/components/WeekGrid.luau +187 -0
  280. package/out/ui/packages/weekGrid/components/weekColumns.d.ts +9 -0
  281. package/out/ui/packages/weekGrid/components/weekColumns.luau +25 -0
  282. package/out/ui/packages/weekGrid/index.d.ts +3 -0
  283. package/out/ui/packages/weekGrid/init.luau +8 -0
  284. package/package.json +67 -69
@@ -2,12 +2,16 @@ import { CustomizedProps } from "../../../../theme/index";
2
2
  export interface ImageListItem {
3
3
  src: string;
4
4
  title?: string;
5
+ color?: Color3;
6
+ aspect?: number;
5
7
  }
6
8
  export interface ImageListProps {
7
9
  items: ImageListItem[];
8
10
  cols?: number;
9
11
  gap?: number;
10
12
  itemSize?: number;
13
+ aspect?: number;
14
+ selected?: ReadonlyArray<number>;
11
15
  onItemActivated?: (index: number) => void;
12
16
  }
13
17
  declare function ImageList(props: CustomizedProps<Frame, ImageListProps>): JSX.Element;
@@ -1,8 +1,15 @@
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 TextService = TS.import(script, TS.getModule(script, "@rbxts", "services")).TextService
5
+ local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
4
6
  local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
5
- local imageListTitle = TS.import(script, script.Parent, "imageListLayout").imageListTitle
7
+ local _imageListLayout = TS.import(script, script.Parent, "imageListLayout")
8
+ local imageListCell = _imageListLayout.imageListCell
9
+ local imageListItemAspect = _imageListLayout.imageListItemAspect
10
+ local imageListSelected = _imageListLayout.imageListSelected
11
+ local imageListTitle = _imageListLayout.imageListTitle
12
+ local imageListTitleWrap = _imageListLayout.imageListTitleWrap
6
13
  local useImageListStyles = TS.import(script, script.Parent, "ImageList.styles").default
7
14
  local function ImageList(props)
8
15
  local _binding = props
@@ -10,41 +17,64 @@ local function ImageList(props)
10
17
  local cols = _binding.cols
11
18
  local gap = _binding.gap
12
19
  local itemSize = _binding.itemSize
20
+ local aspect = _binding.aspect
21
+ local selected = _binding.selected
13
22
  local onItemActivated = _binding.onItemActivated
14
23
  local className = _binding.className
15
24
  local sx = _binding.sx
16
25
  local id = _binding.id
17
26
  local ref = _binding.ref
27
+ local _binding_1 = useTheme()
28
+ local theme = _binding_1.theme
18
29
  local styles = useImageListStyles({
19
30
  cols = cols,
20
31
  gap = gap,
21
32
  itemSize = itemSize,
33
+ aspect = aspect,
22
34
  })
35
+ local font = theme.typography.fontFamilies.default or Enum.Font.SourceSans
36
+ local _condition = theme.typography.fontSizes.caption
37
+ if _condition == nil then
38
+ _condition = 12
39
+ end
40
+ local textSize = _condition
41
+ local pad = theme.spacing.calc(0.5) * 2
42
+ local bar = theme.spacing.calc(2.5)
23
43
  local _attributes = {
24
44
  tag = "frame",
25
45
  }
26
- local _condition = id
27
- if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
28
- _condition = "ImageList"
46
+ local _condition_1 = id
47
+ if not (_condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1 ~= "" and _condition_1) then
48
+ _condition_1 = "ImageList"
29
49
  end
30
- _attributes.key = _condition
50
+ _attributes.key = _condition_1
31
51
  _attributes.hostRef = ref
32
52
  _attributes.base = styles.root
33
53
  _attributes.className = className
34
54
  _attributes.sx = sx
35
- local _attributes_1 = table.clone(styles.grid)
55
+ local _attributes_1 = table.clone(styles.flow)
36
56
  setmetatable(_attributes_1, nil)
37
- local _exp = React.createElement("uigridlayout", _attributes_1)
57
+ local _exp = React.createElement("uilistlayout", _attributes_1)
38
58
  -- ▼ ReadonlyArray.map ▼
39
59
  local _newValue = table.create(#items)
40
60
  local _callback = function(item, index)
41
61
  local title = imageListTitle(item.title)
62
+ local picked = imageListSelected(selected, index)
63
+ local cell = imageListCell(itemSize, imageListItemAspect(item.aspect, aspect))
64
+ local textWidth = if title ~= nil then TextService:GetTextSize(title, textSize, font, Vector2.new(10000, 100)).X else 0
65
+ local wrap = title ~= nil and imageListTitleWrap(textWidth, cell.width - pad)
42
66
  local _attributes_2 = {
43
67
  key = `Tile-{index}`,
44
68
  }
45
69
  for _k, _v in styles.tile do
46
70
  _attributes_2[_k] = _v
47
71
  end
72
+ _attributes_2.Size = UDim2.fromOffset(cell.width, cell.height)
73
+ for _k, _v in (if item.color ~= nil then {
74
+ BackgroundColor3 = item.color,
75
+ } else {}) do
76
+ _attributes_2[_k] = _v
77
+ end
48
78
  _attributes_2.LayoutOrder = index
49
79
  _attributes_2.Event = {
50
80
  Activated = function()
@@ -58,6 +88,12 @@ local function ImageList(props)
58
88
  local _attributes_3 = table.clone(styles.corner)
59
89
  setmetatable(_attributes_3, nil)
60
90
  local _exp_1 = React.createElement("uicorner", _attributes_3)
91
+ local _condition_2 = picked
92
+ if _condition_2 then
93
+ local _attributes_4 = table.clone(styles.selected)
94
+ setmetatable(_attributes_4, nil)
95
+ _condition_2 = React.createElement("uistroke", _attributes_4)
96
+ end
61
97
  local _attributes_4 = {
62
98
  key = "Image",
63
99
  }
@@ -66,8 +102,8 @@ local function ImageList(props)
66
102
  end
67
103
  _attributes_4.Image = item.src
68
104
  local _exp_2 = React.createElement("imagelabel", _attributes_4)
69
- local _condition_1 = title ~= nil
70
- if _condition_1 then
105
+ local _condition_3 = title ~= nil
106
+ if _condition_3 then
71
107
  local _attributes_5 = {
72
108
  key = "Title",
73
109
  }
@@ -75,11 +111,21 @@ local function ImageList(props)
75
111
  _attributes_5[_k] = _v
76
112
  end
77
113
  _attributes_5.Text = title
114
+ for _k, _v in (if wrap then {
115
+ AnchorPoint = Vector2.new(0, 1),
116
+ Position = UDim2.new(0, 0, 1, 0),
117
+ Size = UDim2.new(1, 0, 0, bar),
118
+ AutomaticSize = Enum.AutomaticSize.Y,
119
+ TextWrapped = true,
120
+ TextTruncate = Enum.TextTruncate.None,
121
+ } else {}) do
122
+ _attributes_5[_k] = _v
123
+ end
78
124
  local _attributes_6 = table.clone(styles.titlePad)
79
125
  setmetatable(_attributes_6, nil)
80
- _condition_1 = (React.createElement("textlabel", _attributes_5, React.createElement("uipadding", _attributes_6)))
126
+ _condition_3 = (React.createElement("textlabel", _attributes_5, React.createElement("uipadding", _attributes_6)))
81
127
  end
82
- return React.createElement("imagebutton", _attributes_2, _exp_1, _exp_2, _condition_1)
128
+ return React.createElement("imagebutton", _attributes_2, _exp_1, _condition_2, _exp_2, _condition_3)
83
129
  end
84
130
  for _k, _v in items do
85
131
  _newValue[_k] = _callback(_v, _k - 1, items)
@@ -2,5 +2,6 @@ declare const useImageListStyles: (props: {
2
2
  cols?: number;
3
3
  gap?: number;
4
4
  itemSize?: number;
5
+ aspect?: number;
5
6
  }) => import("../../../../theme/index").ClassNameMap<string>;
6
7
  export default useImageListStyles;
@@ -5,40 +5,46 @@ local Common = _theme.Common
5
5
  local componentStyles = _theme.componentStyles
6
6
  local createStyles = _theme.createStyles
7
7
  local _imageListLayout = TS.import(script, script.Parent, "imageListLayout")
8
+ local imageListCell = _imageListLayout.imageListCell
8
9
  local imageListCols = _imageListLayout.imageListCols
9
10
  local imageListGap = _imageListLayout.imageListGap
10
- local imageListItemSize = _imageListLayout.imageListItemSize
11
11
  local useImageListStyles = componentStyles("ImageList", function(theme, _param)
12
12
  local cols = _param.cols
13
13
  local gap = _param.gap
14
14
  local itemSize = _param.itemSize
15
- local size = imageListItemSize(itemSize)
15
+ local aspect = _param.aspect
16
+ local columns = imageListCols(cols)
17
+ local cell = imageListCell(itemSize, aspect)
16
18
  local pad = theme.spacing.calc(imageListGap(gap))
17
19
  local bar = theme.spacing.calc(2.5)
20
+ local span = columns * cell.width + math.max(0, columns - 1) * pad
18
21
  return createStyles({
19
22
  root = {
20
- AutomaticSize = Enum.AutomaticSize.XY,
21
- Size = UDim2.fromScale(0, 0),
23
+ AutomaticSize = Enum.AutomaticSize.Y,
24
+ Size = UDim2.fromOffset(span, 0),
22
25
  BackgroundTransparency = 1,
23
26
  BorderSizePixel = 0,
24
27
  },
25
- grid = {
26
- CellSize = UDim2.fromOffset(size, size),
27
- CellPadding = UDim2.fromOffset(pad, pad),
28
+ flow = {
28
29
  FillDirection = Enum.FillDirection.Horizontal,
29
- FillDirectionMaxCells = imageListCols(cols),
30
+ Wraps = true,
31
+ Padding = UDim.new(0, pad),
30
32
  SortOrder = Enum.SortOrder.LayoutOrder,
31
- StartCorner = Enum.StartCorner.TopLeft,
32
33
  HorizontalAlignment = Enum.HorizontalAlignment.Left,
33
34
  VerticalAlignment = Enum.VerticalAlignment.Top,
34
35
  },
35
36
  tile = {
36
- Size = UDim2.fromOffset(size, size),
37
+ Size = UDim2.fromOffset(cell.width, cell.height),
37
38
  BackgroundColor3 = theme.palette.surface.input,
38
39
  BorderSizePixel = 0,
39
40
  AutoButtonColor = false,
40
41
  ClipsDescendants = true,
41
42
  },
43
+ selected = {
44
+ Color = theme.palette.primary.main,
45
+ Thickness = 2,
46
+ ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
47
+ },
42
48
  corner = {
43
49
  CornerRadius = UDim.new(0, theme.shape.borderRadius),
44
50
  },
@@ -1,4 +1,14 @@
1
1
  export declare function imageListCols(cols?: number): number;
2
2
  export declare function imageListGap(gap?: number): number;
3
3
  export declare function imageListItemSize(itemSize?: number): number;
4
+ export declare function imageListAspect(aspect?: number): number;
5
+ /** Item ratio wins. The list ratio is used when the item does not set one. */
6
+ export declare function imageListItemAspect(item?: number, list?: number): number;
7
+ export declare function imageListCell(itemSize?: number, aspect?: number): {
8
+ width: number;
9
+ height: number;
10
+ };
11
+ export declare function imageListSelected(selected: ReadonlyArray<number> | undefined, index: number): boolean;
4
12
  export declare function imageListTitle(title?: string): string | undefined;
13
+ /** A title wider than the tile wraps. A short title stays one line. */
14
+ export declare function imageListTitleWrap(textWidth: number, box: number): boolean;
@@ -17,15 +17,59 @@ local function imageListItemSize(itemSize)
17
17
  end
18
18
  return math.floor(itemSize)
19
19
  end
20
+ local function imageListAspect(aspect)
21
+ if aspect == nil or aspect <= 0 then
22
+ return 1
23
+ end
24
+ return aspect
25
+ end
26
+ --* Item ratio wins. The list ratio is used when the item does not set one.
27
+ local function imageListItemAspect(item, list)
28
+ if item ~= nil and item > 0 then
29
+ return item
30
+ end
31
+ return imageListAspect(list)
32
+ end
33
+ local function imageListCell(itemSize, aspect)
34
+ local width = imageListItemSize(itemSize)
35
+ local height = math.max(1, math.floor(width / imageListAspect(aspect)))
36
+ return {
37
+ width = width,
38
+ height = height,
39
+ }
40
+ end
41
+ local function imageListSelected(selected, index)
42
+ if selected == nil then
43
+ return false
44
+ end
45
+ for _, value in selected do
46
+ if value == index then
47
+ return true
48
+ end
49
+ end
50
+ return false
51
+ end
20
52
  local function imageListTitle(title)
21
53
  if title == nil or #title == 0 then
22
54
  return nil
23
55
  end
24
56
  return title
25
57
  end
58
+ --* A title wider than the tile wraps. A short title stays one line.
59
+ local function imageListTitleWrap(textWidth, box)
60
+ if box <= 0 then
61
+ return false
62
+ end
63
+ return textWidth > box
64
+ end
26
65
  return {
27
66
  imageListCols = imageListCols,
28
67
  imageListGap = imageListGap,
29
68
  imageListItemSize = imageListItemSize,
69
+ imageListAspect = imageListAspect,
70
+ imageListItemAspect = imageListItemAspect,
71
+ imageListCell = imageListCell,
72
+ imageListSelected = imageListSelected,
30
73
  imageListTitle = imageListTitle,
74
+ imageListTitleWrap = imageListTitleWrap,
31
75
  }
@@ -1,4 +1,5 @@
1
1
  export * from "./circularProgress/index";
2
+ export * from "./cover/index";
2
3
  export * from "./skeleton/index";
3
4
  export * from "./divider/index";
4
5
  export * from "./errorBoundary/index";
@@ -11,12 +12,17 @@ export * from "./layout/index";
11
12
  export * from "./preloader/index";
12
13
  export * from "./progressBar/index";
13
14
  export * from "./scroll/index";
15
+ export * from "./reorder/index";
14
16
  export * from "./shadow/index";
15
17
  export * from "./sidebar/index";
16
18
  export * from "./toast/index";
17
19
  export * from "./treeView/index";
18
20
  export * from "./typography/index";
21
+ export * from "./text/index";
22
+ export * from "./weekGrid/index";
19
23
  export * from "./button/index";
24
+ export * from "./buttonGroup/index";
25
+ export * from "./copyButton/index";
20
26
  export * from "./checkbox/index";
21
27
  export * from "./colorPicker/index";
22
28
  export * from "./fontEditor/index";
@@ -24,6 +30,7 @@ export * from "./loadingStroke/index";
24
30
  export * from "./numberInput/index";
25
31
  export * from "./numberRangeEditor/index";
26
32
  export * from "./dateRange/index";
33
+ export * from "./timeField/index";
27
34
  export * from "./sparkline/index";
28
35
  export * from "./rectEditor/index";
29
36
  export * from "./rayEditor/index";
@@ -33,6 +40,7 @@ export * from "./vectorEditor/index";
33
40
  export * from "./cframeEditor/index";
34
41
  export * from "./enumPicker/index";
35
42
  export * from "./popup/index";
43
+ export * from "./popover/index";
36
44
  export * from "./modal/index";
37
45
  export * from "./backdrop/index";
38
46
  export * from "./dialog/index";
@@ -42,13 +50,17 @@ export * from "./chip/index";
42
50
  export * from "./badge/index";
43
51
  export * from "./brickColorPicker/index";
44
52
  export * from "./avatar/index";
53
+ export * from "./avatarGroup/index";
45
54
  export * from "./assetField/index";
46
55
  export * from "./gradientEditor/index";
47
56
  export * from "./drawer/index";
48
57
  export * from "./breadcrumbs/index";
49
58
  export * from "./pagination/index";
59
+ export * from "./pager/index";
50
60
  export * from "./stepper/index";
61
+ export * from "./timeline/index";
51
62
  export * from "./accordion/index";
63
+ export * from "./collapse/index";
52
64
  export * from "./snackbar/index";
53
65
  export * from "./table/index";
54
66
  export * from "./autocomplete/index";
@@ -4,6 +4,9 @@ local exports = {}
4
4
  for _k, _v in TS.import(script, script, "circularProgress") or {} do
5
5
  exports[_k] = _v
6
6
  end
7
+ for _k, _v in TS.import(script, script, "cover") or {} do
8
+ exports[_k] = _v
9
+ end
7
10
  for _k, _v in TS.import(script, script, "skeleton") or {} do
8
11
  exports[_k] = _v
9
12
  end
@@ -40,6 +43,9 @@ end
40
43
  for _k, _v in TS.import(script, script, "scroll") or {} do
41
44
  exports[_k] = _v
42
45
  end
46
+ for _k, _v in TS.import(script, script, "reorder") or {} do
47
+ exports[_k] = _v
48
+ end
43
49
  for _k, _v in TS.import(script, script, "shadow") or {} do
44
50
  exports[_k] = _v
45
51
  end
@@ -55,9 +61,21 @@ end
55
61
  for _k, _v in TS.import(script, script, "typography") or {} do
56
62
  exports[_k] = _v
57
63
  end
64
+ for _k, _v in TS.import(script, script, "text") or {} do
65
+ exports[_k] = _v
66
+ end
67
+ for _k, _v in TS.import(script, script, "weekGrid") or {} do
68
+ exports[_k] = _v
69
+ end
58
70
  for _k, _v in TS.import(script, script, "button") or {} do
59
71
  exports[_k] = _v
60
72
  end
73
+ for _k, _v in TS.import(script, script, "buttonGroup") or {} do
74
+ exports[_k] = _v
75
+ end
76
+ for _k, _v in TS.import(script, script, "copyButton") or {} do
77
+ exports[_k] = _v
78
+ end
61
79
  for _k, _v in TS.import(script, script, "checkbox") or {} do
62
80
  exports[_k] = _v
63
81
  end
@@ -79,6 +97,9 @@ end
79
97
  for _k, _v in TS.import(script, script, "dateRange") or {} do
80
98
  exports[_k] = _v
81
99
  end
100
+ for _k, _v in TS.import(script, script, "timeField") or {} do
101
+ exports[_k] = _v
102
+ end
82
103
  for _k, _v in TS.import(script, script, "sparkline") or {} do
83
104
  exports[_k] = _v
84
105
  end
@@ -106,6 +127,9 @@ end
106
127
  for _k, _v in TS.import(script, script, "popup") or {} do
107
128
  exports[_k] = _v
108
129
  end
130
+ for _k, _v in TS.import(script, script, "popover") or {} do
131
+ exports[_k] = _v
132
+ end
109
133
  for _k, _v in TS.import(script, script, "modal") or {} do
110
134
  exports[_k] = _v
111
135
  end
@@ -133,6 +157,9 @@ end
133
157
  for _k, _v in TS.import(script, script, "avatar") or {} do
134
158
  exports[_k] = _v
135
159
  end
160
+ for _k, _v in TS.import(script, script, "avatarGroup") or {} do
161
+ exports[_k] = _v
162
+ end
136
163
  for _k, _v in TS.import(script, script, "assetField") or {} do
137
164
  exports[_k] = _v
138
165
  end
@@ -148,12 +175,21 @@ end
148
175
  for _k, _v in TS.import(script, script, "pagination") or {} do
149
176
  exports[_k] = _v
150
177
  end
178
+ for _k, _v in TS.import(script, script, "pager") or {} do
179
+ exports[_k] = _v
180
+ end
151
181
  for _k, _v in TS.import(script, script, "stepper") or {} do
152
182
  exports[_k] = _v
153
183
  end
184
+ for _k, _v in TS.import(script, script, "timeline") or {} do
185
+ exports[_k] = _v
186
+ end
154
187
  for _k, _v in TS.import(script, script, "accordion") or {} do
155
188
  exports[_k] = _v
156
189
  end
190
+ for _k, _v in TS.import(script, script, "collapse") or {} do
191
+ exports[_k] = _v
192
+ end
157
193
  for _k, _v in TS.import(script, script, "snackbar") or {} do
158
194
  exports[_k] = _v
159
195
  end
@@ -17,6 +17,10 @@ export interface InputProps {
17
17
  rounded?: boolean;
18
18
  clearsTextOnFocus?: boolean;
19
19
  size?: ControlSize;
20
+ multiline?: boolean;
21
+ minRows?: number;
22
+ maxRows?: number;
23
+ maxLength?: number;
20
24
  reducedMotion?: boolean;
21
25
  startAdornment?: React.Element;
22
26
  endAdornment?: React.Element;
@@ -15,6 +15,7 @@ local Divider = TS.import(script, script.Parent.Parent.Parent, "divider").Divide
15
15
  local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
16
16
  local Orientations = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Orientations
17
17
  local useInputStyles = TS.import(script, script.Parent, "Input.styles").default
18
+ local clampText = TS.import(script, script.Parent, "clampText").clampText
18
19
  local syncInputDraft = TS.import(script, script.Parent, "inputDraft").syncInputDraft
19
20
  local function adornmentAlign()
20
21
  return React.createElement("uilistlayout", {
@@ -54,6 +55,11 @@ local function Input(props)
54
55
  rounded = true
55
56
  end
56
57
  local size = _binding.size
58
+ local multiline = _binding.multiline
59
+ if multiline == nil then
60
+ multiline = false
61
+ end
62
+ local maxLength = _binding.maxLength
57
63
  local reducedMotion = _binding.reducedMotion
58
64
  local startAdornment = _binding.startAdornment
59
65
  local endAdornment = _binding.endAdornment
@@ -74,6 +80,7 @@ local function Input(props)
74
80
  end
75
81
  local draft, setDraft = useState(_condition)
76
82
  local focused, setFocused = useState(false)
83
+ local contentHeight, setContentHeight = useState(0)
77
84
  local _binding_1 = useTheme()
78
85
  local theme = _binding_1.theme
79
86
  local active = canActivate(disabled, loading)
@@ -82,6 +89,7 @@ local function Input(props)
82
89
  local _object = table.clone(props)
83
90
  setmetatable(_object, nil)
84
91
  _object.focused = focused
92
+ _object.contentHeight = contentHeight
85
93
  local _binding_2 = useInputStyles(_object)
86
94
  local root = _binding_2.root
87
95
  local font = _binding_2.font
@@ -98,9 +106,9 @@ local function Input(props)
98
106
  local stroke = _binding_2.stroke
99
107
  useEffect(function()
100
108
  setDraft(function(current)
101
- return syncInputDraft(focusedRef.current, text, current)
109
+ return clampText(syncInputDraft(focusedRef.current, text, current), maxLength)
102
110
  end)
103
- end, { text })
111
+ end, { text, maxLength })
104
112
  local showStroke = variant == "outlined" or variant == "filled"
105
113
  local showCorner = rounded
106
114
  local _attributes = {
@@ -167,6 +175,7 @@ local function Input(props)
167
175
  _attributes_3.TextEditable = editable
168
176
  _attributes_3.Text = draft
169
177
  _attributes_3.PlaceholderText = placeholder
178
+ _attributes_3.MultiLine = multiline
170
179
  for _k, _v in cx(hasError and errorColorText) do
171
180
  _attributes_3[_k] = _v
172
181
  end
@@ -175,9 +184,19 @@ local function Input(props)
175
184
  if not editable then
176
185
  return nil
177
186
  end
178
- setDraft(rbx.Text)
187
+ local capped = clampText(rbx.Text, maxLength)
188
+ if rbx.Text ~= capped then
189
+ rbx.Text = capped
190
+ return nil
191
+ end
192
+ setDraft(capped)
179
193
  if focusedRef.current and onInput then
180
- onInput(rbx.Text)
194
+ onInput(capped)
195
+ end
196
+ end,
197
+ TextBounds = function(rbx)
198
+ if multiline then
199
+ setContentHeight(rbx.TextBounds.Y)
181
200
  end
182
201
  end,
183
202
  }
@@ -194,20 +213,20 @@ local function Input(props)
194
213
  end
195
214
  end,
196
215
  ReturnPressedFromOnScreenKeyboard = function(rbx)
197
- if not editable or entered.current or not onEnterPressed then
216
+ if not editable or multiline or entered.current or not onEnterPressed then
198
217
  return nil
199
218
  end
200
219
  entered.current = true
201
- onEnterPressed(rbx.Text)
220
+ onEnterPressed(clampText(rbx.Text, maxLength))
202
221
  end,
203
222
  FocusLost = function(rbx, enterPressed)
204
223
  focusedRef.current = false
205
224
  setFocused(false)
206
- local committed = rbx.Text
225
+ local committed = clampText(rbx.Text, maxLength)
207
226
  if editable and onTextChanged then
208
227
  onTextChanged(committed)
209
228
  end
210
- if editable and enterPressed and not entered.current and onEnterPressed then
229
+ if editable and not multiline and enterPressed and not entered.current and onEnterPressed then
211
230
  onEnterPressed(committed)
212
231
  end
213
232
  entered.current = false
@@ -218,7 +237,7 @@ local function Input(props)
218
237
  if _condition_5 == nil then
219
238
  _condition_5 = ""
220
239
  end
221
- setDraft(_condition_5)
240
+ setDraft(clampText(_condition_5, maxLength))
222
241
  end,
223
242
  }
224
243
  local _exp = React.createElement("textbox", _attributes_3)
@@ -250,6 +269,7 @@ local function Input(props)
250
269
  local _exp_1 = React.createElement("frame", _attributes_2, _condition_2, _condition_3, _condition_4, _exp, _condition_5, _condition_6)
251
270
  local _exp_2 = variant == "standard" and (React.createElement(Divider, {
252
271
  padding = 0,
272
+ weight = if focused then 2 else nil,
253
273
  orientation = Orientations.Horizontal,
254
274
  className = cx(divider, hasError and errorColorFrame),
255
275
  }))
@@ -1,5 +1,6 @@
1
1
  import { InputProps } from "./Input";
2
2
  declare const useInputStyles: (props: InputProps & {
3
3
  focused?: boolean;
4
+ contentHeight?: number;
4
5
  }) => import("../../../../theme/index").ClassNameMap<string>;
5
6
  export default useInputStyles;
@@ -4,7 +4,9 @@ local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "the
4
4
  local controlMetrics = _theme.controlMetrics
5
5
  local createStyles = _theme.createStyles
6
6
  local componentStyles = _theme.componentStyles
7
+ local focusRing = _theme.focusRing
7
8
  local inputInsets = TS.import(script, script.Parent, "inputInsets").inputInsets
9
+ local multilineHeight = TS.import(script, script.Parent, "multilineHeight").multilineHeight
8
10
  local useInputStyles = componentStyles("Input", function(theme, _param)
9
11
  local color = _param.color
10
12
  if color == nil then
@@ -42,15 +44,31 @@ local useInputStyles = componentStyles("Input", function(theme, _param)
42
44
  hasError = false
43
45
  end
44
46
  local size = _param.size
47
+ local multiline = _param.multiline
48
+ if multiline == nil then
49
+ multiline = false
50
+ end
51
+ local minRows = _param.minRows
52
+ if minRows == nil then
53
+ minRows = 2
54
+ end
55
+ local maxRows = _param.maxRows
56
+ if maxRows == nil then
57
+ maxRows = 5
58
+ end
59
+ local contentHeight = _param.contentHeight
60
+ if contentHeight == nil then
61
+ contentHeight = 0
62
+ end
45
63
  local metrics = controlMetrics(theme.density, size)
46
64
  local hasStart = startAdornment ~= nil
47
65
  local hasEnd = endAdornment ~= nil or loading
48
66
  local icon = metrics.icon
49
67
  local gap = theme.padding.calc(1)
50
68
  local insets = inputInsets(hasStart, hasEnd, icon, gap)
51
- local fieldHeight = metrics.height + (if variant == "standard" then 0 else theme.padding.calc(1))
69
+ local verticalPad = theme.padding.calc(1)
70
+ local fieldHeight = if multiline then multilineHeight(contentHeight, metrics.font, minRows, maxRows, verticalPad) else metrics.height + (if variant == "standard" then 0 else verticalPad)
52
71
  local accent = if color == "primary" then theme.palette.primary.main else theme.palette.text.primary
53
- local focusAccent = if hasError then theme.palette.status.error.main else theme.palette.focus
54
72
  local makeRootStyles = function()
55
73
  local defaultStyles = {}
56
74
  defaultStyles.BackgroundTransparency = 1
@@ -96,9 +114,15 @@ local useInputStyles = componentStyles("Input", function(theme, _param)
96
114
  defaultStyles.Position = UDim2.new(0, insets.left, 0, 0)
97
115
  defaultStyles.Size = UDim2.new(1, -(insets.left + insets.right), 1, 0)
98
116
  defaultStyles.TextXAlignment = Enum.TextXAlignment.Left
99
- defaultStyles.TextTruncate = Enum.TextTruncate.AtEnd
117
+ defaultStyles.TextYAlignment = if multiline then Enum.TextYAlignment.Top else Enum.TextYAlignment.Center
118
+ defaultStyles.TextWrapped = multiline
119
+ defaultStyles.TextTruncate = if multiline then Enum.TextTruncate.None else Enum.TextTruncate.AtEnd
100
120
  defaultStyles.ClearTextOnFocus = clearsTextOnFocus
101
121
  defaultStyles.ZIndex = 12000
122
+ if multiline then
123
+ defaultStyles.Position = UDim2.new(0, insets.left, 0, verticalPad)
124
+ defaultStyles.Size = UDim2.new(1, -(insets.left + insets.right), 1, -verticalPad * 2)
125
+ end
102
126
  return defaultStyles
103
127
  end
104
128
  local makeMarginStyles = function()
@@ -132,7 +156,7 @@ local useInputStyles = componentStyles("Input", function(theme, _param)
132
156
  ZIndex = 13000,
133
157
  }
134
158
  end
135
- return createStyles({
159
+ local _object = {
136
160
  root = makeRootStyles(),
137
161
  font = {
138
162
  TextSize = metrics.font,
@@ -162,19 +186,25 @@ local useInputStyles = componentStyles("Input", function(theme, _param)
162
186
  },
163
187
  divider = {
164
188
  Position = UDim2.new(0, 0, 0, fieldHeight),
165
- BackgroundColor3 = accent,
189
+ BackgroundColor3 = if focused then theme.palette.focus else accent,
166
190
  ZIndex = 11000,
167
191
  },
168
192
  corner = {
169
193
  CornerRadius = UDim.new(0, theme.shape.borderRadius),
170
194
  },
171
- stroke = {
172
- Color = if hasError then theme.palette.status.error.main elseif focused then focusAccent else accent,
173
- Transparency = if focused or hasError then 0 else 0.45,
174
- Thickness = if focused then 1.5 else 1,
175
- ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
176
- },
177
- })
195
+ }
196
+ local _left = "stroke"
197
+ local _object_1 = {
198
+ Color = if hasError then theme.palette.status.error.main else accent,
199
+ Transparency = if focused or hasError then 0 else 0.45,
200
+ Thickness = 1,
201
+ ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
202
+ }
203
+ for _k, _v in (if focused then focusRing(if hasError then theme.palette.status.error.main else theme.palette.focus) else {}) do
204
+ _object_1[_k] = _v
205
+ end
206
+ _object[_left] = _object_1
207
+ return createStyles(_object)
178
208
  end)
179
209
  local default = useInputStyles
180
210
  return {