@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,41 +0,0 @@
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 containerMaxPx = TS.import(script, script.Parent, "containerWidth").containerMaxPx
7
- local useContainerStyles = componentStyles("Container", function(theme, _param)
8
- local maxWidth = _param.maxWidth
9
- local disableGutters = _param.disableGutters
10
- local maxPx = containerMaxPx(maxWidth)
11
- local gutter = theme.spacing.calc(2)
12
- return createStyles({
13
- root = {
14
- AutomaticSize = Enum.AutomaticSize.Y,
15
- Size = UDim2.new(1, 0, 0, 0),
16
- BackgroundTransparency = 1,
17
- BorderSizePixel = 0,
18
- },
19
- inner = {
20
- AutomaticSize = Enum.AutomaticSize.Y,
21
- Size = UDim2.new(1, 0, 0, 0),
22
- Position = UDim2.new(0.5, 0, 0, 0),
23
- AnchorPoint = Vector2.new(0.5, 0),
24
- BackgroundTransparency = 1,
25
- BorderSizePixel = 0,
26
- },
27
- constraint = {
28
- MaxSize = if maxPx ~= nil then Vector2.new(maxPx, math.huge) else Vector2.new(math.huge, math.huge),
29
- },
30
- gutter = {
31
- PaddingTop = UDim.new(0, 0),
32
- PaddingBottom = UDim.new(0, 0),
33
- PaddingLeft = UDim.new(0, if disableGutters == true then 0 else gutter),
34
- PaddingRight = UDim.new(0, if disableGutters == true then 0 else gutter),
35
- },
36
- })
37
- end)
38
- local default = useContainerStyles
39
- return {
40
- default = default,
41
- }
@@ -1,12 +0,0 @@
1
- import React from "@rbxts/react";
2
- import { CustomizedProps } from "../../../../theme/index";
3
- import { StackAlign, StackDirection, StackJustify } from "./stackAlign";
4
- export interface StackProps {
5
- direction?: StackDirection;
6
- spacing?: number;
7
- alignItems?: StackAlign;
8
- justifyContent?: StackJustify;
9
- children?: React.ReactNode;
10
- }
11
- declare function Stack(props: CustomizedProps<Frame, StackProps>): JSX.Element;
12
- export default Stack;
@@ -1,49 +0,0 @@
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 useStackStyles = TS.import(script, script.Parent, "Stack.styles").default
5
- local function Stack(props)
6
- local _binding = props
7
- local direction = _binding.direction
8
- local spacing = _binding.spacing
9
- local alignItems = _binding.alignItems
10
- local justifyContent = _binding.justifyContent
11
- local children = _binding.children
12
- local className = _binding.className
13
- local sx = _binding.sx
14
- local id = _binding.id
15
- local ref = _binding.ref
16
- local styles = useStackStyles({
17
- direction = direction,
18
- spacing = spacing,
19
- alignItems = alignItems,
20
- justifyContent = justifyContent,
21
- })
22
- local _attributes = {}
23
- local _condition = id
24
- if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
25
- _condition = "Stack"
26
- end
27
- _attributes.key = _condition
28
- _attributes.ref = ref
29
- for _k, _v in styles.root do
30
- _attributes[_k] = _v
31
- end
32
- if className then
33
- for _k, _v in className do
34
- _attributes[_k] = _v
35
- end
36
- end
37
- if sx then
38
- for _k, _v in sx do
39
- _attributes[_k] = _v
40
- end
41
- end
42
- local _attributes_1 = table.clone(styles.list)
43
- setmetatable(_attributes_1, nil)
44
- return React.createElement("frame", _attributes, React.createElement("uilistlayout", _attributes_1), children)
45
- end
46
- local default = Stack
47
- return {
48
- default = default,
49
- }
@@ -1,8 +0,0 @@
1
- import { StackAlign, StackDirection, StackJustify } from "./stackAlign";
2
- declare const useStackStyles: (props: {
3
- direction?: StackDirection;
4
- spacing?: number;
5
- alignItems?: StackAlign;
6
- justifyContent?: StackJustify;
7
- }) => import("../../../../theme/index").ClassNameMap<string>;
8
- export default useStackStyles;
@@ -1,72 +0,0 @@
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 _stackAlign = TS.import(script, script.Parent, "stackAlign")
7
- local stackAlignKey = _stackAlign.stackAlignKey
8
- local stackGap = _stackAlign.stackGap
9
- local stackIsRow = _stackAlign.stackIsRow
10
- local stackJustifyKey = _stackAlign.stackJustifyKey
11
- local stackUsesFlex = _stackAlign.stackUsesFlex
12
- local function horizontalAlign(key)
13
- if key == "center" then
14
- return Enum.HorizontalAlignment.Center
15
- end
16
- if key == "end" then
17
- return Enum.HorizontalAlignment.Right
18
- end
19
- return Enum.HorizontalAlignment.Left
20
- end
21
- local function verticalAlign(key)
22
- if key == "center" then
23
- return Enum.VerticalAlignment.Center
24
- end
25
- if key == "end" then
26
- return Enum.VerticalAlignment.Bottom
27
- end
28
- return Enum.VerticalAlignment.Top
29
- end
30
- local function mainFlex(justify)
31
- if justify == "space-between" then
32
- return Enum.UIFlexAlignment.SpaceBetween
33
- end
34
- if justify == "space-around" then
35
- return Enum.UIFlexAlignment.SpaceAround
36
- end
37
- if justify == "space-evenly" then
38
- return Enum.UIFlexAlignment.SpaceEvenly
39
- end
40
- return Enum.UIFlexAlignment.None
41
- end
42
- local useStackStyles = componentStyles("Stack", function(theme, _param)
43
- local direction = _param.direction
44
- local spacing = _param.spacing
45
- local alignItems = _param.alignItems
46
- local justifyContent = _param.justifyContent
47
- local row = stackIsRow(direction)
48
- local cross = stackAlignKey(alignItems)
49
- local main = stackJustifyKey(justifyContent)
50
- local flex = if stackUsesFlex(main) then mainFlex(main) else Enum.UIFlexAlignment.None
51
- return createStyles({
52
- root = {
53
- AutomaticSize = Enum.AutomaticSize.XY,
54
- Size = UDim2.fromScale(0, 0),
55
- BackgroundTransparency = 1,
56
- BorderSizePixel = 0,
57
- },
58
- list = {
59
- FillDirection = if row then Enum.FillDirection.Horizontal else Enum.FillDirection.Vertical,
60
- SortOrder = Enum.SortOrder.LayoutOrder,
61
- Padding = UDim.new(0, theme.spacing.calc(stackGap(spacing))),
62
- HorizontalAlignment = if row then horizontalAlign(main) else horizontalAlign(cross),
63
- VerticalAlignment = if row then verticalAlign(cross) else verticalAlign(main),
64
- HorizontalFlex = if row then flex else Enum.UIFlexAlignment.None,
65
- VerticalFlex = if row then Enum.UIFlexAlignment.None else flex,
66
- },
67
- })
68
- end)
69
- local default = useStackStyles
70
- return {
71
- default = default,
72
- }
@@ -1,14 +0,0 @@
1
- export type BoxPad = number | {
2
- x?: number;
3
- y?: number;
4
- top?: number;
5
- right?: number;
6
- bottom?: number;
7
- left?: number;
8
- };
9
- export declare function boxPadSides(padding?: BoxPad): {
10
- top: number;
11
- right: number;
12
- bottom: number;
13
- left: number;
14
- };
@@ -1,59 +0,0 @@
1
- -- Compiled with roblox-ts v3.0.0
2
- local function boxPadSides(padding)
3
- if padding == nil then
4
- return {
5
- top = 0,
6
- right = 0,
7
- bottom = 0,
8
- left = 0,
9
- }
10
- end
11
- local _padding = padding
12
- if type(_padding) == "number" then
13
- return {
14
- top = padding,
15
- right = padding,
16
- bottom = padding,
17
- left = padding,
18
- }
19
- end
20
- local _condition = padding.x
21
- if _condition == nil then
22
- _condition = 0
23
- end
24
- local x = _condition
25
- local _condition_1 = padding.y
26
- if _condition_1 == nil then
27
- _condition_1 = 0
28
- end
29
- local y = _condition_1
30
- local _object = {}
31
- local _left = "top"
32
- local _condition_2 = padding.top
33
- if _condition_2 == nil then
34
- _condition_2 = y
35
- end
36
- _object[_left] = _condition_2
37
- local _left_1 = "right"
38
- local _condition_3 = padding.right
39
- if _condition_3 == nil then
40
- _condition_3 = x
41
- end
42
- _object[_left_1] = _condition_3
43
- local _left_2 = "bottom"
44
- local _condition_4 = padding.bottom
45
- if _condition_4 == nil then
46
- _condition_4 = y
47
- end
48
- _object[_left_2] = _condition_4
49
- local _left_3 = "left"
50
- local _condition_5 = padding.left
51
- if _condition_5 == nil then
52
- _condition_5 = x
53
- end
54
- _object[_left_3] = _condition_5
55
- return _object
56
- end
57
- return {
58
- boxPadSides = boxPadSides,
59
- }
@@ -1,2 +0,0 @@
1
- export type ContainerMaxWidth = "xs" | "sm" | "md" | "lg" | "xl" | false;
2
- export declare function containerMaxPx(maxWidth?: ContainerMaxWidth): number | undefined;
@@ -1,17 +0,0 @@
1
- -- Compiled with roblox-ts v3.0.0
2
- local WIDTHS = {
3
- xs = 444,
4
- sm = 600,
5
- md = 900,
6
- lg = 1200,
7
- xl = 1536,
8
- }
9
- local function containerMaxPx(maxWidth)
10
- if maxWidth == false then
11
- return nil
12
- end
13
- return WIDTHS[maxWidth or "lg"]
14
- end
15
- return {
16
- containerMaxPx = containerMaxPx,
17
- }
@@ -1,8 +0,0 @@
1
- export type StackDirection = "row" | "column";
2
- export type StackAlign = "start" | "center" | "end";
3
- export type StackJustify = "start" | "center" | "end" | "space-between" | "space-around" | "space-evenly";
4
- export declare function stackIsRow(direction?: StackDirection): direction is "row";
5
- export declare function stackGap(spacing?: number): number;
6
- export declare function stackUsesFlex(justify?: StackJustify): justify is "space-between" | "space-around" | "space-evenly";
7
- export declare function stackAlignKey(align?: StackAlign): StackAlign;
8
- export declare function stackJustifyKey(justify?: StackJustify): StackJustify;
@@ -1,29 +0,0 @@
1
- -- Compiled with roblox-ts v3.0.0
2
- local function stackIsRow(direction)
3
- return direction == "row"
4
- end
5
- local function stackGap(spacing)
6
- return if spacing == nil then 1 else spacing
7
- end
8
- local function stackUsesFlex(justify)
9
- return justify == "space-between" or justify == "space-around" or justify == "space-evenly"
10
- end
11
- local function stackAlignKey(align)
12
- if align == "center" or align == "end" then
13
- return align
14
- end
15
- return "start"
16
- end
17
- local function stackJustifyKey(justify)
18
- if justify == "center" or justify == "end" or justify == "space-between" or justify == "space-around" or justify == "space-evenly" then
19
- return justify
20
- end
21
- return "start"
22
- end
23
- return {
24
- stackIsRow = stackIsRow,
25
- stackGap = stackGap,
26
- stackUsesFlex = stackUsesFlex,
27
- stackAlignKey = stackAlignKey,
28
- stackJustifyKey = stackJustifyKey,
29
- }
@@ -1,11 +0,0 @@
1
- import { CustomizedProps } from "../../../../theme/index";
2
- import { LinkColor, LinkUnderline } from "./Link.styles";
3
- export interface LinkProps {
4
- text: string;
5
- color?: LinkColor;
6
- underline?: LinkUnderline;
7
- disabled?: boolean;
8
- onActivated?: () => void;
9
- }
10
- declare function Link(props: CustomizedProps<TextButton, LinkProps>): JSX.Element;
11
- export default Link;
@@ -1,83 +0,0 @@
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 React = _react
5
- local useState = _react.useState
6
- local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
7
- local useLinkStyles = TS.import(script, script.Parent, "Link.styles").default
8
- local function Link(props)
9
- local _binding = props
10
- local text = _binding.text
11
- local color = _binding.color
12
- if color == nil then
13
- color = "primary"
14
- end
15
- local underline = _binding.underline
16
- if underline == nil then
17
- underline = "always"
18
- end
19
- local disabled = _binding.disabled
20
- local onActivated = _binding.onActivated
21
- local className = _binding.className
22
- local sx = _binding.sx
23
- local id = _binding.id
24
- local ref = _binding.ref
25
- local hover, setHover = useState(false)
26
- local showUnderline = underline == "always" or (underline == "hover" and hover)
27
- local styles = useLinkStyles({
28
- color = color,
29
- disabled = disabled,
30
- showUnderline = showUnderline,
31
- })
32
- local active = canActivate(disabled)
33
- local _attributes = {}
34
- local _condition = id
35
- if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
36
- _condition = "Link"
37
- end
38
- _attributes.key = _condition
39
- _attributes.ref = ref
40
- for _k, _v in styles.root do
41
- _attributes[_k] = _v
42
- end
43
- if className then
44
- for _k, _v in className do
45
- _attributes[_k] = _v
46
- end
47
- end
48
- if sx then
49
- for _k, _v in sx do
50
- _attributes[_k] = _v
51
- end
52
- end
53
- _attributes.Text = text
54
- _attributes.Active = active
55
- _attributes.Selectable = active
56
- _attributes.Event = {
57
- Activated = function()
58
- if active then
59
- local _result = onActivated
60
- if _result ~= nil then
61
- _result()
62
- end
63
- end
64
- end,
65
- MouseEnter = function()
66
- return setHover(true)
67
- end,
68
- MouseLeave = function()
69
- return setHover(false)
70
- end,
71
- }
72
- local _attributes_1 = {
73
- key = "Underline",
74
- }
75
- for _k, _v in styles.underline do
76
- _attributes_1[_k] = _v
77
- end
78
- return React.createElement("textbutton", _attributes, React.createElement("frame", _attributes_1))
79
- end
80
- local default = Link
81
- return {
82
- default = default,
83
- }
@@ -1,8 +0,0 @@
1
- export type LinkColor = "primary" | "inherit" | "error";
2
- export type LinkUnderline = "always" | "hover" | "none";
3
- declare const useLinkStyles: (props: {
4
- color?: LinkColor;
5
- disabled?: boolean;
6
- showUnderline?: boolean;
7
- }) => import("../../../../theme/index").ClassNameMap<string>;
8
- export default useLinkStyles;
@@ -1,59 +0,0 @@
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 function linkColor(theme, color, disabled)
7
- if disabled then
8
- return theme.palette.text.disabled
9
- end
10
- if color == "error" then
11
- return theme.palette.status.error.main
12
- end
13
- if color == "inherit" then
14
- return theme.palette.text.primary
15
- end
16
- return theme.palette.primary.main
17
- end
18
- local useLinkStyles = componentStyles("Link", function(theme, _param)
19
- local color = _param.color
20
- if color == nil then
21
- color = "primary"
22
- end
23
- local disabled = _param.disabled
24
- if disabled == nil then
25
- disabled = false
26
- end
27
- local showUnderline = _param.showUnderline
28
- if showUnderline == nil then
29
- showUnderline = true
30
- end
31
- local ink = linkColor(theme, color, disabled)
32
- return createStyles({
33
- root = {
34
- AutomaticSize = Enum.AutomaticSize.XY,
35
- Size = UDim2.fromScale(0, 0),
36
- BackgroundTransparency = 1,
37
- BorderSizePixel = 0,
38
- AutoButtonColor = false,
39
- Active = not disabled,
40
- Selectable = not disabled,
41
- TextColor3 = ink,
42
- Font = theme.typography.fontFamilies.default,
43
- TextSize = theme.typography.fontSizes.body,
44
- TextXAlignment = Enum.TextXAlignment.Left,
45
- },
46
- underline = {
47
- Size = UDim2.new(1, 0, 0, 1),
48
- Position = UDim2.new(0, 0, 1, 0),
49
- AnchorPoint = Vector2.new(0, 1),
50
- BackgroundColor3 = ink,
51
- BackgroundTransparency = if showUnderline then 0 else 1,
52
- BorderSizePixel = 0,
53
- },
54
- })
55
- end)
56
- local default = useLinkStyles
57
- return {
58
- default = default,
59
- }
@@ -1,3 +0,0 @@
1
- export { default as Link } from "./components/Link";
2
- export { LinkProps } from "./components/Link";
3
- export { LinkColor, LinkUnderline } from "./components/Link.styles";
@@ -1,5 +0,0 @@
1
- -- Compiled with roblox-ts v3.0.0
2
- local TS = _G[script]
3
- local exports = {}
4
- exports.Link = TS.import(script, script, "components", "Link").default
5
- return exports
@@ -1,11 +0,0 @@
1
- import { ControlSize, CustomizedProps } from "../../../../theme/index";
2
- export interface RatingProps {
3
- value: number;
4
- max?: number;
5
- size?: ControlSize;
6
- disabled?: boolean;
7
- readOnly?: boolean;
8
- onChange: (value: number) => void;
9
- }
10
- declare function Rating(props: CustomizedProps<Frame, RatingProps>): JSX.Element;
11
- export default Rating;
@@ -1,101 +0,0 @@
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 Icons = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Icons
5
- local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
6
- local useRatingStyles = TS.import(script, script.Parent, "Rating.styles").default
7
- local function Rating(props)
8
- local _binding = props
9
- local value = _binding.value
10
- local max = _binding.max
11
- if max == nil then
12
- max = 5
13
- end
14
- local size = _binding.size
15
- if size == nil then
16
- size = "medium"
17
- end
18
- local disabled = _binding.disabled
19
- local readOnly = _binding.readOnly
20
- local onChange = _binding.onChange
21
- local className = _binding.className
22
- local sx = _binding.sx
23
- local id = _binding.id
24
- local ref = _binding.ref
25
- local styles = useRatingStyles({
26
- disabled = disabled,
27
- size = size,
28
- })
29
- local active = canActivate(disabled) and readOnly ~= true
30
- local stars = {}
31
- do
32
- local i = 1
33
- local _shouldIncrement = false
34
- while true do
35
- if _shouldIncrement then
36
- i += 1
37
- else
38
- _shouldIncrement = true
39
- end
40
- if not (i <= max) then
41
- break
42
- end
43
- local _i = i
44
- table.insert(stars, _i)
45
- end
46
- end
47
- local _attributes = {}
48
- local _condition = id
49
- if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
50
- _condition = "Rating"
51
- end
52
- _attributes.key = _condition
53
- _attributes.ref = ref
54
- for _k, _v in styles.root do
55
- _attributes[_k] = _v
56
- end
57
- if className then
58
- for _k, _v in className do
59
- _attributes[_k] = _v
60
- end
61
- end
62
- if sx then
63
- for _k, _v in sx do
64
- _attributes[_k] = _v
65
- end
66
- end
67
- local _attributes_1 = table.clone(styles.list)
68
- setmetatable(_attributes_1, nil)
69
- local _exp = React.createElement("uilistlayout", _attributes_1)
70
- -- ▼ ReadonlyArray.map ▼
71
- local _newValue = table.create(#stars)
72
- local _callback = function(n)
73
- local _attributes_2 = {
74
- key = `Star-{n}`,
75
- }
76
- for _k, _v in styles.star do
77
- _attributes_2[_k] = _v
78
- end
79
- _attributes_2.Image = tostring(if n <= value then Icons.StarFilled else Icons.Star)
80
- _attributes_2.LayoutOrder = n
81
- _attributes_2.Active = active
82
- _attributes_2.Selectable = active
83
- _attributes_2.Event = {
84
- Activated = function()
85
- if active then
86
- onChange(if n == value then 0 else n)
87
- end
88
- end,
89
- }
90
- return React.createElement("imagebutton", _attributes_2)
91
- end
92
- for _k, _v in stars do
93
- _newValue[_k] = _callback(_v, _k - 1, stars)
94
- end
95
- -- ▲ ReadonlyArray.map ▲
96
- return React.createElement("frame", _attributes, _exp, _newValue)
97
- end
98
- local default = Rating
99
- return {
100
- default = default,
101
- }
@@ -1,6 +0,0 @@
1
- import { ControlSize } from "../../../../theme/index";
2
- declare const useRatingStyles: (props: {
3
- disabled?: boolean;
4
- size?: ControlSize;
5
- }) => import("../../../../theme/index").ClassNameMap<string>;
6
- export default useRatingStyles;
@@ -1,44 +0,0 @@
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 useRatingStyles = componentStyles("Rating", function(theme, _param)
7
- local disabled = _param.disabled
8
- if disabled == nil then
9
- disabled = false
10
- end
11
- local size = _param.size
12
- if size == nil then
13
- size = "medium"
14
- end
15
- local star = if size == "small" then theme.spacing.calc(2) elseif size == "large" then theme.spacing.calc(4) else theme.spacing.calc(3)
16
- return createStyles({
17
- root = {
18
- AutomaticSize = Enum.AutomaticSize.XY,
19
- Size = UDim2.fromScale(0, 0),
20
- BackgroundTransparency = 1,
21
- BorderSizePixel = 0,
22
- },
23
- list = {
24
- FillDirection = Enum.FillDirection.Horizontal,
25
- HorizontalAlignment = Enum.HorizontalAlignment.Left,
26
- VerticalAlignment = Enum.VerticalAlignment.Center,
27
- SortOrder = Enum.SortOrder.LayoutOrder,
28
- Padding = UDim.new(0, theme.padding.calc(if size == "small" then 0.25 else 0.5)),
29
- },
30
- star = {
31
- Size = UDim2.fromOffset(star, star),
32
- BackgroundTransparency = 1,
33
- BorderSizePixel = 0,
34
- AutoButtonColor = false,
35
- Active = not disabled,
36
- Selectable = not disabled,
37
- ImageColor3 = if disabled then theme.palette.text.disabled else theme.palette.primary.main,
38
- },
39
- })
40
- end)
41
- local default = useRatingStyles
42
- return {
43
- default = default,
44
- }
@@ -1,2 +0,0 @@
1
- export { default as Rating } from "./components/Rating";
2
- export { RatingProps } from "./components/Rating";
@@ -1,5 +0,0 @@
1
- -- Compiled with roblox-ts v3.0.0
2
- local TS = _G[script]
3
- local exports = {}
4
- exports.Rating = TS.import(script, script, "components", "Rating").default
5
- return exports