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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/README.md +1 -18
  2. package/out/theme/constants/NumberConstants.d.ts +10 -0
  3. package/out/theme/constants/NumberConstants.luau +12 -0
  4. package/out/theme/interfaces/density/controlMetrics.luau +2 -2
  5. package/out/theme/interfaces/palette/Palette.d.ts +7 -0
  6. package/out/theme/interfaces/spacing/Shape.d.ts +6 -0
  7. package/out/theme/interfaces/theme/Theme.d.ts +6 -0
  8. package/out/theme/interfaces/typography/FontFamilies.luau +1 -0
  9. package/out/theme/interfaces/typography/FontFamilyOptions.d.ts +1 -1
  10. package/out/theme/interfaces/typography/FontSizeOptions.d.ts +1 -1
  11. package/out/theme/interfaces/typography/FontSizes.luau +2 -0
  12. package/out/theme/interfaces/typography/Variants.d.ts +3 -1
  13. package/out/theme/interfaces/typography/Variants.luau +25 -1
  14. package/out/theme/styles/utilities/focusRing.d.ts +2 -0
  15. package/out/theme/styles/utilities/focusRing.luau +3 -0
  16. package/out/theme/styles/utilities/index.d.ts +1 -1
  17. package/out/theme/styles/utilities/init.luau +3 -1
  18. package/out/theme/themes/DarkTheme.luau +4 -0
  19. package/out/theme/themes/LightTheme.luau +4 -0
  20. package/out/theme/themes/createPalette.luau +15 -0
  21. package/out/ui/packages/accordion/components/Accordion.luau +84 -40
  22. package/out/ui/packages/accordion/components/Accordion.styles.luau +35 -17
  23. package/out/ui/packages/alert/components/Alert.luau +15 -11
  24. package/out/ui/packages/alert/components/Alert.styles.luau +37 -26
  25. package/out/ui/packages/appBar/components/AppBar.luau +35 -13
  26. package/out/ui/packages/appBar/components/AppBar.styles.luau +41 -35
  27. package/out/ui/packages/autocomplete/components/Autocomplete.luau +4 -0
  28. package/out/ui/packages/avatar/components/Avatar.d.ts +2 -0
  29. package/out/ui/packages/avatar/components/Avatar.luau +9 -2
  30. package/out/ui/packages/avatar/components/Avatar.styles.luau +7 -0
  31. package/out/ui/packages/avatarGroup/components/AvatarGroup.luau +9 -4
  32. package/out/ui/packages/avatarGroup/components/AvatarGroup.styles.luau +6 -1
  33. package/out/ui/packages/badge/components/Badge.luau +14 -11
  34. package/out/ui/packages/badge/components/Badge.styles.luau +5 -1
  35. package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +4 -3
  36. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +6 -2
  37. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.styles.luau +4 -0
  38. package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +20 -2
  39. package/out/ui/packages/brickColorPicker/components/BrickColorPicker.styles.luau +72 -66
  40. package/out/ui/packages/button/components/Button.luau +61 -34
  41. package/out/ui/packages/button/components/buttonPaint.d.ts +16 -0
  42. package/out/ui/packages/button/components/buttonPaint.luau +70 -0
  43. package/out/ui/packages/buttonGroup/components/ButtonGroup.d.ts +1 -0
  44. package/out/ui/packages/buttonGroup/components/ButtonGroup.luau +17 -2
  45. package/out/ui/packages/card/components/Card.styles.luau +4 -2
  46. package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +9 -1
  47. package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +50 -41
  48. package/out/ui/packages/checkbox/components/Checkbox.luau +5 -4
  49. package/out/ui/packages/checkbox/components/checkboxLook.d.ts +2 -2
  50. package/out/ui/packages/checkbox/components/checkboxLook.luau +2 -2
  51. package/out/ui/packages/chip/components/Chip.luau +16 -14
  52. package/out/ui/packages/chip/components/Chip.styles.luau +7 -4
  53. package/out/ui/packages/circularProgress/components/CircularProgress.luau +10 -3
  54. package/out/ui/packages/codeEditor/components/CodeEditor.d.ts +12 -0
  55. package/out/ui/packages/codeEditor/components/CodeEditor.luau +262 -0
  56. package/out/ui/packages/codeEditor/components/CodeEditor.styles.d.ts +6 -0
  57. package/out/ui/packages/codeEditor/components/CodeEditor.styles.luau +124 -0
  58. package/out/ui/packages/codeEditor/highlightCode.d.ts +11 -0
  59. package/out/ui/packages/codeEditor/highlightCode.luau +503 -0
  60. package/out/ui/packages/codeEditor/index.d.ts +2 -0
  61. package/out/ui/packages/codeEditor/init.luau +5 -0
  62. package/out/ui/packages/colorPicker/components/ColorPicker.luau +9 -1
  63. package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +74 -67
  64. package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +12 -4
  65. package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +12 -4
  66. package/out/ui/packages/dateRange/components/DateRangePicker.luau +31 -19
  67. package/out/ui/packages/dialog/components/Dialog.styles.luau +4 -2
  68. package/out/ui/packages/divider/components/Divider.luau +3 -1
  69. package/out/ui/packages/divider/components/Divider.styles.luau +1 -0
  70. package/out/ui/packages/drawer/components/Drawer.d.ts +1 -0
  71. package/out/ui/packages/drawer/components/Drawer.luau +43 -14
  72. package/out/ui/packages/drawer/components/Drawer.styles.luau +13 -5
  73. package/out/ui/packages/drawer/components/drawerPlacement.d.ts +2 -0
  74. package/out/ui/packages/drawer/components/drawerPlacement.luau +18 -0
  75. package/out/ui/packages/editorFace.d.ts +22 -0
  76. package/out/ui/packages/editorFace.luau +49 -0
  77. package/out/ui/packages/fab/components/Fab.luau +19 -6
  78. package/out/ui/packages/fab/components/Fab.styles.luau +4 -3
  79. package/out/ui/packages/fab/components/fabSize.d.ts +1 -1
  80. package/out/ui/packages/fontEditor/components/FontEditor.luau +13 -3
  81. package/out/ui/packages/fontEditor/components/FontEditor.styles.luau +36 -27
  82. package/out/ui/packages/gradientEditor/components/GradientEditor.luau +21 -13
  83. package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +52 -44
  84. package/out/ui/packages/icon/components/DrawnGlyph.d.ts +11 -0
  85. package/out/ui/packages/icon/components/DrawnGlyph.luau +87 -0
  86. package/out/ui/packages/icon/components/Icon.d.ts +6 -2
  87. package/out/ui/packages/icon/components/Icon.luau +23 -3
  88. package/out/ui/packages/icon/components/Icon.styles.luau +3 -0
  89. package/out/ui/packages/icon/components/glyphs.d.ts +28 -0
  90. package/out/ui/packages/icon/components/glyphs.luau +64 -0
  91. package/out/ui/packages/icon/index.d.ts +1 -0
  92. package/out/ui/packages/iconButton/components/IconButton.d.ts +5 -2
  93. package/out/ui/packages/iconButton/components/IconButton.luau +83 -16
  94. package/out/ui/packages/iconButton/components/IconButton.styles.luau +4 -27
  95. package/out/ui/packages/iconButton/components/iconButtonBox.d.ts +11 -0
  96. package/out/ui/packages/iconButton/components/iconButtonBox.luau +48 -0
  97. package/out/ui/packages/iconButton/components/transportGlyph.d.ts +1 -0
  98. package/out/ui/packages/iconButton/components/transportGlyph.luau +4 -0
  99. package/out/ui/packages/imageList/components/ImageList.luau +11 -36
  100. package/out/ui/packages/imageList/components/ImageList.styles.luau +1 -0
  101. package/out/ui/packages/imageList/components/imageListLayout.d.ts +0 -2
  102. package/out/ui/packages/imageList/components/imageListLayout.luau +0 -8
  103. package/out/ui/packages/index.d.ts +1 -0
  104. package/out/ui/packages/init.luau +3 -0
  105. package/out/ui/packages/input/components/Input.luau +46 -29
  106. package/out/ui/packages/input/components/Input.styles.luau +8 -11
  107. package/out/ui/packages/input/components/fieldChrome.d.ts +5 -0
  108. package/out/ui/packages/input/components/fieldChrome.luau +11 -0
  109. package/out/ui/packages/layout/components/Box.luau +92 -13
  110. package/out/ui/packages/layout/components/Box.styles.d.ts +0 -2
  111. package/out/ui/packages/layout/components/Box.styles.luau +0 -9
  112. package/out/ui/packages/layout/components/Grid.luau +81 -16
  113. package/out/ui/packages/layout/components/Pad.d.ts +24 -0
  114. package/out/ui/packages/layout/components/Pad.luau +88 -0
  115. package/out/ui/packages/layout/components/Stack.luau +79 -13
  116. package/out/ui/packages/link/components/Link.luau +19 -13
  117. package/out/ui/packages/link/components/Link.styles.luau +10 -1
  118. package/out/ui/packages/listItem/components/ListItem.luau +61 -4
  119. package/out/ui/packages/listItem/components/ListItem.styles.d.ts +1 -0
  120. package/out/ui/packages/listItem/components/ListItem.styles.luau +28 -11
  121. package/out/ui/packages/listItem/components/listItemInk.d.ts +1 -1
  122. package/out/ui/packages/listItem/components/listItemLayout.d.ts +12 -2
  123. package/out/ui/packages/listItem/components/listItemLayout.luau +29 -2
  124. package/out/ui/packages/markdown/components/Markdown.luau +163 -50
  125. package/out/ui/packages/markdown/components/Markdown.styles.luau +125 -76
  126. package/out/ui/packages/markdown/components/MarkdownEditor.luau +215 -146
  127. package/out/ui/packages/markdown/components/MarkdownEditor.styles.d.ts +1 -0
  128. package/out/ui/packages/markdown/components/MarkdownEditor.styles.luau +153 -83
  129. package/out/ui/packages/markdown/index.d.ts +1 -1
  130. package/out/ui/packages/markdown/parseMarkdown.d.ts +9 -1
  131. package/out/ui/packages/markdown/parseMarkdown.luau +350 -29
  132. package/out/ui/packages/menu/components/Menu.d.ts +1 -1
  133. package/out/ui/packages/menu/components/Menu.luau +12 -11
  134. package/out/ui/packages/menu/components/Menu.styles.luau +6 -1
  135. package/out/ui/packages/menu/components/menuIcon.d.ts +1 -1
  136. package/out/ui/packages/numberInput/components/NumberInput.luau +19 -4
  137. package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +9 -1
  138. package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.styles.luau +23 -16
  139. package/out/ui/packages/pager/components/Pager.luau +15 -13
  140. package/out/ui/packages/pager/components/Pager.styles.luau +5 -0
  141. package/out/ui/packages/pagination/components/Pagination.styles.luau +4 -1
  142. package/out/ui/packages/paper/components/Paper.luau +17 -11
  143. package/out/ui/packages/paper/components/Paper.styles.luau +12 -5
  144. package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +9 -1
  145. package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +24 -19
  146. package/out/ui/packages/popover/components/Popover.d.ts +1 -1
  147. package/out/ui/packages/popover/components/Popover.luau +6 -4
  148. package/out/ui/packages/popover/components/Popover.styles.luau +6 -0
  149. package/out/ui/packages/popup/components/Popup.d.ts +2 -0
  150. package/out/ui/packages/popup/components/Popup.luau +64 -2
  151. package/out/ui/packages/popup/components/placement.luau +6 -4
  152. package/out/ui/packages/progressBar/components/ProgressBar.luau +1 -1
  153. package/out/ui/packages/progressBar/components/ProgressBar.styles.luau +3 -2
  154. package/out/ui/packages/radioGroup/components/RadioGroup.luau +2 -1
  155. package/out/ui/packages/rating/components/Rating.luau +45 -3
  156. package/out/ui/packages/rating/components/Rating.styles.luau +1 -1
  157. package/out/ui/packages/rayEditor/components/RayEditor.luau +9 -1
  158. package/out/ui/packages/rayEditor/components/RayEditor.styles.luau +17 -11
  159. package/out/ui/packages/rectEditor/components/RectEditor.luau +9 -1
  160. package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +49 -42
  161. package/out/ui/packages/select/components/Select.d.ts +2 -0
  162. package/out/ui/packages/select/components/Select.luau +148 -106
  163. package/out/ui/packages/select/components/Select.styles.d.ts +2 -0
  164. package/out/ui/packages/select/components/Select.styles.luau +29 -5
  165. package/out/ui/packages/shadow/components/Shadow.luau +188 -19
  166. package/out/ui/packages/sidebar/components/Sidebar.styles.luau +1 -0
  167. package/out/ui/packages/skeleton/components/Skeleton.luau +4 -0
  168. package/out/ui/packages/slider/components/RangeSlider.luau +6 -5
  169. package/out/ui/packages/slider/components/Slider.luau +11 -16
  170. package/out/ui/packages/sparkline/components/Sparkline.luau +7 -5
  171. package/out/ui/packages/speedDial/components/SpeedDial.luau +4 -1
  172. package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +5 -0
  173. package/out/ui/packages/speedDial/components/speedDialLabel.d.ts +1 -1
  174. package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
  175. package/out/ui/packages/stepper/components/Stepper.styles.luau +9 -6
  176. package/out/ui/packages/switch/components/Switch.luau +2 -2
  177. package/out/ui/packages/switch/components/switchLook.d.ts +3 -3
  178. package/out/ui/packages/switch/components/switchLook.luau +4 -10
  179. package/out/ui/packages/table/components/Table.d.ts +1 -0
  180. package/out/ui/packages/table/components/Table.luau +92 -53
  181. package/out/ui/packages/table/components/Table.styles.luau +23 -6
  182. package/out/ui/packages/table/components/tableColumns.d.ts +2 -0
  183. package/out/ui/packages/table/components/tableColumns.luau +2 -0
  184. package/out/ui/packages/tabs/components/Tabs.luau +7 -4
  185. package/out/ui/packages/tabs/components/Tabs.styles.luau +12 -11
  186. package/out/ui/packages/tabs/components/tabIndicator.d.ts +7 -0
  187. package/out/ui/packages/tabs/components/tabIndicator.luau +21 -0
  188. package/out/ui/packages/text/components/Text.d.ts +2 -0
  189. package/out/ui/packages/text/components/Text.luau +12 -2
  190. package/out/ui/packages/timeField/components/TimeField.luau +11 -7
  191. package/out/ui/packages/timeline/components/Timeline.luau +35 -32
  192. package/out/ui/packages/timeline/components/Timeline.styles.luau +19 -10
  193. package/out/ui/packages/toast/components/Toast.luau +168 -72
  194. package/out/ui/packages/toast/components/Toast.styles.luau +36 -19
  195. package/out/ui/packages/toast/components/toastPlace.d.ts +4 -0
  196. package/out/ui/packages/toast/components/toastPlace.luau +13 -0
  197. package/out/ui/packages/toast/enums/ToastVariants.d.ts +2 -1
  198. package/out/ui/packages/toast/enums/ToastVariants.luau +1 -0
  199. package/out/ui/packages/toggleButton/components/ToggleButton.luau +43 -4
  200. package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +1 -1
  201. package/out/ui/packages/tooltip/components/Tooltip.styles.luau +2 -2
  202. package/out/ui/packages/treeView/components/TreeView.luau +12 -13
  203. package/out/ui/packages/treeView/components/TreeView.styles.luau +6 -0
  204. package/out/ui/packages/typography/components/Typography.d.ts +2 -0
  205. package/out/ui/packages/typography/components/Typography.luau +8 -0
  206. package/out/ui/packages/typography/components/Typography.styles.luau +3 -1
  207. package/out/ui/packages/udimEditor/components/UDimEditor.luau +9 -1
  208. package/out/ui/packages/udimEditor/components/UDimEditor.styles.luau +25 -18
  209. package/out/ui/packages/vectorEditor/components/VectorEditor.luau +17 -3
  210. package/out/ui/packages/vectorEditor/components/VectorEditor.styles.luau +30 -16
  211. package/out/ui/packages/virtualList/components/VirtualList.styles.luau +1 -0
  212. package/package.json +69 -67
