@rbxts/uiblox 0.2.0-alpha.18 → 0.2.0-alpha.2

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 (230) hide show
  1. package/README.md +0 -2
  2. package/out/theme/constants/NumberConstants.d.ts +0 -2
  3. package/out/theme/constants/NumberConstants.luau +0 -3
  4. package/out/theme/interfaces/spacing/Shape.d.ts +0 -3
  5. package/out/theme/interfaces/typography/FontSizes.d.ts +1 -1
  6. package/out/theme/interfaces/typography/FontSizes.luau +8 -15
  7. package/out/theme/interfaces/typography/ThemeTypography.d.ts +0 -3
  8. package/out/theme/interfaces/typography/Variants.d.ts +15 -14
  9. package/out/theme/interfaces/typography/Variants.luau +18 -68
  10. package/out/theme/themes/DarkTheme.luau +0 -4
  11. package/out/theme/themes/LightTheme.luau +0 -4
  12. package/out/ui/packages/accordion/components/Accordion.d.ts +0 -1
  13. package/out/ui/packages/accordion/components/Accordion.luau +6 -22
  14. package/out/ui/packages/accordion/components/Accordion.styles.d.ts +0 -1
  15. package/out/ui/packages/accordion/components/Accordion.styles.luau +4 -16
  16. package/out/ui/packages/accordion/components/accordionOpen.d.ts +0 -1
  17. package/out/ui/packages/accordion/components/accordionOpen.luau +0 -4
  18. package/out/ui/packages/alert/components/Alert.d.ts +0 -1
  19. package/out/ui/packages/alert/components/Alert.luau +27 -36
  20. package/out/ui/packages/alert/components/Alert.styles.d.ts +0 -2
  21. package/out/ui/packages/alert/components/Alert.styles.luau +8 -17
  22. package/out/ui/packages/appBar/components/AppBar.d.ts +1 -2
  23. package/out/ui/packages/appBar/components/AppBar.luau +0 -5
  24. package/out/ui/packages/appBar/components/AppBar.styles.d.ts +0 -2
  25. package/out/ui/packages/appBar/components/AppBar.styles.luau +2 -6
  26. package/out/ui/packages/autocomplete/components/Autocomplete.luau +0 -8
  27. package/out/ui/packages/avatar/components/Avatar.d.ts +0 -2
  28. package/out/ui/packages/avatar/components/Avatar.luau +12 -20
  29. package/out/ui/packages/avatar/components/Avatar.styles.d.ts +0 -2
  30. package/out/ui/packages/avatar/components/Avatar.styles.luau +1 -5
  31. package/out/ui/packages/badge/components/Badge.d.ts +0 -3
  32. package/out/ui/packages/badge/components/Badge.luau +8 -23
  33. package/out/ui/packages/badge/components/Badge.styles.d.ts +1 -5
  34. package/out/ui/packages/badge/components/Badge.styles.luau +8 -20
  35. package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +0 -1
  36. package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +2 -8
  37. package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.d.ts +1 -3
  38. package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +2 -6
  39. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.d.ts +0 -1
  40. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +24 -58
  41. package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +0 -9
  42. package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +0 -68
  43. package/out/ui/packages/breadcrumbs/index.d.ts +0 -1
  44. package/out/ui/packages/breadcrumbs/init.luau +0 -3
  45. package/out/ui/packages/brickColorPicker/components/brickColorCatalog.luau +1 -1
  46. package/out/ui/packages/button/components/Button.luau +5 -9
  47. package/out/ui/packages/card/components/Card.d.ts +0 -1
  48. package/out/ui/packages/card/components/Card.luau +0 -2
  49. package/out/ui/packages/checkbox/components/checkboxLook.d.ts +1 -1
  50. package/out/ui/packages/chip/components/Chip.d.ts +1 -4
  51. package/out/ui/packages/chip/components/Chip.luau +2 -44
  52. package/out/ui/packages/chip/components/Chip.styles.d.ts +0 -4
  53. package/out/ui/packages/chip/components/Chip.styles.luau +7 -46
  54. package/out/ui/packages/circularProgress/components/CircularProgress.luau +2 -13
  55. package/out/ui/packages/dialog/components/Dialog.d.ts +1 -1
  56. package/out/ui/packages/dialog/components/Dialog.luau +18 -27
  57. package/out/ui/packages/divider/components/Divider.d.ts +0 -1
  58. package/out/ui/packages/divider/components/Divider.luau +0 -48
  59. package/out/ui/packages/divider/components/Divider.styles.luau +0 -29
  60. package/out/ui/packages/drawer/components/Drawer.d.ts +0 -1
  61. package/out/ui/packages/drawer/components/Drawer.luau +1 -4
  62. package/out/ui/packages/drawer/components/Drawer.styles.d.ts +1 -3
  63. package/out/ui/packages/drawer/components/Drawer.styles.luau +2 -3
  64. package/out/ui/packages/fab/components/Fab.d.ts +0 -3
  65. package/out/ui/packages/fab/components/Fab.luau +25 -62
  66. package/out/ui/packages/fab/components/Fab.styles.d.ts +0 -3
  67. package/out/ui/packages/fab/components/Fab.styles.luau +3 -33
  68. package/out/ui/packages/fab/components/fabSize.d.ts +0 -1
  69. package/out/ui/packages/fab/components/fabSize.luau +0 -4
  70. package/out/ui/packages/fab/index.d.ts +1 -1
  71. package/out/ui/packages/fab/init.luau +0 -1
  72. package/out/ui/packages/iconButton/components/IconButton.luau +2 -7
  73. package/out/ui/packages/iconButton/components/IconButton.styles.luau +0 -3
  74. package/out/ui/packages/index.d.ts +0 -7
  75. package/out/ui/packages/init.luau +0 -21
  76. package/out/ui/packages/input/components/Input.luau +1 -1
  77. package/out/ui/packages/layout/components/Grid.d.ts +1 -1
  78. package/out/ui/packages/layout/index.d.ts +0 -10
  79. package/out/ui/packages/layout/init.luau +0 -4
  80. package/out/ui/packages/listItem/components/ListItem.d.ts +0 -1
  81. package/out/ui/packages/listItem/components/ListItem.luau +0 -5
  82. package/out/ui/packages/listItem/components/ListItem.styles.d.ts +0 -1
  83. package/out/ui/packages/listItem/components/ListItem.styles.luau +5 -10
  84. package/out/ui/packages/loadingStroke/components/LoadingStroke.d.ts +0 -2
  85. package/out/ui/packages/loadingStroke/components/LoadingStroke.luau +19 -23
  86. package/out/ui/packages/menu/components/Menu.d.ts +0 -4
  87. package/out/ui/packages/menu/components/Menu.luau +23 -52
  88. package/out/ui/packages/menu/components/Menu.styles.luau +1 -5
  89. package/out/ui/packages/modal/components/Modal.d.ts +1 -1
  90. package/out/ui/packages/modal/components/Modal.luau +37 -55
  91. package/out/ui/packages/motion/index.d.ts +1 -1
  92. package/out/ui/packages/motion/init.luau +0 -1
  93. package/out/ui/packages/motion/unit.d.ts +0 -5
  94. package/out/ui/packages/motion/unit.luau +0 -23
  95. package/out/ui/packages/pagination/components/Pagination.d.ts +1 -4
  96. package/out/ui/packages/pagination/components/Pagination.luau +22 -41
  97. package/out/ui/packages/pagination/components/Pagination.styles.d.ts +1 -4
  98. package/out/ui/packages/pagination/components/Pagination.styles.luau +4 -19
  99. package/out/ui/packages/pagination/components/pageRange.d.ts +1 -2
  100. package/out/ui/packages/pagination/components/pageRange.luau +8 -91
  101. package/out/ui/packages/pagination/index.d.ts +0 -1
  102. package/out/ui/packages/pagination/init.luau +0 -1
  103. package/out/ui/packages/paper/components/Paper.d.ts +1 -2
  104. package/out/ui/packages/paper/components/Paper.luau +3 -14
  105. package/out/ui/packages/paper/components/Paper.styles.d.ts +1 -1
  106. package/out/ui/packages/paper/components/Paper.styles.luau +0 -6
  107. package/out/ui/packages/popup/index.d.ts +0 -1
  108. package/out/ui/packages/popup/init.luau +0 -1
  109. package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +0 -1
  110. package/out/ui/packages/radioGroup/components/RadioGroup.luau +2 -4
  111. package/out/ui/packages/radioGroup/components/RadioGroup.styles.d.ts +0 -1
  112. package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +1 -4
  113. package/out/ui/packages/select/components/Select.d.ts +0 -5
  114. package/out/ui/packages/select/components/Select.luau +24 -48
  115. package/out/ui/packages/select/components/Select.styles.luau +1 -1
  116. package/out/ui/packages/skeleton/components/Skeleton.luau +2 -3
  117. package/out/ui/packages/skeleton/components/Skeleton.styles.luau +2 -7
  118. package/out/ui/packages/skeleton/components/skeletonMotion.luau +1 -1
  119. package/out/ui/packages/slider/components/Slider.d.ts +0 -1
  120. package/out/ui/packages/slider/components/Slider.luau +1 -24
  121. package/out/ui/packages/slider/components/Slider.styles.luau +0 -8
  122. package/out/ui/packages/snackbar/components/Snackbar.d.ts +0 -2
  123. package/out/ui/packages/snackbar/components/Snackbar.luau +0 -5
  124. package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
  125. package/out/ui/packages/stateMatrix.d.ts +0 -2
  126. package/out/ui/packages/stateMatrix.luau +221 -733
  127. package/out/ui/packages/stepper/components/Stepper.d.ts +0 -1
  128. package/out/ui/packages/stepper/components/Stepper.luau +1 -7
  129. package/out/ui/packages/stepper/components/Stepper.styles.d.ts +1 -3
  130. package/out/ui/packages/stepper/components/Stepper.styles.luau +2 -6
  131. package/out/ui/packages/switch/components/Switch.d.ts +0 -2
  132. package/out/ui/packages/switch/components/Switch.luau +0 -5
  133. package/out/ui/packages/switch/components/Switch.styles.d.ts +0 -2
  134. package/out/ui/packages/switch/components/Switch.styles.luau +2 -7
  135. package/out/ui/packages/switch/components/switchLook.d.ts +1 -1
  136. package/out/ui/packages/table/components/Table.d.ts +0 -1
  137. package/out/ui/packages/table/components/Table.luau +1 -4
  138. package/out/ui/packages/table/components/Table.styles.d.ts +1 -3
  139. package/out/ui/packages/table/components/Table.styles.luau +6 -10
  140. package/out/ui/packages/tabs/components/Tabs.d.ts +0 -3
  141. package/out/ui/packages/tabs/components/Tabs.luau +3 -12
  142. package/out/ui/packages/tabs/components/Tabs.styles.d.ts +1 -5
  143. package/out/ui/packages/tabs/components/Tabs.styles.luau +10 -26
  144. package/out/ui/packages/tabs/index.d.ts +0 -1
  145. package/out/ui/packages/tabs/init.luau +0 -1
  146. package/out/ui/packages/toast/components/Toast.d.ts +0 -2
  147. package/out/ui/packages/toast/components/Toast.luau +1 -26
  148. package/out/ui/packages/toast/components/Toast.styles.luau +4 -22
  149. package/out/ui/packages/typography/components/Typography.styles.luau +5 -4
  150. package/out/ui/packages/virtualList/index.d.ts +0 -2
  151. package/out/ui/packages/virtualList/init.luau +0 -1
  152. package/package.json +2 -2
  153. package/out/ui/packages/backdrop/components/Backdrop.d.ts +0 -10
  154. package/out/ui/packages/backdrop/components/Backdrop.luau +0 -58
  155. package/out/ui/packages/backdrop/components/Backdrop.styles.d.ts +0 -4
  156. package/out/ui/packages/backdrop/components/Backdrop.styles.luau +0 -24
  157. package/out/ui/packages/backdrop/index.d.ts +0 -2
  158. package/out/ui/packages/backdrop/init.luau +0 -5
  159. package/out/ui/packages/divider/components/dividerLabel.d.ts +0 -1
  160. package/out/ui/packages/divider/components/dividerLabel.luau +0 -10
  161. package/out/ui/packages/formText/components/FormHelperText.d.ts +0 -8
  162. package/out/ui/packages/formText/components/FormHelperText.luau +0 -44
  163. package/out/ui/packages/formText/components/FormLabel.d.ts +0 -9
  164. package/out/ui/packages/formText/components/FormLabel.luau +0 -46
  165. package/out/ui/packages/formText/components/FormText.styles.d.ts +0 -5
  166. package/out/ui/packages/formText/components/FormText.styles.luau +0 -33
  167. package/out/ui/packages/formText/index.d.ts +0 -4
  168. package/out/ui/packages/formText/init.luau +0 -6
  169. package/out/ui/packages/imageList/components/ImageList.d.ts +0 -14
  170. package/out/ui/packages/imageList/components/ImageList.luau +0 -100
  171. package/out/ui/packages/imageList/components/ImageList.styles.d.ts +0 -6
  172. package/out/ui/packages/imageList/components/ImageList.styles.luau +0 -73
  173. package/out/ui/packages/imageList/components/imageListLayout.d.ts +0 -4
  174. package/out/ui/packages/imageList/components/imageListLayout.luau +0 -31
  175. package/out/ui/packages/imageList/index.d.ts +0 -2
  176. package/out/ui/packages/imageList/init.luau +0 -5
  177. package/out/ui/packages/layout/components/Box.d.ts +0 -11
  178. package/out/ui/packages/layout/components/Box.luau +0 -49
  179. package/out/ui/packages/layout/components/Box.styles.d.ts +0 -7
  180. package/out/ui/packages/layout/components/Box.styles.luau +0 -34
  181. package/out/ui/packages/layout/components/Container.d.ts +0 -10
  182. package/out/ui/packages/layout/components/Container.luau +0 -54
  183. package/out/ui/packages/layout/components/Container.styles.d.ts +0 -6
  184. package/out/ui/packages/layout/components/Container.styles.luau +0 -41
  185. package/out/ui/packages/layout/components/Stack.d.ts +0 -12
  186. package/out/ui/packages/layout/components/Stack.luau +0 -49
  187. package/out/ui/packages/layout/components/Stack.styles.d.ts +0 -8
  188. package/out/ui/packages/layout/components/Stack.styles.luau +0 -72
  189. package/out/ui/packages/layout/components/boxPad.d.ts +0 -14
  190. package/out/ui/packages/layout/components/boxPad.luau +0 -59
  191. package/out/ui/packages/layout/components/containerWidth.d.ts +0 -2
  192. package/out/ui/packages/layout/components/containerWidth.luau +0 -17
  193. package/out/ui/packages/layout/components/stackAlign.d.ts +0 -8
  194. package/out/ui/packages/layout/components/stackAlign.luau +0 -29
  195. package/out/ui/packages/link/components/Link.d.ts +0 -11
  196. package/out/ui/packages/link/components/Link.luau +0 -83
  197. package/out/ui/packages/link/components/Link.styles.d.ts +0 -8
  198. package/out/ui/packages/link/components/Link.styles.luau +0 -59
  199. package/out/ui/packages/link/index.d.ts +0 -3
  200. package/out/ui/packages/link/init.luau +0 -5
  201. package/out/ui/packages/rating/components/Rating.d.ts +0 -11
  202. package/out/ui/packages/rating/components/Rating.luau +0 -101
  203. package/out/ui/packages/rating/components/Rating.styles.d.ts +0 -6
  204. package/out/ui/packages/rating/components/Rating.styles.luau +0 -44
  205. package/out/ui/packages/rating/index.d.ts +0 -2
  206. package/out/ui/packages/rating/init.luau +0 -5
  207. package/out/ui/packages/skeleton/components/skeletonTone.d.ts +0 -20
  208. package/out/ui/packages/skeleton/components/skeletonTone.luau +0 -14
  209. package/out/ui/packages/slider/components/sliderMarks.d.ts +0 -1
  210. package/out/ui/packages/slider/components/sliderMarks.luau +0 -37
  211. package/out/ui/packages/snackbar/components/snackbarAction.d.ts +0 -1
  212. package/out/ui/packages/snackbar/components/snackbarAction.luau +0 -10
  213. package/out/ui/packages/speedDial/components/SpeedDial.d.ts +0 -19
  214. package/out/ui/packages/speedDial/components/SpeedDial.luau +0 -101
  215. package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +0 -5
  216. package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +0 -31
  217. package/out/ui/packages/speedDial/index.d.ts +0 -3
  218. package/out/ui/packages/speedDial/init.luau +0 -5
  219. package/out/ui/packages/tabs/components/tabsOrientation.d.ts +0 -2
  220. package/out/ui/packages/tabs/components/tabsOrientation.luau +0 -7
  221. package/out/ui/packages/toggleButton/components/ToggleButton.d.ts +0 -19
  222. package/out/ui/packages/toggleButton/components/ToggleButton.luau +0 -135
  223. package/out/ui/packages/toggleButton/components/ToggleButton.styles.d.ts +0 -7
  224. package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +0 -65
  225. package/out/ui/packages/toggleButton/index.d.ts +0 -2
  226. package/out/ui/packages/toggleButton/init.luau +0 -7
  227. package/out/ui/packages/virtualList/components/EmptyListHint.d.ts +0 -6
  228. package/out/ui/packages/virtualList/components/EmptyListHint.luau +0 -32
  229. package/out/ui/packages/virtualList/components/EmptyListHint.styles.d.ts +0 -5
  230. package/out/ui/packages/virtualList/components/EmptyListHint.styles.luau +0 -26
