@rbxts/uiblox 0.2.0-alpha.5 → 0.2.0-alpha.6
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/ui/packages/alert/components/Alert.luau +34 -27
- package/out/ui/packages/alert/components/Alert.styles.d.ts +1 -0
- package/out/ui/packages/alert/components/Alert.styles.luau +10 -2
- package/out/ui/packages/checkbox/components/checkboxLook.d.ts +1 -1
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +13 -2
- package/out/ui/packages/imageList/components/ImageList.d.ts +14 -0
- package/out/ui/packages/imageList/components/ImageList.luau +84 -0
- package/out/ui/packages/imageList/components/ImageList.styles.d.ts +6 -0
- package/out/ui/packages/imageList/components/ImageList.styles.luau +54 -0
- package/out/ui/packages/imageList/components/imageListLayout.d.ts +3 -0
- package/out/ui/packages/imageList/components/imageListLayout.luau +24 -0
- package/out/ui/packages/imageList/index.d.ts +2 -0
- package/out/ui/packages/imageList/init.luau +5 -0
- package/out/ui/packages/index.d.ts +1 -0
- package/out/ui/packages/init.luau +3 -0
- package/out/ui/packages/layout/components/Box.d.ts +11 -0
- package/out/ui/packages/layout/components/Box.luau +49 -0
- package/out/ui/packages/layout/components/Box.styles.d.ts +7 -0
- package/out/ui/packages/layout/components/Box.styles.luau +34 -0
- package/out/ui/packages/layout/components/boxPad.d.ts +14 -0
- package/out/ui/packages/layout/components/boxPad.luau +59 -0
- package/out/ui/packages/layout/index.d.ts +4 -0
- package/out/ui/packages/layout/init.luau +1 -0
- package/out/ui/packages/motion/index.d.ts +1 -1
- package/out/ui/packages/motion/init.luau +1 -0
- package/out/ui/packages/motion/unit.d.ts +5 -0
- package/out/ui/packages/motion/unit.luau +23 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.d.ts +1 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +4 -2
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.d.ts +1 -0
- package/out/ui/packages/radioGroup/components/RadioGroup.styles.luau +4 -1
- package/out/ui/packages/skeleton/components/Skeleton.styles.luau +7 -3
- package/out/ui/packages/skeleton/components/skeletonTone.d.ts +20 -0
- package/out/ui/packages/skeleton/components/skeletonTone.luau +14 -0
- package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
- package/out/ui/packages/stateMatrix.d.ts +1 -0
- package/out/ui/packages/stateMatrix.luau +73 -33
- package/out/ui/packages/switch/components/switchLook.d.ts +1 -1
- package/package.json +2 -2
|
@@ -13,8 +13,10 @@ local function Alert(props)
|
|
|
13
13
|
local sx = _binding.sx
|
|
14
14
|
local id = _binding.id
|
|
15
15
|
local ref = _binding.ref
|
|
16
|
+
local dismissible = onClose ~= nil
|
|
16
17
|
local styles = useAlertStyles({
|
|
17
18
|
severity = severity,
|
|
19
|
+
dismissible = dismissible,
|
|
18
20
|
})
|
|
19
21
|
local _attributes = {}
|
|
20
22
|
local _condition = id
|
|
@@ -45,45 +47,50 @@ local function Alert(props)
|
|
|
45
47
|
local _attributes_3 = table.clone(styles.stroke)
|
|
46
48
|
setmetatable(_attributes_3, nil)
|
|
47
49
|
local _exp_2 = React.createElement("uistroke", _attributes_3)
|
|
48
|
-
local
|
|
49
|
-
setmetatable(_attributes_4, nil)
|
|
50
|
-
local _exp_3 = React.createElement("uilistlayout", _attributes_4)
|
|
51
|
-
local _condition_1 = title ~= nil and title ~= ""
|
|
50
|
+
local _condition_1 = dismissible
|
|
52
51
|
if _condition_1 then
|
|
53
|
-
local
|
|
54
|
-
key = "
|
|
52
|
+
local _attributes_4 = {
|
|
53
|
+
key = "Close",
|
|
55
54
|
}
|
|
56
|
-
for _k, _v in styles.
|
|
57
|
-
|
|
55
|
+
for _k, _v in styles.close do
|
|
56
|
+
_attributes_4[_k] = _v
|
|
58
57
|
end
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
_attributes_4.Image = tostring(Icons.Close)
|
|
59
|
+
_attributes_4.Event = {
|
|
60
|
+
Activated = function()
|
|
61
|
+
return onClose()
|
|
62
|
+
end,
|
|
63
|
+
}
|
|
64
|
+
_condition_1 = (React.createElement("imagebutton", _attributes_4))
|
|
61
65
|
end
|
|
62
|
-
local
|
|
63
|
-
key = "
|
|
66
|
+
local _attributes_4 = {
|
|
67
|
+
key = "Body",
|
|
64
68
|
}
|
|
65
|
-
for _k, _v in styles.
|
|
66
|
-
|
|
69
|
+
for _k, _v in styles.body do
|
|
70
|
+
_attributes_4[_k] = _v
|
|
67
71
|
end
|
|
68
|
-
_attributes_5
|
|
69
|
-
|
|
70
|
-
local
|
|
72
|
+
local _attributes_5 = table.clone(styles.layout)
|
|
73
|
+
setmetatable(_attributes_5, nil)
|
|
74
|
+
local _exp_3 = React.createElement("uilistlayout", _attributes_5)
|
|
75
|
+
local _condition_2 = title ~= nil and title ~= ""
|
|
71
76
|
if _condition_2 then
|
|
72
77
|
local _attributes_6 = {
|
|
73
|
-
key = "
|
|
78
|
+
key = "Title",
|
|
74
79
|
}
|
|
75
|
-
for _k, _v in styles.
|
|
80
|
+
for _k, _v in styles.title do
|
|
76
81
|
_attributes_6[_k] = _v
|
|
77
82
|
end
|
|
78
|
-
_attributes_6.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
_attributes_6.Text = title
|
|
84
|
+
_condition_2 = React.createElement("textlabel", _attributes_6)
|
|
85
|
+
end
|
|
86
|
+
local _attributes_6 = {
|
|
87
|
+
key = "Message",
|
|
88
|
+
}
|
|
89
|
+
for _k, _v in styles.message do
|
|
90
|
+
_attributes_6[_k] = _v
|
|
85
91
|
end
|
|
86
|
-
|
|
92
|
+
_attributes_6.Text = message
|
|
93
|
+
return React.createElement("frame", _attributes, _exp, _exp_1, _exp_2, _condition_1, React.createElement("frame", _attributes_4, _exp_3, _condition_2, React.createElement("textlabel", _attributes_6)))
|
|
87
94
|
end
|
|
88
95
|
local default = Alert
|
|
89
96
|
return {
|
|
@@ -6,7 +6,9 @@ local createStyles = _theme.createStyles
|
|
|
6
6
|
local alertSeverity = TS.import(script, script.Parent, "alertTone").alertSeverity
|
|
7
7
|
local useAlertStyles = componentStyles("Alert", function(theme, _param)
|
|
8
8
|
local severity = _param.severity
|
|
9
|
+
local dismissible = _param.dismissible
|
|
9
10
|
local tone = theme.palette.status[alertSeverity(severity)]
|
|
11
|
+
local closeSize = theme.spacing.calc(2)
|
|
10
12
|
local _object = {
|
|
11
13
|
root = {
|
|
12
14
|
AutomaticSize = Enum.AutomaticSize.Y,
|
|
@@ -29,6 +31,12 @@ local useAlertStyles = componentStyles("Alert", function(theme, _param)
|
|
|
29
31
|
Transparency = 0,
|
|
30
32
|
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
|
|
31
33
|
},
|
|
34
|
+
body = {
|
|
35
|
+
AutomaticSize = Enum.AutomaticSize.Y,
|
|
36
|
+
Size = UDim2.new(1, if dismissible == true then -(closeSize + theme.padding.calc(1)) else 0, 0, 0),
|
|
37
|
+
BackgroundTransparency = 1,
|
|
38
|
+
BorderSizePixel = 0,
|
|
39
|
+
},
|
|
32
40
|
layout = {
|
|
33
41
|
FillDirection = Enum.FillDirection.Vertical,
|
|
34
42
|
HorizontalAlignment = Enum.HorizontalAlignment.Left,
|
|
@@ -68,8 +76,8 @@ local useAlertStyles = componentStyles("Alert", function(theme, _param)
|
|
|
68
76
|
_object_1.LayoutOrder = 2
|
|
69
77
|
_object[_left] = _object_1
|
|
70
78
|
_object.close = {
|
|
71
|
-
Size = UDim2.fromOffset(
|
|
72
|
-
Position = UDim2.new(1,
|
|
79
|
+
Size = UDim2.fromOffset(closeSize, closeSize),
|
|
80
|
+
Position = UDim2.new(1, 0, 0, 0),
|
|
73
81
|
AnchorPoint = Vector2.new(1, 0),
|
|
74
82
|
BackgroundTransparency = 1,
|
|
75
83
|
BorderSizePixel = 0,
|
|
@@ -2,4 +2,4 @@ export type CheckboxPointer = "rest" | "hover" | "press" | "focus";
|
|
|
2
2
|
export declare function checkboxMark(value: boolean, mixed?: boolean): "" | "–" | "✓";
|
|
3
3
|
export declare function checkboxPointer(hovering: boolean, pressed: boolean, focused: boolean): CheckboxPointer;
|
|
4
4
|
export declare function checkboxBoxTransparency(filled: boolean, disabled: boolean, pointer: CheckboxPointer): 1 | 0 | 0.7 | 0.55 | 0.85;
|
|
5
|
-
export declare function checkboxStrokeTransparency(filled: boolean, disabled: boolean, pointer: CheckboxPointer): 0 | 0.25 | 0.
|
|
5
|
+
export declare function checkboxStrokeTransparency(filled: boolean, disabled: boolean, pointer: CheckboxPointer): 0 | 0.25 | 0.45 | 0.55 | 0.2;
|
|
@@ -10,6 +10,7 @@ local _motion = TS.import(script, script.Parent.Parent.Parent, "motion")
|
|
|
10
10
|
local arcKeys = _motion.arcKeys
|
|
11
11
|
local loopProperty = _motion.loopProperty
|
|
12
12
|
local progressSpin = _motion.progressSpin
|
|
13
|
+
local spinArcKeys = _motion.spinArcKeys
|
|
13
14
|
local function CircularProgress(props)
|
|
14
15
|
local _binding = props
|
|
15
16
|
local value = _binding.value
|
|
@@ -38,7 +39,17 @@ local function CircularProgress(props)
|
|
|
38
39
|
local shown = if indeterminate then (if motion == "spin" then nil else 0.25) else value
|
|
39
40
|
local _result
|
|
40
41
|
if shown == nil then
|
|
41
|
-
|
|
42
|
+
local _exp = spinArcKeys()
|
|
43
|
+
-- ▼ ReadonlyArray.map ▼
|
|
44
|
+
local _newValue = table.create(#_exp)
|
|
45
|
+
local _callback = function(key)
|
|
46
|
+
return NumberSequenceKeypoint.new(key.time, key.transparency)
|
|
47
|
+
end
|
|
48
|
+
for _k, _v in _exp do
|
|
49
|
+
_newValue[_k] = _callback(_v, _k - 1, _exp)
|
|
50
|
+
end
|
|
51
|
+
-- ▲ ReadonlyArray.map ▲
|
|
52
|
+
_result = NumberSequence.new(_newValue)
|
|
42
53
|
else
|
|
43
54
|
local _exp = arcKeys(shown)
|
|
44
55
|
-- ▼ ReadonlyArray.map ▼
|
|
@@ -91,7 +102,7 @@ local function CircularProgress(props)
|
|
|
91
102
|
}), React.createElement("uistroke", {
|
|
92
103
|
Color = tint,
|
|
93
104
|
Thickness = thickness,
|
|
94
|
-
Transparency = if disabled then 0.
|
|
105
|
+
Transparency = if disabled then 0.85 else 0.82,
|
|
95
106
|
}), React.createElement("uistroke", {
|
|
96
107
|
Color = tint,
|
|
97
108
|
Thickness = thickness,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
export interface ImageListItem {
|
|
3
|
+
src: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ImageListProps {
|
|
7
|
+
items: ImageListItem[];
|
|
8
|
+
cols?: number;
|
|
9
|
+
gap?: number;
|
|
10
|
+
itemSize?: number;
|
|
11
|
+
onItemActivated?: (index: number) => void;
|
|
12
|
+
}
|
|
13
|
+
declare function ImageList(props: CustomizedProps<Frame, ImageListProps>): JSX.Element;
|
|
14
|
+
export default ImageList;
|
|
@@ -0,0 +1,84 @@
|
|
|
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 useImageListStyles = TS.import(script, script.Parent, "ImageList.styles").default
|
|
5
|
+
local function ImageList(props)
|
|
6
|
+
local _binding = props
|
|
7
|
+
local items = _binding.items
|
|
8
|
+
local cols = _binding.cols
|
|
9
|
+
local gap = _binding.gap
|
|
10
|
+
local itemSize = _binding.itemSize
|
|
11
|
+
local onItemActivated = _binding.onItemActivated
|
|
12
|
+
local className = _binding.className
|
|
13
|
+
local sx = _binding.sx
|
|
14
|
+
local id = _binding.id
|
|
15
|
+
local ref = _binding.ref
|
|
16
|
+
local styles = useImageListStyles({
|
|
17
|
+
cols = cols,
|
|
18
|
+
gap = gap,
|
|
19
|
+
itemSize = itemSize,
|
|
20
|
+
})
|
|
21
|
+
local _attributes = {}
|
|
22
|
+
local _condition = id
|
|
23
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
24
|
+
_condition = "ImageList"
|
|
25
|
+
end
|
|
26
|
+
_attributes.key = _condition
|
|
27
|
+
_attributes.ref = ref
|
|
28
|
+
for _k, _v in styles.root do
|
|
29
|
+
_attributes[_k] = _v
|
|
30
|
+
end
|
|
31
|
+
if className then
|
|
32
|
+
for _k, _v in className do
|
|
33
|
+
_attributes[_k] = _v
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
if sx then
|
|
37
|
+
for _k, _v in sx do
|
|
38
|
+
_attributes[_k] = _v
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
local _attributes_1 = table.clone(styles.grid)
|
|
42
|
+
setmetatable(_attributes_1, nil)
|
|
43
|
+
local _exp = React.createElement("uigridlayout", _attributes_1)
|
|
44
|
+
-- ▼ ReadonlyArray.map ▼
|
|
45
|
+
local _newValue = table.create(#items)
|
|
46
|
+
local _callback = function(item, index)
|
|
47
|
+
local _attributes_2 = {
|
|
48
|
+
key = `Tile-{index}`,
|
|
49
|
+
}
|
|
50
|
+
for _k, _v in styles.tile do
|
|
51
|
+
_attributes_2[_k] = _v
|
|
52
|
+
end
|
|
53
|
+
_attributes_2.LayoutOrder = index
|
|
54
|
+
_attributes_2.Event = {
|
|
55
|
+
Activated = function()
|
|
56
|
+
local _result = onItemActivated
|
|
57
|
+
if _result ~= nil then
|
|
58
|
+
_result = _result(index)
|
|
59
|
+
end
|
|
60
|
+
return _result
|
|
61
|
+
end,
|
|
62
|
+
}
|
|
63
|
+
local _attributes_3 = table.clone(styles.corner)
|
|
64
|
+
setmetatable(_attributes_3, nil)
|
|
65
|
+
local _exp_1 = React.createElement("uicorner", _attributes_3)
|
|
66
|
+
local _attributes_4 = {
|
|
67
|
+
key = "Image",
|
|
68
|
+
}
|
|
69
|
+
for _k, _v in styles.image do
|
|
70
|
+
_attributes_4[_k] = _v
|
|
71
|
+
end
|
|
72
|
+
_attributes_4.Image = item.src
|
|
73
|
+
return React.createElement("imagebutton", _attributes_2, _exp_1, React.createElement("imagelabel", _attributes_4))
|
|
74
|
+
end
|
|
75
|
+
for _k, _v in items do
|
|
76
|
+
_newValue[_k] = _callback(_v, _k - 1, items)
|
|
77
|
+
end
|
|
78
|
+
-- ▲ ReadonlyArray.map ▲
|
|
79
|
+
return React.createElement("frame", _attributes, _exp, _newValue)
|
|
80
|
+
end
|
|
81
|
+
local default = ImageList
|
|
82
|
+
return {
|
|
83
|
+
default = default,
|
|
84
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
|
+
local componentStyles = _theme.componentStyles
|
|
5
|
+
local createStyles = _theme.createStyles
|
|
6
|
+
local _imageListLayout = TS.import(script, script.Parent, "imageListLayout")
|
|
7
|
+
local imageListCols = _imageListLayout.imageListCols
|
|
8
|
+
local imageListGap = _imageListLayout.imageListGap
|
|
9
|
+
local imageListItemSize = _imageListLayout.imageListItemSize
|
|
10
|
+
local useImageListStyles = componentStyles("ImageList", function(theme, _param)
|
|
11
|
+
local cols = _param.cols
|
|
12
|
+
local gap = _param.gap
|
|
13
|
+
local itemSize = _param.itemSize
|
|
14
|
+
local size = imageListItemSize(itemSize)
|
|
15
|
+
local pad = theme.spacing.calc(imageListGap(gap))
|
|
16
|
+
return createStyles({
|
|
17
|
+
root = {
|
|
18
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
19
|
+
Size = UDim2.fromScale(0, 0),
|
|
20
|
+
BackgroundTransparency = 1,
|
|
21
|
+
BorderSizePixel = 0,
|
|
22
|
+
},
|
|
23
|
+
grid = {
|
|
24
|
+
CellSize = UDim2.fromOffset(size, size),
|
|
25
|
+
CellPadding = UDim2.fromOffset(pad, pad),
|
|
26
|
+
FillDirection = Enum.FillDirection.Horizontal,
|
|
27
|
+
FillDirectionMaxCells = imageListCols(cols),
|
|
28
|
+
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
29
|
+
StartCorner = Enum.StartCorner.TopLeft,
|
|
30
|
+
HorizontalAlignment = Enum.HorizontalAlignment.Left,
|
|
31
|
+
VerticalAlignment = Enum.VerticalAlignment.Top,
|
|
32
|
+
},
|
|
33
|
+
tile = {
|
|
34
|
+
Size = UDim2.fromOffset(size, size),
|
|
35
|
+
BackgroundColor3 = theme.palette.surface.input,
|
|
36
|
+
BorderSizePixel = 0,
|
|
37
|
+
AutoButtonColor = false,
|
|
38
|
+
Text = "",
|
|
39
|
+
},
|
|
40
|
+
corner = {
|
|
41
|
+
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
42
|
+
},
|
|
43
|
+
image = {
|
|
44
|
+
Size = UDim2.fromScale(1, 1),
|
|
45
|
+
BackgroundTransparency = 1,
|
|
46
|
+
BorderSizePixel = 0,
|
|
47
|
+
ScaleType = Enum.ScaleType.Crop,
|
|
48
|
+
},
|
|
49
|
+
})
|
|
50
|
+
end)
|
|
51
|
+
local default = useImageListStyles
|
|
52
|
+
return {
|
|
53
|
+
default = default,
|
|
54
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function imageListCols(cols)
|
|
3
|
+
if cols == nil or cols < 1 then
|
|
4
|
+
return 3
|
|
5
|
+
end
|
|
6
|
+
return math.floor(cols)
|
|
7
|
+
end
|
|
8
|
+
local function imageListGap(gap)
|
|
9
|
+
if gap == nil or gap < 0 then
|
|
10
|
+
return 1
|
|
11
|
+
end
|
|
12
|
+
return gap
|
|
13
|
+
end
|
|
14
|
+
local function imageListItemSize(itemSize)
|
|
15
|
+
if itemSize == nil or itemSize < 1 then
|
|
16
|
+
return 96
|
|
17
|
+
end
|
|
18
|
+
return math.floor(itemSize)
|
|
19
|
+
end
|
|
20
|
+
return {
|
|
21
|
+
imageListCols = imageListCols,
|
|
22
|
+
imageListGap = imageListGap,
|
|
23
|
+
imageListItemSize = imageListItemSize,
|
|
24
|
+
}
|
|
@@ -3,6 +3,7 @@ export * from "./skeleton/index";
|
|
|
3
3
|
export * from "./divider/index";
|
|
4
4
|
export * from "./errorBoundary/index";
|
|
5
5
|
export * from "./icon/index";
|
|
6
|
+
export * from "./imageList/index";
|
|
6
7
|
export * from "./iconButton/index";
|
|
7
8
|
export * from "./input/index";
|
|
8
9
|
export * from "./formText/index";
|
|
@@ -16,6 +16,9 @@ end
|
|
|
16
16
|
for _k, _v in TS.import(script, script, "icon") or {} do
|
|
17
17
|
exports[_k] = _v
|
|
18
18
|
end
|
|
19
|
+
for _k, _v in TS.import(script, script, "imageList") or {} do
|
|
20
|
+
exports[_k] = _v
|
|
21
|
+
end
|
|
19
22
|
for _k, _v in TS.import(script, script, "iconButton") or {} do
|
|
20
23
|
exports[_k] = _v
|
|
21
24
|
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "@rbxts/react";
|
|
2
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
3
|
+
import { BoxPad } from "./boxPad";
|
|
4
|
+
import { BoxBg } from "./Box.styles";
|
|
5
|
+
export interface BoxProps {
|
|
6
|
+
padding?: BoxPad;
|
|
7
|
+
bgcolor?: BoxBg;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare function Box(props: CustomizedProps<Frame, BoxProps>): JSX.Element;
|
|
11
|
+
export default Box;
|
|
@@ -0,0 +1,49 @@
|
|
|
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 useBoxStyles = TS.import(script, script.Parent, "Box.styles").default
|
|
5
|
+
local function Box(props)
|
|
6
|
+
local _binding = props
|
|
7
|
+
local padding = _binding.padding
|
|
8
|
+
local bgcolor = _binding.bgcolor
|
|
9
|
+
local children = _binding.children
|
|
10
|
+
local className = _binding.className
|
|
11
|
+
local sx = _binding.sx
|
|
12
|
+
local id = _binding.id
|
|
13
|
+
local ref = _binding.ref
|
|
14
|
+
local styles = useBoxStyles({
|
|
15
|
+
padding = padding,
|
|
16
|
+
bgcolor = bgcolor,
|
|
17
|
+
})
|
|
18
|
+
local _attributes = {}
|
|
19
|
+
local _condition = id
|
|
20
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
21
|
+
_condition = "Box"
|
|
22
|
+
end
|
|
23
|
+
_attributes.key = _condition
|
|
24
|
+
_attributes.ref = ref
|
|
25
|
+
for _k, _v in styles.root do
|
|
26
|
+
_attributes[_k] = _v
|
|
27
|
+
end
|
|
28
|
+
if className then
|
|
29
|
+
for _k, _v in className do
|
|
30
|
+
_attributes[_k] = _v
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
if sx then
|
|
34
|
+
for _k, _v in sx do
|
|
35
|
+
_attributes[_k] = _v
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
local _condition_1 = padding ~= nil
|
|
39
|
+
if _condition_1 then
|
|
40
|
+
local _attributes_1 = table.clone(styles.padding)
|
|
41
|
+
setmetatable(_attributes_1, nil)
|
|
42
|
+
_condition_1 = React.createElement("uipadding", _attributes_1)
|
|
43
|
+
end
|
|
44
|
+
return React.createElement("frame", _attributes, _condition_1, children)
|
|
45
|
+
end
|
|
46
|
+
local default = Box
|
|
47
|
+
return {
|
|
48
|
+
default = default,
|
|
49
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BoxPad } from "./boxPad";
|
|
2
|
+
export type BoxBg = "transparent" | "paper" | "elevated" | "input";
|
|
3
|
+
declare const useBoxStyles: (props: {
|
|
4
|
+
padding?: BoxPad;
|
|
5
|
+
bgcolor?: BoxBg;
|
|
6
|
+
}) => import("../../../../theme/index").ClassNameMap<string>;
|
|
7
|
+
export default useBoxStyles;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
|
+
local componentStyles = _theme.componentStyles
|
|
5
|
+
local createStyles = _theme.createStyles
|
|
6
|
+
local boxPadSides = TS.import(script, script.Parent, "boxPad").boxPadSides
|
|
7
|
+
local useBoxStyles = componentStyles("Box", function(theme, _param)
|
|
8
|
+
local padding = _param.padding
|
|
9
|
+
local bgcolor = _param.bgcolor
|
|
10
|
+
if bgcolor == nil then
|
|
11
|
+
bgcolor = "transparent"
|
|
12
|
+
end
|
|
13
|
+
local sides = boxPadSides(padding)
|
|
14
|
+
local fill = if bgcolor == "paper" then theme.palette.surface.paper elseif bgcolor == "elevated" then theme.palette.surface.elevated elseif bgcolor == "input" then theme.palette.surface.input else theme.palette.surface.paper
|
|
15
|
+
return createStyles({
|
|
16
|
+
root = {
|
|
17
|
+
AutomaticSize = Enum.AutomaticSize.XY,
|
|
18
|
+
Size = UDim2.fromScale(0, 0),
|
|
19
|
+
BackgroundColor3 = fill,
|
|
20
|
+
BackgroundTransparency = if bgcolor == "transparent" then 1 else 0,
|
|
21
|
+
BorderSizePixel = 0,
|
|
22
|
+
},
|
|
23
|
+
padding = {
|
|
24
|
+
PaddingTop = UDim.new(0, theme.spacing.calc(sides.top)),
|
|
25
|
+
PaddingRight = UDim.new(0, theme.spacing.calc(sides.right)),
|
|
26
|
+
PaddingBottom = UDim.new(0, theme.spacing.calc(sides.bottom)),
|
|
27
|
+
PaddingLeft = UDim.new(0, theme.spacing.calc(sides.left)),
|
|
28
|
+
},
|
|
29
|
+
})
|
|
30
|
+
end)
|
|
31
|
+
local default = useBoxStyles
|
|
32
|
+
return {
|
|
33
|
+
default = default,
|
|
34
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type BoxPad = number | {
|
|
2
|
+
x?: number;
|
|
3
|
+
y?: number;
|
|
4
|
+
top?: number;
|
|
5
|
+
right?: number;
|
|
6
|
+
bottom?: number;
|
|
7
|
+
left?: number;
|
|
8
|
+
};
|
|
9
|
+
export declare function boxPadSides(padding?: BoxPad): {
|
|
10
|
+
top: number;
|
|
11
|
+
right: number;
|
|
12
|
+
bottom: number;
|
|
13
|
+
left: number;
|
|
14
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function boxPadSides(padding)
|
|
3
|
+
if padding == nil then
|
|
4
|
+
return {
|
|
5
|
+
top = 0,
|
|
6
|
+
right = 0,
|
|
7
|
+
bottom = 0,
|
|
8
|
+
left = 0,
|
|
9
|
+
}
|
|
10
|
+
end
|
|
11
|
+
local _padding = padding
|
|
12
|
+
if type(_padding) == "number" then
|
|
13
|
+
return {
|
|
14
|
+
top = padding,
|
|
15
|
+
right = padding,
|
|
16
|
+
bottom = padding,
|
|
17
|
+
left = padding,
|
|
18
|
+
}
|
|
19
|
+
end
|
|
20
|
+
local _condition = padding.x
|
|
21
|
+
if _condition == nil then
|
|
22
|
+
_condition = 0
|
|
23
|
+
end
|
|
24
|
+
local x = _condition
|
|
25
|
+
local _condition_1 = padding.y
|
|
26
|
+
if _condition_1 == nil then
|
|
27
|
+
_condition_1 = 0
|
|
28
|
+
end
|
|
29
|
+
local y = _condition_1
|
|
30
|
+
local _object = {}
|
|
31
|
+
local _left = "top"
|
|
32
|
+
local _condition_2 = padding.top
|
|
33
|
+
if _condition_2 == nil then
|
|
34
|
+
_condition_2 = y
|
|
35
|
+
end
|
|
36
|
+
_object[_left] = _condition_2
|
|
37
|
+
local _left_1 = "right"
|
|
38
|
+
local _condition_3 = padding.right
|
|
39
|
+
if _condition_3 == nil then
|
|
40
|
+
_condition_3 = x
|
|
41
|
+
end
|
|
42
|
+
_object[_left_1] = _condition_3
|
|
43
|
+
local _left_2 = "bottom"
|
|
44
|
+
local _condition_4 = padding.bottom
|
|
45
|
+
if _condition_4 == nil then
|
|
46
|
+
_condition_4 = y
|
|
47
|
+
end
|
|
48
|
+
_object[_left_2] = _condition_4
|
|
49
|
+
local _left_3 = "left"
|
|
50
|
+
local _condition_5 = padding.left
|
|
51
|
+
if _condition_5 == nil then
|
|
52
|
+
_condition_5 = x
|
|
53
|
+
end
|
|
54
|
+
_object[_left_3] = _condition_5
|
|
55
|
+
return _object
|
|
56
|
+
end
|
|
57
|
+
return {
|
|
58
|
+
boxPadSides = boxPadSides,
|
|
59
|
+
}
|
|
@@ -7,3 +7,7 @@ export * from "./components/List";
|
|
|
7
7
|
export { default as Stack } from "./components/Stack";
|
|
8
8
|
export { StackProps } from "./components/Stack";
|
|
9
9
|
export { StackAlign, StackDirection, StackJustify } from "./components/stackAlign";
|
|
10
|
+
export { default as Box } from "./components/Box";
|
|
11
|
+
export { BoxProps } from "./components/Box";
|
|
12
|
+
export { BoxPad } from "./components/boxPad";
|
|
13
|
+
export { BoxBg } from "./components/Box.styles";
|
|
@@ -2,4 +2,4 @@ export { loopProperty } from "./loop";
|
|
|
2
2
|
export { motionDuration, assignGoal } from "./duration";
|
|
3
3
|
export { playProperty } from "./play";
|
|
4
4
|
export { resolveReduced } from "./resolveReduced";
|
|
5
|
-
export { clampUnit, stopOnce, progressUnit, progressSpin, arcKeys } from "./unit";
|
|
5
|
+
export { clampUnit, stopOnce, progressUnit, progressSpin, arcKeys, spinArcKeys } from "./unit";
|
|
@@ -6,3 +6,8 @@ export declare function arcKeys(value: number): {
|
|
|
6
6
|
time: number;
|
|
7
7
|
transparency: number;
|
|
8
8
|
}[];
|
|
9
|
+
/** Indeterminate ring: long clear trail, bright head — reads as a sweep. */
|
|
10
|
+
export declare function spinArcKeys(): {
|
|
11
|
+
time: number;
|
|
12
|
+
transparency: number;
|
|
13
|
+
}[];
|
|
@@ -71,10 +71,33 @@ local function arcKeys(value)
|
|
|
71
71
|
transparency = 1,
|
|
72
72
|
} }
|
|
73
73
|
end
|
|
74
|
+
--* Indeterminate ring: long clear trail, bright head — reads as a sweep.
|
|
75
|
+
local function spinArcKeys()
|
|
76
|
+
return { {
|
|
77
|
+
time = 0,
|
|
78
|
+
transparency = 1,
|
|
79
|
+
}, {
|
|
80
|
+
time = 0.45,
|
|
81
|
+
transparency = 1,
|
|
82
|
+
}, {
|
|
83
|
+
time = 0.7,
|
|
84
|
+
transparency = 0.55,
|
|
85
|
+
}, {
|
|
86
|
+
time = 0.88,
|
|
87
|
+
transparency = 0,
|
|
88
|
+
}, {
|
|
89
|
+
time = 0.96,
|
|
90
|
+
transparency = 0.35,
|
|
91
|
+
}, {
|
|
92
|
+
time = 1,
|
|
93
|
+
transparency = 1,
|
|
94
|
+
} }
|
|
95
|
+
end
|
|
74
96
|
return {
|
|
75
97
|
clampUnit = clampUnit,
|
|
76
98
|
stopOnce = stopOnce,
|
|
77
99
|
progressUnit = progressUnit,
|
|
78
100
|
progressSpin = progressSpin,
|
|
79
101
|
arcKeys = arcKeys,
|
|
102
|
+
spinArcKeys = spinArcKeys,
|
|
80
103
|
}
|
|
@@ -11,6 +11,7 @@ export interface RadioGroupProps<T> {
|
|
|
11
11
|
onChange: (value: T) => void;
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
size?: ControlSize;
|
|
14
|
+
row?: boolean;
|
|
14
15
|
}
|
|
15
16
|
declare function RadioGroup<T>(props: CustomizedProps<Frame, RadioGroupProps<T>>): JSX.Element;
|
|
16
17
|
export default RadioGroup;
|
|
@@ -10,17 +10,19 @@ local function RadioGroup(props)
|
|
|
10
10
|
local onChange = _binding.onChange
|
|
11
11
|
local disabled = _binding.disabled
|
|
12
12
|
local size = _binding.size
|
|
13
|
+
local row = _binding.row
|
|
13
14
|
local className = _binding.className
|
|
14
15
|
local sx = _binding.sx
|
|
15
16
|
local id = _binding.id
|
|
16
17
|
local ref = _binding.ref
|
|
17
18
|
local _binding_1 = useRadioGroupStyles({
|
|
18
19
|
size = size,
|
|
20
|
+
row = row,
|
|
19
21
|
})
|
|
20
22
|
local root = _binding_1.root
|
|
21
23
|
local list = _binding_1.list
|
|
22
24
|
local option = _binding_1.option
|
|
23
|
-
local
|
|
25
|
+
local optionRow = _binding_1.optionRow
|
|
24
26
|
local ring = _binding_1.ring
|
|
25
27
|
local dot = _binding_1.dot
|
|
26
28
|
local stroke = _binding_1.stroke
|
|
@@ -70,7 +72,7 @@ local function RadioGroup(props)
|
|
|
70
72
|
end
|
|
71
73
|
end,
|
|
72
74
|
}
|
|
73
|
-
local _attributes_3 = table.clone(
|
|
75
|
+
local _attributes_3 = table.clone(optionRow)
|
|
74
76
|
setmetatable(_attributes_3, nil)
|
|
75
77
|
local _exp_1 = React.createElement("uilistlayout", _attributes_3)
|
|
76
78
|
local _attributes_4 = table.clone(ring)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ControlSize } from "../../../../theme/index";
|
|
2
2
|
export interface RadioGroupStyleProps {
|
|
3
3
|
size?: ControlSize;
|
|
4
|
+
row?: boolean;
|
|
4
5
|
}
|
|
5
6
|
declare const useRadioGroupStyles: (props: RadioGroupStyleProps) => import("../../../../theme/index").ClassNameMap<string>;
|
|
6
7
|
export default useRadioGroupStyles;
|
|
@@ -6,6 +6,7 @@ local createStyles = _theme.createStyles
|
|
|
6
6
|
local componentStyles = _theme.componentStyles
|
|
7
7
|
local useRadioGroupStyles = componentStyles("RadioGroup", function(theme, _param)
|
|
8
8
|
local size = _param.size
|
|
9
|
+
local row = _param.row
|
|
9
10
|
local metrics = controlMetrics(theme.density, size)
|
|
10
11
|
return createStyles({
|
|
11
12
|
root = {
|
|
@@ -15,8 +16,10 @@ local useRadioGroupStyles = componentStyles("RadioGroup", function(theme, _param
|
|
|
15
16
|
BorderSizePixel = 0,
|
|
16
17
|
},
|
|
17
18
|
list = {
|
|
19
|
+
FillDirection = if row == true then Enum.FillDirection.Horizontal else Enum.FillDirection.Vertical,
|
|
18
20
|
Padding = UDim.new(0, theme.padding.default),
|
|
19
21
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
22
|
+
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
20
23
|
},
|
|
21
24
|
option = {
|
|
22
25
|
AutomaticSize = Enum.AutomaticSize.XY,
|
|
@@ -25,7 +28,7 @@ local useRadioGroupStyles = componentStyles("RadioGroup", function(theme, _param
|
|
|
25
28
|
BorderSizePixel = 0,
|
|
26
29
|
Text = "",
|
|
27
30
|
},
|
|
28
|
-
|
|
31
|
+
optionRow = {
|
|
29
32
|
FillDirection = Enum.FillDirection.Horizontal,
|
|
30
33
|
Padding = UDim.new(0, theme.padding.default),
|
|
31
34
|
VerticalAlignment = Enum.VerticalAlignment.Center,
|
|
@@ -3,16 +3,20 @@ local TS = _G[script]
|
|
|
3
3
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
4
4
|
local createStyles = _theme.createStyles
|
|
5
5
|
local componentStyles = _theme.componentStyles
|
|
6
|
+
local skeletonTone = TS.import(script, script.Parent, "skeletonTone").skeletonTone
|
|
6
7
|
local useSkeletonStyles = componentStyles("Skeleton", function(theme)
|
|
8
|
+
local _binding = skeletonTone(theme)
|
|
9
|
+
local bone = _binding.bone
|
|
10
|
+
local shine = _binding.shine
|
|
7
11
|
return createStyles({
|
|
8
12
|
block = {
|
|
9
|
-
BackgroundColor3 =
|
|
13
|
+
BackgroundColor3 = bone,
|
|
10
14
|
BackgroundTransparency = 0,
|
|
11
15
|
BorderSizePixel = 0,
|
|
12
16
|
},
|
|
13
17
|
highlight = {
|
|
14
|
-
Color = ColorSequence.new({ ColorSequenceKeypoint.new(0,
|
|
15
|
-
Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.
|
|
18
|
+
Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, bone), ColorSequenceKeypoint.new(0.5, shine), ColorSequenceKeypoint.new(1, bone) }),
|
|
19
|
+
Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.35), NumberSequenceKeypoint.new(0.5, 0), NumberSequenceKeypoint.new(1, 0.35) }),
|
|
16
20
|
},
|
|
17
21
|
rounded = {
|
|
18
22
|
CornerRadius = UDim.new(0, theme.shape.borderRadius),
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface SkeletonPalette {
|
|
2
|
+
surface: {
|
|
3
|
+
canvas: Color3;
|
|
4
|
+
elevated: Color3;
|
|
5
|
+
};
|
|
6
|
+
action: {
|
|
7
|
+
hover: Color3;
|
|
8
|
+
};
|
|
9
|
+
text: {
|
|
10
|
+
secondary: Color3;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
/** Bone + shimmer peak from semantic tokens; shine always lifts off the bone vs canvas. */
|
|
14
|
+
export declare function skeletonTone(theme: {
|
|
15
|
+
palette: SkeletonPalette;
|
|
16
|
+
}): {
|
|
17
|
+
bone: Color3;
|
|
18
|
+
shine: Color3;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local relativeLuminance = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme", "utilites", "colorMath").relativeLuminance
|
|
4
|
+
--* Bone + shimmer peak from semantic tokens; shine always lifts off the bone vs canvas.
|
|
5
|
+
local function skeletonTone(theme)
|
|
6
|
+
local lightCanvas = relativeLuminance(theme.palette.surface.canvas) > 0.5
|
|
7
|
+
return {
|
|
8
|
+
bone = theme.palette.action.hover,
|
|
9
|
+
shine = if lightCanvas then theme.palette.surface.elevated else theme.palette.text.secondary,
|
|
10
|
+
}
|
|
11
|
+
end
|
|
12
|
+
return {
|
|
13
|
+
skeletonTone = skeletonTone,
|
|
14
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type SplitPointer = "rest" | "hover" | "press";
|
|
2
2
|
export declare function splitPointer(hovering: boolean, pressed: boolean): SplitPointer;
|
|
3
|
-
export declare function splitRuleTransparency(pointer: SplitPointer, disabled?: boolean): 0.25 | 0.
|
|
3
|
+
export declare function splitRuleTransparency(pointer: SplitPointer, disabled?: boolean): 0.25 | 0.7 | 0.55 | 0.35;
|
|
4
4
|
export declare function splitMarkTransparency(pointer: SplitPointer, disabled?: boolean): 0 | 0.55 | 0.1;
|
|
5
5
|
export declare function splitHitTransparency(pointer: SplitPointer, disabled?: boolean): 1 | 0.9 | 0.94;
|
|
@@ -713,29 +713,37 @@ local function togglesRows()
|
|
|
713
713
|
local _Length_31 = #_array_32
|
|
714
714
|
table.move(_array_32, 1, _Length_31, _length + 1, _array)
|
|
715
715
|
_length += _Length_31
|
|
716
|
-
local _array_33 = pair("RadioGroup", "
|
|
716
|
+
local _array_33 = pair("RadioGroup", "row", {
|
|
717
717
|
value = "Continue",
|
|
718
718
|
options = { "Continue", "Other" },
|
|
719
|
-
|
|
719
|
+
row = true,
|
|
720
720
|
})
|
|
721
721
|
local _Length_32 = #_array_33
|
|
722
722
|
table.move(_array_33, 1, _Length_32, _length + 1, _array)
|
|
723
723
|
_length += _Length_32
|
|
724
|
-
local _array_34 = pair("RadioGroup", "size-
|
|
724
|
+
local _array_34 = pair("RadioGroup", "size-small", {
|
|
725
725
|
value = "Continue",
|
|
726
726
|
options = { "Continue", "Other" },
|
|
727
|
-
size = "
|
|
727
|
+
size = "small",
|
|
728
728
|
})
|
|
729
729
|
local _Length_33 = #_array_34
|
|
730
730
|
table.move(_array_34, 1, _Length_33, _length + 1, _array)
|
|
731
731
|
_length += _Length_33
|
|
732
|
-
local _array_35 = pair("RadioGroup", "
|
|
732
|
+
local _array_35 = pair("RadioGroup", "size-large", {
|
|
733
|
+
value = "Continue",
|
|
734
|
+
options = { "Continue", "Other" },
|
|
735
|
+
size = "large",
|
|
736
|
+
})
|
|
737
|
+
local _Length_34 = #_array_35
|
|
738
|
+
table.move(_array_35, 1, _Length_34, _length + 1, _array)
|
|
739
|
+
_length += _Length_34
|
|
740
|
+
local _array_36 = pair("RadioGroup", "density-compact", {
|
|
733
741
|
value = "Continue",
|
|
734
742
|
options = { "Continue", "Other" },
|
|
735
743
|
density = "compact",
|
|
736
744
|
size = "small",
|
|
737
745
|
})
|
|
738
|
-
table.move(
|
|
746
|
+
table.move(_array_36, 1, #_array_36, _length + 1, _array)
|
|
739
747
|
return _array
|
|
740
748
|
end
|
|
741
749
|
local function compositeRows()
|
|
@@ -1638,75 +1646,107 @@ local function miscRows()
|
|
|
1638
1646
|
local _Length_20 = #_array_21
|
|
1639
1647
|
table.move(_array_21, 1, _Length_20, _length + 1, _array)
|
|
1640
1648
|
_length += _Length_20
|
|
1641
|
-
local _array_22 = pair("
|
|
1642
|
-
open = false,
|
|
1643
|
-
})
|
|
1649
|
+
local _array_22 = pair("Box", "plain")
|
|
1644
1650
|
local _Length_21 = #_array_22
|
|
1645
1651
|
table.move(_array_22, 1, _Length_21, _length + 1, _array)
|
|
1646
1652
|
_length += _Length_21
|
|
1647
|
-
local _array_23 = pair("
|
|
1648
|
-
|
|
1653
|
+
local _array_23 = pair("Box", "padded", {
|
|
1654
|
+
size = "medium",
|
|
1649
1655
|
})
|
|
1650
1656
|
local _Length_22 = #_array_23
|
|
1651
1657
|
table.move(_array_23, 1, _Length_22, _length + 1, _array)
|
|
1652
1658
|
_length += _Length_22
|
|
1653
|
-
local _array_24 = pair("
|
|
1654
|
-
|
|
1655
|
-
disabled = true,
|
|
1659
|
+
local _array_24 = pair("Box", "paper", {
|
|
1660
|
+
variant = "paper",
|
|
1656
1661
|
})
|
|
1657
1662
|
local _Length_23 = #_array_24
|
|
1658
1663
|
table.move(_array_24, 1, _Length_23, _length + 1, _array)
|
|
1659
1664
|
_length += _Length_23
|
|
1660
|
-
local _array_25 = pair("
|
|
1661
|
-
text = "Email",
|
|
1662
|
-
})
|
|
1665
|
+
local _array_25 = pair("ImageList", "default")
|
|
1663
1666
|
local _Length_24 = #_array_25
|
|
1664
1667
|
table.move(_array_25, 1, _Length_24, _length + 1, _array)
|
|
1665
1668
|
_length += _Length_24
|
|
1666
|
-
local _array_26 = pair("
|
|
1667
|
-
|
|
1668
|
-
value = true,
|
|
1669
|
+
local _array_26 = pair("ImageList", "dense", {
|
|
1670
|
+
size = "small",
|
|
1669
1671
|
})
|
|
1670
1672
|
local _Length_25 = #_array_26
|
|
1671
1673
|
table.move(_array_26, 1, _Length_25, _length + 1, _array)
|
|
1672
1674
|
_length += _Length_25
|
|
1673
|
-
local _array_27 = pair("
|
|
1674
|
-
|
|
1675
|
-
hasError = true,
|
|
1675
|
+
local _array_27 = pair("ImageList", "wide", {
|
|
1676
|
+
size = "large",
|
|
1676
1677
|
})
|
|
1677
1678
|
local _Length_26 = #_array_27
|
|
1678
1679
|
table.move(_array_27, 1, _Length_26, _length + 1, _array)
|
|
1679
1680
|
_length += _Length_26
|
|
1680
|
-
local _array_28 = pair("
|
|
1681
|
-
|
|
1681
|
+
local _array_28 = pair("SpeedDial", "closed", {
|
|
1682
|
+
open = false,
|
|
1682
1683
|
})
|
|
1683
1684
|
local _Length_27 = #_array_28
|
|
1684
1685
|
table.move(_array_28, 1, _Length_27, _length + 1, _array)
|
|
1685
1686
|
_length += _Length_27
|
|
1686
|
-
local _array_29 = pair("
|
|
1687
|
-
|
|
1688
|
-
hasError = true,
|
|
1687
|
+
local _array_29 = pair("SpeedDial", "open", {
|
|
1688
|
+
open = true,
|
|
1689
1689
|
})
|
|
1690
1690
|
local _Length_28 = #_array_29
|
|
1691
1691
|
table.move(_array_29, 1, _Length_28, _length + 1, _array)
|
|
1692
1692
|
_length += _Length_28
|
|
1693
|
-
local _array_30 = pair("
|
|
1693
|
+
local _array_30 = pair("SpeedDial", "disabled", {
|
|
1694
1694
|
open = false,
|
|
1695
|
+
disabled = true,
|
|
1695
1696
|
})
|
|
1696
1697
|
local _Length_29 = #_array_30
|
|
1697
1698
|
table.move(_array_30, 1, _Length_29, _length + 1, _array)
|
|
1698
1699
|
_length += _Length_29
|
|
1699
|
-
local _array_31 = pair("
|
|
1700
|
-
|
|
1700
|
+
local _array_31 = pair("FormLabel", "default", {
|
|
1701
|
+
text = "Email",
|
|
1701
1702
|
})
|
|
1702
1703
|
local _Length_30 = #_array_31
|
|
1703
1704
|
table.move(_array_31, 1, _Length_30, _length + 1, _array)
|
|
1704
1705
|
_length += _Length_30
|
|
1705
|
-
local _array_32 = pair("
|
|
1706
|
+
local _array_32 = pair("FormLabel", "required", {
|
|
1707
|
+
text = "Email",
|
|
1708
|
+
value = true,
|
|
1709
|
+
})
|
|
1710
|
+
local _Length_31 = #_array_32
|
|
1711
|
+
table.move(_array_32, 1, _Length_31, _length + 1, _array)
|
|
1712
|
+
_length += _Length_31
|
|
1713
|
+
local _array_33 = pair("FormLabel", "error", {
|
|
1714
|
+
text = "Email",
|
|
1715
|
+
hasError = true,
|
|
1716
|
+
})
|
|
1717
|
+
local _Length_32 = #_array_33
|
|
1718
|
+
table.move(_array_33, 1, _Length_32, _length + 1, _array)
|
|
1719
|
+
_length += _Length_32
|
|
1720
|
+
local _array_34 = pair("FormHelperText", "default", {
|
|
1721
|
+
text = "We never share this",
|
|
1722
|
+
})
|
|
1723
|
+
local _Length_33 = #_array_34
|
|
1724
|
+
table.move(_array_34, 1, _Length_33, _length + 1, _array)
|
|
1725
|
+
_length += _Length_33
|
|
1726
|
+
local _array_35 = pair("FormHelperText", "error", {
|
|
1727
|
+
text = "Required",
|
|
1728
|
+
hasError = true,
|
|
1729
|
+
})
|
|
1730
|
+
local _Length_34 = #_array_35
|
|
1731
|
+
table.move(_array_35, 1, _Length_34, _length + 1, _array)
|
|
1732
|
+
_length += _Length_34
|
|
1733
|
+
local _array_36 = pair("Menu", "closed", {
|
|
1734
|
+
open = false,
|
|
1735
|
+
})
|
|
1736
|
+
local _Length_35 = #_array_36
|
|
1737
|
+
table.move(_array_36, 1, _Length_35, _length + 1, _array)
|
|
1738
|
+
_length += _Length_35
|
|
1739
|
+
local _array_37 = pair("Menu", "open", {
|
|
1740
|
+
open = true,
|
|
1741
|
+
})
|
|
1742
|
+
local _Length_36 = #_array_37
|
|
1743
|
+
table.move(_array_37, 1, _Length_36, _length + 1, _array)
|
|
1744
|
+
_length += _Length_36
|
|
1745
|
+
local _array_38 = pair("Menu", "empty", {
|
|
1706
1746
|
open = true,
|
|
1707
1747
|
options = {},
|
|
1708
1748
|
})
|
|
1709
|
-
table.move(
|
|
1749
|
+
table.move(_array_38, 1, #_array_38, _length + 1, _array)
|
|
1710
1750
|
return _array
|
|
1711
1751
|
end
|
|
1712
1752
|
local function concatRows(...)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type SwitchPointer = "rest" | "hover" | "press" | "focus";
|
|
2
2
|
export declare function switchPointer(hovering: boolean, pressed: boolean, focused: boolean): SwitchPointer;
|
|
3
|
-
export declare function switchTrackTransparency(on: boolean, disabled: boolean, pointer: SwitchPointer): 0 | 0.25 | 0.
|
|
3
|
+
export declare function switchTrackTransparency(on: boolean, disabled: boolean, pointer: SwitchPointer): 0 | 0.25 | 0.55 | 0.35 | 0.15 | 0.65 | 0.08;
|
|
4
4
|
export declare function switchThumbTransparency(disabled: boolean): 0 | 0.35;
|
|
5
5
|
export declare function switchStrokeTransparency(disabled: boolean, pointer: SwitchPointer): 1 | 0 | 0.35;
|
|
6
6
|
export declare function switchThumbPlacement(on: boolean, inset: number): {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rbxts/uiblox",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.6",
|
|
4
4
|
"description": "UI Library and theming for roblox-ts projects",
|
|
5
5
|
"main": "out/init.luau",
|
|
6
6
|
"packageManager": "pnpm@11.3.0",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"build": "rbxtsc",
|
|
9
9
|
"watch": "rbxtsc -w",
|
|
10
10
|
"pack:check": "node scripts/pack-check.mjs",
|
|
11
|
-
"test": "node scripts/no-internal-refs.check.mjs && node scripts/import-case.check.mjs && node --experimental-strip-types scripts/theme-scope.check.mjs && node --experimental-strip-types scripts/style-types.check.mjs && node --experimental-strip-types scripts/style-cache.check.mjs && node --experimental-strip-types scripts/style-variants.check.mjs && node --experimental-strip-types scripts/component-styles.check.mjs && node --experimental-strip-types scripts/interaction-styles.check.mjs && node --experimental-strip-types scripts/resolve-style.check.mjs && node --experimental-strip-types scripts/density.check.mjs && node --experimental-strip-types scripts/styles.check.mjs && node --experimental-strip-types scripts/contrast.check.mjs && node --experimental-strip-types scripts/primitives.check.mjs && node --experimental-strip-types scripts/paper.check.mjs && node --experimental-strip-types scripts/list-item.check.mjs && node --experimental-strip-types scripts/menu.check.mjs && node --experimental-strip-types scripts/guard.check.mjs && node --experimental-strip-types scripts/breakpoints.check.mjs && node --experimental-strip-types scripts/focus-trap.check.mjs && node --experimental-strip-types scripts/select-typeahead.check.mjs && node --experimental-strip-types scripts/select-groups.check.mjs && node --experimental-strip-types scripts/select-multi.check.mjs && node --experimental-strip-types scripts/select-motion.check.mjs && node --experimental-strip-types scripts/select-polish.check.mjs && node --experimental-strip-types scripts/reduced-motion.check.mjs && node --experimental-strip-types scripts/card.check.mjs && node --experimental-strip-types scripts/chip.check.mjs && node --experimental-strip-types scripts/badge.check.mjs && node --experimental-strip-types scripts/avatar.check.mjs && node --experimental-strip-types scripts/drawer.check.mjs && node --experimental-strip-types scripts/breadcrumbs.check.mjs && node --experimental-strip-types scripts/pagination.check.mjs && node --experimental-strip-types scripts/stepper.check.mjs && node --experimental-strip-types scripts/accordion.check.mjs && node --experimental-strip-types scripts/snackbar.check.mjs && node --experimental-strip-types scripts/table.check.mjs && node --experimental-strip-types scripts/autocomplete.check.mjs && node --experimental-strip-types scripts/field-loading.check.mjs && node --experimental-strip-types scripts/fab.check.mjs && node --experimental-strip-types scripts/appbar.check.mjs && node --experimental-strip-types scripts/bottom-navigation.check.mjs && node --experimental-strip-types scripts/alert.check.mjs && node --experimental-strip-types scripts/toggle-button.check.mjs && node --experimental-strip-types scripts/link.check.mjs && node --experimental-strip-types scripts/rating.check.mjs && node --experimental-strip-types scripts/stack.check.mjs && node --experimental-strip-types scripts/speed-dial.check.mjs && node --experimental-strip-types scripts/form-text.check.mjs && node --experimental-strip-types scripts/cframe-editor.check.mjs && node --experimental-strip-types scripts/enum-picker.check.mjs && node --experimental-strip-types scripts/number-range.check.mjs && node --experimental-strip-types scripts/rect-editor.check.mjs && node --experimental-strip-types scripts/asset-field.check.mjs && node --experimental-strip-types scripts/gradient-editor.check.mjs && node --experimental-strip-types scripts/ray-editor.check.mjs && node --experimental-strip-types scripts/physical-properties.check.mjs && node --experimental-strip-types scripts/brickcolor-picker.check.mjs",
|
|
11
|
+
"test": "node scripts/no-internal-refs.check.mjs && node scripts/import-case.check.mjs && node --experimental-strip-types scripts/theme-scope.check.mjs && node --experimental-strip-types scripts/style-types.check.mjs && node --experimental-strip-types scripts/style-cache.check.mjs && node --experimental-strip-types scripts/style-variants.check.mjs && node --experimental-strip-types scripts/component-styles.check.mjs && node --experimental-strip-types scripts/interaction-styles.check.mjs && node --experimental-strip-types scripts/resolve-style.check.mjs && node --experimental-strip-types scripts/density.check.mjs && node --experimental-strip-types scripts/styles.check.mjs && node --experimental-strip-types scripts/contrast.check.mjs && node --experimental-strip-types scripts/primitives.check.mjs && node --experimental-strip-types scripts/paper.check.mjs && node --experimental-strip-types scripts/list-item.check.mjs && node --experimental-strip-types scripts/menu.check.mjs && node --experimental-strip-types scripts/guard.check.mjs && node --experimental-strip-types scripts/breakpoints.check.mjs && node --experimental-strip-types scripts/focus-trap.check.mjs && node --experimental-strip-types scripts/select-typeahead.check.mjs && node --experimental-strip-types scripts/select-groups.check.mjs && node --experimental-strip-types scripts/select-multi.check.mjs && node --experimental-strip-types scripts/select-motion.check.mjs && node --experimental-strip-types scripts/select-polish.check.mjs && node --experimental-strip-types scripts/reduced-motion.check.mjs && node --experimental-strip-types scripts/card.check.mjs && node --experimental-strip-types scripts/chip.check.mjs && node --experimental-strip-types scripts/badge.check.mjs && node --experimental-strip-types scripts/avatar.check.mjs && node --experimental-strip-types scripts/drawer.check.mjs && node --experimental-strip-types scripts/breadcrumbs.check.mjs && node --experimental-strip-types scripts/pagination.check.mjs && node --experimental-strip-types scripts/stepper.check.mjs && node --experimental-strip-types scripts/accordion.check.mjs && node --experimental-strip-types scripts/snackbar.check.mjs && node --experimental-strip-types scripts/table.check.mjs && node --experimental-strip-types scripts/autocomplete.check.mjs && node --experimental-strip-types scripts/field-loading.check.mjs && node --experimental-strip-types scripts/fab.check.mjs && node --experimental-strip-types scripts/appbar.check.mjs && node --experimental-strip-types scripts/bottom-navigation.check.mjs && node --experimental-strip-types scripts/alert.check.mjs && node --experimental-strip-types scripts/toggle-button.check.mjs && node --experimental-strip-types scripts/link.check.mjs && node --experimental-strip-types scripts/rating.check.mjs && node --experimental-strip-types scripts/stack.check.mjs && node --experimental-strip-types scripts/speed-dial.check.mjs && node --experimental-strip-types scripts/form-text.check.mjs && node --experimental-strip-types scripts/box.check.mjs && node --experimental-strip-types scripts/image-list.check.mjs && node --experimental-strip-types scripts/radio-group.check.mjs && node --experimental-strip-types scripts/cframe-editor.check.mjs && node --experimental-strip-types scripts/enum-picker.check.mjs && node --experimental-strip-types scripts/number-range.check.mjs && node --experimental-strip-types scripts/rect-editor.check.mjs && node --experimental-strip-types scripts/asset-field.check.mjs && node --experimental-strip-types scripts/gradient-editor.check.mjs && node --experimental-strip-types scripts/ray-editor.check.mjs && node --experimental-strip-types scripts/physical-properties.check.mjs && node --experimental-strip-types scripts/brickcolor-picker.check.mjs",
|
|
12
12
|
"prepublishOnly": "pnpm build"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|