@rbxts/uiblox 0.2.0-alpha.25 → 0.2.0-alpha.27
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/README.md +27 -109
- package/out/ui/packages/accordion/components/Accordion.luau +12 -16
- package/out/ui/packages/alert/components/Alert.luau +9 -16
- package/out/ui/packages/appBar/components/AppBar.luau +9 -16
- package/out/ui/packages/assetField/components/AssetField.luau +12 -16
- package/out/ui/packages/avatar/components/Avatar.luau +9 -16
- package/out/ui/packages/backdrop/components/Backdrop.luau +9 -16
- package/out/ui/packages/badge/components/Badge.luau +9 -16
- package/out/ui/packages/bottomNavigation/components/BottomNavigation.luau +12 -16
- package/out/ui/packages/breadcrumbs/components/Breadcrumbs.luau +9 -16
- package/out/ui/packages/brickColorPicker/components/BrickColorPicker.luau +12 -16
- package/out/ui/packages/button/components/Button.luau +20 -18
- package/out/ui/packages/card/components/Card.d.ts +2 -1
- package/out/ui/packages/card/components/Card.luau +8 -0
- package/out/ui/packages/cframeEditor/components/CFrameEditor.luau +12 -16
- package/out/ui/packages/checkbox/components/Checkbox.luau +16 -16
- package/out/ui/packages/chip/components/Chip.luau +13 -16
- package/out/ui/packages/circularProgress/components/CircularProgress.luau +16 -16
- package/out/ui/packages/colorPicker/components/ColorPicker.luau +12 -16
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +12 -16
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +12 -16
- package/out/ui/packages/dialog/components/Dialog.d.ts +2 -1
- package/out/ui/packages/dialog/components/Dialog.luau +21 -10
- package/out/ui/packages/divider/components/Divider.luau +20 -33
- package/out/ui/packages/drawer/components/Drawer.d.ts +2 -1
- package/out/ui/packages/drawer/components/Drawer.luau +18 -5
- package/out/ui/packages/fab/components/Fab.luau +31 -26
- package/out/ui/packages/fab/components/Fab.styles.luau +6 -0
- package/out/ui/packages/fontEditor/components/FontEditor.luau +12 -16
- package/out/ui/packages/formText/components/FormHelperText.luau +12 -16
- package/out/ui/packages/formText/components/FormLabel.luau +12 -16
- package/out/ui/packages/gradientEditor/components/GradientEditor.luau +12 -16
- package/out/ui/packages/host/components/SxHost.d.ts +18 -0
- package/out/ui/packages/host/components/SxHost.luau +197 -0
- package/out/ui/packages/host/hostPaint.d.ts +11 -0
- package/out/ui/packages/host/hostPaint.luau +33 -0
- package/out/ui/packages/host/hostRules.d.ts +15 -0
- package/out/ui/packages/host/hostRules.luau +92 -0
- package/out/ui/packages/host/index.d.ts +3 -0
- package/out/ui/packages/host/init.luau +13 -0
- package/out/ui/packages/icon/components/Icon.luau +9 -16
- package/out/ui/packages/iconButton/components/IconButton.luau +16 -16
- package/out/ui/packages/imageList/components/ImageList.luau +9 -16
- package/out/ui/packages/imageList/components/ImageList.styles.luau +4 -3
- package/out/ui/packages/input/components/Input.luau +14 -16
- package/out/ui/packages/layout/components/Box.luau +6 -15
- package/out/ui/packages/layout/components/Container.luau +6 -15
- package/out/ui/packages/layout/components/FlexItem.luau +6 -15
- package/out/ui/packages/layout/components/Grid.luau +6 -15
- package/out/ui/packages/layout/components/List.luau +9 -16
- package/out/ui/packages/layout/components/Stack.luau +6 -15
- package/out/ui/packages/link/components/Link.luau +13 -16
- package/out/ui/packages/listItem/components/ListItem.d.ts +2 -1
- package/out/ui/packages/listItem/components/ListItem.luau +23 -4
- package/out/ui/packages/loadingStroke/components/LoadingStroke.d.ts +5 -1
- package/out/ui/packages/loadingStroke/components/loadingStrokeSx.d.ts +11 -0
- package/out/ui/packages/loadingStroke/components/loadingStrokeSx.luau +2 -0
- package/out/ui/packages/markdown/components/Markdown.luau +9 -16
- package/out/ui/packages/markdown/components/MarkdownEditor.luau +9 -16
- package/out/ui/packages/menu/components/Menu.d.ts +2 -1
- package/out/ui/packages/menu/components/Menu.luau +23 -12
- package/out/ui/packages/modal/components/Modal.d.ts +2 -1
- package/out/ui/packages/modal/components/Modal.luau +29 -5
- package/out/ui/packages/numberInput/components/NumberInput.d.ts +1 -0
- package/out/ui/packages/numberInput/components/NumberInput.luau +14 -3
- package/out/ui/packages/numberInput/components/numberValue.d.ts +1 -0
- package/out/ui/packages/numberInput/components/numberValue.luau +45 -0
- package/out/ui/packages/numberRangeEditor/components/NumberRangeEditor.luau +12 -16
- package/out/ui/packages/pagination/components/Pagination.luau +12 -16
- package/out/ui/packages/paper/components/Paper.d.ts +2 -1
- package/out/ui/packages/paper/components/Paper.luau +21 -12
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.luau +63 -38
- package/out/ui/packages/physicalPropertiesEditor/components/PhysicalPropertiesEditor.styles.luau +21 -7
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.d.ts +2 -0
- package/out/ui/packages/physicalPropertiesEditor/components/physicalParts.luau +14 -0
- package/out/ui/packages/popup/components/Popup.d.ts +2 -1
- package/out/ui/packages/popup/components/Popup.luau +35 -18
- package/out/ui/packages/preloader/components/Preloader.luau +9 -16
- package/out/ui/packages/progressBar/components/ProgressBar.luau +12 -16
- package/out/ui/packages/radioGroup/components/RadioGroup.luau +12 -16
- package/out/ui/packages/rating/components/Rating.luau +12 -16
- package/out/ui/packages/rayEditor/components/RayEditor.luau +12 -16
- package/out/ui/packages/rectEditor/components/RectEditor.luau +86 -43
- package/out/ui/packages/rectEditor/components/RectEditor.styles.luau +30 -7
- package/out/ui/packages/select/components/Select.luau +13 -16
- package/out/ui/packages/shadow/components/Shadow.d.ts +2 -1
- package/out/ui/packages/shadow/components/Shadow.luau +39 -17
- package/out/ui/packages/shadow/components/Shadow.styles.luau +7 -2
- package/out/ui/packages/sidebar/components/Sidebar.luau +9 -16
- package/out/ui/packages/skeleton/components/Skeleton.luau +19 -28
- package/out/ui/packages/slider/components/Slider.luau +16 -17
- package/out/ui/packages/speedDial/components/SpeedDial.luau +12 -16
- package/out/ui/packages/splitPane/components/SplitPane.luau +12 -16
- package/out/ui/packages/stateMatrix.luau +1209 -725
- package/out/ui/packages/stepper/components/Stepper.luau +9 -16
- package/out/ui/packages/switch/components/Switch.luau +16 -16
- package/out/ui/packages/table/components/Table.luau +9 -16
- package/out/ui/packages/tabs/components/Tabs.luau +12 -16
- package/out/ui/packages/toast/components/Toast.luau +16 -13
- package/out/ui/packages/toggleButton/components/ToggleButton.luau +24 -32
- package/out/ui/packages/tooltip/components/Tooltip.luau +9 -16
- package/out/ui/packages/treeView/components/TreeView.luau +9 -16
- package/out/ui/packages/typography/components/Typography.luau +13 -14
- package/out/ui/packages/udimEditor/components/UDimEditor.luau +12 -16
- package/out/ui/packages/vectorEditor/components/VectorEditor.luau +12 -16
- package/out/ui/packages/virtualList/components/EmptyListHint.d.ts +2 -1
- package/out/ui/packages/virtualList/components/EmptyListHint.luau +15 -4
- package/out/ui/packages/virtualList/components/VirtualList.luau +9 -16
- package/package.json +2 -2
|
@@ -5,6 +5,7 @@ local React = _react
|
|
|
5
5
|
local useEffect = _react.useEffect
|
|
6
6
|
local useRef = _react.useRef
|
|
7
7
|
local useReducedMotion = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "hooks").useReducedMotion
|
|
8
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
8
9
|
local loopProperty = TS.import(script, script.Parent.Parent.Parent, "motion").loopProperty
|
|
9
10
|
local useSkeletonStyles = TS.import(script, script.Parent, "Skeleton.styles").default
|
|
10
11
|
local _skeletonMotion = TS.import(script, script.Parent, "skeletonMotion")
|
|
@@ -56,25 +57,21 @@ local function SkeletonBlock(props)
|
|
|
56
57
|
end, { motion })
|
|
57
58
|
local corner = if variant == "circular" then circular elseif variant == "rectangular" then nil else rounded
|
|
58
59
|
local side = if variant == "circular" then width else nil
|
|
59
|
-
local _attributes = {
|
|
60
|
+
local _attributes = {
|
|
61
|
+
tag = "frame",
|
|
62
|
+
}
|
|
60
63
|
local _condition = id
|
|
61
64
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
62
65
|
_condition = "Skeleton"
|
|
63
66
|
end
|
|
64
67
|
_attributes.key = _condition
|
|
65
|
-
_attributes.
|
|
66
|
-
_attributes.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
end
|
|
73
|
-
if sx then
|
|
74
|
-
for _k, _v in sx do
|
|
75
|
-
_attributes[_k] = _v
|
|
76
|
-
end
|
|
77
|
-
end
|
|
68
|
+
_attributes.hostRef = ref
|
|
69
|
+
_attributes.base = {
|
|
70
|
+
BackgroundTransparency = 1,
|
|
71
|
+
BorderSizePixel = 0,
|
|
72
|
+
}
|
|
73
|
+
_attributes.className = className
|
|
74
|
+
_attributes.sx = sx
|
|
78
75
|
local _condition_1 = side
|
|
79
76
|
if _condition_1 == nil then
|
|
80
77
|
_condition_1 = width
|
|
@@ -107,7 +104,7 @@ local function SkeletonBlock(props)
|
|
|
107
104
|
setmetatable(_attributes_2, nil)
|
|
108
105
|
_condition_4 = React.createElement("uicorner", _attributes_2)
|
|
109
106
|
end
|
|
110
|
-
return React.createElement(
|
|
107
|
+
return React.createElement(SxHost, _attributes, React.createElement("frame", _attributes_1, _condition_3, _condition_4))
|
|
111
108
|
end
|
|
112
109
|
local function Skeleton(props)
|
|
113
110
|
local _binding = props
|
|
@@ -170,23 +167,17 @@ local function Skeleton(props)
|
|
|
170
167
|
end
|
|
171
168
|
end
|
|
172
169
|
local blockHeight = height * count + gap * (count - 1)
|
|
173
|
-
local _attributes = {
|
|
170
|
+
local _attributes = {
|
|
171
|
+
tag = "frame",
|
|
172
|
+
}
|
|
174
173
|
local _condition = id
|
|
175
174
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
176
175
|
_condition = "Skeleton"
|
|
177
176
|
end
|
|
178
177
|
_attributes.key = _condition
|
|
179
|
-
_attributes.
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
_attributes[_k] = _v
|
|
183
|
-
end
|
|
184
|
-
end
|
|
185
|
-
if sx then
|
|
186
|
-
for _k, _v in sx do
|
|
187
|
-
_attributes[_k] = _v
|
|
188
|
-
end
|
|
189
|
-
end
|
|
178
|
+
_attributes.hostRef = ref
|
|
179
|
+
_attributes.className = className
|
|
180
|
+
_attributes.sx = sx
|
|
190
181
|
_attributes.Size = UDim2.new(0, width, 0, blockHeight)
|
|
191
182
|
_attributes.BackgroundTransparency = 1
|
|
192
183
|
_attributes.BorderSizePixel = 0
|
|
@@ -210,7 +201,7 @@ local function Skeleton(props)
|
|
|
210
201
|
_newValue[_k] = _callback(_v, _k - 1, rows)
|
|
211
202
|
end
|
|
212
203
|
-- ▲ ReadonlyArray.map ▲
|
|
213
|
-
return React.createElement(
|
|
204
|
+
return React.createElement(SxHost, _attributes, _exp, React.createElement(React.Fragment, nil, _newValue))
|
|
214
205
|
end
|
|
215
206
|
local function SkeletonText(props)
|
|
216
207
|
local _attributes = table.clone(props)
|
|
@@ -6,6 +6,7 @@ local useRef = _react.useRef
|
|
|
6
6
|
local useState = _react.useState
|
|
7
7
|
local cx = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").cx
|
|
8
8
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
9
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
9
10
|
local commitNumber = TS.import(script, script.Parent.Parent.Parent, "numberInput", "components", "numberValue").commitNumber
|
|
10
11
|
local useSliderStyles = TS.import(script, script.Parent, "Slider.styles").default
|
|
11
12
|
local sliderMarkValues = TS.import(script, script.Parent, "sliderMarks").sliderMarkValues
|
|
@@ -91,26 +92,24 @@ local function Slider(props)
|
|
|
91
92
|
onCommit(nudged)
|
|
92
93
|
end
|
|
93
94
|
end
|
|
94
|
-
local _attributes = {
|
|
95
|
+
local _attributes = {
|
|
96
|
+
tag = "frame",
|
|
97
|
+
}
|
|
95
98
|
local _condition = id
|
|
96
99
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
97
100
|
_condition = "Slider"
|
|
98
101
|
end
|
|
99
102
|
_attributes.key = _condition
|
|
100
|
-
_attributes.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
for _k, _v in sx do
|
|
111
|
-
_attributes[_k] = _v
|
|
112
|
-
end
|
|
113
|
-
end
|
|
103
|
+
_attributes.hostRef = ref
|
|
104
|
+
_attributes.base = root
|
|
105
|
+
_attributes.className = className
|
|
106
|
+
_attributes.sx = sx
|
|
107
|
+
_attributes.state = {
|
|
108
|
+
disabled = disabled,
|
|
109
|
+
hover = hovering,
|
|
110
|
+
pressed = pressed,
|
|
111
|
+
focused = focused,
|
|
112
|
+
}
|
|
114
113
|
_attributes.Active = active
|
|
115
114
|
_attributes.Selectable = active
|
|
116
115
|
_attributes.BackgroundTransparency = if showFocus then 0.85 else 1
|
|
@@ -137,7 +136,7 @@ local function Slider(props)
|
|
|
137
136
|
update(rbx, input.Position.X)
|
|
138
137
|
end
|
|
139
138
|
end,
|
|
140
|
-
InputEnded = function(
|
|
139
|
+
InputEnded = function(_rbx, input)
|
|
141
140
|
if isSliderDrag(input.UserInputType.Name) then
|
|
142
141
|
finish()
|
|
143
142
|
end
|
|
@@ -225,7 +224,7 @@ local function Slider(props)
|
|
|
225
224
|
_attributes_7.Thickness = 1
|
|
226
225
|
_condition_2 = React.createElement("uistroke", _attributes_7)
|
|
227
226
|
end
|
|
228
|
-
return React.createElement(
|
|
227
|
+
return React.createElement(SxHost, _attributes, React.createElement("frame", _attributes_1, _exp, _condition_1, _exp_1, _exp_2, React.createElement("frame", _attributes_5, _exp_3, _condition_2)))
|
|
229
228
|
end
|
|
230
229
|
local default = Slider
|
|
231
230
|
return {
|
|
@@ -3,6 +3,7 @@ local TS = _G[script]
|
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local Icons = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Icons
|
|
5
5
|
local Fab = TS.import(script, script.Parent.Parent.Parent, "fab").Fab
|
|
6
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
6
7
|
local useSpeedDialStyles = TS.import(script, script.Parent, "SpeedDial.styles").default
|
|
7
8
|
local function SpeedDial(props)
|
|
8
9
|
local _binding = props
|
|
@@ -32,26 +33,21 @@ local function SpeedDial(props)
|
|
|
32
33
|
local mainFirst = direction == "down" or direction == "right"
|
|
33
34
|
local mainOrder = if mainFirst then 0 else 1000
|
|
34
35
|
local actionBase = if mainFirst then 1 else 0
|
|
35
|
-
local _attributes = {
|
|
36
|
+
local _attributes = {
|
|
37
|
+
tag = "frame",
|
|
38
|
+
}
|
|
36
39
|
local _condition = id
|
|
37
40
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
38
41
|
_condition = "SpeedDial"
|
|
39
42
|
end
|
|
40
43
|
_attributes.key = _condition
|
|
41
|
-
_attributes.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
if sx then
|
|
51
|
-
for _k, _v in sx do
|
|
52
|
-
_attributes[_k] = _v
|
|
53
|
-
end
|
|
54
|
-
end
|
|
44
|
+
_attributes.hostRef = ref
|
|
45
|
+
_attributes.base = styles.root
|
|
46
|
+
_attributes.className = className
|
|
47
|
+
_attributes.sx = sx
|
|
48
|
+
_attributes.state = {
|
|
49
|
+
disabled = disabled,
|
|
50
|
+
}
|
|
55
51
|
local _attributes_1 = table.clone(styles.list)
|
|
56
52
|
setmetatable(_attributes_1, nil)
|
|
57
53
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
@@ -83,7 +79,7 @@ local function SpeedDial(props)
|
|
|
83
79
|
-- ▲ ReadonlyArray.map ▲
|
|
84
80
|
_condition_1 = (React.createElement(React.Fragment, nil, _newValue))
|
|
85
81
|
end
|
|
86
|
-
return React.createElement(
|
|
82
|
+
return React.createElement(SxHost, _attributes, _exp, _condition_1, React.createElement(Fab, {
|
|
87
83
|
key = "Main",
|
|
88
84
|
icon = if open then openIcon else icon,
|
|
89
85
|
disabled = disabled,
|
|
@@ -7,6 +7,7 @@ local useRef = _react.useRef
|
|
|
7
7
|
local useState = _react.useState
|
|
8
8
|
local useTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").useTheme
|
|
9
9
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
10
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
10
11
|
local useSplitPaneStyles = TS.import(script, script.Parent, "SplitPane.styles").default
|
|
11
12
|
local _splitLook = TS.import(script, script.Parent, "splitLook")
|
|
12
13
|
local splitHitTransparency = _splitLook.splitHitTransparency
|
|
@@ -79,26 +80,21 @@ local function SplitPane(props)
|
|
|
79
80
|
return connection:Disconnect()
|
|
80
81
|
end
|
|
81
82
|
end, { body, vertical })
|
|
82
|
-
local _attributes = {
|
|
83
|
+
local _attributes = {
|
|
84
|
+
tag = "frame",
|
|
85
|
+
}
|
|
83
86
|
local _condition = id
|
|
84
87
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
85
88
|
_condition = "SplitPane"
|
|
86
89
|
end
|
|
87
90
|
_attributes.key = _condition
|
|
88
|
-
_attributes.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
end
|
|
96
|
-
end
|
|
97
|
-
if sx then
|
|
98
|
-
for _k, _v in sx do
|
|
99
|
-
_attributes[_k] = _v
|
|
100
|
-
end
|
|
101
|
-
end
|
|
91
|
+
_attributes.hostRef = ref
|
|
92
|
+
_attributes.base = styles.root
|
|
93
|
+
_attributes.className = className
|
|
94
|
+
_attributes.sx = sx
|
|
95
|
+
_attributes.state = {
|
|
96
|
+
disabled = disabled,
|
|
97
|
+
}
|
|
102
98
|
local _attributes_1 = {
|
|
103
99
|
key = "Body",
|
|
104
100
|
ref = setBody,
|
|
@@ -233,7 +229,7 @@ local function SplitPane(props)
|
|
|
233
229
|
}
|
|
234
230
|
_condition_1 = (React.createElement("frame", _attributes_7))
|
|
235
231
|
end
|
|
236
|
-
return React.createElement(
|
|
232
|
+
return React.createElement(SxHost, _attributes, React.createElement("frame", _attributes_1, _exp, _exp_4, _exp_5, _condition_1))
|
|
237
233
|
end
|
|
238
234
|
local default = SplitPane
|
|
239
235
|
return {
|