@rbxts/uiblox 0.2.0-alpha.24 → 0.2.0-alpha.26
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/hooks/index.d.ts +1 -0
- package/out/hooks/init.luau +3 -0
- package/out/hooks/useBreakpoints.luau +2 -11
- package/out/hooks/viewportObserver.d.ts +10 -0
- package/out/hooks/viewportObserver.luau +75 -0
- package/out/theme/interfaces/theme/Theme.d.ts +15 -0
- package/out/theme/styles/utilities/componentStyles.luau +45 -3
- package/out/theme/styles/utilities/componentTheme.d.ts +15 -0
- package/out/theme/styles/utilities/index.d.ts +2 -0
- package/out/theme/styles/utilities/init.luau +7 -0
- package/out/theme/styles/utilities/resolveStyle.d.ts +10 -2
- package/out/theme/styles/utilities/resolveStyle.luau +7 -3
- package/out/theme/styles/utilities/resolveSx.d.ts +110 -0
- package/out/theme/styles/utilities/resolveSx.luau +479 -0
- package/out/theme/styles/utilities/styleCache.d.ts +2 -0
- package/out/theme/styles/utilities/styleCache.luau +9 -0
- 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 +15 -16
- 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 +17 -5
- 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 +1171 -675
- 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
|
@@ -12,6 +12,7 @@ local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "co
|
|
|
12
12
|
local spinnerPixels = TS.import(script, script.Parent.Parent.Parent, "button", "components", "buttonLook").spinnerPixels
|
|
13
13
|
local CircularProgress = TS.import(script, script.Parent.Parent.Parent, "circularProgress").CircularProgress
|
|
14
14
|
local Divider = TS.import(script, script.Parent.Parent.Parent, "divider").Divider
|
|
15
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
15
16
|
local Orientations = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Orientations
|
|
16
17
|
local useInputStyles = TS.import(script, script.Parent, "Input.styles").default
|
|
17
18
|
local syncInputDraft = TS.import(script, script.Parent, "inputDraft").syncInputDraft
|
|
@@ -102,26 +103,23 @@ local function Input(props)
|
|
|
102
103
|
end, { text })
|
|
103
104
|
local showStroke = variant == "outlined" or variant == "filled"
|
|
104
105
|
local showCorner = rounded
|
|
105
|
-
local _attributes = {
|
|
106
|
+
local _attributes = {
|
|
107
|
+
tag = "frame",
|
|
108
|
+
}
|
|
106
109
|
local _condition_1 = id
|
|
107
110
|
if not (_condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1 ~= "" and _condition_1) then
|
|
108
111
|
_condition_1 = "Input"
|
|
109
112
|
end
|
|
110
113
|
_attributes.key = _condition_1
|
|
111
|
-
_attributes.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
if sx then
|
|
121
|
-
for _k, _v in sx do
|
|
122
|
-
_attributes[_k] = _v
|
|
123
|
-
end
|
|
124
|
-
end
|
|
114
|
+
_attributes.hostRef = ref
|
|
115
|
+
_attributes.base = root
|
|
116
|
+
_attributes.className = className
|
|
117
|
+
_attributes.sx = sx
|
|
118
|
+
_attributes.state = {
|
|
119
|
+
disabled = disabled,
|
|
120
|
+
loading = loading,
|
|
121
|
+
focused = focused,
|
|
122
|
+
}
|
|
125
123
|
local _attributes_1 = {
|
|
126
124
|
key = "Margin",
|
|
127
125
|
}
|
|
@@ -272,7 +270,7 @@ local function Input(props)
|
|
|
272
270
|
_attributes_4.Text = helperText
|
|
273
271
|
_condition_7 = (React.createElement("textlabel", _attributes_4))
|
|
274
272
|
end
|
|
275
|
-
return React.createElement(
|
|
273
|
+
return React.createElement(SxHost, _attributes, React.createElement("frame", _attributes_1, _exp_1, _exp_2, _condition_7))
|
|
276
274
|
end
|
|
277
275
|
local default = Input
|
|
278
276
|
return {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
4
5
|
local useBoxStyles = TS.import(script, script.Parent, "Box.styles").default
|
|
5
6
|
local function Box(props)
|
|
6
7
|
local _binding = props
|
|
@@ -21,27 +22,17 @@ local function Box(props)
|
|
|
21
22
|
_condition = "Box"
|
|
22
23
|
end
|
|
23
24
|
_attributes.key = _condition
|
|
24
|
-
_attributes.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|
25
|
+
_attributes.hostRef = ref
|
|
26
|
+
_attributes.base = styles.root
|
|
27
|
+
_attributes.className = className
|
|
28
|
+
_attributes.sx = sx
|
|
38
29
|
local _condition_1 = padding ~= nil
|
|
39
30
|
if _condition_1 then
|
|
40
31
|
local _attributes_1 = table.clone(styles.padding)
|
|
41
32
|
setmetatable(_attributes_1, nil)
|
|
42
33
|
_condition_1 = React.createElement("uipadding", _attributes_1)
|
|
43
34
|
end
|
|
44
|
-
return React.createElement(
|
|
35
|
+
return React.createElement(SxHost, _attributes, _condition_1, children)
|
|
45
36
|
end
|
|
46
37
|
local default = Box
|
|
47
38
|
return {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
4
5
|
local useContainerStyles = TS.import(script, script.Parent, "Container.styles").default
|
|
5
6
|
local function Container(props)
|
|
6
7
|
local _binding = props
|
|
@@ -21,20 +22,10 @@ local function Container(props)
|
|
|
21
22
|
_condition = "Container"
|
|
22
23
|
end
|
|
23
24
|
_attributes.key = _condition
|
|
24
|
-
_attributes.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|
25
|
+
_attributes.hostRef = ref
|
|
26
|
+
_attributes.base = styles.root
|
|
27
|
+
_attributes.className = className
|
|
28
|
+
_attributes.sx = sx
|
|
38
29
|
local _attributes_1 = {
|
|
39
30
|
key = "Inner",
|
|
40
31
|
}
|
|
@@ -46,7 +37,7 @@ local function Container(props)
|
|
|
46
37
|
local _exp = React.createElement("uisizeconstraint", _attributes_2)
|
|
47
38
|
local _attributes_3 = table.clone(styles.gutter)
|
|
48
39
|
setmetatable(_attributes_3, nil)
|
|
49
|
-
return React.createElement(
|
|
40
|
+
return React.createElement(SxHost, _attributes, React.createElement("frame", _attributes_1, _exp, React.createElement("uipadding", _attributes_3), children))
|
|
50
41
|
end
|
|
51
42
|
local default = Container
|
|
52
43
|
return {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
4
5
|
local useFlexItemStyles = TS.import(script, script.Parent, "FlexItem.styles").default
|
|
5
6
|
local function FlexItem(props)
|
|
6
7
|
local _binding = props
|
|
@@ -25,23 +26,13 @@ local function FlexItem(props)
|
|
|
25
26
|
_condition = "FlexItem"
|
|
26
27
|
end
|
|
27
28
|
_attributes.key = _condition
|
|
28
|
-
_attributes.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if className then
|
|
33
|
-
for _k, _v in className do
|
|
34
|
-
_attributes[_k] = _v
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
if sx then
|
|
38
|
-
for _k, _v in sx do
|
|
39
|
-
_attributes[_k] = _v
|
|
40
|
-
end
|
|
41
|
-
end
|
|
29
|
+
_attributes.hostRef = ref
|
|
30
|
+
_attributes.base = styles.root
|
|
31
|
+
_attributes.className = className
|
|
32
|
+
_attributes.sx = sx
|
|
42
33
|
local _attributes_1 = table.clone(styles.flex)
|
|
43
34
|
setmetatable(_attributes_1, nil)
|
|
44
|
-
return React.createElement(
|
|
35
|
+
return React.createElement(SxHost, _attributes, React.createElement("uiflexitem", _attributes_1), children)
|
|
45
36
|
end
|
|
46
37
|
local default = FlexItem
|
|
47
38
|
return {
|
|
@@ -4,6 +4,7 @@ local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
|
4
4
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
5
5
|
local componentStyles = _theme.componentStyles
|
|
6
6
|
local createStyles = _theme.createStyles
|
|
7
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
7
8
|
local _gridProps = TS.import(script, script.Parent, "gridProps")
|
|
8
9
|
local gridCornerKey = _gridProps.gridCornerKey
|
|
9
10
|
local gridMaxCells = _gridProps.gridMaxCells
|
|
@@ -112,27 +113,17 @@ local function Grid(props)
|
|
|
112
113
|
_condition = "Grid"
|
|
113
114
|
end
|
|
114
115
|
_attributes.key = _condition
|
|
115
|
-
_attributes.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
if className then
|
|
120
|
-
for _k, _v in className do
|
|
121
|
-
_attributes[_k] = _v
|
|
122
|
-
end
|
|
123
|
-
end
|
|
124
|
-
if sx then
|
|
125
|
-
for _k, _v in sx do
|
|
126
|
-
_attributes[_k] = _v
|
|
127
|
-
end
|
|
128
|
-
end
|
|
116
|
+
_attributes.hostRef = ref
|
|
117
|
+
_attributes.base = baseGrid
|
|
118
|
+
_attributes.className = className
|
|
119
|
+
_attributes.sx = sx
|
|
129
120
|
local _attributes_1 = {
|
|
130
121
|
key = "GridLayout",
|
|
131
122
|
}
|
|
132
123
|
for _k, _v in baseLayout do
|
|
133
124
|
_attributes_1[_k] = _v
|
|
134
125
|
end
|
|
135
|
-
return React.createElement(
|
|
126
|
+
return React.createElement(SxHost, _attributes, React.createElement("uigridlayout", _attributes_1), children)
|
|
136
127
|
end
|
|
137
128
|
local default = Grid
|
|
138
129
|
return {
|
|
@@ -4,6 +4,7 @@ local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
|
4
4
|
local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme")
|
|
5
5
|
local componentStyles = _theme.componentStyles
|
|
6
6
|
local createStyles = _theme.createStyles
|
|
7
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
7
8
|
local useListStyles = componentStyles("List", function(_, props)
|
|
8
9
|
return createStyles({
|
|
9
10
|
baseList = {
|
|
@@ -75,33 +76,25 @@ local function List(props)
|
|
|
75
76
|
})
|
|
76
77
|
local baseList = _binding_1.baseList
|
|
77
78
|
local baseLayout = _binding_1.baseLayout
|
|
78
|
-
local _attributes = {
|
|
79
|
+
local _attributes = {
|
|
80
|
+
tag = "frame",
|
|
81
|
+
}
|
|
79
82
|
local _condition = id
|
|
80
83
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
81
84
|
_condition = "List"
|
|
82
85
|
end
|
|
83
86
|
_attributes.key = _condition
|
|
84
|
-
_attributes.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
if className then
|
|
89
|
-
for _k, _v in className do
|
|
90
|
-
_attributes[_k] = _v
|
|
91
|
-
end
|
|
92
|
-
end
|
|
93
|
-
if sx then
|
|
94
|
-
for _k, _v in sx do
|
|
95
|
-
_attributes[_k] = _v
|
|
96
|
-
end
|
|
97
|
-
end
|
|
87
|
+
_attributes.hostRef = ref
|
|
88
|
+
_attributes.base = baseList
|
|
89
|
+
_attributes.className = className
|
|
90
|
+
_attributes.sx = sx
|
|
98
91
|
local _attributes_1 = {
|
|
99
92
|
key = "ListLayout",
|
|
100
93
|
}
|
|
101
94
|
for _k, _v in baseLayout do
|
|
102
95
|
_attributes_1[_k] = _v
|
|
103
96
|
end
|
|
104
|
-
return React.createElement(
|
|
97
|
+
return React.createElement(SxHost, _attributes, React.createElement("uilistlayout", _attributes_1), children)
|
|
105
98
|
end
|
|
106
99
|
local default = List
|
|
107
100
|
return {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
4
5
|
local useStackStyles = TS.import(script, script.Parent, "Stack.styles").default
|
|
5
6
|
local function Stack(props)
|
|
6
7
|
local _binding = props
|
|
@@ -29,23 +30,13 @@ local function Stack(props)
|
|
|
29
30
|
_condition = "Stack"
|
|
30
31
|
end
|
|
31
32
|
_attributes.key = _condition
|
|
32
|
-
_attributes.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if className then
|
|
37
|
-
for _k, _v in className do
|
|
38
|
-
_attributes[_k] = _v
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
if sx then
|
|
42
|
-
for _k, _v in sx do
|
|
43
|
-
_attributes[_k] = _v
|
|
44
|
-
end
|
|
45
|
-
end
|
|
33
|
+
_attributes.hostRef = ref
|
|
34
|
+
_attributes.base = styles.root
|
|
35
|
+
_attributes.className = className
|
|
36
|
+
_attributes.sx = sx
|
|
46
37
|
local _attributes_1 = table.clone(styles.list)
|
|
47
38
|
setmetatable(_attributes_1, nil)
|
|
48
|
-
return React.createElement(
|
|
39
|
+
return React.createElement(SxHost, _attributes, React.createElement("uilistlayout", _attributes_1), children)
|
|
49
40
|
end
|
|
50
41
|
local default = Stack
|
|
51
42
|
return {
|
|
@@ -4,6 +4,7 @@ local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
|
4
4
|
local React = _react
|
|
5
5
|
local useState = _react.useState
|
|
6
6
|
local canActivate = TS.import(script, script.Parent.Parent.Parent, "button", "components", "activation").canActivate
|
|
7
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
7
8
|
local useLinkStyles = TS.import(script, script.Parent, "Link.styles").default
|
|
8
9
|
local function Link(props)
|
|
9
10
|
local _binding = props
|
|
@@ -30,26 +31,22 @@ local function Link(props)
|
|
|
30
31
|
showUnderline = showUnderline,
|
|
31
32
|
})
|
|
32
33
|
local active = canActivate(disabled)
|
|
33
|
-
local _attributes = {
|
|
34
|
+
local _attributes = {
|
|
35
|
+
tag = "textbutton",
|
|
36
|
+
}
|
|
34
37
|
local _condition = id
|
|
35
38
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
36
39
|
_condition = "Link"
|
|
37
40
|
end
|
|
38
41
|
_attributes.key = _condition
|
|
39
|
-
_attributes.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
end
|
|
48
|
-
if sx then
|
|
49
|
-
for _k, _v in sx do
|
|
50
|
-
_attributes[_k] = _v
|
|
51
|
-
end
|
|
52
|
-
end
|
|
42
|
+
_attributes.hostRef = ref
|
|
43
|
+
_attributes.base = styles.root
|
|
44
|
+
_attributes.className = className
|
|
45
|
+
_attributes.sx = sx
|
|
46
|
+
_attributes.state = {
|
|
47
|
+
disabled = disabled,
|
|
48
|
+
hover = hover,
|
|
49
|
+
}
|
|
53
50
|
_attributes.Text = text
|
|
54
51
|
_attributes.Active = active
|
|
55
52
|
_attributes.Selectable = active
|
|
@@ -75,7 +72,7 @@ local function Link(props)
|
|
|
75
72
|
for _k, _v in styles.underline do
|
|
76
73
|
_attributes_1[_k] = _v
|
|
77
74
|
end
|
|
78
|
-
return React.createElement(
|
|
75
|
+
return React.createElement(SxHost, _attributes, React.createElement("frame", _attributes_1))
|
|
79
76
|
end
|
|
80
77
|
local default = Link
|
|
81
78
|
return {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
1
2
|
export interface ListItemProps {
|
|
2
3
|
text: string;
|
|
3
4
|
secondary?: string;
|
|
@@ -7,5 +8,5 @@ export interface ListItemProps {
|
|
|
7
8
|
divider?: boolean;
|
|
8
9
|
onActivated?: () => void;
|
|
9
10
|
}
|
|
10
|
-
declare function ListItem(props: ListItemProps): JSX.Element;
|
|
11
|
+
declare function ListItem(props: CustomizedProps<TextButton, ListItemProps>): JSX.Element;
|
|
11
12
|
export default ListItem;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
4
5
|
local useListItemStyles = TS.import(script, script.Parent, "ListItem.styles").default
|
|
5
6
|
local function ListItem(props)
|
|
6
7
|
local _binding = props
|
|
@@ -23,17 +24,35 @@ local function ListItem(props)
|
|
|
23
24
|
divider = false
|
|
24
25
|
end
|
|
25
26
|
local onActivated = _binding.onActivated
|
|
27
|
+
local className = _binding.className
|
|
28
|
+
local sx = _binding.sx
|
|
29
|
+
local id = _binding.id
|
|
30
|
+
local ref = _binding.ref
|
|
26
31
|
local styles = useListItemStyles({
|
|
27
32
|
selected = selected,
|
|
28
33
|
disabled = disabled,
|
|
29
34
|
dense = dense,
|
|
30
35
|
})
|
|
31
36
|
local _attributes = {
|
|
32
|
-
|
|
37
|
+
tag = "textbutton",
|
|
33
38
|
}
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
local _condition = id
|
|
40
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
41
|
+
_condition = "ListItem"
|
|
36
42
|
end
|
|
43
|
+
_attributes.key = _condition
|
|
44
|
+
_attributes.hostRef = ref
|
|
45
|
+
_attributes.base = styles.root
|
|
46
|
+
_attributes.className = className
|
|
47
|
+
_attributes.sx = sx
|
|
48
|
+
_attributes.state = {
|
|
49
|
+
disabled = disabled,
|
|
50
|
+
selected = selected,
|
|
51
|
+
}
|
|
52
|
+
_attributes.Text = ""
|
|
53
|
+
_attributes.Active = not disabled
|
|
54
|
+
_attributes.Selectable = not disabled
|
|
55
|
+
_attributes.AutoButtonColor = false
|
|
37
56
|
_attributes.Event = {
|
|
38
57
|
Activated = function()
|
|
39
58
|
if not disabled and onActivated ~= nil then
|
|
@@ -80,7 +99,7 @@ local function ListItem(props)
|
|
|
80
99
|
else
|
|
81
100
|
_result_1 = nil
|
|
82
101
|
end
|
|
83
|
-
return React.createElement(
|
|
102
|
+
return React.createElement(SxHost, _attributes, _exp, _exp_1, _exp_2, _result, _result_1)
|
|
84
103
|
end
|
|
85
104
|
local default = ListItem
|
|
86
105
|
return {
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { CustomizedProps } from "../../../../theme/index";
|
|
2
|
+
import { LoadingStrokeStyle } from "./loadingStrokeSx";
|
|
2
3
|
export interface LoadingStrokeProps {
|
|
3
4
|
animating?: boolean;
|
|
4
5
|
color?: Color3;
|
|
5
6
|
thickness?: number;
|
|
6
7
|
}
|
|
7
|
-
declare function LoadingStroke(props: CustomizedProps<UIStroke, LoadingStrokeProps>
|
|
8
|
+
declare function LoadingStroke(props: Omit<CustomizedProps<UIStroke, LoadingStrokeProps>, "sx" | "className"> & {
|
|
9
|
+
className?: LoadingStrokeStyle;
|
|
10
|
+
sx?: LoadingStrokeStyle;
|
|
11
|
+
}): JSX.Element;
|
|
8
12
|
export default LoadingStroke;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WriteableStyle } from "../../../../theme/index";
|
|
2
|
+
export type LoadingStrokeStyle = WriteableStyle<UIStroke> & {
|
|
3
|
+
BackgroundColor3?: never;
|
|
4
|
+
BackgroundTransparency?: never;
|
|
5
|
+
Size?: never;
|
|
6
|
+
Position?: never;
|
|
7
|
+
AnchorPoint?: never;
|
|
8
|
+
BorderSizePixel?: never;
|
|
9
|
+
Text?: never;
|
|
10
|
+
TextColor3?: never;
|
|
11
|
+
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local Divider = TS.import(script, script.Parent.Parent.Parent, "divider").Divider
|
|
5
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
5
6
|
local Orientations = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Orientations
|
|
6
7
|
local _parseMarkdown = TS.import(script, script.Parent.Parent, "parseMarkdown")
|
|
7
8
|
local inlinesToRichText = _parseMarkdown.inlinesToRichText
|
|
@@ -188,26 +189,18 @@ local function Markdown(props)
|
|
|
188
189
|
local ref = _binding.ref
|
|
189
190
|
local styles = useMarkdownStyles()
|
|
190
191
|
local blocks = parseMarkdown(value)
|
|
191
|
-
local _attributes = {
|
|
192
|
+
local _attributes = {
|
|
193
|
+
tag = "frame",
|
|
194
|
+
}
|
|
192
195
|
local _condition = id
|
|
193
196
|
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
194
197
|
_condition = "Markdown"
|
|
195
198
|
end
|
|
196
199
|
_attributes.key = _condition
|
|
197
|
-
_attributes.
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
if className then
|
|
202
|
-
for _k, _v in className do
|
|
203
|
-
_attributes[_k] = _v
|
|
204
|
-
end
|
|
205
|
-
end
|
|
206
|
-
if sx then
|
|
207
|
-
for _k, _v in sx do
|
|
208
|
-
_attributes[_k] = _v
|
|
209
|
-
end
|
|
210
|
-
end
|
|
200
|
+
_attributes.hostRef = ref
|
|
201
|
+
_attributes.base = styles.root
|
|
202
|
+
_attributes.className = className
|
|
203
|
+
_attributes.sx = sx
|
|
211
204
|
local _attributes_1 = table.clone(styles.layout)
|
|
212
205
|
setmetatable(_attributes_1, nil)
|
|
213
206
|
local _exp = React.createElement("uilistlayout", _attributes_1)
|
|
@@ -220,7 +213,7 @@ local function Markdown(props)
|
|
|
220
213
|
_newValue[_k] = _callback(_v, _k - 1, blocks)
|
|
221
214
|
end
|
|
222
215
|
-- ▲ ReadonlyArray.map ▲
|
|
223
|
-
return React.createElement(
|
|
216
|
+
return React.createElement(SxHost, _attributes, _exp, _newValue)
|
|
224
217
|
end
|
|
225
218
|
local default = Markdown
|
|
226
219
|
return {
|
|
@@ -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 Button = TS.import(script, script.Parent.Parent.Parent, "button").Button
|
|
10
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
10
11
|
local IconButton = TS.import(script, script.Parent.Parent.Parent, "iconButton").IconButton
|
|
11
12
|
local Icons = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Icons
|
|
12
13
|
local ToggleButtonGroup = TS.import(script, script.Parent.Parent.Parent, "toggleButton").ToggleButtonGroup
|
|
@@ -90,26 +91,18 @@ local function MarkdownEditor(props)
|
|
|
90
91
|
local previewNode = if preview ~= nil then preview(value) else React.createElement(Markdown, {
|
|
91
92
|
value = value,
|
|
92
93
|
})
|
|
93
|
-
local _attributes = {
|
|
94
|
+
local _attributes = {
|
|
95
|
+
tag = "frame",
|
|
96
|
+
}
|
|
94
97
|
local _condition_1 = id
|
|
95
98
|
if not (_condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1 ~= "" and _condition_1) then
|
|
96
99
|
_condition_1 = "MarkdownEditor"
|
|
97
100
|
end
|
|
98
101
|
_attributes.key = _condition_1
|
|
99
|
-
_attributes.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
if className then
|
|
104
|
-
for _k, _v in className do
|
|
105
|
-
_attributes[_k] = _v
|
|
106
|
-
end
|
|
107
|
-
end
|
|
108
|
-
if sx then
|
|
109
|
-
for _k, _v in sx do
|
|
110
|
-
_attributes[_k] = _v
|
|
111
|
-
end
|
|
112
|
-
end
|
|
102
|
+
_attributes.hostRef = ref
|
|
103
|
+
_attributes.base = styles.root
|
|
104
|
+
_attributes.className = className
|
|
105
|
+
_attributes.sx = sx
|
|
113
106
|
local _attributes_1 = table.clone(styles.corner)
|
|
114
107
|
setmetatable(_attributes_1, nil)
|
|
115
108
|
local _exp = React.createElement("uicorner", _attributes_1)
|
|
@@ -314,7 +307,7 @@ local function MarkdownEditor(props)
|
|
|
314
307
|
setmetatable(_attributes_9, nil)
|
|
315
308
|
_condition_5 = (React.createElement("scrollingframe", _attributes_8, React.createElement("uipadding", _attributes_9), previewNode))
|
|
316
309
|
end
|
|
317
|
-
return React.createElement(
|
|
310
|
+
return React.createElement(SxHost, _attributes, _exp, _exp_1, _exp_2, _exp_4, _exp_5, React.createElement("frame", _attributes_7, _condition_2, _condition_3, _condition_4, _condition_5))
|
|
318
311
|
end
|
|
319
312
|
local default = MarkdownEditor
|
|
320
313
|
return {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "@rbxts/react";
|
|
2
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
3
|
export interface MenuItem {
|
|
3
4
|
id: string;
|
|
4
5
|
text: string;
|
|
@@ -15,5 +16,5 @@ export interface MenuProps {
|
|
|
15
16
|
dense?: boolean;
|
|
16
17
|
selected?: string;
|
|
17
18
|
}
|
|
18
|
-
declare function Menu(props: MenuProps): JSX.Element | undefined;
|
|
19
|
+
declare function Menu(props: CustomizedProps<Frame, MenuProps>): JSX.Element | undefined;
|
|
19
20
|
export default Menu;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local SxHost = TS.import(script, script.Parent.Parent.Parent, "host").SxHost
|
|
4
5
|
local ListItem = TS.import(script, script.Parent.Parent.Parent, "listItem").ListItem
|
|
5
6
|
local Popup = TS.import(script, script.Parent.Parent.Parent, "popup").Popup
|
|
6
7
|
local EmptyListHint = TS.import(script, script.Parent.Parent.Parent, "virtualList").EmptyListHint
|
|
@@ -18,6 +19,10 @@ local function Menu(props)
|
|
|
18
19
|
local empty = _binding.empty
|
|
19
20
|
local dense = _binding.dense
|
|
20
21
|
local selected = _binding.selected
|
|
22
|
+
local className = _binding.className
|
|
23
|
+
local sx = _binding.sx
|
|
24
|
+
local id = _binding.id
|
|
25
|
+
local ref = _binding.ref
|
|
21
26
|
local styles = useMenuStyles()
|
|
22
27
|
if not open then
|
|
23
28
|
return nil
|
|
@@ -26,11 +31,17 @@ local function Menu(props)
|
|
|
26
31
|
local row = if dense == true then ROW_DENSE else ROW
|
|
27
32
|
local height = if vacant then row else #items * row
|
|
28
33
|
local _attributes = {
|
|
29
|
-
|
|
34
|
+
tag = "frame",
|
|
30
35
|
}
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
local _condition = id
|
|
37
|
+
if not (_condition ~= 0 and _condition == _condition and _condition ~= "" and _condition) then
|
|
38
|
+
_condition = "Surface"
|
|
33
39
|
end
|
|
40
|
+
_attributes.key = _condition
|
|
41
|
+
_attributes.hostRef = ref
|
|
42
|
+
_attributes.base = styles.surface
|
|
43
|
+
_attributes.className = className
|
|
44
|
+
_attributes.sx = sx
|
|
34
45
|
local _attributes_1 = table.clone(styles.corner)
|
|
35
46
|
setmetatable(_attributes_1, nil)
|
|
36
47
|
local _exp = React.createElement("uicorner", _attributes_1)
|
|
@@ -42,18 +53,18 @@ local function Menu(props)
|
|
|
42
53
|
local _exp_2 = React.createElement("uilistlayout", _attributes_3)
|
|
43
54
|
local _result
|
|
44
55
|
if vacant then
|
|
45
|
-
local
|
|
46
|
-
if
|
|
56
|
+
local _condition_1 = empty
|
|
57
|
+
if _condition_1 == nil then
|
|
47
58
|
local _attributes_4 = {}
|
|
48
|
-
local
|
|
49
|
-
if
|
|
50
|
-
|
|
59
|
+
local _condition_2 = emptyText
|
|
60
|
+
if _condition_2 == nil then
|
|
61
|
+
_condition_2 = "No options"
|
|
51
62
|
end
|
|
52
|
-
_attributes_4.text =
|
|
63
|
+
_attributes_4.text = _condition_2
|
|
53
64
|
_attributes_4.height = row
|
|
54
|
-
|
|
65
|
+
_condition_1 = React.createElement(EmptyListHint, _attributes_4)
|
|
55
66
|
end
|
|
56
|
-
_result =
|
|
67
|
+
_result = _condition_1
|
|
57
68
|
else
|
|
58
69
|
-- ▼ ReadonlyArray.map ▼
|
|
59
70
|
local _newValue = table.create(#items)
|
|
@@ -83,7 +94,7 @@ local function Menu(props)
|
|
|
83
94
|
anchor = anchor,
|
|
84
95
|
preferredHeight = height,
|
|
85
96
|
onDismiss = onClose,
|
|
86
|
-
}, React.createElement(
|
|
97
|
+
}, React.createElement(SxHost, _attributes, _exp, _exp_1, _exp_2, _result))
|
|
87
98
|
end
|
|
88
99
|
local default = Menu
|
|
89
100
|
return {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "@rbxts/react";
|
|
2
|
+
import { CustomizedProps } from "../../../../theme/index";
|
|
2
3
|
export interface ModalProps {
|
|
3
4
|
host?: Instance;
|
|
4
5
|
open: boolean;
|
|
5
6
|
onClose: () => void;
|
|
6
7
|
children?: React.ReactNode;
|
|
7
8
|
}
|
|
8
|
-
declare function Modal(props: ModalProps): JSX.Element;
|
|
9
|
+
declare function Modal(props: CustomizedProps<Frame, ModalProps>): JSX.Element;
|
|
9
10
|
export default Modal;
|