@@ -3,8 +3,11 @@ local TS = _G[script]
3
3
  local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
4
4
  local createStyles = _theme.createStyles
5
5
  local componentStyles = _theme.componentStyles
6
+ local _editorFace = TS.import(script, script.Parent.Parent.Parent, "editorFace")
7
+ local editorPad = _editorFace.editorPad
8
+ local editorText = _editorFace.editorText
6
9
  local useColorPickerStyles = componentStyles("ColorPicker", function(theme)
7
- return createStyles({
10
+ local _object = {
8
11
  root = {
9
12
  Size = UDim2.new(1, 0, 0, 0),
10
13
  AutomaticSize = Enum.AutomaticSize.Y,
@@ -15,7 +18,7 @@ local useColorPickerStyles = componentStyles("ColorPicker", function(theme)
15
18
  },
16
19
  column = {
17
20
  FillDirection = Enum.FillDirection.Vertical,
18
- Padding = UDim.new(0, theme.padding.calc(0.75)),
21
+ Padding = UDim.new(0, editorPad(theme)),
19
22
  SortOrder = Enum.SortOrder.LayoutOrder,
20
23
  },
21
24
  row = {
@@ -25,7 +28,7 @@ local useColorPickerStyles = componentStyles("ColorPicker", function(theme)
25
28
  },
26
29
  rowLayout = {
27
30
  FillDirection = Enum.FillDirection.Horizontal,
28
- Padding = UDim.new(0, theme.padding.calc(0.5)),
31
+ Padding = UDim.new(0, editorPad(theme)),
29
32
  VerticalAlignment = Enum.VerticalAlignment.Center,
30
33
  SortOrder = Enum.SortOrder.LayoutOrder,
31
34
  },
@@ -86,72 +89,76 @@ local useColorPickerStyles = componentStyles("ColorPicker", function(theme)
86
89
  BorderSizePixel = 0,
87
90
  },
88
91
  channel = {
89
- Size = UDim2.new(1 / 3, -theme.padding.calc(0.5), 0, theme.spacing.calc(3)),
92
+ Size = UDim2.new(1 / 3, -editorPad(theme), 0, theme.spacing.calc(3)),
90
93
  BackgroundTransparency = 1,
91
94
  },
92
- label = {
93
- Size = UDim2.new(0, theme.spacing.calc(1.5), 1, 0),
94
- BackgroundTransparency = 1,
95
- Font = theme.typography.fontFamilies.default,
96
- TextSize = theme.typography.fontSizes.button,
97
- TextColor3 = theme.palette.text.secondary,
98
- TextXAlignment = Enum.TextXAlignment.Left,
99
- },
100
- channelField = {
101
- Size = UDim2.new(1, -theme.spacing.calc(1.5), 1, 0),
102
- BackgroundTransparency = 1,
103
- },
104
- field = {
105
- Size = UDim2.new(1, 0, 0, theme.spacing.calc(3)),
106
- BackgroundTransparency = 1,
107
- BorderSizePixel = 0,
108
- },
109
- swatchButton = {
110
- Size = UDim2.fromOffset(theme.spacing.calc(3), theme.spacing.calc(3)),
111
- BorderSizePixel = 0,
112
- AutoButtonColor = false,
113
- Text = "",
114
- },
115
- value = {
116
- Size = UDim2.new(1, -theme.spacing.calc(4), 1, 0),
117
- BackgroundTransparency = 1,
118
- },
119
- shell = {
120
- Size = UDim2.fromScale(1, 1),
121
- BackgroundColor3 = theme.palette.surface.elevated,
122
- BorderSizePixel = 0,
123
- },
124
- shellPad = {
125
- PaddingTop = UDim.new(0, theme.padding.calc(1)),
126
- PaddingBottom = UDim.new(0, theme.padding.calc(1)),
127
- PaddingLeft = UDim.new(0, theme.padding.calc(1)),
128
- PaddingRight = UDim.new(0, theme.padding.calc(1)),
129
- },
130
- shellStroke = {
131
- Color = theme.palette.divider,
132
- Thickness = 1,
133
- },
134
- recent = {
135
- Size = UDim2.new(1, 0, 0, theme.spacing.calc(2)),
136
- BackgroundTransparency = 1,
137
- },
138
- recentChip = {
139
- Size = UDim2.fromOffset(theme.spacing.calc(2), theme.spacing.calc(2)),
140
- BorderSizePixel = 0,
141
- AutoButtonColor = false,
142
- Text = "",
143
- },
144
- link = {
145
- Size = UDim2.new(0, 0, 0, theme.spacing.calc(2)),
146
- AutomaticSize = Enum.AutomaticSize.X,
147
- BackgroundTransparency = 1,
148
- AutoButtonColor = false,
149
- Font = theme.typography.fontFamilies.default,
150
- TextSize = theme.typography.fontSizes.button,
151
- TextColor3 = theme.palette.text.secondary,
152
- TextXAlignment = Enum.TextXAlignment.Left,
153
- },
154
- })
95
+ }
96
+ local _left = "label"
97
+ local _object_1 = {
98
+ Size = UDim2.new(0, theme.spacing.calc(1.5), 1, 0),
99
+ BackgroundTransparency = 1,
100
+ TextColor3 = theme.palette.text.secondary,
101
+ }
102
+ for _k, _v in editorText(theme) do
103
+ _object_1[_k] = _v
104
+ end
105
+ _object[_left] = _object_1
106
+ _object.channelField = {
107
+ Size = UDim2.new(1, -theme.spacing.calc(1.5), 1, 0),
108
+ BackgroundTransparency = 1,
109
+ }
110
+ _object.field = {
111
+ Size = UDim2.new(1, 0, 0, theme.spacing.calc(3)),
112
+ BackgroundTransparency = 1,
113
+ BorderSizePixel = 0,
114
+ }
115
+ _object.swatchButton = {
116
+ Size = UDim2.fromOffset(theme.spacing.calc(3), theme.spacing.calc(3)),
117
+ BorderSizePixel = 0,
118
+ AutoButtonColor = false,
119
+ Text = "",
120
+ }
121
+ _object.value = {
122
+ Size = UDim2.new(1, -theme.spacing.calc(4), 1, 0),
123
+ BackgroundTransparency = 1,
124
+ }
125
+ _object.shell = {
126
+ Size = UDim2.fromScale(1, 1),
127
+ BackgroundColor3 = theme.palette.surface.elevated,
128
+ BorderSizePixel = 0,
129
+ }
130
+ _object.shellPad = {
131
+ PaddingTop = UDim.new(0, editorPad(theme)),
132
+ PaddingBottom = UDim.new(0, editorPad(theme)),
133
+ PaddingLeft = UDim.new(0, editorPad(theme)),
134
+ PaddingRight = UDim.new(0, editorPad(theme)),
135
+ }
136
+ _object.shellStroke = {
137
+ Color = theme.palette.divider,
138
+ Thickness = 1,
139
+ }
140
+ _object.recent = {
141
+ Size = UDim2.new(1, 0, 0, theme.spacing.calc(2)),
142
+ BackgroundTransparency = 1,
143
+ }
144
+ _object.recentChip = {
145
+ Size = UDim2.fromOffset(theme.spacing.calc(2), theme.spacing.calc(2)),
146
+ BorderSizePixel = 0,
147
+ AutoButtonColor = false,
148
+ Text = "",
149
+ }
150
+ local _left_1 = "link"
151
+ local _object_2 = {
152
+ Size = UDim2.new(1, 0, 0, theme.spacing.calc(2)),
153
+ BackgroundTransparency = 1,
154
+ AutoButtonColor = false,
155
+ TextColor3 = theme.palette.text.secondary,
156
+ }
157
+ for _k, _v in editorText(theme) do
158
+ _object_2[_k] = _v
159
+ end
160
+ _object[_left_1] = _object_2
161
+ return createStyles(_object)
155
162
  end)
156
163
  local default = useColorPickerStyles
157
164
  return {
@@ -4,6 +4,7 @@ local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
4
  local React = _react
5
5
  local useRef = _react.useRef
6
6
  local useState = _react.useState
7
+ local useEditorHover = TS.import(script, script.Parent.Parent.Parent, "editorFace").useEditorHover
7
8
  local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
8
9
  local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
9
10
  local ColorPicker = TS.import(script, script.Parent, "ColorPicker").default
@@ -27,6 +28,7 @@ local function ColorSequenceEditor(props)
27
28
  local id = _binding.id
28
29
  local ref = _binding.ref
29
30
  local styles = useColorPickerStyles()
31
+ local hover = useEditorHover(disabled)
30
32
  local active = canActivate(disabled)
31
33
  local stops = readColorStops(value)
32
34
  local selected, setSelected = useState(0)
@@ -55,12 +57,18 @@ local function ColorSequenceEditor(props)
55
57
  end
56
58
  _attributes.key = _condition
57
59
  _attributes.hostRef = ref
58
- _attributes.base = styles.root
60
+ local _object = table.clone(styles.root)
61
+ setmetatable(_object, nil)
62
+ for _k, _v in hover.face do
63
+ _object[_k] = _v
64
+ end
65
+ _attributes.base = _object
59
66
  _attributes.className = className
60
67
  _attributes.sx = sx
61
68
  _attributes.state = {
62
69
  disabled = disabled,
63
70
  }
71
+ _attributes.Event = hover.event
64
72
  _attributes.Selectable = false
65
73
  local _attributes_1 = table.clone(styles.column)
66
74
  setmetatable(_attributes_1, nil)
@@ -140,9 +148,9 @@ local function ColorSequenceEditor(props)
140
148
  _attributes_5.BackgroundColor3 = stop.color
141
149
  _attributes_5.Position = UDim2.fromScale(stop.t, 0.5)
142
150
  _attributes_5.ZIndex = if stopIndex == index then 2 else 1
143
- return React.createElement("frame", _attributes_5, React.createElement("uicorner", {
144
- CornerRadius = UDim.new(0, 2),
145
- }), React.createElement("uistroke", {
151
+ local _attributes_6 = table.clone(styles.corner)
152
+ setmetatable(_attributes_6, nil)
153
+ return React.createElement("frame", _attributes_5, React.createElement("uicorner", _attributes_6), React.createElement("uistroke", {
146
154
  Thickness = if stopIndex == index then 2 else 1,
147
155
  Color = Color3.new(1, 1, 1),
148
156
  }))
@@ -4,6 +4,7 @@ local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
4
  local React = _react
5
5
  local useRef = _react.useRef
6
6
  local useState = _react.useState
7
+ local useEditorHover = TS.import(script, script.Parent.Parent.Parent, "editorFace").useEditorHover
7
8
  local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
8
9
  local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
9
10
  local NumberInput = TS.import(script, script.Parent.Parent.Parent, "numberInput").NumberInput
@@ -27,6 +28,7 @@ local function NumberSequenceEditor(props)
27
28
  local id = _binding.id
28
29
  local ref = _binding.ref
29
30
  local styles = useColorPickerStyles()
31
+ local hover = useEditorHover(disabled)
30
32
  local active = canActivate(disabled)
31
33
  local stops = readNumberStops(value)
32
34
  local selected, setSelected = useState(0)
@@ -56,12 +58,18 @@ local function NumberSequenceEditor(props)
56
58
  end
57
59
  _attributes.key = _condition
58
60
  _attributes.hostRef = ref
59
- _attributes.base = styles.root
61
+ local _object = table.clone(styles.root)
62
+ setmetatable(_object, nil)
63
+ for _k, _v in hover.face do
64
+ _object[_k] = _v
65
+ end
66
+ _attributes.base = _object
60
67
  _attributes.className = className
61
68
  _attributes.sx = sx
62
69
  _attributes.state = {
63
70
  disabled = disabled,
64
71
  }
72
+ _attributes.Event = hover.event
65
73
  _attributes.Selectable = false
66
74
  local _attributes_1 = table.clone(styles.column)
67
75
  setmetatable(_attributes_1, nil)
@@ -142,9 +150,9 @@ local function NumberSequenceEditor(props)
142
150
  _attributes_5.BackgroundColor3 = Color3.new(0.85, 0.85, 0.85)
143
151
  _attributes_5.Position = UDim2.fromScale(stop.t, 0.5)
144
152
  _attributes_5.ZIndex = if stopIndex == index then 2 else 1
145
- return React.createElement("frame", _attributes_5, React.createElement("uicorner", {
146
- CornerRadius = UDim.new(0, 2),
147
- }), React.createElement("uistroke", {
153
+ local _attributes_6 = table.clone(styles.corner)
154
+ setmetatable(_attributes_6, nil)
155
+ return React.createElement("frame", _attributes_5, React.createElement("uicorner", _attributes_6), React.createElement("uistroke", {
148
156
  Thickness = if stopIndex == index then 2 else 1,
149
157
  Color = Color3.new(1, 1, 1),
150
158
  }))
@@ -1,7 +1,10 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
3
  local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
- local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
4
+ local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
5
+ local controlMetrics = _theme.controlMetrics
6
+ local useTheme = _theme.useTheme
7
+ local fieldChrome = TS.import(script, script.Parent.Parent.Parent, "input", "components", "fieldChrome").fieldChrome
5
8
  local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
6
9
  local _dateRangeValue = TS.import(script, script.Parent.Parent, "dateRangeValue")
7
10
  local dateStamp = _dateRangeValue.dateStamp
@@ -48,6 +51,9 @@ local function DateRangePicker(props)
48
51
  local week = if weekMode then weekStamps(anchorStamp) else {}
49
52
  local _binding_1 = useTheme()
50
53
  local theme = _binding_1.theme
54
+ local chrome = fieldChrome(controlMetrics(theme.density).height, theme.padding.calc(1))
55
+ local pad = chrome.padX
56
+ local row = chrome.height
51
57
  local lead = weekday(year, month, 1)
52
58
  local count = daysInMonth(year, month)
53
59
  local cells = {}
@@ -140,24 +146,24 @@ local function DateRangePicker(props)
140
146
  _attributes.className = className
141
147
  _attributes.sx = sx
142
148
  local _exp = React.createElement("uipadding", {
143
- PaddingTop = UDim.new(0, 8),
144
- PaddingBottom = UDim.new(0, 8),
145
- PaddingLeft = UDim.new(0, 8),
146
- PaddingRight = UDim.new(0, 8),
149
+ PaddingTop = UDim.new(0, pad),
150
+ PaddingBottom = UDim.new(0, pad),
151
+ PaddingLeft = UDim.new(0, pad),
152
+ PaddingRight = UDim.new(0, pad),
147
153
  })
148
154
  local _exp_1 = React.createElement("uilistlayout", {
149
155
  FillDirection = Enum.FillDirection.Vertical,
150
- Padding = UDim.new(0, 8),
156
+ Padding = UDim.new(0, pad),
151
157
  SortOrder = Enum.SortOrder.LayoutOrder,
152
158
  })
153
159
  local _exp_2 = React.createElement("frame", {
154
- Size = UDim2.new(1, 0, 0, 28),
160
+ Size = UDim2.new(1, 0, 0, row),
155
161
  BackgroundTransparency = 1,
156
162
  BorderSizePixel = 0,
157
163
  LayoutOrder = 0,
158
164
  }, React.createElement("textbutton", {
159
165
  Text = if weekMode then "Earlier" else "Prev",
160
- Size = UDim2.fromOffset(if weekMode then 72 else 56, 28),
166
+ Size = UDim2.fromOffset(if weekMode then 72 else 56, row),
161
167
  BackgroundTransparency = 1,
162
168
  BorderSizePixel = 0,
163
169
  TextColor3 = theme.palette.text.secondary,
@@ -172,9 +178,11 @@ local function DateRangePicker(props)
172
178
  Text = title,
173
179
  AnchorPoint = Vector2.new(0.5, 0),
174
180
  Position = UDim2.fromScale(0.5, 0),
175
- Size = UDim2.fromOffset(if weekMode then 200 else 140, 28),
181
+ Size = UDim2.new(1, -(if weekMode then 72 else 56) * 2, 1, 0),
176
182
  BackgroundTransparency = 1,
177
183
  BorderSizePixel = 0,
184
+ TextTruncate = Enum.TextTruncate.AtEnd,
185
+ TextWrapped = false,
178
186
  TextColor3 = theme.palette.text.primary,
179
187
  Font = theme.typography.fontFamilies.semibold,
180
188
  TextSize = theme.typography.fontSizes.body,
@@ -182,7 +190,7 @@ local function DateRangePicker(props)
182
190
  Text = if weekMode then "Later" else "Next",
183
191
  AnchorPoint = Vector2.new(1, 0),
184
192
  Position = UDim2.fromScale(1, 0),
185
- Size = UDim2.fromOffset(if weekMode then 72 else 56, 28),
193
+ Size = UDim2.fromOffset(if weekMode then 72 else 56, row),
186
194
  BackgroundTransparency = 1,
187
195
  BorderSizePixel = 0,
188
196
  TextColor3 = theme.palette.text.secondary,
@@ -196,9 +204,11 @@ local function DateRangePicker(props)
196
204
  }))
197
205
  local _exp_3 = React.createElement("textlabel", {
198
206
  Text = if value.start == nil then "Choose a start and finish" elseif value.finish == nil then formatStamp(value.start) else `{formatStamp(value.start)} – {formatStamp(value.finish)}`,
199
- Size = UDim2.new(1, 0, 0, 16),
207
+ Size = UDim2.new(1, 0, 0, row),
200
208
  BackgroundTransparency = 1,
201
209
  BorderSizePixel = 0,
210
+ TextTruncate = Enum.TextTruncate.AtEnd,
211
+ TextWrapped = false,
202
212
  TextXAlignment = Enum.TextXAlignment.Left,
203
213
  TextColor3 = theme.palette.text.secondary,
204
214
  Font = theme.typography.fontFamilies.default,
@@ -209,7 +219,8 @@ local function DateRangePicker(props)
209
219
  if weekMode then
210
220
  local _exp_4 = React.createElement("uilistlayout", {
211
221
  FillDirection = Enum.FillDirection.Horizontal,
212
- Padding = UDim.new(0, 4),
222
+ HorizontalAlignment = Enum.HorizontalAlignment.Center,
223
+ Padding = UDim.new(0, pad),
213
224
  SortOrder = Enum.SortOrder.LayoutOrder,
214
225
  })
215
226
  -- ▼ ReadonlyArray.map ▼
@@ -226,7 +237,7 @@ local function DateRangePicker(props)
226
237
  end
227
238
  _attributes_1.Text = `{_condition_2}\n{stamp % 100}`
228
239
  _attributes_1.LayoutOrder = index
229
- _attributes_1.Size = UDim2.new(1 / 7, -4, 1, 0)
240
+ _attributes_1.Size = UDim2.new(1 / 7, -math.ceil((pad * 6) / 7), 1, 0)
230
241
  _attributes_1.BackgroundColor3 = if chosen then theme.palette.primary.main else theme.palette.surface.input
231
242
  _attributes_1.BackgroundTransparency = if chosen and not endpoint then 0.55 else 0
232
243
  _attributes_1.BorderSizePixel = 0
@@ -241,7 +252,7 @@ local function DateRangePicker(props)
241
252
  end,
242
253
  }
243
254
  return React.createElement("textbutton", _attributes_1, React.createElement("uicorner", {
244
- CornerRadius = UDim.new(0, 4),
255
+ CornerRadius = UDim.new(0, theme.shape.borderRadius),
245
256
  }))
246
257
  end
247
258
  for _k, _v in week do
@@ -249,16 +260,17 @@ local function DateRangePicker(props)
249
260
  end
250
261
  -- ▲ ReadonlyArray.map ▲
251
262
  _result_1 = (React.createElement("frame", {
252
- Size = UDim2.new(1, 0, 0, 56),
263
+ Size = UDim2.new(1, 0, 0, row * 2),
253
264
  BackgroundTransparency = 1,
254
265
  BorderSizePixel = 0,
255
266
  LayoutOrder = 2,
256
267
  }, _exp_4, _newValue))
257
268
  else
258
269
  local _exp_4 = React.createElement("uigridlayout", {
259
- CellSize = UDim2.fromOffset(36, 28),
260
- CellPadding = UDim2.fromOffset(4, 4),
270
+ CellSize = UDim2.new(1 / 7, -math.ceil((pad * 6) / 7), 0, row),
271
+ CellPadding = UDim2.fromOffset(pad, pad),
261
272
  FillDirectionMaxCells = 7,
273
+ HorizontalAlignment = Enum.HorizontalAlignment.Center,
262
274
  SortOrder = Enum.SortOrder.LayoutOrder,
263
275
  })
264
276
  -- ▼ ReadonlyArray.map ▼
@@ -310,7 +322,7 @@ local function DateRangePicker(props)
310
322
  end,
311
323
  },
312
324
  }, React.createElement("uicorner", {
313
- CornerRadius = UDim.new(0, 4),
325
+ CornerRadius = UDim.new(0, theme.shape.borderRadius),
314
326
  }))
315
327
  end
316
328
  for _k, _v in cells do
@@ -318,7 +330,7 @@ local function DateRangePicker(props)
318
330
  end
319
331
  -- ▲ ReadonlyArray.map ▲
320
332
  _result_1 = (React.createElement("frame", {
321
- Size = UDim2.new(1, 0, 0, 248),
333
+ Size = UDim2.new(1, 0, 0, row * 7 + pad * 6),
322
334
  BackgroundTransparency = 1,
323
335
  BorderSizePixel = 0,
324
336
  LayoutOrder = 2,
@@ -4,6 +4,7 @@ local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "the
4
4
  local createStyles = _theme.createStyles
5
5
  local componentStyles = _theme.componentStyles
6
6
  local useDialogStyles = componentStyles("Dialog", function(theme)
7
+ local heading = theme.typography.variants.h6
7
8
  return createStyles({
8
9
  column = {
9
10
  AutomaticSize = Enum.AutomaticSize.Y,
@@ -22,8 +23,9 @@ local useDialogStyles = componentStyles("Dialog", function(theme)
22
23
  Size = UDim2.new(1, 0, 0, 0),
23
24
  BackgroundTransparency = 1,
24
25
  BorderSizePixel = 0,
25
- Font = theme.typography.fontFamilies.default,
26
- TextSize = theme.typography.fontSizes.h6,
26
+ Font = theme.typography.fontFamilies[heading.family],
27
+ TextSize = heading.size,
28
+ LineHeight = heading.leading,
27
29
  TextColor3 = theme.palette.text.primary,
28
30
  TextXAlignment = Enum.TextXAlignment.Left,
29
31
  TextWrapped = true,
@@ -94,7 +94,9 @@ local function Divider(props)
94
94
  _attributes_2.AutomaticSize = if fit > 0 then Enum.AutomaticSize.None else Enum.AutomaticSize.X
95
95
  local _attributes_3 = table.clone(captionPad)
96
96
  setmetatable(_attributes_3, nil)
97
- return React.createElement(SxHost, _attributes, _exp, React.createElement("textlabel", _attributes_2, React.createElement("uipadding", _attributes_3)))
97
+ return React.createElement(SxHost, _attributes, _exp, React.createElement("textlabel", _attributes_2, React.createElement("uipadding", _attributes_3), if room > 0 then React.createElement("uisizeconstraint", {
98
+ MaxSize = Vector2.new(room, math.huge),
99
+ }) else nil))
98
100
  end
99
101
  local _attributes = {
100
102
  tag = "frame",
@@ -57,6 +57,7 @@ local useDividerStyles = componentStyles("Divider", function(theme, props)
57
57
  TextSize = theme.typography.fontSizes.caption,
58
58
  TextColor3 = theme.palette.text.secondary,
59
59
  TextTruncate = Enum.TextTruncate.AtEnd,
60
+ TextWrapped = false,
60
61
  TextXAlignment = Enum.TextXAlignment.Center,
61
62
  ZIndex = 2,
62
63
  },
@@ -7,6 +7,7 @@ export interface DrawerProps {
7
7
  edge?: DrawerEdge;
8
8
  width?: number;
9
9
  height?: number;
10
+ title?: string;
10
11
  onClose: () => void;
11
12
  children?: React.ReactNode;
12
13
  }
@@ -6,14 +6,13 @@ local useEffect = _react.useEffect
6
6
  local useRef = _react.useRef
7
7
  local useState = _react.useState
8
8
  local UserInputService = TS.import(script, TS.getModule(script, "@rbxts", "services")).UserInputService
9
+ local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
9
10
  local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
10
11
  local isDismissInput = TS.import(script, script.Parent.Parent.Parent, "modal", "components", "dismissInput").isDismissInput
11
12
  local _popup = TS.import(script, script.Parent.Parent.Parent, "popup")
12
13
  local Portal = _popup.Portal
13
14
  local portalTarget = _popup.portalTarget
14
- local _drawerPlacement = TS.import(script, script.Parent, "drawerPlacement")
15
- local drawerAnchor = _drawerPlacement.drawerAnchor
16
- local drawerBox = _drawerPlacement.drawerBox
15
+ local drawerFit = TS.import(script, script.Parent, "drawerPlacement").drawerFit
17
16
  local useDrawerStyles = TS.import(script, script.Parent, "Drawer.styles").default
18
17
  local function Drawer(props)
19
18
  local _binding = props
@@ -25,6 +24,7 @@ local function Drawer(props)
25
24
  end
26
25
  local width = _binding.width
27
26
  local height = _binding.height
27
+ local title = _binding.title
28
28
  local onClose = _binding.onClose
29
29
  local children = _binding.children
30
30
  local className = _binding.className
@@ -34,6 +34,8 @@ local function Drawer(props)
34
34
  local styles = useDrawerStyles({
35
35
  width = width,
36
36
  })
37
+ local _binding_1 = useTheme()
38
+ local theme = _binding_1.theme
37
39
  local close = useRef(onClose)
38
40
  local anchor = useRef()
39
41
  local layer, setLayer = useState(function()
@@ -56,18 +58,23 @@ local function Drawer(props)
56
58
  return connection:Disconnect()
57
59
  end
58
60
  end, { open, layer })
59
- local placement = drawerAnchor(edge)
60
61
  local _result
61
62
  if edge == "bottom" then
62
63
  local _condition = height
63
64
  if _condition == nil then
64
- _condition = 0
65
+ _condition = theme.spacing.calc(20)
65
66
  end
66
- _result = drawerBox(edge, _condition)
67
+ _result = _condition
67
68
  else
68
- _result = nil
69
+ local _condition = width
70
+ if _condition == nil then
71
+ _condition = theme.spacing.calc(20)
72
+ end
73
+ _result = _condition
69
74
  end
70
- local sheet = _result
75
+ local span = _result
76
+ local room = if layer ~= nil then (if edge == "bottom" then layer.AbsoluteSize.Y else layer.AbsoluteSize.X) else 0
77
+ local box = drawerFit(edge, span, room)
71
78
  local panelStyle = styles.panel
72
79
  local _exp = React.createElement("frame", {
73
80
  key = "DrawerAnchor",
@@ -108,15 +115,37 @@ local function Drawer(props)
108
115
  _attributes_2.base = panelStyle
109
116
  _attributes_2.className = className
110
117
  _attributes_2.sx = sx
111
- _attributes_2.AnchorPoint = Vector2.new(if sheet ~= nil then sheet.anchorX else placement, if sheet ~= nil then sheet.anchorY else 0)
112
- _attributes_2.Position = UDim2.fromScale(if sheet ~= nil then sheet.posX else placement, if sheet ~= nil then sheet.posY else 0)
113
- _attributes_2.Size = if sheet ~= nil then UDim2.new(sheet.sizeX, sheet.sizeXO, sheet.sizeY, sheet.sizeYO) else nil
118
+ _attributes_2.AnchorPoint = Vector2.new(box.anchorX, box.anchorY)
119
+ _attributes_2.Position = UDim2.fromScale(box.posX, box.posY)
120
+ _attributes_2.Size = UDim2.new(box.sizeX, box.sizeXO, box.sizeY, box.sizeYO)
114
121
  _attributes_2.ZIndex = panelStyle.ZIndex
115
- local _attributes_3 = table.clone(styles.padding)
116
- setmetatable(_attributes_3, nil)
122
+ local _exp_2 = React.createElement("uilistlayout", {
123
+ FillDirection = Enum.FillDirection.Vertical,
124
+ Padding = UDim.new(0, theme.padding.calc(1)),
125
+ SortOrder = Enum.SortOrder.LayoutOrder,
126
+ })
127
+ local _result_1
128
+ if title ~= nil and #title > 0 then
129
+ local _attributes_3 = {
130
+ key = "Title",
131
+ }
132
+ for _k, _v in styles.title do
133
+ _attributes_3[_k] = _v
134
+ end
135
+ _attributes_3.Text = title
136
+ _result_1 = (React.createElement("textlabel", _attributes_3))
137
+ else
138
+ _result_1 = nil
139
+ end
117
140
  _condition = (React.createElement(Portal, {
118
141
  host = layer,
119
- }, React.createElement("frame", _attributes, _exp_1, React.createElement(SxHost, _attributes_2, React.createElement("uipadding", _attributes_3), children))))
142
+ }, React.createElement("frame", _attributes, _exp_1, React.createElement(SxHost, _attributes_2, React.createElement("frame", {
143
+ key = "Pad",
144
+ Size = UDim2.new(1, -theme.padding.calc(4), 1, -theme.padding.calc(4)),
145
+ Position = UDim2.new(0, theme.padding.calc(2), 0, theme.padding.calc(2)),
146
+ BackgroundTransparency = 1,
147
+ BorderSizePixel = 0,
148
+ }, _exp_2, _result_1, children)))))
120
149
  end
121
150
  return React.createElement(React.Fragment, nil, _exp, _condition)
122
151
  end
@@ -5,6 +5,7 @@ local componentStyles = _theme.componentStyles
5
5
  local createStyles = _theme.createStyles
6
6
  local useDrawerStyles = componentStyles("Drawer", function(theme, _param)
7
7
  local width = _param.width
8
+ local heading = theme.typography.variants.h6
8
9
  return createStyles({
9
10
  root = {
10
11
  Size = UDim2.fromScale(1, 1),
@@ -27,11 +28,18 @@ local useDrawerStyles = componentStyles("Drawer", function(theme, _param)
27
28
  BorderSizePixel = 0,
28
29
  ZIndex = 30001,
29
30
  },
30
- padding = {
31
- PaddingTop = UDim.new(0, theme.padding.calc(2)),
32
- PaddingBottom = UDim.new(0, theme.padding.calc(2)),
33
- PaddingLeft = UDim.new(0, theme.padding.calc(2)),
34
- PaddingRight = UDim.new(0, theme.padding.calc(2)),
31
+ title = {
32
+ Size = UDim2.new(1, 0, 0, 0),
33
+ AutomaticSize = Enum.AutomaticSize.Y,
34
+ BackgroundTransparency = 1,
35
+ BorderSizePixel = 0,
36
+ TextWrapped = true,
37
+ Font = theme.typography.fontFamilies[heading.family],
38
+ TextSize = heading.size,
39
+ LineHeight = heading.leading,
40
+ TextColor3 = theme.palette.text.primary,
41
+ TextXAlignment = Enum.TextXAlignment.Left,
42
+ ZIndex = 30002,
35
43
  },
36
44
  })
37
45
  end)
@@ -12,3 +12,5 @@ export interface DrawerBox {
12
12
  }
13
13
  /** Side drawers keep a column. A bottom sheet spans the width and sits on the lower edge. */
14
14
  export declare function drawerBox(edge: DrawerEdge, span: number): DrawerBox;
15
+ /** Keep the panel on its edge and leave the scrim visible. */
16
+ export declare function drawerFit(edge: DrawerEdge, span: number, limit: number): DrawerBox;
@@ -29,7 +29,25 @@ local function drawerBox(edge, span)
29
29
  sizeYO = 0,
30
30
  }
31
31
  end
32
+ --* Keep the panel on its edge and leave the scrim visible.
33
+ local function drawerFit(edge, span, limit)
34
+ local box = drawerBox(edge, span)
35
+ local room = if limit > 0 then limit else 0
36
+ if edge == "bottom" then
37
+ local size = if room > 0 and box.sizeYO > room then room else box.sizeYO
38
+ local _object = table.clone(box)
39
+ setmetatable(_object, nil)
40
+ _object.sizeYO = size
41
+ return _object
42
+ end
43
+ local size = if room > 0 and box.sizeXO > room then room else box.sizeXO
44
+ local _object = table.clone(box)
45
+ setmetatable(_object, nil)
46
+ _object.sizeXO = size
47
+ return _object
48
+ end
32
49
  return {
33
50
  drawerAnchor = drawerAnchor,
34
51
  drawerBox = drawerBox,
52
+ drawerFit = drawerFit,
35
53
  }