@rbxts/uiblox 0.1.0

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 (251) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +263 -0
  3. package/out/index.d.ts +2 -0
  4. package/out/init.lua +10 -0
  5. package/out/theme/components/ThemeProvider.d.ts +7 -0
  6. package/out/theme/components/ThemeProvider.lua +37 -0
  7. package/out/theme/components/ThemeStore.d.ts +14 -0
  8. package/out/theme/components/ThemeStore.lua +29 -0
  9. package/out/theme/components/ThemeWrapper.d.ts +7 -0
  10. package/out/theme/components/ThemeWrapper.lua +52 -0
  11. package/out/theme/components/index.d.ts +8 -0
  12. package/out/theme/components/init.lua +10 -0
  13. package/out/theme/constants/NumberConstants.d.ts +6 -0
  14. package/out/theme/constants/NumberConstants.lua +18 -0
  15. package/out/theme/constants/ThemeConstants.d.ts +5 -0
  16. package/out/theme/constants/ThemeConstants.lua +104 -0
  17. package/out/theme/constants/index.d.ts +2 -0
  18. package/out/theme/constants/init.lua +10 -0
  19. package/out/theme/index.d.ts +20 -0
  20. package/out/theme/init.lua +27 -0
  21. package/out/theme/interfaces/IconSizes/IconSizes.d.ts +5 -0
  22. package/out/theme/interfaces/IconSizes/IconSizes.lua +2 -0
  23. package/out/theme/interfaces/IconSizes/index.d.ts +1 -0
  24. package/out/theme/interfaces/IconSizes/init.lua +2 -0
  25. package/out/theme/interfaces/Palette/ColorTokens/ColorTokens.d.ts +5 -0
  26. package/out/theme/interfaces/Palette/ColorTokens/ColorTokens.lua +2 -0
  27. package/out/theme/interfaces/Palette/ColorTokens/index.d.ts +1 -0
  28. package/out/theme/interfaces/Palette/ColorTokens/init.lua +2 -0
  29. package/out/theme/interfaces/Palette/Colors/Blue.d.ts +3 -0
  30. package/out/theme/interfaces/Palette/Colors/Blue.lua +21 -0
  31. package/out/theme/interfaces/Palette/Colors/Colors.d.ts +43 -0
  32. package/out/theme/interfaces/Palette/Colors/Colors.lua +2 -0
  33. package/out/theme/interfaces/Palette/Colors/Common.d.ts +7 -0
  34. package/out/theme/interfaces/Palette/Colors/Common.lua +9 -0
  35. package/out/theme/interfaces/Palette/Colors/Dark.d.ts +3 -0
  36. package/out/theme/interfaces/Palette/Colors/Dark.lua +24 -0
  37. package/out/theme/interfaces/Palette/Colors/Gray.d.ts +3 -0
  38. package/out/theme/interfaces/Palette/Colors/Gray.lua +21 -0
  39. package/out/theme/interfaces/Palette/Colors/Green.d.ts +3 -0
  40. package/out/theme/interfaces/Palette/Colors/Green.lua +21 -0
  41. package/out/theme/interfaces/Palette/Colors/Light.d.ts +3 -0
  42. package/out/theme/interfaces/Palette/Colors/Light.lua +8 -0
  43. package/out/theme/interfaces/Palette/Colors/Magenta.d.ts +3 -0
  44. package/out/theme/interfaces/Palette/Colors/Magenta.lua +21 -0
  45. package/out/theme/interfaces/Palette/Colors/Orange.d.ts +3 -0
  46. package/out/theme/interfaces/Palette/Colors/Orange.lua +21 -0
  47. package/out/theme/interfaces/Palette/Colors/Purple.d.ts +3 -0
  48. package/out/theme/interfaces/Palette/Colors/Purple.lua +21 -0
  49. package/out/theme/interfaces/Palette/Colors/Red.d.ts +3 -0
  50. package/out/theme/interfaces/Palette/Colors/Red.lua +21 -0
  51. package/out/theme/interfaces/Palette/Colors/Turquoise.d.ts +3 -0
  52. package/out/theme/interfaces/Palette/Colors/Turquoise.lua +21 -0
  53. package/out/theme/interfaces/Palette/Colors/Yellow.d.ts +3 -0
  54. package/out/theme/interfaces/Palette/Colors/Yellow.lua +21 -0
  55. package/out/theme/interfaces/Palette/Colors/index.d.ts +13 -0
  56. package/out/theme/interfaces/Palette/Colors/init.lua +16 -0
  57. package/out/theme/interfaces/Palette/Palette.d.ts +27 -0
  58. package/out/theme/interfaces/Palette/Palette.lua +2 -0
  59. package/out/theme/interfaces/Palette/index.d.ts +3 -0
  60. package/out/theme/interfaces/Palette/init.lua +7 -0
  61. package/out/theme/interfaces/Spacing/Borders.d.ts +4 -0
  62. package/out/theme/interfaces/Spacing/Borders.lua +2 -0
  63. package/out/theme/interfaces/Spacing/Padding.d.ts +4 -0
  64. package/out/theme/interfaces/Spacing/Padding.lua +2 -0
  65. package/out/theme/interfaces/Spacing/Shape.d.ts +3 -0
  66. package/out/theme/interfaces/Spacing/Shape.lua +2 -0
  67. package/out/theme/interfaces/Spacing/Spacing.d.ts +4 -0
  68. package/out/theme/interfaces/Spacing/Spacing.lua +2 -0
  69. package/out/theme/interfaces/Spacing/index.d.ts +4 -0
  70. package/out/theme/interfaces/Spacing/init.lua +2 -0
  71. package/out/theme/interfaces/Theme/Theme.d.ts +14 -0
  72. package/out/theme/interfaces/Theme/Theme.lua +2 -0
  73. package/out/theme/interfaces/Theme/ThemeConstants.d.ts +25 -0
  74. package/out/theme/interfaces/Theme/ThemeConstants.lua +2 -0
  75. package/out/theme/interfaces/Theme/ThemeOptions.d.ts +4 -0
  76. package/out/theme/interfaces/Theme/ThemeOptions.lua +2 -0
  77. package/out/theme/interfaces/Theme/index.d.ts +3 -0
  78. package/out/theme/interfaces/Theme/init.lua +2 -0
  79. package/out/theme/interfaces/Tokens/Tokens.d.ts +1 -0
  80. package/out/theme/interfaces/Tokens/Tokens.lua +2 -0
  81. package/out/theme/interfaces/Tokens/index.d.ts +1 -0
  82. package/out/theme/interfaces/Tokens/init.lua +2 -0
  83. package/out/theme/interfaces/index.d.ts +13 -0
  84. package/out/theme/interfaces/init.lua +16 -0
  85. package/out/theme/interfaces/typography/FontFamilies.d.ts +2 -0
  86. package/out/theme/interfaces/typography/FontFamilies.lua +11 -0
  87. package/out/theme/interfaces/typography/FontFamilyOptions.d.ts +5 -0
  88. package/out/theme/interfaces/typography/FontFamilyOptions.lua +2 -0
  89. package/out/theme/interfaces/typography/FontSizeOptions.d.ts +4 -0
  90. package/out/theme/interfaces/typography/FontSizeOptions.lua +2 -0
  91. package/out/theme/interfaces/typography/FontSizes.d.ts +3 -0
  92. package/out/theme/interfaces/typography/FontSizes.lua +15 -0
  93. package/out/theme/interfaces/typography/ThemeTypography.d.ts +7 -0
  94. package/out/theme/interfaces/typography/ThemeTypography.lua +2 -0
  95. package/out/theme/interfaces/typography/Variants.d.ts +18 -0
  96. package/out/theme/interfaces/typography/Variants.lua +24 -0
  97. package/out/theme/interfaces/typography/index.d.ts +8 -0
  98. package/out/theme/interfaces/typography/init.lua +13 -0
  99. package/out/theme/styles/index.d.ts +5 -0
  100. package/out/theme/styles/init.lua +7 -0
  101. package/out/theme/styles/types/WriteableStyle.d.ts +3 -0
  102. package/out/theme/styles/types/WriteableStyle.lua +2 -0
  103. package/out/theme/styles/types/index.d.ts +2 -0
  104. package/out/theme/styles/types/init.lua +2 -0
  105. package/out/theme/styles/types/styles.d.ts +4 -0
  106. package/out/theme/styles/types/styles.lua +2 -0
  107. package/out/theme/styles/utilities/classNames.d.ts +8 -0
  108. package/out/theme/styles/utilities/classNames.lua +31 -0
  109. package/out/theme/styles/utilities/createStyles.d.ts +3 -0
  110. package/out/theme/styles/utilities/createStyles.lua +8 -0
  111. package/out/theme/styles/utilities/index.d.ts +3 -0
  112. package/out/theme/styles/utilities/init.lua +7 -0
  113. package/out/theme/styles/utilities/makeStyles.d.ts +7 -0
  114. package/out/theme/styles/utilities/makeStyles.lua +32 -0
  115. package/out/theme/themes/DarkTheme.d.ts +3 -0
  116. package/out/theme/themes/DarkTheme.lua +99 -0
  117. package/out/theme/themes/LightTheme.d.ts +3 -0
  118. package/out/theme/themes/LightTheme.lua +99 -0
  119. package/out/theme/themes/index.d.ts +3 -0
  120. package/out/theme/themes/init.lua +7 -0
  121. package/out/theme/types/index.d.ts +7 -0
  122. package/out/theme/types/init.lua +2 -0
  123. package/out/theme/types/types.d.ts +16 -0
  124. package/out/theme/types/types.lua +3 -0
  125. package/out/theme/utilites/Color3FromHex.d.ts +2 -0
  126. package/out/theme/utilites/Color3FromHex.lua +14 -0
  127. package/out/theme/utilites/index.d.ts +1 -0
  128. package/out/theme/utilites/init.lua +5 -0
  129. package/out/ui/constants/ImageConstants.d.ts +2 -0
  130. package/out/ui/constants/ImageConstants.lua +7 -0
  131. package/out/ui/constants/LayoutConstants.d.ts +1 -0
  132. package/out/ui/constants/LayoutConstants.lua +7 -0
  133. package/out/ui/constants/index.d.ts +2 -0
  134. package/out/ui/constants/init.lua +10 -0
  135. package/out/ui/enums/Directions.d.ts +8 -0
  136. package/out/ui/enums/Directions.lua +23 -0
  137. package/out/ui/enums/Icons.d.ts +40 -0
  138. package/out/ui/enums/Icons.lua +87 -0
  139. package/out/ui/enums/Orientations.d.ts +4 -0
  140. package/out/ui/enums/Orientations.lua +15 -0
  141. package/out/ui/enums/index.d.ts +3 -0
  142. package/out/ui/enums/init.lua +7 -0
  143. package/out/ui/index.d.ts +34 -0
  144. package/out/ui/init.lua +24 -0
  145. package/out/ui/packages/button/components/Button.d.ts +26 -0
  146. package/out/ui/packages/button/components/Button.lua +175 -0
  147. package/out/ui/packages/button/components/Button.styles.d.ts +3 -0
  148. package/out/ui/packages/button/components/Button.styles.lua +149 -0
  149. package/out/ui/packages/button/index.d.ts +6 -0
  150. package/out/ui/packages/button/init.lua +8 -0
  151. package/out/ui/packages/button/types/ButtonColor.d.ts +1 -0
  152. package/out/ui/packages/button/types/ButtonColor.lua +2 -0
  153. package/out/ui/packages/button/types/ButtonSize.d.ts +1 -0
  154. package/out/ui/packages/button/types/ButtonSize.lua +2 -0
  155. package/out/ui/packages/button/types/ButtonVariant.d.ts +1 -0
  156. package/out/ui/packages/button/types/ButtonVariant.lua +2 -0
  157. package/out/ui/packages/button/types/index.d.ts +3 -0
  158. package/out/ui/packages/button/types/init.lua +2 -0
  159. package/out/ui/packages/divider/components/Divider.d.ts +18 -0
  160. package/out/ui/packages/divider/components/Divider.lua +27 -0
  161. package/out/ui/packages/divider/components/Divider.styles.d.ts +3 -0
  162. package/out/ui/packages/divider/components/Divider.styles.lua +42 -0
  163. package/out/ui/packages/divider/index.d.ts +3 -0
  164. package/out/ui/packages/divider/init.lua +8 -0
  165. package/out/ui/packages/icon/components/Icon.d.ts +11 -0
  166. package/out/ui/packages/icon/components/Icon.lua +31 -0
  167. package/out/ui/packages/icon/components/Icon.styles.d.ts +3 -0
  168. package/out/ui/packages/icon/components/Icon.styles.lua +47 -0
  169. package/out/ui/packages/icon/index.d.ts +3 -0
  170. package/out/ui/packages/icon/init.lua +8 -0
  171. package/out/ui/packages/iconButton/components/IconButton.d.ts +13 -0
  172. package/out/ui/packages/iconButton/components/IconButton.lua +48 -0
  173. package/out/ui/packages/iconButton/components/IconButton.styles.d.ts +3 -0
  174. package/out/ui/packages/iconButton/components/IconButton.styles.lua +47 -0
  175. package/out/ui/packages/iconButton/index.d.ts +3 -0
  176. package/out/ui/packages/iconButton/init.lua +8 -0
  177. package/out/ui/packages/index.d.ts +11 -0
  178. package/out/ui/packages/init.lua +37 -0
  179. package/out/ui/packages/input/components/Input.d.ts +26 -0
  180. package/out/ui/packages/input/components/Input.lua +165 -0
  181. package/out/ui/packages/input/components/Input.styles.d.ts +3 -0
  182. package/out/ui/packages/input/components/Input.styles.lua +156 -0
  183. package/out/ui/packages/input/index.d.ts +6 -0
  184. package/out/ui/packages/input/init.lua +8 -0
  185. package/out/ui/packages/input/types/InputColor.d.ts +1 -0
  186. package/out/ui/packages/input/types/InputColor.lua +2 -0
  187. package/out/ui/packages/input/types/InputMargin.d.ts +1 -0
  188. package/out/ui/packages/input/types/InputMargin.lua +2 -0
  189. package/out/ui/packages/input/types/InputVariant.d.ts +1 -0
  190. package/out/ui/packages/input/types/InputVariant.lua +2 -0
  191. package/out/ui/packages/input/types/index.d.ts +3 -0
  192. package/out/ui/packages/input/types/init.lua +2 -0
  193. package/out/ui/packages/progressBar/components/ProgressBar.d.ts +9 -0
  194. package/out/ui/packages/progressBar/components/ProgressBar.lua +76 -0
  195. package/out/ui/packages/progressBar/components/ProgressBar.styles.d.ts +2 -0
  196. package/out/ui/packages/progressBar/components/ProgressBar.styles.lua +47 -0
  197. package/out/ui/packages/progressBar/index.d.ts +3 -0
  198. package/out/ui/packages/progressBar/init.lua +8 -0
  199. package/out/ui/packages/shadow/components/Shadow.d.ts +3 -0
  200. package/out/ui/packages/shadow/components/Shadow.lua +72 -0
  201. package/out/ui/packages/shadow/components/Shadow.styles.d.ts +2 -0
  202. package/out/ui/packages/shadow/components/Shadow.styles.lua +20 -0
  203. package/out/ui/packages/shadow/index.d.ts +2 -0
  204. package/out/ui/packages/shadow/init.lua +8 -0
  205. package/out/ui/packages/sidebar/components/Sidebar.d.ts +11 -0
  206. package/out/ui/packages/sidebar/components/Sidebar.lua +46 -0
  207. package/out/ui/packages/sidebar/components/Sidebar.styles.d.ts +3 -0
  208. package/out/ui/packages/sidebar/components/Sidebar.styles.lua +38 -0
  209. package/out/ui/packages/sidebar/index.d.ts +4 -0
  210. package/out/ui/packages/sidebar/init.lua +8 -0
  211. package/out/ui/packages/sidebar/types/SidebarType.d.ts +1 -0
  212. package/out/ui/packages/sidebar/types/SidebarType.lua +2 -0
  213. package/out/ui/packages/sidebar/types/index.d.ts +1 -0
  214. package/out/ui/packages/sidebar/types/init.lua +2 -0
  215. package/out/ui/packages/toast/components/Toast.d.ts +11 -0
  216. package/out/ui/packages/toast/components/Toast.lua +94 -0
  217. package/out/ui/packages/toast/components/Toast.styles.d.ts +3 -0
  218. package/out/ui/packages/toast/components/Toast.styles.lua +74 -0
  219. package/out/ui/packages/toast/enums/ToastVariants.d.ts +7 -0
  220. package/out/ui/packages/toast/enums/ToastVariants.lua +20 -0
  221. package/out/ui/packages/toast/index.d.ts +5 -0
  222. package/out/ui/packages/toast/init.lua +9 -0
  223. package/out/ui/packages/toast/interfaces/ToastEvent.d.ts +5 -0
  224. package/out/ui/packages/toast/interfaces/ToastEvent.lua +2 -0
  225. package/out/ui/packages/treeView/components/TreeView.d.ts +11 -0
  226. package/out/ui/packages/treeView/components/TreeView.lua +339 -0
  227. package/out/ui/packages/treeView/components/TreeView.styles.d.ts +2 -0
  228. package/out/ui/packages/treeView/components/TreeView.styles.lua +91 -0
  229. package/out/ui/packages/treeView/index.d.ts +6 -0
  230. package/out/ui/packages/treeView/init.lua +8 -0
  231. package/out/ui/packages/treeView/interfaces/Branch.d.ts +6 -0
  232. package/out/ui/packages/treeView/interfaces/Branch.lua +2 -0
  233. package/out/ui/packages/treeView/interfaces/Leaf.d.ts +4 -0
  234. package/out/ui/packages/treeView/interfaces/Leaf.lua +2 -0
  235. package/out/ui/packages/treeView/interfaces/Tree.d.ts +5 -0
  236. package/out/ui/packages/treeView/interfaces/Tree.lua +2 -0
  237. package/out/ui/packages/typography/components/Typography.d.ts +21 -0
  238. package/out/ui/packages/typography/components/Typography.lua +47 -0
  239. package/out/ui/packages/typography/components/Typography.styles.d.ts +3 -0
  240. package/out/ui/packages/typography/components/Typography.styles.lua +97 -0
  241. package/out/ui/packages/typography/index.d.ts +6 -0
  242. package/out/ui/packages/typography/init.lua +8 -0
  243. package/out/ui/packages/typography/types/TypographyAlignment.d.ts +1 -0
  244. package/out/ui/packages/typography/types/TypographyAlignment.lua +2 -0
  245. package/out/ui/packages/typography/types/TypographyColor.d.ts +1 -0
  246. package/out/ui/packages/typography/types/TypographyColor.lua +2 -0
  247. package/out/ui/packages/typography/types/TypographyDisplay.d.ts +1 -0
  248. package/out/ui/packages/typography/types/TypographyDisplay.lua +2 -0
  249. package/out/ui/packages/typography/types/index.d.ts +3 -0
  250. package/out/ui/packages/typography/types/init.lua +2 -0
  251. package/package.json +68 -0
