@rbxts/uiblox 0.1.30 → 0.1.31
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/index.d.ts +1 -0
- package/out/ui/packages/init.luau +3 -0
- package/out/ui/packages/layout/components/Grid.d.ts +13 -0
- package/out/ui/packages/layout/components/Grid.luau +93 -0
- package/out/ui/packages/layout/components/List.d.ts +13 -0
- package/out/ui/packages/layout/components/List.luau +89 -0
- package/out/ui/packages/layout/index.d.ts +6 -0
- package/out/ui/packages/layout/init.luau +12 -0
- 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
|
|
@@ -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
|
|
@@ -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,93 @@
|
|
|
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 _binding_1 = useGridStyles({
|
|
64
|
+
cellPadding = cellPadding,
|
|
65
|
+
cellSize = cellSize,
|
|
66
|
+
fillDirection = fillDirection,
|
|
67
|
+
fillDirectionMaxCells = fillDirectionMaxCells,
|
|
68
|
+
sortOrder = sortOrder,
|
|
69
|
+
startCorner = startCorner,
|
|
70
|
+
horizontalAlignment = horizontalAlignment,
|
|
71
|
+
veritcalAlignment = veritcalAlignment,
|
|
72
|
+
})
|
|
73
|
+
local baseGrid = _binding_1.baseGrid
|
|
74
|
+
local baseLayout = _binding_1.baseLayout
|
|
75
|
+
local _attributes = {
|
|
76
|
+
key = "grid",
|
|
77
|
+
}
|
|
78
|
+
for _k, _v in baseGrid do
|
|
79
|
+
_attributes[_k] = _v
|
|
80
|
+
end
|
|
81
|
+
if className then
|
|
82
|
+
for _k, _v in className do
|
|
83
|
+
_attributes[_k] = _v
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
local _attributes_1 = table.clone(baseLayout)
|
|
87
|
+
setmetatable(_attributes_1, nil)
|
|
88
|
+
return React.createElement("frame", _attributes, React.createElement("uigridlayout", _attributes_1), children)
|
|
89
|
+
end
|
|
90
|
+
local default = Grid
|
|
91
|
+
return {
|
|
92
|
+
default = default,
|
|
93
|
+
}
|
|
@@ -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,89 @@
|
|
|
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 _binding_1 = useListStyles({
|
|
64
|
+
padding = padding,
|
|
65
|
+
fillDirection = fillDirection,
|
|
66
|
+
sortOrder = sortOrder,
|
|
67
|
+
wrap = wrap,
|
|
68
|
+
horizontalAlignment = horizontalAlignment,
|
|
69
|
+
horizontalFlex = horizontalFlex,
|
|
70
|
+
veritcalAlignment = veritcalAlignment,
|
|
71
|
+
verticalFlex = verticalFlex,
|
|
72
|
+
})
|
|
73
|
+
local baseList = _binding_1.baseList
|
|
74
|
+
local baseLayout = _binding_1.baseLayout
|
|
75
|
+
local _attributes = table.clone(baseList)
|
|
76
|
+
setmetatable(_attributes, nil)
|
|
77
|
+
if className then
|
|
78
|
+
for _k, _v in className do
|
|
79
|
+
_attributes[_k] = _v
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
local _attributes_1 = table.clone(baseLayout)
|
|
83
|
+
setmetatable(_attributes_1, nil)
|
|
84
|
+
return React.createElement("frame", _attributes, React.createElement("uilistlayout", _attributes_1), children)
|
|
85
|
+
end
|
|
86
|
+
local default = List
|
|
87
|
+
return {
|
|
88
|
+
default = default,
|
|
89
|
+
}
|
|
@@ -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
|