@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.
- package/LICENSE +21 -0
- package/README.md +263 -0
- package/out/index.d.ts +2 -0
- package/out/init.lua +10 -0
- package/out/theme/components/ThemeProvider.d.ts +7 -0
- package/out/theme/components/ThemeProvider.lua +37 -0
- package/out/theme/components/ThemeStore.d.ts +14 -0
- package/out/theme/components/ThemeStore.lua +29 -0
- package/out/theme/components/ThemeWrapper.d.ts +7 -0
- package/out/theme/components/ThemeWrapper.lua +52 -0
- package/out/theme/components/index.d.ts +8 -0
- package/out/theme/components/init.lua +10 -0
- package/out/theme/constants/NumberConstants.d.ts +6 -0
- package/out/theme/constants/NumberConstants.lua +18 -0
- package/out/theme/constants/ThemeConstants.d.ts +5 -0
- package/out/theme/constants/ThemeConstants.lua +104 -0
- package/out/theme/constants/index.d.ts +2 -0
- package/out/theme/constants/init.lua +10 -0
- package/out/theme/index.d.ts +20 -0
- package/out/theme/init.lua +27 -0
- package/out/theme/interfaces/IconSizes/IconSizes.d.ts +5 -0
- package/out/theme/interfaces/IconSizes/IconSizes.lua +2 -0
- package/out/theme/interfaces/IconSizes/index.d.ts +1 -0
- package/out/theme/interfaces/IconSizes/init.lua +2 -0
- package/out/theme/interfaces/Palette/ColorTokens/ColorTokens.d.ts +5 -0
- package/out/theme/interfaces/Palette/ColorTokens/ColorTokens.lua +2 -0
- package/out/theme/interfaces/Palette/ColorTokens/index.d.ts +1 -0
- package/out/theme/interfaces/Palette/ColorTokens/init.lua +2 -0
- package/out/theme/interfaces/Palette/Colors/Blue.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Blue.lua +21 -0
- package/out/theme/interfaces/Palette/Colors/Colors.d.ts +43 -0
- package/out/theme/interfaces/Palette/Colors/Colors.lua +2 -0
- package/out/theme/interfaces/Palette/Colors/Common.d.ts +7 -0
- package/out/theme/interfaces/Palette/Colors/Common.lua +9 -0
- package/out/theme/interfaces/Palette/Colors/Dark.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Dark.lua +24 -0
- package/out/theme/interfaces/Palette/Colors/Gray.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Gray.lua +21 -0
- package/out/theme/interfaces/Palette/Colors/Green.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Green.lua +21 -0
- package/out/theme/interfaces/Palette/Colors/Light.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Light.lua +8 -0
- package/out/theme/interfaces/Palette/Colors/Magenta.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Magenta.lua +21 -0
- package/out/theme/interfaces/Palette/Colors/Orange.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Orange.lua +21 -0
- package/out/theme/interfaces/Palette/Colors/Purple.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Purple.lua +21 -0
- package/out/theme/interfaces/Palette/Colors/Red.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Red.lua +21 -0
- package/out/theme/interfaces/Palette/Colors/Turquoise.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Turquoise.lua +21 -0
- package/out/theme/interfaces/Palette/Colors/Yellow.d.ts +3 -0
- package/out/theme/interfaces/Palette/Colors/Yellow.lua +21 -0
- package/out/theme/interfaces/Palette/Colors/index.d.ts +13 -0
- package/out/theme/interfaces/Palette/Colors/init.lua +16 -0
- package/out/theme/interfaces/Palette/Palette.d.ts +27 -0
- package/out/theme/interfaces/Palette/Palette.lua +2 -0
- package/out/theme/interfaces/Palette/index.d.ts +3 -0
- package/out/theme/interfaces/Palette/init.lua +7 -0
- package/out/theme/interfaces/Spacing/Borders.d.ts +4 -0
- package/out/theme/interfaces/Spacing/Borders.lua +2 -0
- package/out/theme/interfaces/Spacing/Padding.d.ts +4 -0
- package/out/theme/interfaces/Spacing/Padding.lua +2 -0
- package/out/theme/interfaces/Spacing/Shape.d.ts +3 -0
- package/out/theme/interfaces/Spacing/Shape.lua +2 -0
- package/out/theme/interfaces/Spacing/Spacing.d.ts +4 -0
- package/out/theme/interfaces/Spacing/Spacing.lua +2 -0
- package/out/theme/interfaces/Spacing/index.d.ts +4 -0
- package/out/theme/interfaces/Spacing/init.lua +2 -0
- package/out/theme/interfaces/Theme/Theme.d.ts +14 -0
- package/out/theme/interfaces/Theme/Theme.lua +2 -0
- package/out/theme/interfaces/Theme/ThemeConstants.d.ts +25 -0
- package/out/theme/interfaces/Theme/ThemeConstants.lua +2 -0
- package/out/theme/interfaces/Theme/ThemeOptions.d.ts +4 -0
- package/out/theme/interfaces/Theme/ThemeOptions.lua +2 -0
- package/out/theme/interfaces/Theme/index.d.ts +3 -0
- package/out/theme/interfaces/Theme/init.lua +2 -0
- package/out/theme/interfaces/Tokens/Tokens.d.ts +1 -0
- package/out/theme/interfaces/Tokens/Tokens.lua +2 -0
- package/out/theme/interfaces/Tokens/index.d.ts +1 -0
- package/out/theme/interfaces/Tokens/init.lua +2 -0
- package/out/theme/interfaces/index.d.ts +13 -0
- package/out/theme/interfaces/init.lua +16 -0
- package/out/theme/interfaces/typography/FontFamilies.d.ts +2 -0
- package/out/theme/interfaces/typography/FontFamilies.lua +11 -0
- package/out/theme/interfaces/typography/FontFamilyOptions.d.ts +5 -0
- package/out/theme/interfaces/typography/FontFamilyOptions.lua +2 -0
- package/out/theme/interfaces/typography/FontSizeOptions.d.ts +4 -0
- package/out/theme/interfaces/typography/FontSizeOptions.lua +2 -0
- package/out/theme/interfaces/typography/FontSizes.d.ts +3 -0
- package/out/theme/interfaces/typography/FontSizes.lua +15 -0
- package/out/theme/interfaces/typography/ThemeTypography.d.ts +7 -0
- package/out/theme/interfaces/typography/ThemeTypography.lua +2 -0
- package/out/theme/interfaces/typography/Variants.d.ts +18 -0
- package/out/theme/interfaces/typography/Variants.lua +24 -0
- package/out/theme/interfaces/typography/index.d.ts +8 -0
- package/out/theme/interfaces/typography/init.lua +13 -0
- package/out/theme/styles/index.d.ts +5 -0
- package/out/theme/styles/init.lua +7 -0
- package/out/theme/styles/types/WriteableStyle.d.ts +3 -0
- package/out/theme/styles/types/WriteableStyle.lua +2 -0
- package/out/theme/styles/types/index.d.ts +2 -0
- package/out/theme/styles/types/init.lua +2 -0
- package/out/theme/styles/types/styles.d.ts +4 -0
- package/out/theme/styles/types/styles.lua +2 -0
- package/out/theme/styles/utilities/classNames.d.ts +8 -0
- package/out/theme/styles/utilities/classNames.lua +31 -0
- package/out/theme/styles/utilities/createStyles.d.ts +3 -0
- package/out/theme/styles/utilities/createStyles.lua +8 -0
- package/out/theme/styles/utilities/index.d.ts +3 -0
- package/out/theme/styles/utilities/init.lua +7 -0
- package/out/theme/styles/utilities/makeStyles.d.ts +7 -0
- package/out/theme/styles/utilities/makeStyles.lua +32 -0
- package/out/theme/themes/DarkTheme.d.ts +3 -0
- package/out/theme/themes/DarkTheme.lua +99 -0
- package/out/theme/themes/LightTheme.d.ts +3 -0
- package/out/theme/themes/LightTheme.lua +99 -0
- package/out/theme/themes/index.d.ts +3 -0
- package/out/theme/themes/init.lua +7 -0
- package/out/theme/types/index.d.ts +7 -0
- package/out/theme/types/init.lua +2 -0
- package/out/theme/types/types.d.ts +16 -0
- package/out/theme/types/types.lua +3 -0
- package/out/theme/utilites/Color3FromHex.d.ts +2 -0
- package/out/theme/utilites/Color3FromHex.lua +14 -0
- package/out/theme/utilites/index.d.ts +1 -0
- package/out/theme/utilites/init.lua +5 -0
- package/out/ui/constants/ImageConstants.d.ts +2 -0
- package/out/ui/constants/ImageConstants.lua +7 -0
- package/out/ui/constants/LayoutConstants.d.ts +1 -0
- package/out/ui/constants/LayoutConstants.lua +7 -0
- package/out/ui/constants/index.d.ts +2 -0
- package/out/ui/constants/init.lua +10 -0
- package/out/ui/enums/Directions.d.ts +8 -0
- package/out/ui/enums/Directions.lua +23 -0
- package/out/ui/enums/Icons.d.ts +40 -0
- package/out/ui/enums/Icons.lua +87 -0
- package/out/ui/enums/Orientations.d.ts +4 -0
- package/out/ui/enums/Orientations.lua +15 -0
- package/out/ui/enums/index.d.ts +3 -0
- package/out/ui/enums/init.lua +7 -0
- package/out/ui/index.d.ts +34 -0
- package/out/ui/init.lua +24 -0
- package/out/ui/packages/button/components/Button.d.ts +26 -0
- package/out/ui/packages/button/components/Button.lua +175 -0
- package/out/ui/packages/button/components/Button.styles.d.ts +3 -0
- package/out/ui/packages/button/components/Button.styles.lua +149 -0
- package/out/ui/packages/button/index.d.ts +6 -0
- package/out/ui/packages/button/init.lua +8 -0
- package/out/ui/packages/button/types/ButtonColor.d.ts +1 -0
- package/out/ui/packages/button/types/ButtonColor.lua +2 -0
- package/out/ui/packages/button/types/ButtonSize.d.ts +1 -0
- package/out/ui/packages/button/types/ButtonSize.lua +2 -0
- package/out/ui/packages/button/types/ButtonVariant.d.ts +1 -0
- package/out/ui/packages/button/types/ButtonVariant.lua +2 -0
- package/out/ui/packages/button/types/index.d.ts +3 -0
- package/out/ui/packages/button/types/init.lua +2 -0
- package/out/ui/packages/divider/components/Divider.d.ts +18 -0
- package/out/ui/packages/divider/components/Divider.lua +27 -0
- package/out/ui/packages/divider/components/Divider.styles.d.ts +3 -0
- package/out/ui/packages/divider/components/Divider.styles.lua +42 -0
- package/out/ui/packages/divider/index.d.ts +3 -0
- package/out/ui/packages/divider/init.lua +8 -0
- package/out/ui/packages/icon/components/Icon.d.ts +11 -0
- package/out/ui/packages/icon/components/Icon.lua +31 -0
- package/out/ui/packages/icon/components/Icon.styles.d.ts +3 -0
- package/out/ui/packages/icon/components/Icon.styles.lua +47 -0
- package/out/ui/packages/icon/index.d.ts +3 -0
- package/out/ui/packages/icon/init.lua +8 -0
- package/out/ui/packages/iconButton/components/IconButton.d.ts +13 -0
- package/out/ui/packages/iconButton/components/IconButton.lua +48 -0
- package/out/ui/packages/iconButton/components/IconButton.styles.d.ts +3 -0
- package/out/ui/packages/iconButton/components/IconButton.styles.lua +47 -0
- package/out/ui/packages/iconButton/index.d.ts +3 -0
- package/out/ui/packages/iconButton/init.lua +8 -0
- package/out/ui/packages/index.d.ts +11 -0
- package/out/ui/packages/init.lua +37 -0
- package/out/ui/packages/input/components/Input.d.ts +26 -0
- package/out/ui/packages/input/components/Input.lua +165 -0
- package/out/ui/packages/input/components/Input.styles.d.ts +3 -0
- package/out/ui/packages/input/components/Input.styles.lua +156 -0
- package/out/ui/packages/input/index.d.ts +6 -0
- package/out/ui/packages/input/init.lua +8 -0
- package/out/ui/packages/input/types/InputColor.d.ts +1 -0
- package/out/ui/packages/input/types/InputColor.lua +2 -0
- package/out/ui/packages/input/types/InputMargin.d.ts +1 -0
- package/out/ui/packages/input/types/InputMargin.lua +2 -0
- package/out/ui/packages/input/types/InputVariant.d.ts +1 -0
- package/out/ui/packages/input/types/InputVariant.lua +2 -0
- package/out/ui/packages/input/types/index.d.ts +3 -0
- package/out/ui/packages/input/types/init.lua +2 -0
- package/out/ui/packages/progressBar/components/ProgressBar.d.ts +9 -0
- package/out/ui/packages/progressBar/components/ProgressBar.lua +76 -0
- package/out/ui/packages/progressBar/components/ProgressBar.styles.d.ts +2 -0
- package/out/ui/packages/progressBar/components/ProgressBar.styles.lua +47 -0
- package/out/ui/packages/progressBar/index.d.ts +3 -0
- package/out/ui/packages/progressBar/init.lua +8 -0
- package/out/ui/packages/shadow/components/Shadow.d.ts +3 -0
- package/out/ui/packages/shadow/components/Shadow.lua +72 -0
- package/out/ui/packages/shadow/components/Shadow.styles.d.ts +2 -0
- package/out/ui/packages/shadow/components/Shadow.styles.lua +20 -0
- package/out/ui/packages/shadow/index.d.ts +2 -0
- package/out/ui/packages/shadow/init.lua +8 -0
- package/out/ui/packages/sidebar/components/Sidebar.d.ts +11 -0
- package/out/ui/packages/sidebar/components/Sidebar.lua +46 -0
- package/out/ui/packages/sidebar/components/Sidebar.styles.d.ts +3 -0
- package/out/ui/packages/sidebar/components/Sidebar.styles.lua +38 -0
- package/out/ui/packages/sidebar/index.d.ts +4 -0
- package/out/ui/packages/sidebar/init.lua +8 -0
- package/out/ui/packages/sidebar/types/SidebarType.d.ts +1 -0
- package/out/ui/packages/sidebar/types/SidebarType.lua +2 -0
- package/out/ui/packages/sidebar/types/index.d.ts +1 -0
- package/out/ui/packages/sidebar/types/init.lua +2 -0
- package/out/ui/packages/toast/components/Toast.d.ts +11 -0
- package/out/ui/packages/toast/components/Toast.lua +94 -0
- package/out/ui/packages/toast/components/Toast.styles.d.ts +3 -0
- package/out/ui/packages/toast/components/Toast.styles.lua +74 -0
- package/out/ui/packages/toast/enums/ToastVariants.d.ts +7 -0
- package/out/ui/packages/toast/enums/ToastVariants.lua +20 -0
- package/out/ui/packages/toast/index.d.ts +5 -0
- package/out/ui/packages/toast/init.lua +9 -0
- package/out/ui/packages/toast/interfaces/ToastEvent.d.ts +5 -0
- package/out/ui/packages/toast/interfaces/ToastEvent.lua +2 -0
- package/out/ui/packages/treeView/components/TreeView.d.ts +11 -0
- package/out/ui/packages/treeView/components/TreeView.lua +339 -0
- package/out/ui/packages/treeView/components/TreeView.styles.d.ts +2 -0
- package/out/ui/packages/treeView/components/TreeView.styles.lua +91 -0
- package/out/ui/packages/treeView/index.d.ts +6 -0
- package/out/ui/packages/treeView/init.lua +8 -0
- package/out/ui/packages/treeView/interfaces/Branch.d.ts +6 -0
- package/out/ui/packages/treeView/interfaces/Branch.lua +2 -0
- package/out/ui/packages/treeView/interfaces/Leaf.d.ts +4 -0
- package/out/ui/packages/treeView/interfaces/Leaf.lua +2 -0
- package/out/ui/packages/treeView/interfaces/Tree.d.ts +5 -0
- package/out/ui/packages/treeView/interfaces/Tree.lua +2 -0
- package/out/ui/packages/typography/components/Typography.d.ts +21 -0
- package/out/ui/packages/typography/components/Typography.lua +47 -0
- package/out/ui/packages/typography/components/Typography.styles.d.ts +3 -0
- package/out/ui/packages/typography/components/Typography.styles.lua +97 -0
- package/out/ui/packages/typography/index.d.ts +6 -0
- package/out/ui/packages/typography/init.lua +8 -0
- package/out/ui/packages/typography/types/TypographyAlignment.d.ts +1 -0
- package/out/ui/packages/typography/types/TypographyAlignment.lua +2 -0
- package/out/ui/packages/typography/types/TypographyColor.d.ts +1 -0
- package/out/ui/packages/typography/types/TypographyColor.lua +2 -0
- package/out/ui/packages/typography/types/TypographyDisplay.d.ts +1 -0
- package/out/ui/packages/typography/types/TypographyDisplay.lua +2 -0
- package/out/ui/packages/typography/types/index.d.ts +3 -0
- package/out/ui/packages/typography/types/init.lua +2 -0
- 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,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,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,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,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,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,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
|
+
}
|