@@ -0,0 +1,27 @@
1
+ -- Compiled with roblox-ts v2.2.0
2
+ local TS = _G[script]
3
+ local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src)
4
+ local useDividerStyles = TS.import(script, script.Parent, "Divider.styles").default
5
+ local function Divider(props)
6
+ local _binding = props
7
+ local className = _binding.className
8
+ local _binding_1 = useDividerStyles(props)
9
+ local root = _binding_1.root
10
+ local _attributes = {}
11
+ for _k, _v in root do
12
+ _attributes[_k] = _v
13
+ end
14
+ _attributes.BorderSizePixel = 0
15
+ if className then
16
+ for _k, _v in className do
17
+ _attributes[_k] = _v
18
+ end
19
+ end
20
+ return Roact.createFragment({
21
+ Divider = Roact.createElement("Frame", _attributes),
22
+ })
23
+ end
24
+ local default = Divider
25
+ return {
26
+ default = default,
27
+ }
@@ -0,0 +1,3 @@
1
+ import { DividerProps } from "./Divider";
2
+ declare const useDividerStyles: (props: DividerProps) => import("../../../../theme").ClassNameMap<string>;
3
+ export default useDividerStyles;
@@ -0,0 +1,42 @@
1
+ -- Compiled with roblox-ts v2.2.0
2
+ local TS = _G[script]
3
+ local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
4
+ local createStyles = _theme.createStyles
5
+ local makeStyles = _theme.makeStyles
6
+ local Orientations = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Orientations
7
+ local useDividerStyles = makeStyles(function(theme, props)
8
+ local _binding = props
9
+ local position = _binding.position
10
+ local orientation = _binding.orientation
11
+ if orientation == nil then
12
+ orientation = Orientations.Horizontal
13
+ end
14
+ local padding = _binding.padding
15
+ if padding == nil then
16
+ padding = theme.padding.calc(2)
17
+ end
18
+ local color = _binding.color
19
+ if color == nil then
20
+ color = theme.options.constants.colors.divider
21
+ end
22
+ local transparency = _binding.transparency
23
+ if transparency == nil then
24
+ transparency = 0
25
+ end
26
+ local weight = _binding.weight
27
+ if weight == nil then
28
+ weight = theme.options.constants.borders.default
29
+ end
30
+ return createStyles({
31
+ root = {
32
+ Position = position or UDim2.new(0, 0, 0, 0),
33
+ 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),
34
+ BackgroundColor3 = color or Color3.fromRGB(255, 255, 255),
35
+ BackgroundTransparency = transparency,
36
+ },
37
+ })
38
+ end)
39
+ local default = useDividerStyles
40
+ return {
41
+ default = default,
42
+ }
@@ -0,0 +1,3 @@
1
+ export { default as Divider } from "./components/Divider";
2
+ export { DividerProps } from "./components/Divider";
3
+ export * from "./components/Divider";
@@ -0,0 +1,8 @@
1
+ -- Compiled with roblox-ts v2.2.0
2
+ local TS = _G[script]
3
+ local exports = {}
4
+ exports.Divider = TS.import(script, script, "components", "Divider").default
5
+ for _k, _v in TS.import(script, script, "components", "Divider") or {} do
6
+ exports[_k] = _v
7
+ end
8
+ return exports
@@ -0,0 +1,11 @@
1
+ /// <reference types="@rbxts/types" />
2
+ import Roact from "@rbxts/roact";
3
+ import { Icons } from "../../../enums";
4
+ import { CustomizedProps } from "../../../../theme";
5
+ export interface IconProps {
6
+ icon: Icons;
7
+ size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl";
8
+ tint?: Color3;
9
+ }
10
+ declare const Icon: (props: CustomizedProps<ImageLabel, IconProps>) => Roact.Element;
11
+ export default Icon;
@@ -0,0 +1,31 @@
1
+ -- Compiled with roblox-ts v2.2.0
2
+ local TS = _G[script]
3
+ local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src)
4
+ local withHooks = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src).withHooks
5
+ local useIconStyles = TS.import(script, script.Parent, "Icon.styles").default
6
+ local Icon = withHooks(function(props)
7
+ local _binding = props
8
+ local icon = _binding.icon
9
+ local tint = _binding.tint
10
+ local className = _binding.className
11
+ local _binding_1 = useIconStyles(props)
12
+ local container = _binding_1.container
13
+ local _attributes = {}
14
+ for _k, _v in container do
15
+ _attributes[_k] = _v
16
+ end
17
+ if className then
18
+ for _k, _v in className do
19
+ _attributes[_k] = _v
20
+ end
21
+ end
22
+ _attributes.Image = tostring(icon)
23
+ _attributes.ImageColor3 = tint or container.ImageColor3
24
+ return Roact.createFragment({
25
+ Icon = Roact.createElement("ImageLabel", _attributes),
26
+ })
27
+ end)
28
+ local default = Icon
29
+ return {
30
+ default = default,
31
+ }
@@ -0,0 +1,3 @@
1
+ import { IconProps } from "./Icon";
2
+ declare const useIconStyles: (props: IconProps) => import("../../../../theme").ClassNameMap<string>;
3
+ export default useIconStyles;
@@ -0,0 +1,47 @@
1
+ -- Compiled with roblox-ts v2.2.0
2
+ local TS = _G[script]
3
+ local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
4
+ local createStyles = _theme.createStyles
5
+ local makeStyles = _theme.makeStyles
6
+ local useIconStyles = makeStyles(function(theme, props)
7
+ local getIconSize = function(props)
8
+ local _binding = props
9
+ local size = _binding.size
10
+ repeat
11
+ if size == "xxs" then
12
+ return UDim2.new(0, theme.spacing.calc(0.5), 0, theme.spacing.calc(0.5))
13
+ end
14
+ if size == "xs" then
15
+ return UDim2.new(0, theme.spacing.calc(1), 0, theme.spacing.calc(1))
16
+ end
17
+ if size == "sm" then
18
+ return UDim2.new(0, theme.spacing.calc(2), 0, theme.spacing.calc(2))
19
+ end
20
+ if size == "md" then
21
+ return UDim2.new(0, theme.spacing.calc(3), 0, theme.spacing.calc(3))
22
+ end
23
+ if size == "lg" then
24
+ return UDim2.new(0, theme.spacing.calc(6), 0, theme.spacing.calc(6))
25
+ end
26
+ if size == "xl" then
27
+ return UDim2.new(0, theme.spacing.calc(8), 0, theme.spacing.calc(8))
28
+ end
29
+ return UDim2.new(0, theme.spacing.calc(2), 0, theme.spacing.calc(2))
30
+ until true
31
+ end
32
+ return createStyles({
33
+ container = {
34
+ Size = getIconSize(props),
35
+ BackgroundColor3 = theme.palette.secondary.main,
36
+ ImageColor3 = theme.palette.text.primary,
37
+ BackgroundTransparency = 1,
38
+ BorderSizePixel = 0,
39
+ ScaleType = Enum.ScaleType.Fit,
40
+ ZIndex = 12000,
41
+ },
42
+ })
43
+ end)
44
+ local default = useIconStyles
45
+ return {
46
+ default = default,
47
+ }
@@ -0,0 +1,3 @@
1
+ export { default as Icon } from "./components/Icon";
2
+ export { IconProps } from "./components/Icon";
3
+ export * from "./components/Icon";
@@ -0,0 +1,8 @@
1
+ -- Compiled with roblox-ts v2.2.0
2
+ local TS = _G[script]
3
+ local exports = {}
4
+ exports.Icon = TS.import(script, script, "components", "Icon").default
5
+ for _k, _v in TS.import(script, script, "components", "Icon") or {} do
6
+ exports[_k] = _v
7
+ end
8
+ return exports
@@ -0,0 +1,13 @@
1
+ /// <reference types="@rbxts/types" />
2
+ import Roact from "@rbxts/roact";
3
+ import { Icons } from "../../../enums";
4
+ import { CustomizedProps } from "../../../../theme";
5
+ export interface IconButtonProps {
6
+ icon: Icons;
7
+ size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl";
8
+ tint: Color3;
9
+ selected?: boolean;
10
+ onClick?: () => void;
11
+ }
12
+ declare const IconButton: (props: CustomizedProps<ImageButton, IconButtonProps>) => Roact.Element;
13
+ export default IconButton;
@@ -0,0 +1,48 @@
1
+ -- Compiled with roblox-ts v2.2.0
2
+ local TS = _G[script]
3
+ local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src)
4
+ local _roact_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src)
5
+ local withHooks = _roact_hooked.withHooks
6
+ local useState = _roact_hooked.useState
7
+ local useIconButtonStyles = TS.import(script, script.Parent, "IconButton.styles").default
8
+ local IconButton = withHooks(function(props)
9
+ local _binding = props
10
+ local icon = _binding.icon
11
+ local selected = _binding.selected
12
+ local tint = _binding.tint
13
+ local onClick = _binding.onClick
14
+ local className = _binding.className
15
+ local _binding_1 = useIconButtonStyles(props)
16
+ local container = _binding_1.container
17
+ local hovering, setHovering = useState(false)
18
+ local _attributes = {}
19
+ for _k, _v in container do
20
+ _attributes[_k] = _v
21
+ end
22
+ if className then
23
+ for _k, _v in className do
24
+ _attributes[_k] = _v
25
+ end
26
+ end
27
+ _attributes.BackgroundTransparency = if hovering or selected then 0.5 else 1
28
+ _attributes.Image = tostring(icon)
29
+ _attributes.ImageColor3 = tint or container.ImageColor3
30
+ _attributes[Roact.Event.MouseButton1Click] = function()
31
+ if onClick then
32
+ onClick()
33
+ end
34
+ end
35
+ _attributes[Roact.Event.MouseEnter] = function()
36
+ setHovering(true)
37
+ end
38
+ _attributes[Roact.Event.MouseLeave] = function()
39
+ setHovering(false)
40
+ end
41
+ return Roact.createFragment({
42
+ IconButton = Roact.createElement("ImageButton", _attributes),
43
+ })
44
+ end)
45
+ local default = IconButton
46
+ return {
47
+ default = default,
48
+ }
@@ -0,0 +1,3 @@
1
+ import { IconButtonProps } from "./IconButton";
2
+ declare const useIconButtonStyles: (props: IconButtonProps) => import("../../../../theme").ClassNameMap<string>;
3
+ export default useIconButtonStyles;
@@ -0,0 +1,47 @@
1
+ -- Compiled with roblox-ts v2.2.0
2
+ local TS = _G[script]
3
+ local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
4
+ local createStyles = _theme.createStyles
5
+ local makeStyles = _theme.makeStyles
6
+ local useIconButtonStyles = makeStyles(function(theme, props)
7
+ local getIconSize = function(props)
8
+ local _binding = props
9
+ local size = _binding.size
10
+ repeat
11
+ if size == "xxs" then
12
+ return UDim2.new(0, theme.spacing.calc(0.5), 0, theme.spacing.calc(0.5))
13
+ end
14
+ if size == "xs" then
15
+ return UDim2.new(0, theme.spacing.calc(1), 0, theme.spacing.calc(1))
16
+ end
17
+ if size == "sm" then
18
+ return UDim2.new(0, theme.spacing.calc(2), 0, theme.spacing.calc(2))
19
+ end
20
+ if size == "md" then
21
+ return UDim2.new(0, theme.spacing.calc(3), 0, theme.spacing.calc(3))
22
+ end
23
+ if size == "lg" then
24
+ return UDim2.new(0, theme.spacing.calc(6), 0, theme.spacing.calc(6))
25
+ end
26
+ if size == "xl" then
27
+ return UDim2.new(0, theme.spacing.calc(8), 0, theme.spacing.calc(8))
28
+ end
29
+ return UDim2.new(0, theme.spacing.calc(2), 0, theme.spacing.calc(2))
30
+ until true
31
+ end
32
+ return createStyles({
33
+ container = {
34
+ Size = getIconSize(props),
35
+ BackgroundColor3 = theme.palette.secondary.main,
36
+ ImageColor3 = theme.palette.text.primary,
37
+ BackgroundTransparency = 1,
38
+ BorderSizePixel = 0,
39
+ ScaleType = Enum.ScaleType.Fit,
40
+ ZIndex = 12000,
41
+ },
42
+ })
43
+ end)
44
+ local default = useIconButtonStyles
45
+ return {
46
+ default = default,
47
+ }
@@ -0,0 +1,3 @@
1
+ export { default as IconButton } from "./components/IconButton";
2
+ export { IconButtonProps } from "./components/IconButton";
3
+ export * from "./components/IconButton";
@@ -0,0 +1,8 @@
1
+ -- Compiled with roblox-ts v2.2.0
2
+ local TS = _G[script]
3
+ local exports = {}
4
+ exports.IconButton = TS.import(script, script, "components", "IconButton").default
5
+ for _k, _v in TS.import(script, script, "components", "IconButton") or {} do
6
+ exports[_k] = _v
7
+ end
8
+ return exports
@@ -0,0 +1,11 @@
1
+ export * from "./divider";
2
+ export * from "./icon";
3
+ export * from "./iconButton";
4
+ export * from "./input";
5
+ export * from "./progressBar";
6
+ export * from "./shadow";
7
+ export * from "./sidebar";
8
+ export * from "./toast";
9
+ export * from "./treeView";
10
+ export * from "./typography";
11
+ export * from "./button";
@@ -0,0 +1,37 @@
1
+ -- Compiled with roblox-ts v2.2.0
2
+ local TS = _G[script]
3
+ local exports = {}
4
+ for _k, _v in TS.import(script, script, "divider") or {} do
5
+ exports[_k] = _v
6
+ end
7
+ for _k, _v in TS.import(script, script, "icon") or {} do
8
+ exports[_k] = _v
9
+ end
10
+ for _k, _v in TS.import(script, script, "iconButton") or {} do
11
+ exports[_k] = _v
12
+ end
13
+ for _k, _v in TS.import(script, script, "input") or {} do
14
+ exports[_k] = _v
15
+ end
16
+ for _k, _v in TS.import(script, script, "progressBar") or {} do
17
+ exports[_k] = _v
18
+ end
19
+ for _k, _v in TS.import(script, script, "shadow") or {} do
20
+ exports[_k] = _v
21
+ end
22
+ for _k, _v in TS.import(script, script, "sidebar") or {} do
23
+ exports[_k] = _v
24
+ end
25
+ for _k, _v in TS.import(script, script, "toast") or {} do
26
+ exports[_k] = _v
27
+ end
28
+ for _k, _v in TS.import(script, script, "treeView") or {} do
29
+ exports[_k] = _v
30
+ end
31
+ for _k, _v in TS.import(script, script, "typography") or {} do
32
+ exports[_k] = _v
33
+ end
34
+ for _k, _v in TS.import(script, script, "button") or {} do
35
+ exports[_k] = _v
36
+ end
37
+ return exports
@@ -0,0 +1,26 @@
1
+ /// <reference types="@rbxts/types" />
2
+ /// <reference types="@rbxts/types" />
3
+ /// <reference types="@rbxts/types" />
4
+ import Roact from "@rbxts/roact";
5
+ import { CustomizedProps } from "../../../../theme";
6
+ import { InputColor, InputMargin, InputVariant } from "../types";
7
+ export type DefaultInputComponent = Frame;
8
+ export interface InputProps {
9
+ color?: InputColor;
10
+ disabled?: boolean;
11
+ hasError?: boolean;
12
+ helperText?: string;
13
+ margin?: InputMargin;
14
+ variant?: InputVariant;
15
+ width?: UDim;
16
+ text?: string;
17
+ placeholder?: string;
18
+ rounded?: boolean;
19
+ clearsTextOnFocus?: boolean;
20
+ onTextChanged?: (text: string) => void;
21
+ onFocus?: () => void;
22
+ onBlur?: () => void;
23
+ onEnterPressed?: (text: string) => void;
24
+ }
25
+ declare const Input: (props: CustomizedProps<Frame, InputProps>) => Roact.Element;
26
+ export default Input;
@@ -0,0 +1,165 @@
1
+ -- Compiled with roblox-ts v2.2.0
2
+ local TS = _G[script]
3
+ local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src)
4
+ local _roact_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src)
5
+ local useState = _roact_hooked.useState
6
+ local withHooks = _roact_hooked.withHooks
7
+ local classNames = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").classNames
8
+ local Divider = TS.import(script, script.Parent.Parent.Parent, "divider").Divider
9
+ local Orientations = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Orientations
10
+ local useInputStyles = TS.import(script, script.Parent, "Input.styles").default
11
+ local Input = withHooks(function(props)
12
+ local _binding = props
13
+ local text = _binding.text
14
+ local placeholder = _binding.placeholder
15
+ local helperText = _binding.helperText
16
+ local variant = _binding.variant
17
+ if variant == nil then
18
+ variant = "standard"
19
+ end
20
+ local disabled = _binding.disabled
21
+ if disabled == nil then
22
+ disabled = false
23
+ end
24
+ local hasError = _binding.hasError
25
+ if hasError == nil then
26
+ hasError = false
27
+ end
28
+ local rounded = _binding.rounded
29
+ if rounded == nil then
30
+ rounded = false
31
+ end
32
+ local onTextChanged = _binding.onTextChanged
33
+ local onFocus = _binding.onFocus
34
+ local onBlur = _binding.onBlur
35
+ local onEnterPressed = _binding.onEnterPressed
36
+ local className = _binding.className
37
+ local _binding_1 = useInputStyles(props)
38
+ local root = _binding_1.root
39
+ local font = _binding_1.font
40
+ local margin = _binding_1.margin
41
+ local box = _binding_1.box
42
+ local helper = _binding_1.helper
43
+ local errorColorFrame = _binding_1.errorColorFrame
44
+ local errorColorText = _binding_1.errorColorText
45
+ local divider = _binding_1.divider
46
+ local corner = _binding_1.corner
47
+ local stroke = _binding_1.stroke
48
+ local _condition = text
49
+ if _condition == nil then
50
+ _condition = ""
51
+ end
52
+ local input, setInput = useState(_condition)
53
+ local _attributes = {}
54
+ for _k, _v in 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
+ local _children = {}
63
+ local _length = #_children
64
+ local _attributes_1 = {}
65
+ for _k, _v in margin do
66
+ _attributes_1[_k] = _v
67
+ end
68
+ local _children_1 = {}
69
+ local _length_1 = #_children_1
70
+ local _attributes_2 = {}
71
+ for _k, _v in font do
72
+ _attributes_2[_k] = _v
73
+ end
74
+ for _k, _v in box do
75
+ _attributes_2[_k] = _v
76
+ end
77
+ _attributes_2.Active = not disabled
78
+ _attributes_2.Text = input
79
+ _attributes_2.PlaceholderText = placeholder
80
+ for _k, _v in classNames({
81
+ [errorColorText] = hasError,
82
+ }) do
83
+ _attributes_2[_k] = _v
84
+ end
85
+ _attributes_2[Roact.Event.ReturnPressedFromOnScreenKeyboard] = function(rbx)
86
+ if onEnterPressed then
87
+ local text = rbx.Text
88
+ onEnterPressed(text)
89
+ end
90
+ end
91
+ _attributes_2[Roact.Event.Focused] = onFocus
92
+ _attributes_2[Roact.Event.FocusLost] = function(rbx)
93
+ if onTextChanged then
94
+ local text = rbx.Text
95
+ onTextChanged(text)
96
+ end
97
+ if onBlur then
98
+ onBlur()
99
+ end
100
+ end
101
+ local _condition_1 = variant == "outlined"
102
+ if _condition_1 then
103
+ local _attributes_3 = {}
104
+ for _k, _v in stroke do
105
+ _attributes_3[_k] = _v
106
+ end
107
+ _condition_1 = Roact.createElement("UIStroke", _attributes_3)
108
+ end
109
+ local _children_2 = {}
110
+ local _length_2 = #_children_2
111
+ if _condition_1 then
112
+ _children_2[_length_2 + 1] = _condition_1
113
+ end
114
+ _length_2 = #_children_2
115
+ local _condition_2 = rounded
116
+ if _condition_2 then
117
+ local _attributes_3 = {}
118
+ for _k, _v in corner do
119
+ _attributes_3[_k] = _v
120
+ end
121
+ _condition_2 = Roact.createElement("UICorner", _attributes_3)
122
+ end
123
+ if _condition_2 then
124
+ _children_2[_length_2 + 1] = _condition_2
125
+ end
126
+ _children_1.Field = Roact.createElement("TextBox", _attributes_2, _children_2)
127
+ _children_1[_length_1 + 1] = Roact.createElement(Divider, {
128
+ padding = 0,
129
+ orientation = Orientations.Horizontal,
130
+ className = classNames({
131
+ [errorColorFrame] = hasError,
132
+ [divider] = true,
133
+ }),
134
+ })
135
+ local _condition_3 = helperText ~= nil
136
+ if _condition_3 then
137
+ local _attributes_3 = {}
138
+ for _k, _v in font do
139
+ _attributes_3[_k] = _v
140
+ end
141
+ for _k, _v in helper do
142
+ _attributes_3[_k] = _v
143
+ end
144
+ for _k, _v in classNames({
145
+ [errorColorText] = hasError,
146
+ }) do
147
+ _attributes_3[_k] = _v
148
+ end
149
+ _attributes_3.Text = helperText
150
+ _condition_3 = (Roact.createFragment({
151
+ HelperText = Roact.createElement("TextLabel", _attributes_3),
152
+ }))
153
+ end
154
+ if _condition_3 then
155
+ _children_1[_length_1 + 2] = _condition_3
156
+ end
157
+ _children.Margin = Roact.createElement("Frame", _attributes_1, _children_1)
158
+ return Roact.createFragment({
159
+ Input = Roact.createElement("Frame", _attributes, _children),
160
+ })
161
+ end)
162
+ local default = Input
163
+ return {
164
+ default = default,
165
+ }
@@ -0,0 +1,3 @@
1
+ import { InputProps } from "./Input";
2
+ declare const useInputStyles: (props: InputProps) => import("../../../../theme").ClassNameMap<string>;
3
+ export default useInputStyles;