@@ -1,31 +1,20 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
3
  local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
- local Icons = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Icons
5
4
  local useChipStyles = TS.import(script, script.Parent, "Chip.styles").default
6
5
  local function Chip(props)
7
6
  local _binding = props
8
7
  local label = _binding.label
9
8
  local selected = _binding.selected
10
9
  local disabled = _binding.disabled
11
- local size = _binding.size
12
- local variant = _binding.variant
13
- if variant == nil then
14
- variant = "filled"
15
- end
16
10
  local onActivated = _binding.onActivated
17
- local onDelete = _binding.onDelete
18
11
  local className = _binding.className
19
12
  local sx = _binding.sx
20
13
  local id = _binding.id
21
14
  local ref = _binding.ref
22
- local deletable = onDelete ~= nil
23
15
  local styles = useChipStyles({
24
16
  selected = selected,
25
17
  disabled = disabled,
26
- deletable = deletable,
27
- size = size,
28
- variant = variant,
29
18
  })
30
19
  local _attributes = {}
31
20
  local _condition = id
@@ -47,7 +36,7 @@ local function Chip(props)
47
36
  _attributes[_k] = _v
48
37
  end
49
38
  end
50
- _attributes.Text = if deletable then "" else label
39
+ _attributes.Text = label
51
40
  _attributes.Event = {
52
41
  Activated = function()
53
42
  if disabled ~= true then
@@ -66,38 +55,7 @@ local function Chip(props)
66
55
  local _exp_1 = React.createElement("uicorner", _attributes_2)
67
56
  local _attributes_3 = table.clone(styles.stroke)
68
57
  setmetatable(_attributes_3, nil)
69
- local _exp_2 = React.createElement("uistroke", _attributes_3)
70
- local _condition_1 = deletable
71
- if _condition_1 then
72
- local _attributes_4 = table.clone(styles.row)
73
- setmetatable(_attributes_4, nil)
74
- local _exp_3 = React.createElement("uilistlayout", _attributes_4)
75
- local _attributes_5 = {
76
- key = "Label",
77
- }
78
- for _k, _v in styles.label do
79
- _attributes_5[_k] = _v
80
- end
81
- _attributes_5.Text = label
82
- local _exp_4 = React.createElement("textlabel", _attributes_5)
83
- local _attributes_6 = {
84
- key = "Delete",
85
- }
86
- for _k, _v in styles.delete do
87
- _attributes_6[_k] = _v
88
- end
89
- _attributes_6.Image = tostring(Icons.Close)
90
- _attributes_6.Active = disabled ~= true
91
- _attributes_6.Event = {
92
- Activated = function()
93
- if disabled ~= true then
94
- onDelete()
95
- end
96
- end,
97
- }
98
- _condition_1 = (React.createElement(React.Fragment, nil, _exp_3, _exp_4, React.createElement("imagebutton", _attributes_6)))
99
- end
100
- return React.createElement("textbutton", _attributes, _exp, _exp_1, _exp_2, _condition_1)
58
+ return React.createElement("textbutton", _attributes, _exp, _exp_1, React.createElement("uistroke", _attributes_3))
101
59
  end
102
60
  local default = Chip
103
61
  return {
@@ -1,9 +1,5 @@
1
- import { ControlSize } from "../../../../theme/index";
2
1
  declare const useChipStyles: (props: {
3
2
  selected?: boolean;
4
3
  disabled?: boolean;
5
- deletable?: boolean;
6
- size?: ControlSize;
7
- variant?: "filled" | "outlined";
8
4
  }) => import("../../../../theme/index").ClassNameMap<string>;
9
5
  export default useChipStyles;
@@ -2,7 +2,6 @@
2
2
  local TS = _G[script]
3
3
  local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
4
4
  local componentStyles = _theme.componentStyles
5
- local controlMetrics = _theme.controlMetrics
6
5
  local createStyles = _theme.createStyles
7
6
  local useChipStyles = componentStyles("Chip", function(theme, _param)
8
7
  local selected = _param.selected
@@ -13,70 +12,32 @@ local useChipStyles = componentStyles("Chip", function(theme, _param)
13
12
  if disabled == nil then
14
13
  disabled = false
15
14
  end
16
- local deletable = _param.deletable
17
- if deletable == nil then
18
- deletable = false
19
- end
20
- local size = _param.size
21
- local variant = _param.variant
22
- if variant == nil then
23
- variant = "filled"
24
- end
25
- local metrics = controlMetrics(theme.density, size)
26
- local padY = if size == "small" then 0.25 elseif size == "large" then 0.75 else 0.5
27
- local padX = if size == "small" then 1 elseif size == "large" then 2 else 1.5
28
- local deletePx = metrics.icon
29
15
  return createStyles({
30
16
  root = {
31
17
  AutomaticSize = Enum.AutomaticSize.XY,
32
18
  Size = UDim2.fromScale(0, 0),
33
19
  BackgroundColor3 = if selected then theme.palette.action.selected else theme.palette.surface.input,
34
- BackgroundTransparency = if variant == "outlined" and selected ~= true then 1 else 0,
35
20
  BorderSizePixel = 0,
36
21
  AutoButtonColor = false,
37
22
  Active = not disabled,
38
23
  Selectable = not disabled,
39
24
  TextColor3 = if disabled then theme.palette.text.disabled else theme.palette.text.primary,
40
25
  Font = theme.typography.fontFamilies.default,
41
- TextSize = metrics.font,
26
+ TextSize = theme.typography.fontSizes.body,
42
27
  },
43
28
  padding = {
44
- PaddingTop = UDim.new(0, theme.padding.calc(padY)),
45
- PaddingBottom = UDim.new(0, theme.padding.calc(padY)),
46
- PaddingLeft = UDim.new(0, theme.padding.calc(padX)),
47
- PaddingRight = UDim.new(0, theme.padding.calc(if deletable then 0.5 else padX)),
29
+ PaddingTop = UDim.new(0, theme.padding.calc(0.5)),
30
+ PaddingBottom = UDim.new(0, theme.padding.calc(0.5)),
31
+ PaddingLeft = UDim.new(0, theme.padding.calc(1.5)),
32
+ PaddingRight = UDim.new(0, theme.padding.calc(1.5)),
48
33
  },
49
34
  corner = {
50
- CornerRadius = UDim.new(theme.shape.pillScale, 0),
35
+ CornerRadius = UDim.new(1, 0),
51
36
  },
52
37
  stroke = {
53
38
  Color = theme.palette.border,
54
39
  ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
55
- Transparency = if variant == "outlined" then (if disabled then 0.5 else 0) elseif selected then 1 else 0,
56
- },
57
- row = {
58
- FillDirection = Enum.FillDirection.Horizontal,
59
- VerticalAlignment = Enum.VerticalAlignment.Center,
60
- SortOrder = Enum.SortOrder.LayoutOrder,
61
- Padding = UDim.new(0, theme.padding.calc(0.5)),
62
- },
63
- label = {
64
- AutomaticSize = Enum.AutomaticSize.XY,
65
- Size = UDim2.fromScale(0, 0),
66
- BackgroundTransparency = 1,
67
- BorderSizePixel = 0,
68
- TextColor3 = if disabled then theme.palette.text.disabled else theme.palette.text.primary,
69
- Font = theme.typography.fontFamilies.default,
70
- TextSize = metrics.font,
71
- LayoutOrder = 1,
72
- },
73
- delete = {
74
- Size = UDim2.fromOffset(deletePx, deletePx),
75
- BackgroundTransparency = 1,
76
- BorderSizePixel = 0,
77
- AutoButtonColor = false,
78
- ImageColor3 = if disabled then theme.palette.text.disabled else theme.palette.text.secondary,
79
- LayoutOrder = 2,
40
+ Transparency = if selected then 1 else 0,
80
41
  },
81
42
  })
82
43
  end)
@@ -10,7 +10,6 @@ local _motion = TS.import(script, script.Parent.Parent.Parent, "motion")
10
10
  local arcKeys = _motion.arcKeys
11
11
  local loopProperty = _motion.loopProperty
12
12
  local progressSpin = _motion.progressSpin
13
- local spinArcKeys = _motion.spinArcKeys
14
13
  local function CircularProgress(props)
15
14
  local _binding = props
16
15
  local value = _binding.value
@@ -39,17 +38,7 @@ local function CircularProgress(props)
39
38
  local shown = if indeterminate then (if motion == "spin" then nil else 0.25) else value
40
39
  local _result
41
40
  if shown == nil then
42
- local _exp = spinArcKeys()
43
- -- ▼ ReadonlyArray.map ▼
44
- local _newValue = table.create(#_exp)
45
- local _callback = function(key)
46
- return NumberSequenceKeypoint.new(key.time, key.transparency)
47
- end
48
- for _k, _v in _exp do
49
- _newValue[_k] = _callback(_v, _k - 1, _exp)
50
- end
51
- -- ▲ ReadonlyArray.map ▲
52
- _result = NumberSequence.new(_newValue)
41
+ _result = NumberSequence.new({ NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.35, 1), NumberSequenceKeypoint.new(0.5, 0), NumberSequenceKeypoint.new(0.65, 1), NumberSequenceKeypoint.new(1, 1) })
53
42
  else
54
43
  local _exp = arcKeys(shown)
55
44
  -- ▼ ReadonlyArray.map ▼
@@ -102,7 +91,7 @@ local function CircularProgress(props)
102
91
  }), React.createElement("uistroke", {
103
92
  Color = tint,
104
93
  Thickness = thickness,
105
- Transparency = if disabled then 0.85 else 0.82,
94
+ Transparency = if disabled then 0.75 else 0.7,
106
95
  }), React.createElement("uistroke", {
107
96
  Color = tint,
108
97
  Thickness = thickness,
@@ -2,7 +2,7 @@ import React from "@rbxts/react";
2
2
  export interface DialogProps {
3
3
  host?: Instance;
4
4
  open: boolean;
5
- title?: string;
5
+ title: string;
6
6
  onClose: () => void;
7
7
  children?: React.ReactNode;
8
8
  actions?: React.ReactNode;
@@ -12,8 +12,6 @@ local function Dialog(props)
12
12
  local children = _binding.children
13
13
  local actions = _binding.actions
14
14
  local styles = useDialogStyles()
15
- local hasTitle = title ~= nil and title ~= ""
16
- local hasActions = actions ~= nil
17
15
  local _attributes = {
18
16
  key = "Column",
19
17
  }
@@ -23,41 +21,34 @@ local function Dialog(props)
23
21
  local _attributes_1 = table.clone(styles.columnList)
24
22
  setmetatable(_attributes_1, nil)
25
23
  local _exp = React.createElement("uilistlayout", _attributes_1)
26
- local _condition = hasTitle
27
- if _condition then
28
- local _attributes_2 = {
29
- key = "Title",
30
- }
31
- for _k, _v in styles.title do
32
- _attributes_2[_k] = _v
33
- end
34
- _attributes_2.Text = title
35
- _condition = React.createElement("textlabel", _attributes_2)
36
- end
37
24
  local _attributes_2 = {
25
+ key = "Title",
26
+ }
27
+ for _k, _v in styles.title do
28
+ _attributes_2[_k] = _v
29
+ end
30
+ _attributes_2.Text = title
31
+ local _exp_1 = React.createElement("textlabel", _attributes_2)
32
+ local _attributes_3 = {
38
33
  key = "Body",
39
34
  }
40
35
  for _k, _v in styles.body do
41
- _attributes_2[_k] = _v
36
+ _attributes_3[_k] = _v
42
37
  end
43
- local _exp_1 = React.createElement("frame", _attributes_2, children)
44
- local _condition_1 = hasActions
45
- if _condition_1 then
46
- local _attributes_3 = {
47
- key = "Actions",
48
- }
49
- for _k, _v in styles.actions do
50
- _attributes_3[_k] = _v
51
- end
52
- local _attributes_4 = table.clone(styles.actionList)
53
- setmetatable(_attributes_4, nil)
54
- _condition_1 = (React.createElement("frame", _attributes_3, React.createElement("uilistlayout", _attributes_4), actions))
38
+ local _exp_2 = React.createElement("frame", _attributes_3, children)
39
+ local _attributes_4 = {
40
+ key = "Actions",
41
+ }
42
+ for _k, _v in styles.actions do
43
+ _attributes_4[_k] = _v
55
44
  end
45
+ local _attributes_5 = table.clone(styles.actionList)
46
+ setmetatable(_attributes_5, nil)
56
47
  return React.createElement(Modal, {
57
48
  host = host,
58
49
  open = open,
59
50
  onClose = onClose,
60
- }, React.createElement("frame", _attributes, _exp, _condition, _exp_1, _condition_1))
51
+ }, React.createElement("frame", _attributes, _exp, _exp_1, _exp_2, React.createElement("frame", _attributes_4, React.createElement("uilistlayout", _attributes_5), actions)))
61
52
  end
62
53
  local default = Dialog
63
54
  return {
@@ -9,7 +9,6 @@ export interface DividerProps {
9
9
  transparency?: number;
10
10
  weight?: number;
11
11
  anchorPoint?: Vector2;
12
- text?: string;
13
12
  }
14
13
  declare function Divider<T extends DefaultDividerComponent>(props: CustomizedProps<T, DividerProps>): JSX.Element;
15
14
  export default Divider;
@@ -1,63 +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 Orientations = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Orientations
5
- local dividerLabel = TS.import(script, script.Parent, "dividerLabel").dividerLabel
6
4
  local useDividerStyles = TS.import(script, script.Parent, "Divider.styles").default
7
5
  local function Divider(props)
8
6
  local _binding = props
9
- local text = _binding.text
10
- local orientation = _binding.orientation
11
7
  local className = _binding.className
12
8
  local sx = _binding.sx
13
9
  local id = _binding.id
14
10
  local ref = _binding.ref
15
11
  local _binding_1 = useDividerStyles(props)
16
12
  local root = _binding_1.root
17
- local shell = _binding_1.shell
18
- local line = _binding_1.line
19
- local caption = _binding_1.caption
20
- local captionPad = _binding_1.captionPad
21
- local label = dividerLabel(text)
22
- if label ~= nil and orientation ~= Orientations.Vertical then
23
- local _attributes = {}
24
- local _condition = id
25
- if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
26
- _condition = "Divider"
27
- end
28
- _attributes.key = _condition
29
- _attributes.ref = ref
30
- for _k, _v in shell do
31
- _attributes[_k] = _v
32
- end
33
- if className ~= 0 and className == className and className ~= "" and className then
34
- for _k, _v in className do
35
- _attributes[_k] = _v
36
- end
37
- end
38
- if sx ~= 0 and sx == sx and sx ~= "" and sx then
39
- for _k, _v in sx do
40
- _attributes[_k] = _v
41
- end
42
- end
43
- local _attributes_1 = {
44
- key = "Line",
45
- }
46
- for _k, _v in line do
47
- _attributes_1[_k] = _v
48
- end
49
- local _exp = React.createElement("frame", _attributes_1)
50
- local _attributes_2 = {
51
- key = "Label",
52
- }
53
- for _k, _v in caption do
54
- _attributes_2[_k] = _v
55
- end
56
- _attributes_2.Text = label
57
- local _attributes_3 = table.clone(captionPad)
58
- setmetatable(_attributes_3, nil)
59
- return React.createElement("frame", _attributes, _exp, React.createElement("textlabel", _attributes_2, React.createElement("uipadding", _attributes_3)))
60
- end
61
13
  local _attributes = {}
62
14
  local _condition = id
63
15
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
@@ -32,35 +32,6 @@ local useDividerStyles = componentStyles("Divider", function(theme, props)
32
32
  anchorPoint = Vector2.new(0, 0)
33
33
  end
34
34
  return createStyles({
35
- shell = {
36
- Size = UDim2.new(1, 0, 0, theme.spacing.calc(2)),
37
- BackgroundTransparency = 1,
38
- BorderSizePixel = 0,
39
- },
40
- line = {
41
- Size = UDim2.new(1, 0, 0, weight),
42
- Position = UDim2.new(0, 0, 0.5, 0),
43
- AnchorPoint = Vector2.new(0, 0.5),
44
- BackgroundColor3 = color,
45
- BackgroundTransparency = transparency,
46
- BorderSizePixel = 0,
47
- },
48
- caption = {
49
- AutomaticSize = Enum.AutomaticSize.XY,
50
- Size = UDim2.fromScale(0, 0),
51
- AnchorPoint = Vector2.new(0.5, 0.5),
52
- Position = UDim2.new(0.5, 0, 0.5, 0),
53
- BackgroundColor3 = theme.palette.surface.canvas,
54
- BorderSizePixel = 0,
55
- Font = theme.typography.fontFamilies.default,
56
- TextSize = theme.typography.fontSizes.caption,
57
- TextColor3 = theme.palette.text.secondary,
58
- ZIndex = 2,
59
- },
60
- captionPad = {
61
- PaddingLeft = UDim.new(0, theme.padding.calc(1)),
62
- PaddingRight = UDim.new(0, theme.padding.calc(1)),
63
- },
64
35
  root = {
65
36
  Position = position or UDim2.new(0, 0, 0, 0),
66
37
  Size = UDim2.new(if orientation == Orientations.Horizontal then 1 else 0, if orientation == Orientations.Horizontal then -padding * 2 else weight, if orientation == Orientations.Vertical then 1 else 0, if orientation == Orientations.Vertical then -padding * 2 else weight),
@@ -4,7 +4,6 @@ export interface DrawerProps {
4
4
  host?: Instance;
5
5
  open: boolean;
6
6
  edge?: DrawerEdge;
7
- width?: number;
8
7
  onClose: () => void;
9
8
  children?: React.ReactNode;
10
9
  }
@@ -17,12 +17,9 @@ local function Drawer(props)
17
17
  if edge == nil then
18
18
  edge = "left"
19
19
  end
20
- local width = _binding.width
21
20
  local onClose = _binding.onClose
22
21
  local children = _binding.children
23
- local styles = useDrawerStyles({
24
- width = width,
25
- })
22
+ local styles = useDrawerStyles()
26
23
  local close = useRef(onClose)
27
24
  close.current = onClose
28
25
  useEffect(function()
@@ -1,4 +1,2 @@
1
- declare const useDrawerStyles: (props: {
2
- width?: number;
3
- }) => import("../../../../theme/index").ClassNameMap<string>;
1
+ declare const useDrawerStyles: () => import("../../../../theme/index").ClassNameMap<string>;
4
2
  export default useDrawerStyles;
@@ -3,8 +3,7 @@ local TS = _G[script]
3
3
  local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
4
4
  local componentStyles = _theme.componentStyles
5
5
  local createStyles = _theme.createStyles
6
- local useDrawerStyles = componentStyles("Drawer", function(theme, _param)
7
- local width = _param.width
6
+ local useDrawerStyles = componentStyles("Drawer", function(theme)
8
7
  return createStyles({
9
8
  root = {
10
9
  Size = UDim2.fromScale(1, 1),
@@ -22,7 +21,7 @@ local useDrawerStyles = componentStyles("Drawer", function(theme, _param)
22
21
  ZIndex = 30000,
23
22
  },
24
23
  panel = {
25
- Size = UDim2.new(0, if width ~= nil and width > 0 then width else theme.spacing.calc(20), 1, 0),
24
+ Size = UDim2.new(0, theme.spacing.calc(20), 1, 0),
26
25
  BackgroundColor3 = theme.palette.surface.elevated,
27
26
  BorderSizePixel = 0,
28
27
  ZIndex = 30001,
@@ -1,12 +1,9 @@
1
1
  import { CustomizedProps } from "../../../../theme/index";
2
2
  import { Icons } from "../../../enums/index";
3
3
  import { FabSize } from "./fabSize";
4
- import { FabColor } from "./Fab.styles";
5
4
  export interface FabProps {
6
5
  icon: Icons;
7
- label?: string;
8
6
  size?: FabSize;
9
- color?: FabColor;
10
7
  disabled?: boolean;
11
8
  loading?: boolean;
12
9
  reducedMotion?: boolean;
@@ -8,22 +8,15 @@ local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "t
8
8
  local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
9
9
  local CircularProgress = TS.import(script, script.Parent.Parent.Parent, "circularProgress").CircularProgress
10
10
  local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
11
- local _fabSize = TS.import(script, script.Parent, "fabSize")
12
- local fabExtended = _fabSize.fabExtended
13
- local fabIconPixels = _fabSize.fabIconPixels
11
+ local fabIconPixels = TS.import(script, script.Parent, "fabSize").fabIconPixels
14
12
  local useFabStyles = TS.import(script, script.Parent, "Fab.styles").default
15
13
  local function Fab(props)
16
14
  local _binding = props
17
15
  local icon = _binding.icon
18
- local label = _binding.label
19
16
  local size = _binding.size
20
17
  if size == nil then
21
18
  size = "medium"
22
19
  end
23
- local color = _binding.color
24
- if color == nil then
25
- color = "primary"
26
- end
27
20
  local disabled = _binding.disabled
28
21
  local loading = _binding.loading
29
22
  if loading == nil then
@@ -36,12 +29,9 @@ local function Fab(props)
36
29
  local id = _binding.id
37
30
  local ref = _binding.ref
38
31
  local active = canActivate(disabled, loading)
39
- local extended = fabExtended(label)
40
32
  local styles = useFabStyles({
41
33
  size = size,
42
- color = color,
43
34
  disabled = not active,
44
- extended = extended,
45
35
  })
46
36
  local _binding_1 = useTheme()
47
37
  local theme = _binding_1.theme
@@ -55,34 +45,6 @@ local function Fab(props)
55
45
  setHovering(false)
56
46
  setFocused(false)
57
47
  end, { active })
58
- local _result
59
- if loading then
60
- _result = (React.createElement(CircularProgress, {
61
- size = iconPx,
62
- thickness = 2,
63
- color = theme.palette.primary.on,
64
- reducedMotion = reducedMotion,
65
- className = if extended then {
66
- LayoutOrder = 1,
67
- } else {
68
- AnchorPoint = Vector2.new(0.5, 0.5),
69
- Position = UDim2.fromScale(0.5, 0.5),
70
- },
71
- }))
72
- else
73
- local _attributes = {
74
- key = "Icon",
75
- }
76
- for _k, _v in styles.icon do
77
- _attributes[_k] = _v
78
- end
79
- _attributes.Size = UDim2.fromOffset(iconPx, iconPx)
80
- _attributes.AnchorPoint = if extended then Vector2.new(0, 0) else Vector2.new(0.5, 0.5)
81
- _attributes.Position = if extended then UDim2.fromScale(0, 0) else UDim2.fromScale(0.5, 0.5)
82
- _attributes.Image = tostring(icon)
83
- _result = (React.createElement("imagelabel", _attributes))
84
- end
85
- local iconEl = _result
86
48
  local _attributes = {}
87
49
  local _condition = id
88
50
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
@@ -133,31 +95,32 @@ local function Fab(props)
133
95
  setmetatable(_attributes_1, nil)
134
96
  local _exp = React.createElement("uicorner", _attributes_1)
135
97
  local _exp_1 = React.createElement(Shadow)
136
- local _result_1
137
- if extended then
138
- local _attributes_2 = table.clone(styles.padding)
139
- setmetatable(_attributes_2, nil)
140
- local _exp_2 = React.createElement("uipadding", _attributes_2)
141
- local _attributes_3 = table.clone(styles.row)
142
- setmetatable(_attributes_3, nil)
143
- local _exp_3 = React.createElement("uilistlayout", _attributes_3)
144
- local _exp_4 = iconEl
145
- local _condition_1 = not loading
146
- if _condition_1 then
147
- local _attributes_4 = {
148
- key = "Label",
149
- }
150
- for _k, _v in styles.label do
151
- _attributes_4[_k] = _v
152
- end
153
- _attributes_4.Text = label
154
- _condition_1 = React.createElement("textlabel", _attributes_4)
155
- end
156
- _result_1 = (React.createElement(React.Fragment, nil, _exp_2, _exp_3, _exp_4, _condition_1))
98
+ local _result
99
+ if loading then
100
+ _result = (React.createElement(CircularProgress, {
101
+ size = iconPx,
102
+ thickness = 2,
103
+ color = theme.palette.primary.on,
104
+ reducedMotion = reducedMotion,
105
+ className = {
106
+ AnchorPoint = Vector2.new(0.5, 0.5),
107
+ Position = UDim2.fromScale(0.5, 0.5),
108
+ },
109
+ }))
157
110
  else
158
- _result_1 = iconEl
111
+ local _attributes_2 = {
112
+ key = "Icon",
113
+ }
114
+ for _k, _v in styles.icon do
115
+ _attributes_2[_k] = _v
116
+ end
117
+ _attributes_2.Size = UDim2.fromOffset(iconPx, iconPx)
118
+ _attributes_2.AnchorPoint = Vector2.new(0.5, 0.5)
119
+ _attributes_2.Position = UDim2.fromScale(0.5, 0.5)
120
+ _attributes_2.Image = tostring(icon)
121
+ _result = (React.createElement("imagelabel", _attributes_2))
159
122
  end
160
- return React.createElement("textbutton", _attributes, _exp, _exp_1, _result_1)
123
+ return React.createElement("textbutton", _attributes, _exp, _exp_1, _result)
161
124
  end
162
125
  local default = Fab
163
126
  return {
@@ -1,10 +1,7 @@
1
1
  import { FabSize } from "./fabSize";
2
- export type FabColor = "primary" | "accent";
3
2
  export interface FabStyleProps {
4
3
  size?: FabSize;
5
- color?: FabColor;
6
4
  disabled?: boolean;
7
- extended?: boolean;
8
5
  }
9
6
  declare const useFabStyles: (props: FabStyleProps) => import("../../../../theme/index").ClassNameMap<string>;
10
7
  export default useFabStyles;
@@ -9,19 +9,12 @@ local useFabStyles = componentStyles("Fab", function(theme, _param)
9
9
  if size == nil then
10
10
  size = "medium"
11
11
  end
12
- local color = _param.color
13
- if color == nil then
14
- color = "primary"
15
- end
16
12
  local disabled = _param.disabled
17
- local extended = _param.extended
18
13
  local diameter = fabPixels(size)
19
- local tone = if color == "accent" then theme.palette.accent else theme.palette.primary
20
14
  return createStyles({
21
15
  root = {
22
- Size = if extended == true then UDim2.new(0, 0, 0, diameter) else UDim2.fromOffset(diameter, diameter),
23
- AutomaticSize = if extended == true then Enum.AutomaticSize.X else Enum.AutomaticSize.None,
24
- BackgroundColor3 = tone.main,
16
+ Size = UDim2.fromOffset(diameter, diameter),
17
+ BackgroundColor3 = theme.palette.primary.main,
25
18
  BackgroundTransparency = if disabled then 0.5 else 0,
26
19
  BorderSizePixel = 0,
27
20
  AutoButtonColor = false,
@@ -31,36 +24,13 @@ local useFabStyles = componentStyles("Fab", function(theme, _param)
31
24
  corner = {
32
25
  CornerRadius = UDim.new(1, 0),
33
26
  },
34
- padding = {
35
- PaddingLeft = UDim.new(0, theme.padding.calc(2)),
36
- PaddingRight = UDim.new(0, theme.padding.calc(2.5)),
37
- },
38
- row = {
39
- FillDirection = Enum.FillDirection.Horizontal,
40
- VerticalAlignment = Enum.VerticalAlignment.Center,
41
- HorizontalAlignment = Enum.HorizontalAlignment.Center,
42
- SortOrder = Enum.SortOrder.LayoutOrder,
43
- Padding = UDim.new(0, theme.padding.calc(1)),
44
- },
45
27
  icon = {
46
28
  Size = UDim2.fromScale(1, 1),
47
29
  BackgroundTransparency = 1,
48
30
  BorderSizePixel = 0,
49
31
  ScaleType = Enum.ScaleType.Fit,
50
- ImageColor3 = tone.on,
32
+ ImageColor3 = theme.palette.primary.on,
51
33
  ImageTransparency = if disabled then 0.5 else 0,
52
- LayoutOrder = 1,
53
- },
54
- label = {
55
- AutomaticSize = Enum.AutomaticSize.XY,
56
- Size = UDim2.fromScale(0, 0),
57
- BackgroundTransparency = 1,
58
- BorderSizePixel = 0,
59
- Font = theme.typography.fontFamilies.default,
60
- TextSize = theme.typography.fontSizes.body,
61
- TextColor3 = tone.on,
62
- TextTransparency = if disabled then 0.5 else 0,
63
- LayoutOrder = 2,
64
34
  },
65
35
  })
66
36
  end)
@@ -1,4 +1,3 @@
1
1
  export type FabSize = "small" | "medium" | "large";
2
2
  export declare function fabPixels(size?: FabSize): 40 | 64 | 56;
3
3
  export declare function fabIconPixels(size?: FabSize): 18 | 24 | 28;
4
- export declare function fabExtended(label?: string): boolean;