@rbxts/uiblox 0.1.30 → 0.1.32
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/out/theme/types/types.d.ts +1 -0
- package/out/ui/index.d.ts +4 -0
- package/out/ui/init.luau +2 -0
- package/out/ui/packages/button/components/Button.luau +18 -14
- package/out/ui/packages/divider/components/Divider.luau +7 -3
- package/out/ui/packages/icon/components/Icon.luau +7 -3
- package/out/ui/packages/iconButton/components/IconButton.luau +7 -3
- package/out/ui/packages/index.d.ts +1 -0
- package/out/ui/packages/init.luau +3 -0
- package/out/ui/packages/input/components/Input.luau +18 -14
- package/out/ui/packages/layout/components/Grid.d.ts +13 -0
- package/out/ui/packages/layout/components/Grid.luau +97 -0
- package/out/ui/packages/layout/components/List.d.ts +13 -0
- package/out/ui/packages/layout/components/List.luau +97 -0
- package/out/ui/packages/layout/index.d.ts +6 -0
- package/out/ui/packages/layout/init.luau +12 -0
- package/out/ui/packages/preloader/components/Preloader.luau +14 -10
- package/out/ui/packages/progressBar/components/ProgressBar.d.ts +2 -3
- package/out/ui/packages/progressBar/components/ProgressBar.luau +18 -13
- package/out/ui/packages/sidebar/components/Sidebar.luau +7 -3
- package/out/ui/packages/toast/components/Toast.d.ts +2 -1
- package/out/ui/packages/toast/components/Toast.luau +14 -4
- package/out/ui/packages/treeView/components/TreeView.luau +15 -11
- package/out/ui/packages/typography/components/Typography.luau +7 -3
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ import { WriteableStyle } from "../interfaces/index";
|
|
|
3
3
|
export interface CommonProps<T extends Instance> extends PropsWithChildren {
|
|
4
4
|
className?: WriteableStyle<T>;
|
|
5
5
|
component?: T;
|
|
6
|
+
key?: string;
|
|
6
7
|
}
|
|
7
8
|
export type BaseDefaultProps<T extends Instance, P> = CommonProps<T> & P;
|
|
8
9
|
export type BaseCustomizedProps<T extends Instance, P> = BaseDefaultProps<T, P>;
|
package/out/ui/index.d.ts
CHANGED
|
@@ -14,6 +14,10 @@ export { InputProps } from "./packages/index";
|
|
|
14
14
|
export { InputColor } from "./packages/index";
|
|
15
15
|
export { InputMargin } from "./packages/index";
|
|
16
16
|
export { InputVariant } from "./packages/index";
|
|
17
|
+
export { Grid } from "./packages/index";
|
|
18
|
+
export { GridProps } from "./packages/index";
|
|
19
|
+
export { List } from "./packages/index";
|
|
20
|
+
export { ListProps } from "./packages/index";
|
|
17
21
|
export { Preloader } from "./packages/index";
|
|
18
22
|
export { PreloaderProps } from "./packages/index";
|
|
19
23
|
export { PreloaderAssets as Assets } from "./packages/index";
|
package/out/ui/init.luau
CHANGED
|
@@ -12,6 +12,8 @@ exports.ErrorBoundary = TS.import(script, script, "packages").ErrorBoundary
|
|
|
12
12
|
exports.Icon = TS.import(script, script, "packages").Icon
|
|
13
13
|
exports.IconButton = TS.import(script, script, "packages").IconButton
|
|
14
14
|
exports.Input = TS.import(script, script, "packages").Input
|
|
15
|
+
exports.Grid = TS.import(script, script, "packages").Grid
|
|
16
|
+
exports.List = TS.import(script, script, "packages").List
|
|
15
17
|
exports.Preloader = TS.import(script, script, "packages").Preloader
|
|
16
18
|
exports.ProgressBar = TS.import(script, script, "packages").ProgressBar
|
|
17
19
|
exports.Shadow = TS.import(script, script, "packages").Shadow
|
|
@@ -40,15 +40,19 @@ local function Button(props)
|
|
|
40
40
|
local mouseLeave = _binding.mouseLeave
|
|
41
41
|
local className = _binding.className
|
|
42
42
|
local children = _binding.children
|
|
43
|
+
local key = _binding.key
|
|
43
44
|
local _binding_1 = useButtonStyles(props)
|
|
44
45
|
local root = _binding_1.root
|
|
45
46
|
local font = _binding_1.font
|
|
46
47
|
local corner = _binding_1.corner
|
|
47
48
|
local stroke = _binding_1.stroke
|
|
48
49
|
local hovering, setHovering = useState(false)
|
|
49
|
-
local _attributes = {
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
local _attributes = {}
|
|
51
|
+
local _condition = key
|
|
52
|
+
if not (_condition ~= "" and _condition) then
|
|
53
|
+
_condition = "Button"
|
|
54
|
+
end
|
|
55
|
+
_attributes.key = _condition
|
|
52
56
|
for _k, _v in root do
|
|
53
57
|
_attributes[_k] = _v
|
|
54
58
|
end
|
|
@@ -65,11 +69,11 @@ local function Button(props)
|
|
|
65
69
|
if _result_1 ~= nil then
|
|
66
70
|
_result_1 = _result_1.BackgroundTransparency
|
|
67
71
|
end
|
|
68
|
-
local
|
|
69
|
-
if
|
|
70
|
-
|
|
72
|
+
local _condition_1 = _result_1
|
|
73
|
+
if _condition_1 == nil then
|
|
74
|
+
_condition_1 = (if variant == "outlined" or variant == "text" then 1 else 0)
|
|
71
75
|
end
|
|
72
|
-
_result =
|
|
76
|
+
_result = _condition_1
|
|
73
77
|
end
|
|
74
78
|
_attributes.BackgroundTransparency = _result
|
|
75
79
|
_attributes.Event = {
|
|
@@ -133,19 +137,19 @@ local function Button(props)
|
|
|
133
137
|
_attributes[_k] = _v
|
|
134
138
|
end
|
|
135
139
|
end
|
|
136
|
-
local
|
|
137
|
-
if
|
|
140
|
+
local _condition_1 = variant == "outlined"
|
|
141
|
+
if _condition_1 then
|
|
138
142
|
local _attributes_1 = table.clone(stroke)
|
|
139
143
|
setmetatable(_attributes_1, nil)
|
|
140
|
-
|
|
144
|
+
_condition_1 = React.createElement("uistroke", _attributes_1)
|
|
141
145
|
end
|
|
142
|
-
local
|
|
143
|
-
if
|
|
146
|
+
local _condition_2 = rounded
|
|
147
|
+
if _condition_2 then
|
|
144
148
|
local _attributes_1 = table.clone(corner)
|
|
145
149
|
setmetatable(_attributes_1, nil)
|
|
146
|
-
|
|
150
|
+
_condition_2 = React.createElement("uicorner", _attributes_1)
|
|
147
151
|
end
|
|
148
|
-
return React.createElement("textbutton", _attributes,
|
|
152
|
+
return React.createElement("textbutton", _attributes, _condition_1, _condition_2, children)
|
|
149
153
|
end
|
|
150
154
|
local default = Button
|
|
151
155
|
return {
|
|
@@ -5,11 +5,15 @@ local useDividerStyles = TS.import(script, script.Parent, "Divider.styles").defa
|
|
|
5
5
|
local function Divider(props)
|
|
6
6
|
local _binding = props
|
|
7
7
|
local className = _binding.className
|
|
8
|
+
local key = _binding.key
|
|
8
9
|
local _binding_1 = useDividerStyles(props)
|
|
9
10
|
local root = _binding_1.root
|
|
10
|
-
local _attributes = {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
local _attributes = {}
|
|
12
|
+
local _condition = key
|
|
13
|
+
if not (_condition ~= "" and _condition) then
|
|
14
|
+
_condition = "Divider"
|
|
15
|
+
end
|
|
16
|
+
_attributes.key = _condition
|
|
13
17
|
for _k, _v in root do
|
|
14
18
|
_attributes[_k] = _v
|
|
15
19
|
end
|
|
@@ -7,11 +7,15 @@ local function Icon(props)
|
|
|
7
7
|
local icon = _binding.icon
|
|
8
8
|
local tint = _binding.tint
|
|
9
9
|
local className = _binding.className
|
|
10
|
+
local key = _binding.key
|
|
10
11
|
local _binding_1 = useIconStyles(props)
|
|
11
12
|
local container = _binding_1.container
|
|
12
|
-
local _attributes = {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
local _attributes = {}
|
|
14
|
+
local _condition = key
|
|
15
|
+
if not (_condition ~= "" and _condition) then
|
|
16
|
+
_condition = "Icon"
|
|
17
|
+
end
|
|
18
|
+
_attributes.key = _condition
|
|
15
19
|
for _k, _v in container do
|
|
16
20
|
_attributes[_k] = _v
|
|
17
21
|
end
|
|
@@ -11,12 +11,16 @@ local function IconButton(props)
|
|
|
11
11
|
local tint = _binding.tint
|
|
12
12
|
local onClick = _binding.onClick
|
|
13
13
|
local className = _binding.className
|
|
14
|
+
local key = _binding.key
|
|
14
15
|
local _binding_1 = useIconButtonStyles(props)
|
|
15
16
|
local container = _binding_1.container
|
|
16
17
|
local hovering, setHovering = useState(false)
|
|
17
|
-
local _attributes = {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
local _attributes = {}
|
|
19
|
+
local _condition = key
|
|
20
|
+
if not (_condition ~= "" and _condition) then
|
|
21
|
+
_condition = "IconButton"
|
|
22
|
+
end
|
|
23
|
+
_attributes.key = _condition
|
|
20
24
|
for _k, _v in container do
|
|
21
25
|
_attributes[_k] = _v
|
|
22
26
|
end
|
|
@@ -3,6 +3,7 @@ export * from "./errorBoundary/index";
|
|
|
3
3
|
export * from "./icon/index";
|
|
4
4
|
export * from "./iconButton/index";
|
|
5
5
|
export * from "./input/index";
|
|
6
|
+
export * from "./layout/index";
|
|
6
7
|
export * from "./preloader/index";
|
|
7
8
|
export * from "./progressBar/index";
|
|
8
9
|
export * from "./shadow/index";
|
|
@@ -16,6 +16,9 @@ end
|
|
|
16
16
|
for _k, _v in TS.import(script, script, "input") or {} do
|
|
17
17
|
exports[_k] = _v
|
|
18
18
|
end
|
|
19
|
+
for _k, _v in TS.import(script, script, "layout") or {} do
|
|
20
|
+
exports[_k] = _v
|
|
21
|
+
end
|
|
19
22
|
for _k, _v in TS.import(script, script, "preloader") or {} do
|
|
20
23
|
exports[_k] = _v
|
|
21
24
|
end
|
|
@@ -33,6 +33,7 @@ local function Input(props)
|
|
|
33
33
|
local onBlur = _binding.onBlur
|
|
34
34
|
local onEnterPressed = _binding.onEnterPressed
|
|
35
35
|
local className = _binding.className
|
|
36
|
+
local key = _binding.key
|
|
36
37
|
local _binding_1 = useInputStyles(props)
|
|
37
38
|
local root = _binding_1.root
|
|
38
39
|
local font = _binding_1.font
|
|
@@ -49,9 +50,12 @@ local function Input(props)
|
|
|
49
50
|
_condition = ""
|
|
50
51
|
end
|
|
51
52
|
local input, setInput = useState(_condition)
|
|
52
|
-
local _attributes = {
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
local _attributes = {}
|
|
54
|
+
local _condition_1 = key
|
|
55
|
+
if not (_condition_1 ~= "" and _condition_1) then
|
|
56
|
+
_condition_1 = "Input"
|
|
57
|
+
end
|
|
58
|
+
_attributes.key = _condition_1
|
|
55
59
|
for _k, _v in root do
|
|
56
60
|
_attributes[_k] = _v
|
|
57
61
|
end
|
|
@@ -101,19 +105,19 @@ local function Input(props)
|
|
|
101
105
|
end
|
|
102
106
|
end,
|
|
103
107
|
}
|
|
104
|
-
local
|
|
105
|
-
if
|
|
108
|
+
local _condition_2 = variant == "outlined"
|
|
109
|
+
if _condition_2 then
|
|
106
110
|
local _attributes_3 = table.clone(stroke)
|
|
107
111
|
setmetatable(_attributes_3, nil)
|
|
108
|
-
|
|
112
|
+
_condition_2 = React.createElement("uistroke", _attributes_3)
|
|
109
113
|
end
|
|
110
|
-
local
|
|
111
|
-
if
|
|
114
|
+
local _condition_3 = rounded
|
|
115
|
+
if _condition_3 then
|
|
112
116
|
local _attributes_3 = table.clone(corner)
|
|
113
117
|
setmetatable(_attributes_3, nil)
|
|
114
|
-
|
|
118
|
+
_condition_3 = React.createElement("uicorner", _attributes_3)
|
|
115
119
|
end
|
|
116
|
-
local _exp = React.createElement("textbox", _attributes_2,
|
|
120
|
+
local _exp = React.createElement("textbox", _attributes_2, _condition_2, _condition_3)
|
|
117
121
|
local _exp_1 = React.createElement(Divider, {
|
|
118
122
|
padding = 0,
|
|
119
123
|
orientation = Orientations.Horizontal,
|
|
@@ -122,8 +126,8 @@ local function Input(props)
|
|
|
122
126
|
[divider] = true,
|
|
123
127
|
}),
|
|
124
128
|
})
|
|
125
|
-
local
|
|
126
|
-
if
|
|
129
|
+
local _condition_4 = helperText ~= nil
|
|
130
|
+
if _condition_4 then
|
|
127
131
|
local _attributes_3 = {
|
|
128
132
|
key = "HelperText",
|
|
129
133
|
}
|
|
@@ -139,9 +143,9 @@ local function Input(props)
|
|
|
139
143
|
_attributes_3[_k] = _v
|
|
140
144
|
end
|
|
141
145
|
_attributes_3.Text = helperText
|
|
142
|
-
|
|
146
|
+
_condition_4 = (React.createElement("textlabel", _attributes_3))
|
|
143
147
|
end
|
|
144
|
-
return React.createElement("frame", _attributes, React.createElement("frame", _attributes_1, _exp, _exp_1,
|
|
148
|
+
return React.createElement("frame", _attributes, React.createElement("frame", _attributes_1, _exp, _exp_1, _condition_4))
|
|
145
149
|
end
|
|
146
150
|
local default = Input
|
|
147
151
|
return {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
export interface GridProps {
|
|
3
|
+
cellPadding?: UDim;
|
|
4
|
+
cellSize?: UDim2;
|
|
5
|
+
fillDirection?: Enum.FillDirection;
|
|
6
|
+
fillDirectionMaxCells?: number;
|
|
7
|
+
sortOrder?: Enum.SortOrder;
|
|
8
|
+
startCorner: Enum.StartCorner;
|
|
9
|
+
horizontalAlignment?: Enum.HorizontalAlignment;
|
|
10
|
+
veritcalAlignment?: Enum.VerticalAlignment;
|
|
11
|
+
}
|
|
12
|
+
declare function Grid(props: CustomizedProps<Frame, GridProps>): JSX.Element;
|
|
13
|
+
export default Grid;
|
|
@@ -0,0 +1,97 @@
|
|
|
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 _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
5
|
+
local makeStyles = _theme.makeStyles
|
|
6
|
+
local createStyles = _theme.createStyles
|
|
7
|
+
local useGridStyles = makeStyles(function(_, props)
|
|
8
|
+
return createStyles({
|
|
9
|
+
baseGrid = {
|
|
10
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
11
|
+
Size = UDim2.fromScale(0, 0),
|
|
12
|
+
BackgroundTransparency = 0,
|
|
13
|
+
BorderSizePixel = 0,
|
|
14
|
+
},
|
|
15
|
+
baseLayout = {
|
|
16
|
+
CellPadding = props.cellPadding,
|
|
17
|
+
CellSize = props.cellSize,
|
|
18
|
+
FillDirection = props.fillDirection,
|
|
19
|
+
FillDirectionMaxCells = props.fillDirectionMaxCells,
|
|
20
|
+
SortOrder = props.sortOrder,
|
|
21
|
+
StartCorner = props.startCorner,
|
|
22
|
+
HorizontalAlignment = props.horizontalAlignment,
|
|
23
|
+
VerticalAlignment = props.veritcalAlignment,
|
|
24
|
+
},
|
|
25
|
+
})
|
|
26
|
+
end)
|
|
27
|
+
local function Grid(props)
|
|
28
|
+
local _binding = props
|
|
29
|
+
local cellPadding = _binding.cellPadding
|
|
30
|
+
if cellPadding == nil then
|
|
31
|
+
cellPadding = UDim.new(0, 0)
|
|
32
|
+
end
|
|
33
|
+
local cellSize = _binding.cellSize
|
|
34
|
+
if cellSize == nil then
|
|
35
|
+
cellSize = UDim2.fromOffset(100, 100)
|
|
36
|
+
end
|
|
37
|
+
local fillDirection = _binding.fillDirection
|
|
38
|
+
if fillDirection == nil then
|
|
39
|
+
fillDirection = Enum.FillDirection.Horizontal
|
|
40
|
+
end
|
|
41
|
+
local fillDirectionMaxCells = _binding.fillDirectionMaxCells
|
|
42
|
+
if fillDirectionMaxCells == nil then
|
|
43
|
+
fillDirectionMaxCells = 0
|
|
44
|
+
end
|
|
45
|
+
local sortOrder = _binding.sortOrder
|
|
46
|
+
if sortOrder == nil then
|
|
47
|
+
sortOrder = Enum.SortOrder.LayoutOrder
|
|
48
|
+
end
|
|
49
|
+
local startCorner = _binding.startCorner
|
|
50
|
+
if startCorner == nil then
|
|
51
|
+
startCorner = Enum.StartCorner.TopLeft
|
|
52
|
+
end
|
|
53
|
+
local horizontalAlignment = _binding.horizontalAlignment
|
|
54
|
+
if horizontalAlignment == nil then
|
|
55
|
+
horizontalAlignment = Enum.HorizontalAlignment.Left
|
|
56
|
+
end
|
|
57
|
+
local veritcalAlignment = _binding.veritcalAlignment
|
|
58
|
+
if veritcalAlignment == nil then
|
|
59
|
+
veritcalAlignment = Enum.VerticalAlignment.Top
|
|
60
|
+
end
|
|
61
|
+
local className = _binding.className
|
|
62
|
+
local children = _binding.children
|
|
63
|
+
local key = _binding.key
|
|
64
|
+
local _binding_1 = useGridStyles({
|
|
65
|
+
cellPadding = cellPadding,
|
|
66
|
+
cellSize = cellSize,
|
|
67
|
+
fillDirection = fillDirection,
|
|
68
|
+
fillDirectionMaxCells = fillDirectionMaxCells,
|
|
69
|
+
sortOrder = sortOrder,
|
|
70
|
+
startCorner = startCorner,
|
|
71
|
+
horizontalAlignment = horizontalAlignment,
|
|
72
|
+
veritcalAlignment = veritcalAlignment,
|
|
73
|
+
})
|
|
74
|
+
local baseGrid = _binding_1.baseGrid
|
|
75
|
+
local baseLayout = _binding_1.baseLayout
|
|
76
|
+
local _attributes = {}
|
|
77
|
+
local _condition = key
|
|
78
|
+
if not (_condition ~= "" and _condition) then
|
|
79
|
+
_condition = "Grid"
|
|
80
|
+
end
|
|
81
|
+
_attributes.key = _condition
|
|
82
|
+
for _k, _v in baseGrid do
|
|
83
|
+
_attributes[_k] = _v
|
|
84
|
+
end
|
|
85
|
+
if className then
|
|
86
|
+
for _k, _v in className do
|
|
87
|
+
_attributes[_k] = _v
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
local _attributes_1 = table.clone(baseLayout)
|
|
91
|
+
setmetatable(_attributes_1, nil)
|
|
92
|
+
return React.createElement("frame", _attributes, React.createElement("uigridlayout", _attributes_1), children)
|
|
93
|
+
end
|
|
94
|
+
local default = Grid
|
|
95
|
+
return {
|
|
96
|
+
default = default,
|
|
97
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
export interface ListProps {
|
|
3
|
+
padding?: UDim;
|
|
4
|
+
fillDirection?: Enum.FillDirection;
|
|
5
|
+
sortOrder?: Enum.SortOrder;
|
|
6
|
+
wrap?: "wrap" | "no-wrap";
|
|
7
|
+
horizontalAlignment?: Enum.HorizontalAlignment;
|
|
8
|
+
horizontalFlex?: Enum.UIFlexAlignment;
|
|
9
|
+
veritcalAlignment?: Enum.VerticalAlignment;
|
|
10
|
+
verticalFlex?: Enum.UIFlexAlignment;
|
|
11
|
+
}
|
|
12
|
+
declare function List(props: CustomizedProps<Frame, ListProps>): JSX.Element;
|
|
13
|
+
export default List;
|
|
@@ -0,0 +1,97 @@
|
|
|
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 _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
5
|
+
local makeStyles = _theme.makeStyles
|
|
6
|
+
local createStyles = _theme.createStyles
|
|
7
|
+
local useListStyles = makeStyles(function(_, props)
|
|
8
|
+
return createStyles({
|
|
9
|
+
baseList = {
|
|
10
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
11
|
+
Size = UDim2.fromScale(0, 0),
|
|
12
|
+
BackgroundTransparency = 0,
|
|
13
|
+
BorderSizePixel = 0,
|
|
14
|
+
},
|
|
15
|
+
baseLayout = {
|
|
16
|
+
Padding = props.padding,
|
|
17
|
+
FillDirection = props.fillDirection,
|
|
18
|
+
SortOrder = props.sortOrder,
|
|
19
|
+
Wraps = props.wrap == "wrap",
|
|
20
|
+
HorizontalAlignment = props.horizontalAlignment,
|
|
21
|
+
HorizontalFlex = props.horizontalFlex,
|
|
22
|
+
VerticalAlignment = props.veritcalAlignment,
|
|
23
|
+
VerticalFlex = props.verticalFlex,
|
|
24
|
+
},
|
|
25
|
+
})
|
|
26
|
+
end)
|
|
27
|
+
local function List(props)
|
|
28
|
+
local _binding = props
|
|
29
|
+
local padding = _binding.padding
|
|
30
|
+
if padding == nil then
|
|
31
|
+
padding = UDim.new(0, 0)
|
|
32
|
+
end
|
|
33
|
+
local fillDirection = _binding.fillDirection
|
|
34
|
+
if fillDirection == nil then
|
|
35
|
+
fillDirection = Enum.FillDirection.Horizontal
|
|
36
|
+
end
|
|
37
|
+
local sortOrder = _binding.sortOrder
|
|
38
|
+
if sortOrder == nil then
|
|
39
|
+
sortOrder = Enum.SortOrder.LayoutOrder
|
|
40
|
+
end
|
|
41
|
+
local wrap = _binding.wrap
|
|
42
|
+
if wrap == nil then
|
|
43
|
+
wrap = "wrap"
|
|
44
|
+
end
|
|
45
|
+
local horizontalAlignment = _binding.horizontalAlignment
|
|
46
|
+
if horizontalAlignment == nil then
|
|
47
|
+
horizontalAlignment = Enum.HorizontalAlignment.Left
|
|
48
|
+
end
|
|
49
|
+
local horizontalFlex = _binding.horizontalFlex
|
|
50
|
+
if horizontalFlex == nil then
|
|
51
|
+
horizontalFlex = Enum.UIFlexAlignment.None
|
|
52
|
+
end
|
|
53
|
+
local veritcalAlignment = _binding.veritcalAlignment
|
|
54
|
+
if veritcalAlignment == nil then
|
|
55
|
+
veritcalAlignment = Enum.VerticalAlignment.Top
|
|
56
|
+
end
|
|
57
|
+
local verticalFlex = _binding.verticalFlex
|
|
58
|
+
if verticalFlex == nil then
|
|
59
|
+
verticalFlex = Enum.UIFlexAlignment.None
|
|
60
|
+
end
|
|
61
|
+
local className = _binding.className
|
|
62
|
+
local children = _binding.children
|
|
63
|
+
local key = _binding.key
|
|
64
|
+
local _binding_1 = useListStyles({
|
|
65
|
+
padding = padding,
|
|
66
|
+
fillDirection = fillDirection,
|
|
67
|
+
sortOrder = sortOrder,
|
|
68
|
+
wrap = wrap,
|
|
69
|
+
horizontalAlignment = horizontalAlignment,
|
|
70
|
+
horizontalFlex = horizontalFlex,
|
|
71
|
+
veritcalAlignment = veritcalAlignment,
|
|
72
|
+
verticalFlex = verticalFlex,
|
|
73
|
+
})
|
|
74
|
+
local baseList = _binding_1.baseList
|
|
75
|
+
local baseLayout = _binding_1.baseLayout
|
|
76
|
+
local _attributes = {}
|
|
77
|
+
local _condition = key
|
|
78
|
+
if not (_condition ~= "" and _condition) then
|
|
79
|
+
_condition = "List"
|
|
80
|
+
end
|
|
81
|
+
_attributes.key = _condition
|
|
82
|
+
for _k, _v in baseList do
|
|
83
|
+
_attributes[_k] = _v
|
|
84
|
+
end
|
|
85
|
+
if className then
|
|
86
|
+
for _k, _v in className do
|
|
87
|
+
_attributes[_k] = _v
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
local _attributes_1 = table.clone(baseLayout)
|
|
91
|
+
setmetatable(_attributes_1, nil)
|
|
92
|
+
return React.createElement("frame", _attributes, React.createElement("uilistlayout", _attributes_1), children)
|
|
93
|
+
end
|
|
94
|
+
local default = List
|
|
95
|
+
return {
|
|
96
|
+
default = default,
|
|
97
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as Grid } from "./components/Grid";
|
|
2
|
+
export { GridProps } from "./components/Grid";
|
|
3
|
+
export * from "./components/Grid";
|
|
4
|
+
export { default as List } from "./components/List";
|
|
5
|
+
export { ListProps } from "./components/List";
|
|
6
|
+
export * from "./components/List";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local exports = {}
|
|
4
|
+
exports.Grid = TS.import(script, script, "components", "Grid").default
|
|
5
|
+
for _k, _v in TS.import(script, script, "components", "Grid") or {} do
|
|
6
|
+
exports[_k] = _v
|
|
7
|
+
end
|
|
8
|
+
exports.List = TS.import(script, script, "components", "List").default
|
|
9
|
+
for _k, _v in TS.import(script, script, "components", "List") or {} do
|
|
10
|
+
exports[_k] = _v
|
|
11
|
+
end
|
|
12
|
+
return exports
|
|
@@ -34,6 +34,7 @@ local function Preloader(props)
|
|
|
34
34
|
local Adornment = _binding.adornment
|
|
35
35
|
local className = _binding.className
|
|
36
36
|
local children = _binding.children
|
|
37
|
+
local key = _binding.key
|
|
37
38
|
local percentage, setPercentage = useState(0)
|
|
38
39
|
local loaded, setLoaded = useState(false)
|
|
39
40
|
local _binding_1 = usePreloaderStyles(props)
|
|
@@ -100,9 +101,12 @@ local function Preloader(props)
|
|
|
100
101
|
children = children,
|
|
101
102
|
})
|
|
102
103
|
else
|
|
103
|
-
local _attributes = {
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
local _attributes = {}
|
|
105
|
+
local _condition = key
|
|
106
|
+
if not (_condition ~= "" and _condition) then
|
|
107
|
+
_condition = "Preloader"
|
|
108
|
+
end
|
|
109
|
+
_attributes.key = _condition
|
|
106
110
|
for _k, _v in container do
|
|
107
111
|
_attributes[_k] = _v
|
|
108
112
|
end
|
|
@@ -114,23 +118,23 @@ local function Preloader(props)
|
|
|
114
118
|
local _exp = Adornment ~= nil and React.createElement(Adornment, {
|
|
115
119
|
progress = percentage,
|
|
116
120
|
})
|
|
117
|
-
local
|
|
118
|
-
if
|
|
121
|
+
local _condition_1 = icon ~= nil
|
|
122
|
+
if _condition_1 then
|
|
119
123
|
local _attributes_1 = table.clone(logo)
|
|
120
124
|
setmetatable(_attributes_1, nil)
|
|
121
|
-
|
|
125
|
+
_condition_1 = React.createElement("imagelabel", _attributes_1)
|
|
122
126
|
end
|
|
123
|
-
local
|
|
124
|
-
if
|
|
127
|
+
local _condition_2 = not hideProgressBar
|
|
128
|
+
if _condition_2 then
|
|
125
129
|
local _attributes_1 = table.clone(label)
|
|
126
130
|
setmetatable(_attributes_1, nil)
|
|
127
131
|
_attributes_1.Text = `Loading {if currentAsset ~= nil then currentAsset else "resources"}... {percentageStr}`
|
|
128
|
-
|
|
132
|
+
_condition_2 = (React.createElement(React.Fragment, nil, React.createElement("textlabel", _attributes_1), React.createElement(ProgressBar, {
|
|
129
133
|
className = progressBar,
|
|
130
134
|
progress = percentage,
|
|
131
135
|
})))
|
|
132
136
|
end
|
|
133
|
-
_result = (React.createElement("frame", _attributes, _exp,
|
|
137
|
+
_result = (React.createElement("frame", _attributes, _exp, _condition_1, _condition_2))
|
|
134
138
|
end
|
|
135
139
|
return React.createElement(React.Fragment, nil, _result)
|
|
136
140
|
end
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
2
|
export interface ProgressBarProps {
|
|
3
3
|
progress: number;
|
|
4
|
-
className?: WriteableStyle<Frame>;
|
|
5
4
|
}
|
|
6
|
-
declare function ProgressBar(
|
|
5
|
+
declare function ProgressBar(props: CustomizedProps<Frame, ProgressBarProps>): JSX.Element;
|
|
7
6
|
export default ProgressBar;
|
|
@@ -2,19 +2,24 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local useProgressBarStyles = TS.import(script, script.Parent, "ProgressBar.styles").default
|
|
5
|
-
local function ProgressBar(
|
|
6
|
-
local
|
|
7
|
-
local
|
|
8
|
-
local
|
|
9
|
-
local
|
|
10
|
-
local
|
|
11
|
-
local
|
|
12
|
-
local
|
|
13
|
-
local
|
|
14
|
-
local
|
|
15
|
-
local
|
|
16
|
-
|
|
17
|
-
}
|
|
5
|
+
local function ProgressBar(props)
|
|
6
|
+
local _binding = props
|
|
7
|
+
local progress = _binding.progress
|
|
8
|
+
local className = _binding.className
|
|
9
|
+
local key = _binding.key
|
|
10
|
+
local _binding_1 = useProgressBarStyles()
|
|
11
|
+
local container = _binding_1.container
|
|
12
|
+
local outer = _binding_1.outer
|
|
13
|
+
local stroke = _binding_1.stroke
|
|
14
|
+
local inner = _binding_1.inner
|
|
15
|
+
local fill = _binding_1.fill
|
|
16
|
+
local corner = _binding_1.corner
|
|
17
|
+
local _attributes = {}
|
|
18
|
+
local _condition = key
|
|
19
|
+
if not (_condition ~= "" and _condition) then
|
|
20
|
+
_condition = "ProgressBar"
|
|
21
|
+
end
|
|
22
|
+
_attributes.key = _condition
|
|
18
23
|
for _k, _v in container do
|
|
19
24
|
_attributes[_k] = _v
|
|
20
25
|
end
|
|
@@ -6,12 +6,16 @@ local function Sidebar(props)
|
|
|
6
6
|
local _binding = props
|
|
7
7
|
local className = _binding.className
|
|
8
8
|
local children = _binding.children
|
|
9
|
+
local key = _binding.key
|
|
9
10
|
local _binding_1 = useSidebarStyles(props)
|
|
10
11
|
local root = _binding_1.root
|
|
11
12
|
local container = _binding_1.container
|
|
12
|
-
local _attributes = {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
local _attributes = {}
|
|
14
|
+
local _condition = key
|
|
15
|
+
if not (_condition ~= "" and _condition) then
|
|
16
|
+
_condition = "Sidebar"
|
|
17
|
+
end
|
|
18
|
+
_attributes.key = _condition
|
|
15
19
|
for _k, _v in root do
|
|
16
20
|
_attributes[_k] = _v
|
|
17
21
|
end
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
1
2
|
import ToastVariants from "../enums/ToastVariants";
|
|
2
3
|
export interface ToastProps {
|
|
3
4
|
text: string;
|
|
@@ -6,5 +7,5 @@ export interface ToastProps {
|
|
|
6
7
|
variant?: ToastVariants;
|
|
7
8
|
toggledAt?: number;
|
|
8
9
|
}
|
|
9
|
-
declare function Toast(props: ToastProps): JSX.Element;
|
|
10
|
+
declare function Toast(props: CustomizedProps<Frame, ToastProps>): JSX.Element;
|
|
10
11
|
export default Toast;
|
|
@@ -18,6 +18,8 @@ local function Toast(props)
|
|
|
18
18
|
if duration == nil then
|
|
19
19
|
duration = 4
|
|
20
20
|
end
|
|
21
|
+
local className = _binding.className
|
|
22
|
+
local key = _binding.key
|
|
21
23
|
local _binding_1 = useToastStyles(props)
|
|
22
24
|
local container = _binding_1.container
|
|
23
25
|
local label = _binding_1.label
|
|
@@ -53,13 +55,21 @@ local function Toast(props)
|
|
|
53
55
|
onDismiss()
|
|
54
56
|
end
|
|
55
57
|
end, {})
|
|
56
|
-
local _attributes = {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
local _attributes = {}
|
|
59
|
+
local _condition = key
|
|
60
|
+
if not (_condition ~= "" and _condition) then
|
|
61
|
+
_condition = "Toast"
|
|
62
|
+
end
|
|
63
|
+
_attributes.key = _condition
|
|
64
|
+
_attributes.ref = frameRef
|
|
60
65
|
for _k, _v in container do
|
|
61
66
|
_attributes[_k] = _v
|
|
62
67
|
end
|
|
68
|
+
if className then
|
|
69
|
+
for _k, _v in className do
|
|
70
|
+
_attributes[_k] = _v
|
|
71
|
+
end
|
|
72
|
+
end
|
|
63
73
|
local _exp = React.createElement("uicorner", {
|
|
64
74
|
key = "Corner",
|
|
65
75
|
CornerRadius = UDim.new(0, DefaultTheme.shape.borderRadius),
|
|
@@ -16,6 +16,7 @@ local function TreeView(props)
|
|
|
16
16
|
local icon = _binding.icon
|
|
17
17
|
local filter = _binding.filter
|
|
18
18
|
local className = _binding.className
|
|
19
|
+
local key = _binding.key
|
|
19
20
|
local _binding_1 = useTreeViewStyles()
|
|
20
21
|
local root = _binding_1.root
|
|
21
22
|
local header = _binding_1.header
|
|
@@ -133,9 +134,12 @@ local function TreeView(props)
|
|
|
133
134
|
-- Set expanded to new array
|
|
134
135
|
setExpanded(newExpanded)
|
|
135
136
|
end, { tree, filter })
|
|
136
|
-
local _attributes = {
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
local _attributes = {}
|
|
138
|
+
local _condition = key
|
|
139
|
+
if not (_condition ~= "" and _condition) then
|
|
140
|
+
_condition = "TreeView"
|
|
141
|
+
end
|
|
142
|
+
_attributes.key = _condition
|
|
139
143
|
for _k, _v in root do
|
|
140
144
|
_attributes[_k] = _v
|
|
141
145
|
end
|
|
@@ -234,15 +238,15 @@ local function TreeView(props)
|
|
|
234
238
|
end
|
|
235
239
|
end,
|
|
236
240
|
}
|
|
237
|
-
local
|
|
238
|
-
if
|
|
241
|
+
local _condition_1 = #branch.leaves > 0
|
|
242
|
+
if _condition_1 then
|
|
239
243
|
local _attributes_5 = {}
|
|
240
244
|
local _branch = branch
|
|
241
245
|
_attributes_5.icon = if table.find(expanded, _branch) ~= nil then Icons.Expanded else Icons.Collapsed
|
|
242
246
|
_attributes_5.size = "xxs"
|
|
243
247
|
_attributes_5.className = branchIcon
|
|
244
248
|
_attributes_5.tint = DefaultTheme.options.constants.extendedPalette.Gray[70]
|
|
245
|
-
|
|
249
|
+
_condition_1 = (React.createElement(Icon, _attributes_5))
|
|
246
250
|
end
|
|
247
251
|
local _attributes_5 = {
|
|
248
252
|
text = branch.title,
|
|
@@ -253,10 +257,10 @@ local function TreeView(props)
|
|
|
253
257
|
_attributes_5.color = "textPrimary"
|
|
254
258
|
_attributes_5.variant = "body"
|
|
255
259
|
_attributes_5.family = if selectedBranch == branch then "bold" else "default"
|
|
256
|
-
local _exp_3 = React.createElement("textbutton", _attributes_4,
|
|
260
|
+
local _exp_3 = React.createElement("textbutton", _attributes_4, _condition_1, React.createElement(Typography, _attributes_5))
|
|
257
261
|
local _branch = branch
|
|
258
|
-
local
|
|
259
|
-
if
|
|
262
|
+
local _condition_2 = table.find(expanded, _branch) ~= nil
|
|
263
|
+
if _condition_2 then
|
|
260
264
|
local _exp_4 = branch.leaves
|
|
261
265
|
-- ▼ ReadonlyArray.map ▼
|
|
262
266
|
local _newValue_1 = table.create(#_exp_4)
|
|
@@ -302,9 +306,9 @@ local function TreeView(props)
|
|
|
302
306
|
_newValue_1[_k] = _callback_1(_v, _k - 1, _exp_4)
|
|
303
307
|
end
|
|
304
308
|
-- ▲ ReadonlyArray.map ▲
|
|
305
|
-
|
|
309
|
+
_condition_2 = _newValue_1
|
|
306
310
|
end
|
|
307
|
-
return React.createElement(React.Fragment, nil, _exp_3,
|
|
311
|
+
return React.createElement(React.Fragment, nil, _exp_3, _condition_2)
|
|
308
312
|
else
|
|
309
313
|
return React.createElement(React.Fragment)
|
|
310
314
|
end
|
|
@@ -10,12 +10,16 @@ local function Typography(props)
|
|
|
10
10
|
end
|
|
11
11
|
local className = _binding.className
|
|
12
12
|
local children = _binding.children
|
|
13
|
+
local key = _binding.key
|
|
13
14
|
local _binding_1 = useTypographyStyles(props)
|
|
14
15
|
local root = _binding_1.root
|
|
15
16
|
local variantToken = _binding_1.variantToken
|
|
16
|
-
local _attributes = {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
local _attributes = {}
|
|
18
|
+
local _condition = key
|
|
19
|
+
if not (_condition ~= "" and _condition) then
|
|
20
|
+
_condition = "Typography"
|
|
21
|
+
end
|
|
22
|
+
_attributes.key = _condition
|
|
19
23
|
for _k, _v in root do
|
|
20
24
|
_attributes[_k] = _v
|
|
21
25
|
end
|