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

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 (234) hide show
  1. package/README.md +2 -0
  2. package/out/theme/constants/NumberConstants.d.ts +2 -0
  3. package/out/theme/constants/NumberConstants.luau +3 -0
  4. package/out/theme/interfaces/spacing/Shape.d.ts +3 -0
  5. package/out/theme/interfaces/typography/FontSizes.d.ts +1 -1
  6. package/out/theme/interfaces/typography/FontSizes.luau +15 -8
  7. package/out/theme/interfaces/typography/ThemeTypography.d.ts +3 -0
  8. package/out/theme/interfaces/typography/Variants.d.ts +14 -15
  9. package/out/theme/interfaces/typography/Variants.luau +68 -18
  10. package/out/theme/themes/DarkTheme.luau +4 -0
  11. package/out/theme/themes/LightTheme.luau +4 -0
  12. package/out/ui/packages/accordion/components/Accordion.d.ts +2 -0
  13. package/out/ui/packages/accordion/components/Accordion.luau +36 -16
  14. package/out/ui/packages/accordion/components/Accordion.styles.d.ts +1 -0
  15. package/out/ui/packages/accordion/components/Accordion.styles.luau +16 -4
  16. package/out/ui/packages/accordion/components/accordionOpen.d.ts +1 -0
  17. package/out/ui/packages/accordion/components/accordionOpen.luau +4 -0
  18. package/out/ui/packages/alert/components/Alert.d.ts +2 -0
  19. package/out/ui/packages/alert/components/Alert.luau +40 -27
  20. package/out/ui/packages/alert/components/Alert.styles.d.ts +2 -0
  21. package/out/ui/packages/alert/components/Alert.styles.luau +17 -8
  22. package/out/ui/packages/appBar/components/AppBar.d.ts +2 -1
  23. package/out/ui/packages/appBar/components/AppBar.luau +5 -0
  24. package/out/ui/packages/appBar/components/AppBar.styles.d.ts +2 -0
  25. package/out/ui/packages/appBar/components/AppBar.styles.luau +6 -2
  26. package/out/ui/packages/autocomplete/components/Autocomplete.luau +8 -0
  27. package/out/ui/packages/avatar/components/Avatar.d.ts +2 -0
  28. package/out/ui/packages/avatar/components/Avatar.luau +20 -12
  29. package/out/ui/packages/avatar/components/Avatar.styles.d.ts +2 -0
  30. package/out/ui/packages/avatar/components/Avatar.styles.luau +5 -1
  31. package/out/ui/packages/backdrop/components/Backdrop.d.ts +10 -0
  32. package/out/ui/packages/backdrop/components/Backdrop.luau +58 -0
  33. package/out/ui/packages/backdrop/components/Backdrop.styles.d.ts +4 -0
  34. package/out/ui/packages/backdrop/components/Backdrop.styles.luau +24 -0
  35. package/out/ui/packages/backdrop/index.d.ts +2 -0
  36. package/out/ui/packages/backdrop/init.luau +5 -0
  37. package/out/ui/packages/badge/components/Badge.d.ts +3 -0
  38. package/out/ui/packages/badge/components/Badge.luau +23 -8
  39. package/out/ui/packages/badge/components/Badge.styles.d.ts +5 -1
  40. package/out/ui/packages/badge/components/Badge.styles.luau +20 -8
  41. package/out/ui/packages/bottomNavigation/components/BottomNavigation.d.ts +1 -0
  42. package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +8 -2
  43. package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.d.ts +3 -1
  44. package/out/ui/packages/bottomNavigation/components/BottomNavigation.styles.luau +6 -2
  45. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.d.ts +1 -0
  46. package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +58 -24
  47. package/out/ui/packages/breadcrumbs/components/breadcrumbItems.d.ts +9 -0
  48. package/out/ui/packages/breadcrumbs/components/breadcrumbItems.luau +68 -0
  49. package/out/ui/packages/breadcrumbs/index.d.ts +1 -0
  50. package/out/ui/packages/breadcrumbs/init.luau +3 -0
  51. package/out/ui/packages/brickColorPicker/components/brickColorCatalog.luau +1 -1
  52. package/out/ui/packages/button/components/Button.luau +9 -5
  53. package/out/ui/packages/card/components/Card.d.ts +1 -0
  54. package/out/ui/packages/card/components/Card.luau +2 -0
  55. package/out/ui/packages/checkbox/components/checkboxLook.d.ts +1 -1
  56. package/out/ui/packages/chip/components/Chip.d.ts +6 -1
  57. package/out/ui/packages/chip/components/Chip.luau +49 -2
  58. package/out/ui/packages/chip/components/Chip.styles.d.ts +6 -0
  59. package/out/ui/packages/chip/components/Chip.styles.luau +55 -10
  60. package/out/ui/packages/circularProgress/components/CircularProgress.luau +13 -2
  61. package/out/ui/packages/dialog/components/Dialog.d.ts +1 -1
  62. package/out/ui/packages/dialog/components/Dialog.luau +27 -18
  63. package/out/ui/packages/divider/components/Divider.d.ts +1 -0
  64. package/out/ui/packages/divider/components/Divider.luau +48 -0
  65. package/out/ui/packages/divider/components/Divider.styles.luau +29 -0
  66. package/out/ui/packages/divider/components/dividerLabel.d.ts +1 -0
  67. package/out/ui/packages/divider/components/dividerLabel.luau +10 -0
  68. package/out/ui/packages/drawer/components/Drawer.d.ts +1 -0
  69. package/out/ui/packages/drawer/components/Drawer.luau +4 -1
  70. package/out/ui/packages/drawer/components/Drawer.styles.d.ts +3 -1
  71. package/out/ui/packages/drawer/components/Drawer.styles.luau +3 -2
  72. package/out/ui/packages/fab/components/Fab.d.ts +3 -0
  73. package/out/ui/packages/fab/components/Fab.luau +62 -25
  74. package/out/ui/packages/fab/components/Fab.styles.d.ts +3 -0
  75. package/out/ui/packages/fab/components/Fab.styles.luau +33 -3
  76. package/out/ui/packages/fab/components/fabSize.d.ts +1 -0
  77. package/out/ui/packages/fab/components/fabSize.luau +4 -0
  78. package/out/ui/packages/fab/index.d.ts +1 -1
  79. package/out/ui/packages/fab/init.luau +1 -0
  80. package/out/ui/packages/formText/components/FormHelperText.d.ts +8 -0
  81. package/out/ui/packages/formText/components/FormHelperText.luau +44 -0
  82. package/out/ui/packages/formText/components/FormLabel.d.ts +9 -0
  83. package/out/ui/packages/formText/components/FormLabel.luau +46 -0
  84. package/out/ui/packages/formText/components/FormText.styles.d.ts +5 -0
  85. package/out/ui/packages/formText/components/FormText.styles.luau +33 -0
  86. package/out/ui/packages/formText/index.d.ts +4 -0
  87. package/out/ui/packages/formText/init.luau +6 -0
  88. package/out/ui/packages/iconButton/components/IconButton.luau +7 -2
  89. package/out/ui/packages/iconButton/components/IconButton.styles.luau +3 -0
  90. package/out/ui/packages/imageList/components/ImageList.d.ts +14 -0
  91. package/out/ui/packages/imageList/components/ImageList.luau +100 -0
  92. package/out/ui/packages/imageList/components/ImageList.styles.d.ts +6 -0
  93. package/out/ui/packages/imageList/components/ImageList.styles.luau +73 -0
  94. package/out/ui/packages/imageList/components/imageListLayout.d.ts +4 -0
  95. package/out/ui/packages/imageList/components/imageListLayout.luau +31 -0
  96. package/out/ui/packages/imageList/index.d.ts +2 -0
  97. package/out/ui/packages/imageList/init.luau +5 -0
  98. package/out/ui/packages/index.d.ts +7 -0
  99. package/out/ui/packages/init.luau +21 -0
  100. package/out/ui/packages/input/components/Input.d.ts +1 -0
  101. package/out/ui/packages/input/components/Input.luau +8 -3
  102. package/out/ui/packages/layout/components/Box.d.ts +11 -0
  103. package/out/ui/packages/layout/components/Box.luau +49 -0
  104. package/out/ui/packages/layout/components/Box.styles.d.ts +7 -0
  105. package/out/ui/packages/layout/components/Box.styles.luau +34 -0
  106. package/out/ui/packages/layout/components/Container.d.ts +10 -0
  107. package/out/ui/packages/layout/components/Container.luau +54 -0
  108. package/out/ui/packages/layout/components/Container.styles.d.ts +6 -0
  109. package/out/ui/packages/layout/components/Container.styles.luau +41 -0
  110. package/out/ui/packages/layout/components/Grid.d.ts +1 -1
  111. package/out/ui/packages/layout/components/Stack.d.ts +12 -0
  112. package/out/ui/packages/layout/components/Stack.luau +49 -0
  113. package/out/ui/packages/layout/components/Stack.styles.d.ts +8 -0
  114. package/out/ui/packages/layout/components/Stack.styles.luau +72 -0
  115. package/out/ui/packages/layout/components/boxPad.d.ts +14 -0
  116. package/out/ui/packages/layout/components/boxPad.luau +59 -0
  117. package/out/ui/packages/layout/components/containerWidth.d.ts +2 -0
  118. package/out/ui/packages/layout/components/containerWidth.luau +17 -0
  119. package/out/ui/packages/layout/components/stackAlign.d.ts +8 -0
  120. package/out/ui/packages/layout/components/stackAlign.luau +29 -0
  121. package/out/ui/packages/layout/index.d.ts +10 -0
  122. package/out/ui/packages/layout/init.luau +4 -0
  123. package/out/ui/packages/link/components/Link.d.ts +11 -0
  124. package/out/ui/packages/link/components/Link.luau +83 -0
  125. package/out/ui/packages/link/components/Link.styles.d.ts +8 -0
  126. package/out/ui/packages/link/components/Link.styles.luau +59 -0
  127. package/out/ui/packages/link/index.d.ts +3 -0
  128. package/out/ui/packages/link/init.luau +5 -0
  129. package/out/ui/packages/listItem/components/ListItem.d.ts +2 -0
  130. package/out/ui/packages/listItem/components/ListItem.luau +22 -1
  131. package/out/ui/packages/listItem/components/ListItem.styles.d.ts +1 -0
  132. package/out/ui/packages/listItem/components/ListItem.styles.luau +16 -5
  133. package/out/ui/packages/loadingStroke/components/LoadingStroke.d.ts +2 -0
  134. package/out/ui/packages/loadingStroke/components/LoadingStroke.luau +23 -19
  135. package/out/ui/packages/menu/components/Menu.d.ts +5 -0
  136. package/out/ui/packages/menu/components/Menu.luau +54 -23
  137. package/out/ui/packages/menu/components/Menu.styles.luau +5 -1
  138. package/out/ui/packages/modal/components/Modal.d.ts +1 -1
  139. package/out/ui/packages/modal/components/Modal.luau +55 -37
  140. package/out/ui/packages/motion/index.d.ts +1 -1
  141. package/out/ui/packages/motion/init.luau +1 -0
  142. package/out/ui/packages/motion/unit.d.ts +5 -0
  143. package/out/ui/packages/motion/unit.luau +23 -0
  144. package/out/ui/packages/numberInput/components/NumberInput.d.ts +1 -0
  145. package/out/ui/packages/numberInput/components/NumberInput.luau +2 -0
  146. package/out/ui/packages/pagination/components/Pagination.d.ts +4 -1
  147. package/out/ui/packages/pagination/components/Pagination.luau +41 -22
  148. package/out/ui/packages/pagination/components/Pagination.styles.d.ts +4 -1
  149. package/out/ui/packages/pagination/components/Pagination.styles.luau +19 -4
  150. package/out/ui/packages/pagination/components/pageRange.d.ts +2 -1
  151. package/out/ui/packages/pagination/components/pageRange.luau +91 -8
  152. package/out/ui/packages/pagination/index.d.ts +1 -0
  153. package/out/ui/packages/pagination/init.luau +1 -0
  154. package/out/ui/packages/paper/components/Paper.d.ts +2 -1
  155. package/out/ui/packages/paper/components/Paper.luau +14 -3
  156. package/out/ui/packages/paper/components/Paper.styles.d.ts +1 -1
  157. package/out/ui/packages/paper/components/Paper.styles.luau +6 -0
  158. package/out/ui/packages/popup/index.d.ts +1 -0
  159. package/out/ui/packages/popup/init.luau +1 -0
  160. package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +1 -0
  161. package/out/ui/packages/radioGroup/components/RadioGroup.luau +4 -2
  162. package/out/ui/packages/radioGroup/components/RadioGroup.styles.d.ts +1 -0
  163. package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +4 -1
  164. package/out/ui/packages/rating/components/Rating.d.ts +11 -0
  165. package/out/ui/packages/rating/components/Rating.luau +101 -0
  166. package/out/ui/packages/rating/components/Rating.styles.d.ts +6 -0
  167. package/out/ui/packages/rating/components/Rating.styles.luau +44 -0
  168. package/out/ui/packages/rating/index.d.ts +2 -0
  169. package/out/ui/packages/rating/init.luau +5 -0
  170. package/out/ui/packages/select/components/Select.d.ts +5 -0
  171. package/out/ui/packages/select/components/Select.luau +48 -24
  172. package/out/ui/packages/select/components/Select.styles.luau +1 -1
  173. package/out/ui/packages/skeleton/components/Skeleton.luau +3 -2
  174. package/out/ui/packages/skeleton/components/Skeleton.styles.luau +7 -2
  175. package/out/ui/packages/skeleton/components/skeletonMotion.luau +1 -1
  176. package/out/ui/packages/skeleton/components/skeletonTone.d.ts +20 -0
  177. package/out/ui/packages/skeleton/components/skeletonTone.luau +14 -0
  178. package/out/ui/packages/slider/components/Slider.d.ts +3 -0
  179. package/out/ui/packages/slider/components/Slider.luau +32 -3
  180. package/out/ui/packages/slider/components/Slider.styles.d.ts +2 -0
  181. package/out/ui/packages/slider/components/Slider.styles.luau +14 -1
  182. package/out/ui/packages/slider/components/sliderMarks.d.ts +1 -0
  183. package/out/ui/packages/slider/components/sliderMarks.luau +37 -0
  184. package/out/ui/packages/snackbar/components/Snackbar.d.ts +2 -0
  185. package/out/ui/packages/snackbar/components/Snackbar.luau +5 -0
  186. package/out/ui/packages/snackbar/components/snackbarAction.d.ts +1 -0
  187. package/out/ui/packages/snackbar/components/snackbarAction.luau +10 -0
  188. package/out/ui/packages/speedDial/components/SpeedDial.d.ts +19 -0
  189. package/out/ui/packages/speedDial/components/SpeedDial.luau +101 -0
  190. package/out/ui/packages/speedDial/components/SpeedDial.styles.d.ts +5 -0
  191. package/out/ui/packages/speedDial/components/SpeedDial.styles.luau +31 -0
  192. package/out/ui/packages/speedDial/index.d.ts +3 -0
  193. package/out/ui/packages/speedDial/init.luau +5 -0
  194. package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
  195. package/out/ui/packages/stateMatrix.d.ts +2 -0
  196. package/out/ui/packages/stateMatrix.luau +809 -252
  197. package/out/ui/packages/stepper/components/Stepper.d.ts +1 -0
  198. package/out/ui/packages/stepper/components/Stepper.luau +7 -1
  199. package/out/ui/packages/stepper/components/Stepper.styles.d.ts +3 -1
  200. package/out/ui/packages/stepper/components/Stepper.styles.luau +6 -2
  201. package/out/ui/packages/switch/components/Switch.d.ts +2 -0
  202. package/out/ui/packages/switch/components/Switch.luau +5 -0
  203. package/out/ui/packages/switch/components/Switch.styles.d.ts +2 -0
  204. package/out/ui/packages/switch/components/Switch.styles.luau +7 -2
  205. package/out/ui/packages/switch/components/switchLook.d.ts +1 -1
  206. package/out/ui/packages/table/components/Table.d.ts +1 -0
  207. package/out/ui/packages/table/components/Table.luau +4 -1
  208. package/out/ui/packages/table/components/Table.styles.d.ts +3 -1
  209. package/out/ui/packages/table/components/Table.styles.luau +10 -6
  210. package/out/ui/packages/tabs/components/Tabs.d.ts +3 -0
  211. package/out/ui/packages/tabs/components/Tabs.luau +12 -3
  212. package/out/ui/packages/tabs/components/Tabs.styles.d.ts +5 -1
  213. package/out/ui/packages/tabs/components/Tabs.styles.luau +26 -10
  214. package/out/ui/packages/tabs/components/tabsOrientation.d.ts +2 -0
  215. package/out/ui/packages/tabs/components/tabsOrientation.luau +7 -0
  216. package/out/ui/packages/tabs/index.d.ts +1 -0
  217. package/out/ui/packages/tabs/init.luau +1 -0
  218. package/out/ui/packages/toast/components/Toast.d.ts +2 -0
  219. package/out/ui/packages/toast/components/Toast.luau +26 -1
  220. package/out/ui/packages/toast/components/Toast.styles.luau +22 -4
  221. package/out/ui/packages/toggleButton/components/ToggleButton.d.ts +19 -0
  222. package/out/ui/packages/toggleButton/components/ToggleButton.luau +135 -0
  223. package/out/ui/packages/toggleButton/components/ToggleButton.styles.d.ts +7 -0
  224. package/out/ui/packages/toggleButton/components/ToggleButton.styles.luau +65 -0
  225. package/out/ui/packages/toggleButton/index.d.ts +2 -0
  226. package/out/ui/packages/toggleButton/init.luau +7 -0
  227. package/out/ui/packages/typography/components/Typography.styles.luau +4 -5
  228. package/out/ui/packages/virtualList/components/EmptyListHint.d.ts +6 -0
  229. package/out/ui/packages/virtualList/components/EmptyListHint.luau +32 -0
  230. package/out/ui/packages/virtualList/components/EmptyListHint.styles.d.ts +5 -0
  231. package/out/ui/packages/virtualList/components/EmptyListHint.styles.luau +26 -0
  232. package/out/ui/packages/virtualList/index.d.ts +2 -0
  233. package/out/ui/packages/virtualList/init.luau +1 -0
  234. package/package.json +2 -2
@@ -1,6 +1,8 @@
1
1
  export type AppBarElevation = "flat" | "raised";
2
+ export type AppBarColor = "default" | "primary";
2
3
  declare const useAppBarStyles: (props: {
3
4
  elevation?: AppBarElevation;
5
+ color?: AppBarColor;
4
6
  hasActions?: boolean;
5
7
  }) => import("../../../../theme/index").ClassNameMap<string>;
6
8
  export default useAppBarStyles;
@@ -8,6 +8,10 @@ local useAppBarStyles = componentStyles("AppBar", function(theme, _param)
8
8
  if elevation == nil then
9
9
  elevation = "raised"
10
10
  end
11
+ local color = _param.color
12
+ if color == nil then
13
+ color = "default"
14
+ end
11
15
  local hasActions = _param.hasActions
12
16
  if hasActions == nil then
13
17
  hasActions = false
@@ -15,7 +19,7 @@ local useAppBarStyles = componentStyles("AppBar", function(theme, _param)
15
19
  local _object = {
16
20
  root = {
17
21
  Size = UDim2.new(1, 0, 0, theme.spacing.calc(7)),
18
- BackgroundColor3 = if elevation == "raised" then theme.palette.surface.elevated else theme.palette.surface.paper,
22
+ BackgroundColor3 = if color == "primary" then theme.palette.primary.main elseif elevation == "raised" then theme.palette.surface.elevated else theme.palette.surface.paper,
19
23
  BorderSizePixel = 0,
20
24
  ZIndex = 11000,
21
25
  },
@@ -37,7 +41,7 @@ local useAppBarStyles = componentStyles("AppBar", function(theme, _param)
37
41
  _condition = theme.typography.fontSizes.body
38
42
  end
39
43
  _object_1[_left_1] = _condition
40
- _object_1.TextColor3 = theme.palette.text.primary
44
+ _object_1.TextColor3 = if color == "primary" then theme.palette.primary.on else theme.palette.text.primary
41
45
  _object_1.TextXAlignment = Enum.TextXAlignment.Left
42
46
  _object_1.TextYAlignment = Enum.TextYAlignment.Center
43
47
  _object_1.TextTruncate = Enum.TextTruncate.AtEnd
@@ -13,6 +13,10 @@ local function Autocomplete(props)
13
13
  local loading = _binding.loading
14
14
  local placeholder = _binding.placeholder
15
15
  local searchable = _binding.searchable
16
+ local defaultOpen = _binding.defaultOpen
17
+ local defaultQuery = _binding.defaultQuery
18
+ local emptyText = _binding.emptyText
19
+ local empty = _binding.empty
16
20
  local reducedMotion = _binding.reducedMotion
17
21
  local size = _binding.size
18
22
  local className = _binding.className
@@ -28,6 +32,10 @@ local function Autocomplete(props)
28
32
  loading = loading,
29
33
  placeholder = placeholder,
30
34
  searchable = autocompleteSearchable(searchable),
35
+ defaultOpen = defaultOpen,
36
+ defaultQuery = defaultQuery,
37
+ emptyText = emptyText,
38
+ empty = empty,
31
39
  reducedMotion = reducedMotion,
32
40
  size = size,
33
41
  className = className,
@@ -1,8 +1,10 @@
1
1
  import { CustomizedProps } from "../../../../theme/index";
2
+ import { AvatarVariant } from "./Avatar.styles";
2
3
  export interface AvatarProps {
3
4
  name?: string;
4
5
  image?: string;
5
6
  size?: number;
7
+ variant?: AvatarVariant;
6
8
  }
7
9
  declare function Avatar(props: CustomizedProps<Frame, AvatarProps>): JSX.Element;
8
10
  export default Avatar;
@@ -11,12 +11,17 @@ local function Avatar(props)
11
11
  end
12
12
  local image = _binding.image
13
13
  local size = _binding.size
14
+ local variant = _binding.variant
15
+ if variant == nil then
16
+ variant = "circular"
17
+ end
14
18
  local className = _binding.className
15
19
  local sx = _binding.sx
16
20
  local id = _binding.id
17
21
  local ref = _binding.ref
18
22
  local styles = useAvatarStyles({
19
23
  size = size,
24
+ variant = variant,
20
25
  })
21
26
  local _attributes = {}
22
27
  local _condition = id
@@ -38,30 +43,33 @@ local function Avatar(props)
38
43
  _attributes[_k] = _v
39
44
  end
40
45
  end
41
- local _attributes_1 = table.clone(styles.corner)
42
- setmetatable(_attributes_1, nil)
43
- local _exp = React.createElement("uicorner", _attributes_1)
46
+ local _condition_1 = variant ~= "square"
47
+ if _condition_1 then
48
+ local _attributes_1 = table.clone(styles.corner)
49
+ setmetatable(_attributes_1, nil)
50
+ _condition_1 = React.createElement("uicorner", _attributes_1)
51
+ end
44
52
  local _result
45
53
  if image ~= nil then
46
- local _attributes_2 = {
54
+ local _attributes_1 = {
47
55
  key = "Image",
48
56
  }
49
57
  for _k, _v in styles.image do
50
- _attributes_2[_k] = _v
58
+ _attributes_1[_k] = _v
51
59
  end
52
- _attributes_2.Image = image
53
- _result = (React.createElement("imagelabel", _attributes_2))
60
+ _attributes_1.Image = image
61
+ _result = (React.createElement("imagelabel", _attributes_1))
54
62
  else
55
- local _attributes_2 = {
63
+ local _attributes_1 = {
56
64
  key = "Initials",
57
65
  }
58
66
  for _k, _v in styles.text do
59
- _attributes_2[_k] = _v
67
+ _attributes_1[_k] = _v
60
68
  end
61
- _attributes_2.Text = avatarInitials(name)
62
- _result = (React.createElement("textlabel", _attributes_2))
69
+ _attributes_1.Text = avatarInitials(name)
70
+ _result = (React.createElement("textlabel", _attributes_1))
63
71
  end
64
- return React.createElement("frame", _attributes, _exp, _result)
72
+ return React.createElement("frame", _attributes, _condition_1, _result)
65
73
  end
66
74
  local default = Avatar
67
75
  return {
@@ -1,4 +1,6 @@
1
+ export type AvatarVariant = "circular" | "rounded" | "square";
1
2
  declare const useAvatarStyles: (props: {
2
3
  size?: number;
4
+ variant?: AvatarVariant;
3
5
  }) => import("../../../../theme/index").ClassNameMap<string>;
4
6
  export default useAvatarStyles;
@@ -8,6 +8,10 @@ local useAvatarStyles = componentStyles("Avatar", function(theme, _param)
8
8
  if size == nil then
9
9
  size = 40
10
10
  end
11
+ local variant = _param.variant
12
+ if variant == nil then
13
+ variant = "circular"
14
+ end
11
15
  return createStyles({
12
16
  root = {
13
17
  Size = UDim2.fromOffset(size, size),
@@ -29,7 +33,7 @@ local useAvatarStyles = componentStyles("Avatar", function(theme, _param)
29
33
  TextColor3 = theme.palette.primary.on,
30
34
  },
31
35
  corner = {
32
- CornerRadius = UDim.new(1, 0),
36
+ CornerRadius = if variant == "rounded" then UDim.new(0, theme.shape.borderRadius) else UDim.new(1, 0),
33
37
  },
34
38
  })
35
39
  end)
@@ -0,0 +1,10 @@
1
+ import React from "@rbxts/react";
2
+ import { CustomizedProps } from "../../../../theme/index";
3
+ export interface BackdropProps {
4
+ open?: boolean;
5
+ invisible?: boolean;
6
+ onClick?: () => void;
7
+ children?: React.ReactNode;
8
+ }
9
+ declare function Backdrop(props: CustomizedProps<TextButton, BackdropProps>): JSX.Element | undefined;
10
+ export default Backdrop;
@@ -0,0 +1,58 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local TS = _G[script]
3
+ local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
+ local useBackdropStyles = TS.import(script, script.Parent, "Backdrop.styles").default
5
+ local function Backdrop(props)
6
+ local _binding = props
7
+ local open = _binding.open
8
+ if open == nil then
9
+ open = true
10
+ end
11
+ local invisible = _binding.invisible
12
+ local onClick = _binding.onClick
13
+ local children = _binding.children
14
+ local className = _binding.className
15
+ local sx = _binding.sx
16
+ local id = _binding.id
17
+ local ref = _binding.ref
18
+ local styles = useBackdropStyles({
19
+ invisible = invisible,
20
+ })
21
+ if open ~= true then
22
+ return nil
23
+ end
24
+ local _attributes = {}
25
+ local _condition = id
26
+ if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
27
+ _condition = "Backdrop"
28
+ end
29
+ _attributes.key = _condition
30
+ _attributes.ref = ref
31
+ for _k, _v in styles.root do
32
+ _attributes[_k] = _v
33
+ end
34
+ if className then
35
+ for _k, _v in className do
36
+ _attributes[_k] = _v
37
+ end
38
+ end
39
+ if sx then
40
+ for _k, _v in sx do
41
+ _attributes[_k] = _v
42
+ end
43
+ end
44
+ _attributes.Event = {
45
+ Activated = function()
46
+ local _result = onClick
47
+ if _result ~= nil then
48
+ _result = _result()
49
+ end
50
+ return _result
51
+ end,
52
+ }
53
+ return React.createElement("textbutton", _attributes, children)
54
+ end
55
+ local default = Backdrop
56
+ return {
57
+ default = default,
58
+ }
@@ -0,0 +1,4 @@
1
+ declare const useBackdropStyles: (props: {
2
+ invisible?: boolean;
3
+ }) => import("../../../../theme/index").ClassNameMap<string>;
4
+ export default useBackdropStyles;
@@ -0,0 +1,24 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local TS = _G[script]
3
+ local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
4
+ local componentStyles = _theme.componentStyles
5
+ local createStyles = _theme.createStyles
6
+ local useBackdropStyles = componentStyles("Backdrop", function(theme, _param)
7
+ local invisible = _param.invisible
8
+ return createStyles({
9
+ root = {
10
+ Size = UDim2.fromScale(1, 1),
11
+ BackgroundColor3 = theme.palette.backdrop,
12
+ BackgroundTransparency = if invisible == true then 1 else 0.45,
13
+ BorderSizePixel = 0,
14
+ Text = "",
15
+ AutoButtonColor = false,
16
+ Selectable = false,
17
+ ZIndex = 30000,
18
+ },
19
+ })
20
+ end)
21
+ local default = useBackdropStyles
22
+ return {
23
+ default = default,
24
+ }
@@ -0,0 +1,2 @@
1
+ export { default as Backdrop } from "./components/Backdrop";
2
+ export { BackdropProps } from "./components/Backdrop";
@@ -0,0 +1,5 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local TS = _G[script]
3
+ local exports = {}
4
+ exports.Backdrop = TS.import(script, script, "components", "Backdrop").default
5
+ return exports
@@ -1,9 +1,12 @@
1
1
  import React from "@rbxts/react";
2
2
  import { CustomizedProps } from "../../../../theme/index";
3
+ import { BadgeColor } from "./Badge.styles";
3
4
  export interface BadgeProps {
4
5
  count?: number;
5
6
  max?: number;
6
7
  invisible?: boolean;
8
+ variant?: "standard" | "dot";
9
+ color?: BadgeColor;
7
10
  children?: React.ReactNode;
8
11
  }
9
12
  declare function Badge(props: CustomizedProps<Frame, BadgeProps>): JSX.Element;
@@ -17,13 +17,25 @@ local function Badge(props)
17
17
  if invisible == nil then
18
18
  invisible = false
19
19
  end
20
+ local variant = _binding.variant
21
+ if variant == nil then
22
+ variant = "standard"
23
+ end
24
+ local color = _binding.color
25
+ if color == nil then
26
+ color = "error"
27
+ end
20
28
  local children = _binding.children
21
29
  local className = _binding.className
22
30
  local sx = _binding.sx
23
31
  local id = _binding.id
24
32
  local ref = _binding.ref
25
- local styles = useBadgeStyles()
26
- local shown = not invisible and count > 0
33
+ local styles = useBadgeStyles({
34
+ variant = variant,
35
+ color = color,
36
+ })
37
+ local isDot = variant == "dot"
38
+ local shown = not invisible and (isDot or count > 0)
27
39
  local _attributes = {}
28
40
  local _condition = id
29
41
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
@@ -53,13 +65,16 @@ local function Badge(props)
53
65
  for _k, _v in styles.badge do
54
66
  _attributes_1[_k] = _v
55
67
  end
56
- _attributes_1.Text = badgeText(count, max)
57
- local _attributes_2 = table.clone(styles.padding)
68
+ _attributes_1.Text = if isDot then "" else badgeText(count, max)
69
+ local _condition_2 = isDot ~= true
70
+ if _condition_2 then
71
+ local _attributes_2 = table.clone(styles.padding)
72
+ setmetatable(_attributes_2, nil)
73
+ _condition_2 = React.createElement("uipadding", _attributes_2)
74
+ end
75
+ local _attributes_2 = table.clone(styles.corner)
58
76
  setmetatable(_attributes_2, nil)
59
- local _exp_1 = React.createElement("uipadding", _attributes_2)
60
- local _attributes_3 = table.clone(styles.corner)
61
- setmetatable(_attributes_3, nil)
62
- _condition_1 = (React.createElement("textlabel", _attributes_1, _exp_1, React.createElement("uicorner", _attributes_3)))
77
+ _condition_1 = (React.createElement("textlabel", _attributes_1, _condition_2, React.createElement("uicorner", _attributes_2)))
63
78
  end
64
79
  return React.createElement("frame", _attributes, _exp, _condition_1)
65
80
  end
@@ -1,2 +1,6 @@
1
- declare const useBadgeStyles: () => import("../../../../theme/index").ClassNameMap<string>;
1
+ export type BadgeColor = "error" | "primary" | "success";
2
+ declare const useBadgeStyles: (props: {
3
+ variant?: "standard" | "dot";
4
+ color?: BadgeColor;
5
+ }) => import("../../../../theme/index").ClassNameMap<string>;
2
6
  export default useBadgeStyles;
@@ -3,7 +3,17 @@ 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 useBadgeStyles = componentStyles("Badge", function(theme)
6
+ local useBadgeStyles = componentStyles("Badge", function(theme, _param)
7
+ local variant = _param.variant
8
+ if variant == nil then
9
+ variant = "standard"
10
+ end
11
+ local color = _param.color
12
+ if color == nil then
13
+ color = "error"
14
+ end
15
+ local diameter = if variant == "dot" then theme.spacing.calc(1) else theme.spacing.calc(2) + theme.padding.calc(1)
16
+ local tone = if color == "primary" then theme.palette.primary elseif color == "success" then theme.palette.status.success else theme.palette.status.error
7
17
  return createStyles({
8
18
  root = {
9
19
  AutomaticSize = Enum.AutomaticSize.XY,
@@ -14,21 +24,23 @@ local useBadgeStyles = componentStyles("Badge", function(theme)
14
24
  badge = {
15
25
  AnchorPoint = Vector2.new(0.5, 0.5),
16
26
  Position = UDim2.fromScale(1, 0),
17
- AutomaticSize = Enum.AutomaticSize.XY,
18
- Size = UDim2.fromOffset(theme.padding.calc(2), theme.padding.calc(2)),
19
- BackgroundColor3 = theme.palette.status.error.main,
27
+ AutomaticSize = if variant == "dot" then Enum.AutomaticSize.None else Enum.AutomaticSize.X,
28
+ Size = UDim2.fromOffset(diameter, diameter),
29
+ BackgroundColor3 = tone.main,
20
30
  BorderSizePixel = 0,
21
31
  Font = theme.typography.fontFamilies.default,
22
32
  TextSize = theme.typography.fontSizes.caption,
23
- TextColor3 = theme.palette.text.inverse,
33
+ TextColor3 = if color == "error" then theme.palette.text.inverse else tone.on,
34
+ TextXAlignment = Enum.TextXAlignment.Center,
35
+ TextYAlignment = Enum.TextYAlignment.Center,
24
36
  ZIndex = 2,
25
37
  },
26
38
  padding = {
27
- PaddingLeft = UDim.new(0, theme.padding.calc(0.5)),
28
- PaddingRight = UDim.new(0, theme.padding.calc(0.5)),
39
+ PaddingLeft = UDim.new(0, if variant == "dot" then 0 else theme.padding.calc(0.5)),
40
+ PaddingRight = UDim.new(0, if variant == "dot" then 0 else theme.padding.calc(0.5)),
29
41
  },
30
42
  corner = {
31
- CornerRadius = UDim.new(1, 0),
43
+ CornerRadius = UDim.new(0.5, 0),
32
44
  },
33
45
  })
34
46
  end)
@@ -5,6 +5,7 @@ export interface BottomNavigationProps<T> {
5
5
  options: ChoiceOption<T>[];
6
6
  onChange: (value: T) => void;
7
7
  disabled?: boolean;
8
+ showLabels?: boolean;
8
9
  }
9
10
  declare function BottomNavigation<T>(props: CustomizedProps<Frame, BottomNavigationProps<T>>): JSX.Element;
10
11
  export default BottomNavigation;
@@ -10,11 +10,17 @@ local function BottomNavigation(props)
10
10
  local options = _binding.options
11
11
  local onChange = _binding.onChange
12
12
  local disabled = _binding.disabled
13
+ local showLabels = _binding.showLabels
14
+ if showLabels == nil then
15
+ showLabels = true
16
+ end
13
17
  local className = _binding.className
14
18
  local sx = _binding.sx
15
19
  local id = _binding.id
16
20
  local ref = _binding.ref
17
- local styles = useBottomNavigationStyles()
21
+ local styles = useBottomNavigationStyles({
22
+ showLabels = showLabels,
23
+ })
18
24
  local count = math.max(#options, 1)
19
25
  local _attributes = {}
20
26
  local _condition = id
@@ -51,7 +57,7 @@ local function BottomNavigation(props)
51
57
  _attributes_2[_k] = _v
52
58
  end
53
59
  _attributes_2.Size = UDim2.new(1 / count, 0, 1, 0)
54
- _attributes_2.Text = choice.label
60
+ _attributes_2.Text = if showLabels == false then "" else choice.label
55
61
  _attributes_2.LayoutOrder = index
56
62
  _attributes_2.Active = active
57
63
  _attributes_2.Selectable = active
@@ -1,2 +1,4 @@
1
- declare const useBottomNavigationStyles: () => import("../../../../theme/index").ClassNameMap<string>;
1
+ declare const useBottomNavigationStyles: (props: {
2
+ showLabels?: boolean;
3
+ }) => import("../../../../theme/index").ClassNameMap<string>;
2
4
  export default useBottomNavigationStyles;
@@ -3,10 +3,14 @@ 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 useBottomNavigationStyles = componentStyles("BottomNavigation", function(theme)
6
+ local useBottomNavigationStyles = componentStyles("BottomNavigation", function(theme, _param)
7
+ local showLabels = _param.showLabels
8
+ if showLabels == nil then
9
+ showLabels = true
10
+ end
7
11
  local _object = {
8
12
  root = {
9
- Size = UDim2.new(1, 0, 0, theme.spacing.calc(7)),
13
+ Size = UDim2.new(1, 0, 0, theme.spacing.calc(if showLabels == false then 5 else 7)),
10
14
  BackgroundColor3 = theme.palette.surface.elevated,
11
15
  BorderSizePixel = 0,
12
16
  ZIndex = 11000,
@@ -6,6 +6,7 @@ export interface BreadcrumbItem {
6
6
  export interface BreadcrumbsProps {
7
7
  items: BreadcrumbItem[];
8
8
  separator?: string;
9
+ maxItems?: number;
9
10
  }
10
11
  declare function Breadcrumbs(props: CustomizedProps<Frame, BreadcrumbsProps>): JSX.Element;
11
12
  export default Breadcrumbs;
@@ -2,7 +2,9 @@
2
2
  local TS = _G[script]
3
3
  local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
4
  local cx = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").cx
5
- local breadcrumbCurrent = TS.import(script, script.Parent, "breadcrumbItems").breadcrumbCurrent
5
+ local _breadcrumbItems = TS.import(script, script.Parent, "breadcrumbItems")
6
+ local breadcrumbCurrent = _breadcrumbItems.breadcrumbCurrent
7
+ local breadcrumbVisible = _breadcrumbItems.breadcrumbVisible
6
8
  local useBreadcrumbStyles = TS.import(script, script.Parent, "Breadcrumbs.styles").default
7
9
  local function Breadcrumbs(props)
8
10
  local _binding = props
@@ -11,11 +13,13 @@ local function Breadcrumbs(props)
11
13
  if separator == nil then
12
14
  separator = "/"
13
15
  end
16
+ local maxItems = _binding.maxItems
14
17
  local className = _binding.className
15
18
  local sx = _binding.sx
16
19
  local id = _binding.id
17
20
  local ref = _binding.ref
18
21
  local styles = useBreadcrumbStyles()
22
+ local visible = breadcrumbVisible(items, maxItems)
19
23
  local _attributes = {}
20
24
  local _condition = id
21
25
  if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
@@ -40,38 +44,68 @@ local function Breadcrumbs(props)
40
44
  setmetatable(_attributes_1, nil)
41
45
  local _exp = React.createElement("uilistlayout", _attributes_1)
42
46
  -- ▼ ReadonlyArray.map ▼
43
- local _newValue = table.create(#items)
44
- local _callback = function(item, index)
45
- local current = breadcrumbCurrent(index, #items)
46
- local _condition_1 = index > 0
47
+ local _newValue = table.create(#visible)
48
+ local _callback = function(entry, order)
49
+ local current = not entry.ellipsis and breadcrumbCurrent(entry.index, #items)
50
+ local item = if entry.ellipsis then nil else items[entry.index + 1]
51
+ local _condition_1 = order > 0
47
52
  if _condition_1 then
48
53
  local _attributes_2 = table.clone(styles.separator)
49
54
  setmetatable(_attributes_2, nil)
50
55
  _attributes_2.Text = separator
51
- _attributes_2.LayoutOrder = index * 2
56
+ _attributes_2.LayoutOrder = order * 2
52
57
  _condition_1 = React.createElement("textlabel", _attributes_2)
53
58
  end
54
- local _attributes_2 = table.clone(cx(styles.item, current and styles.current))
55
- setmetatable(_attributes_2, nil)
56
- _attributes_2.Text = item.label
57
- _attributes_2.LayoutOrder = index * 2 + 1
58
- _attributes_2.Active = not current and item.onActivated ~= nil
59
- _attributes_2.Selectable = not current and item.onActivated ~= nil
60
- _attributes_2.Event = {
61
- Activated = function()
62
- local _result = item.onActivated
63
- if _result ~= nil then
64
- _result = _result()
59
+ local _result
60
+ if entry.ellipsis then
61
+ local _attributes_2 = table.clone(styles.separator)
62
+ setmetatable(_attributes_2, nil)
63
+ _attributes_2.Text = "…"
64
+ _attributes_2.LayoutOrder = order * 2 + 1
65
+ _result = (React.createElement("textlabel", _attributes_2))
66
+ else
67
+ local _attributes_2 = table.clone(cx(styles.item, current and styles.current))
68
+ setmetatable(_attributes_2, nil)
69
+ _attributes_2.Text = entry.label
70
+ _attributes_2.LayoutOrder = order * 2 + 1
71
+ local _condition_2 = not current
72
+ if _condition_2 then
73
+ local _result_1 = item
74
+ if _result_1 ~= nil then
75
+ _result_1 = _result_1.onActivated
65
76
  end
66
- return _result
67
- end,
68
- }
77
+ _condition_2 = _result_1 ~= nil
78
+ end
79
+ _attributes_2.Active = _condition_2
80
+ local _condition_3 = not current
81
+ if _condition_3 then
82
+ local _result_1 = item
83
+ if _result_1 ~= nil then
84
+ _result_1 = _result_1.onActivated
85
+ end
86
+ _condition_3 = _result_1 ~= nil
87
+ end
88
+ _attributes_2.Selectable = _condition_3
89
+ _attributes_2.Event = {
90
+ Activated = function()
91
+ local _result_1 = item
92
+ if _result_1 ~= nil then
93
+ _result_1 = _result_1.onActivated
94
+ if _result_1 ~= nil then
95
+ _result_1 = _result_1()
96
+ end
97
+ end
98
+ return _result_1
99
+ end,
100
+ }
101
+ _result = (React.createElement("textbutton", _attributes_2))
102
+ end
69
103
  return React.createElement(React.Fragment, {
70
- key = `{item.label}-{index}`,
71
- }, _condition_1, React.createElement("textbutton", _attributes_2))
104
+ key = `{entry.label}-{order}`,
105
+ }, _condition_1, _result)
72
106
  end
73
- for _k, _v in items do
74
- _newValue[_k] = _callback(_v, _k - 1, items)
107
+ for _k, _v in visible do
108
+ _newValue[_k] = _callback(_v, _k - 1, visible)
75
109
  end
76
110
  -- ▲ ReadonlyArray.map ▲
77
111
  return React.createElement("frame", _attributes, _exp, _newValue)
@@ -1 +1,10 @@
1
1
  export declare function breadcrumbCurrent(index: number, count: number): boolean;
2
+ export interface BreadcrumbSlice {
3
+ label: string;
4
+ index: number;
5
+ ellipsis?: boolean;
6
+ }
7
+ /** Collapse middle items when over maxItems (keep ends). */
8
+ export declare function breadcrumbVisible<T extends {
9
+ label: string;
10
+ }>(items: T[], maxItems?: number): BreadcrumbSlice[];