@rbxts/uiblox 0.1.11 → 0.1.13
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 +3 -4
- package/out/theme/components/ThemeProducer.luau +12 -0
- package/out/theme/components/ThemeProvider.luau +10 -9
- package/out/theme/components/ThemeWrapper.luau +15 -20
- package/out/theme/components/init.luau +0 -2
- package/out/theme/init.luau +0 -1
- package/out/theme/styles/utilities/makeStyles.luau +2 -2
- package/out/ui/packages/button/components/Button.luau +13 -10
- package/out/ui/packages/divider/components/Divider.luau +8 -4
- package/out/ui/packages/icon/components/Icon.luau +9 -6
- package/out/ui/packages/iconButton/components/IconButton.luau +11 -8
- package/out/ui/packages/input/components/Input.luau +34 -19
- package/out/ui/packages/progressBar/components/ProgressBar.luau +36 -17
- package/out/ui/packages/shadow/components/Shadow.luau +13 -9
- package/out/ui/packages/sidebar/components/Sidebar.luau +14 -6
- package/out/ui/packages/toast/components/Toast.luau +25 -16
- package/out/ui/packages/treeView/components/TreeView.luau +40 -25
- package/out/ui/packages/typography/components/Typography.luau +8 -4
- package/package.json +15 -12
- package/out/index.d.ts +0 -2
- package/out/theme/components/ThemeProvider.d.ts +0 -9
- package/out/theme/components/ThemeStore.d.ts +0 -13
- package/out/theme/components/ThemeStore.luau +0 -29
- package/out/theme/components/ThemeWrapper.d.ts +0 -9
- package/out/theme/components/index.d.ts +0 -8
- package/out/theme/constants/NumberConstants.d.ts +0 -6
- package/out/theme/constants/ThemeConstants.d.ts +0 -5
- package/out/theme/constants/index.d.ts +0 -2
- package/out/theme/index.d.ts +0 -20
- package/out/theme/interfaces/iconSizes/IconSizes.d.ts +0 -5
- package/out/theme/interfaces/iconSizes/index.d.ts +0 -1
- package/out/theme/interfaces/index.d.ts +0 -13
- package/out/theme/interfaces/palette/Palette.d.ts +0 -26
- package/out/theme/interfaces/palette/colorTokens/ColorTokens.d.ts +0 -4
- package/out/theme/interfaces/palette/colorTokens/index.d.ts +0 -1
- package/out/theme/interfaces/palette/colors/Blue.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Colors.d.ts +0 -42
- package/out/theme/interfaces/palette/colors/Common.d.ts +0 -6
- package/out/theme/interfaces/palette/colors/Dark.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Gray.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Green.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Light.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Magenta.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Orange.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Purple.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Red.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Turquoise.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/Yellow.d.ts +0 -3
- package/out/theme/interfaces/palette/colors/index.d.ts +0 -13
- package/out/theme/interfaces/palette/index.d.ts +0 -3
- package/out/theme/interfaces/spacing/Borders.d.ts +0 -4
- package/out/theme/interfaces/spacing/Padding.d.ts +0 -4
- package/out/theme/interfaces/spacing/Shape.d.ts +0 -3
- package/out/theme/interfaces/spacing/Spacing.d.ts +0 -4
- package/out/theme/interfaces/spacing/index.d.ts +0 -4
- package/out/theme/interfaces/theme/Theme.d.ts +0 -14
- package/out/theme/interfaces/theme/ThemeConstants.d.ts +0 -25
- package/out/theme/interfaces/theme/ThemeOptions.d.ts +0 -4
- package/out/theme/interfaces/theme/index.d.ts +0 -3
- package/out/theme/interfaces/tokens/Tokens.d.ts +0 -1
- package/out/theme/interfaces/tokens/index.d.ts +0 -1
- package/out/theme/interfaces/typography/FontFamilies.d.ts +0 -2
- package/out/theme/interfaces/typography/FontFamilyOptions.d.ts +0 -3
- package/out/theme/interfaces/typography/FontSizeOptions.d.ts +0 -3
- package/out/theme/interfaces/typography/FontSizes.d.ts +0 -3
- package/out/theme/interfaces/typography/ThemeTypography.d.ts +0 -7
- package/out/theme/interfaces/typography/Variants.d.ts +0 -18
- package/out/theme/interfaces/typography/index.d.ts +0 -8
- package/out/theme/styles/index.d.ts +0 -5
- package/out/theme/styles/types/WriteableStyle.d.ts +0 -1
- package/out/theme/styles/types/index.d.ts +0 -2
- package/out/theme/styles/types/styles.d.ts +0 -2
- package/out/theme/styles/utilities/classNames.d.ts +0 -7
- package/out/theme/styles/utilities/createStyles.d.ts +0 -3
- package/out/theme/styles/utilities/index.d.ts +0 -3
- package/out/theme/styles/utilities/makeStyles.d.ts +0 -7
- package/out/theme/themes/DarkTheme.d.ts +0 -3
- package/out/theme/themes/LightTheme.d.ts +0 -3
- package/out/theme/themes/index.d.ts +0 -3
- package/out/theme/types/index.d.ts +0 -7
- package/out/theme/types/types.d.ts +0 -13
- package/out/theme/utilites/Color3FromHex.d.ts +0 -2
- package/out/theme/utilites/index.d.ts +0 -1
- package/out/ui/constants/ImageConstants.d.ts +0 -2
- package/out/ui/constants/LayoutConstants.d.ts +0 -1
- package/out/ui/constants/index.d.ts +0 -2
- package/out/ui/enums/Directions.d.ts +0 -8
- package/out/ui/enums/Icons.d.ts +0 -40
- package/out/ui/enums/Orientations.d.ts +0 -4
- package/out/ui/enums/index.d.ts +0 -3
- package/out/ui/index.d.ts +0 -34
- package/out/ui/packages/button/components/Button.d.ts +0 -26
- package/out/ui/packages/button/components/Button.styles.d.ts +0 -3
- package/out/ui/packages/button/index.d.ts +0 -6
- package/out/ui/packages/button/types/ButtonColor.d.ts +0 -1
- package/out/ui/packages/button/types/ButtonSize.d.ts +0 -1
- package/out/ui/packages/button/types/ButtonVariant.d.ts +0 -1
- package/out/ui/packages/button/types/index.d.ts +0 -3
- package/out/ui/packages/divider/components/Divider.d.ts +0 -14
- package/out/ui/packages/divider/components/Divider.styles.d.ts +0 -3
- package/out/ui/packages/divider/index.d.ts +0 -3
- package/out/ui/packages/icon/components/Icon.d.ts +0 -12
- package/out/ui/packages/icon/components/Icon.styles.d.ts +0 -3
- package/out/ui/packages/icon/index.d.ts +0 -3
- package/out/ui/packages/iconButton/components/IconButton.d.ts +0 -14
- package/out/ui/packages/iconButton/components/IconButton.styles.d.ts +0 -3
- package/out/ui/packages/iconButton/index.d.ts +0 -3
- package/out/ui/packages/index.d.ts +0 -11
- package/out/ui/packages/input/components/Input.d.ts +0 -24
- package/out/ui/packages/input/components/Input.styles.d.ts +0 -3
- package/out/ui/packages/input/index.d.ts +0 -6
- package/out/ui/packages/input/types/InputColor.d.ts +0 -1
- package/out/ui/packages/input/types/InputMargin.d.ts +0 -1
- package/out/ui/packages/input/types/InputVariant.d.ts +0 -1
- package/out/ui/packages/input/types/index.d.ts +0 -3
- package/out/ui/packages/progressBar/components/ProgressBar.d.ts +0 -9
- package/out/ui/packages/progressBar/components/ProgressBar.styles.d.ts +0 -2
- package/out/ui/packages/progressBar/index.d.ts +0 -3
- package/out/ui/packages/shadow/components/Shadow.d.ts +0 -4
- package/out/ui/packages/shadow/components/Shadow.styles.d.ts +0 -2
- package/out/ui/packages/shadow/index.d.ts +0 -2
- package/out/ui/packages/sidebar/components/Sidebar.d.ts +0 -9
- package/out/ui/packages/sidebar/components/Sidebar.styles.d.ts +0 -3
- package/out/ui/packages/sidebar/index.d.ts +0 -4
- package/out/ui/packages/sidebar/types/SidebarType.d.ts +0 -1
- package/out/ui/packages/sidebar/types/index.d.ts +0 -1
- package/out/ui/packages/toast/components/Toast.d.ts +0 -12
- package/out/ui/packages/toast/components/Toast.styles.d.ts +0 -3
- package/out/ui/packages/toast/enums/ToastVariants.d.ts +0 -7
- package/out/ui/packages/toast/index.d.ts +0 -5
- package/out/ui/packages/toast/interfaces/ToastEvent.d.ts +0 -5
- package/out/ui/packages/treeView/components/TreeView.d.ts +0 -13
- package/out/ui/packages/treeView/components/TreeView.styles.d.ts +0 -2
- package/out/ui/packages/treeView/index.d.ts +0 -6
- package/out/ui/packages/treeView/interfaces/Branch.d.ts +0 -6
- package/out/ui/packages/treeView/interfaces/Leaf.d.ts +0 -4
- package/out/ui/packages/treeView/interfaces/Tree.d.ts +0 -5
- package/out/ui/packages/typography/components/Typography.d.ts +0 -19
- package/out/ui/packages/typography/components/Typography.styles.d.ts +0 -3
- package/out/ui/packages/typography/index.d.ts +0 -6
- package/out/ui/packages/typography/types/TypographyAlignment.d.ts +0 -1
- package/out/ui/packages/typography/types/TypographyColor.d.ts +0 -1
- package/out/ui/packages/typography/types/TypographyDisplay.d.ts +0 -1
- package/out/ui/packages/typography/types/index.d.ts +0 -3
package/README.md
CHANGED
|
@@ -103,7 +103,7 @@ class AppLayout extends Component {
|
|
|
103
103
|
render() {
|
|
104
104
|
return (
|
|
105
105
|
<ThemeProvider theme={DarkTheme}>
|
|
106
|
-
<frame Size={new UDim2(1, 0, 1, 0)} BackgroundTransparency={1}>
|
|
106
|
+
<frame key={"AppLayout"} Size={new UDim2(1, 0, 1, 0)} BackgroundTransparency={1}>
|
|
107
107
|
<MyComponent />
|
|
108
108
|
</frame>
|
|
109
109
|
</ThemeProvider>
|
|
@@ -124,8 +124,7 @@ then you can omit props without a type warning (i.e. `makeStyles(theme => {})`
|
|
|
124
124
|
instead of `makeStyles<MyComponentProps>((theme, props) => {})`).
|
|
125
125
|
|
|
126
126
|
```javascript
|
|
127
|
-
import
|
|
128
|
-
import { useState, markPureComponent } from "@rbxts/roact-hooked";
|
|
127
|
+
import React, { useState } from "@rbxts/react";
|
|
129
128
|
import useMyComponentStyles from "./MyComponent.styles";
|
|
130
129
|
import { Button } from "@rbxts/uiblox";
|
|
131
130
|
|
|
@@ -141,7 +140,7 @@ function MyComponent(props: MyComponentProps) {
|
|
|
141
140
|
const { root, button } = useMyComponentStyles(props);
|
|
142
141
|
|
|
143
142
|
return (
|
|
144
|
-
<frame {...root}>
|
|
143
|
+
<frame key="MyComponent" {...root}>
|
|
145
144
|
<Button
|
|
146
145
|
variant="outlined"
|
|
147
146
|
text={title}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local DefaultTheme = TS.import(script, script.Parent.Parent, "themes").default
|
|
4
|
+
local createProducer = TS.import(script, TS.getModule(script, "@rbxts", "reflex").src).createProducer
|
|
5
|
+
local themeProducer = createProducer(DefaultTheme, {
|
|
6
|
+
setTheme = function(_state, theme)
|
|
7
|
+
return theme
|
|
8
|
+
end,
|
|
9
|
+
})
|
|
10
|
+
return {
|
|
11
|
+
themeProducer = themeProducer,
|
|
12
|
+
}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
4
|
-
local
|
|
5
|
-
local
|
|
6
|
-
local themeStore = TS.import(script, script.Parent, "ThemeStore").themeStore
|
|
3
|
+
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local React = _react
|
|
5
|
+
local StrictMode = _react.StrictMode
|
|
7
6
|
local ThemeWrapper = TS.import(script, script.Parent, "ThemeWrapper").default
|
|
7
|
+
local ReflexProvider = TS.import(script, TS.getModule(script, "@rbxts", "react-reflex")).ReflexProvider
|
|
8
|
+
local themeProducer = TS.import(script, script.Parent, "ThemeProducer").themeProducer
|
|
8
9
|
local function ThemeProvider(props)
|
|
9
10
|
local _binding = props
|
|
10
11
|
local theme = _binding.theme
|
|
11
12
|
local children = _binding.children
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
},
|
|
13
|
+
return React.createElement(StrictMode, nil, React.createElement(ReflexProvider, {
|
|
14
|
+
producer = themeProducer,
|
|
15
|
+
}, React.createElement(ThemeWrapper, {
|
|
15
16
|
theme = theme,
|
|
16
|
-
}, children))
|
|
17
|
+
}, children)))
|
|
17
18
|
end
|
|
18
|
-
local default =
|
|
19
|
+
local default = ThemeProvider
|
|
19
20
|
return {
|
|
20
21
|
default = default,
|
|
21
22
|
}
|
|
@@ -1,37 +1,32 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
4
|
-
local
|
|
5
|
-
local useEffect =
|
|
6
|
-
local useRef =
|
|
7
|
-
local _roact_rodux_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-rodux-hooked").src)
|
|
8
|
-
local useDispatch = _roact_rodux_hooked.useDispatch
|
|
9
|
-
local useSelector = _roact_rodux_hooked.useSelector
|
|
10
|
-
local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src.ts)
|
|
11
|
-
local selectTheme = TS.import(script, script.Parent, "ThemeStore").selectTheme
|
|
3
|
+
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local React = _react
|
|
5
|
+
local useEffect = _react.useEffect
|
|
6
|
+
local useRef = _react.useRef
|
|
12
7
|
local DefaultTheme = TS.import(script, script.Parent.Parent, "themes").default
|
|
8
|
+
local useProducer = TS.import(script, TS.getModule(script, "@rbxts", "react-reflex")).useProducer
|
|
9
|
+
local themeProducer = TS.import(script, script.Parent, "ThemeProducer").themeProducer
|
|
13
10
|
local function ThemeWrapper(props)
|
|
14
11
|
local _binding = props
|
|
15
12
|
local theme = _binding.theme
|
|
16
13
|
local children = _binding.children
|
|
17
|
-
local
|
|
14
|
+
local _binding_1 = useProducer()
|
|
15
|
+
local setTheme = _binding_1.setTheme
|
|
18
16
|
local ref = useRef()
|
|
19
|
-
|
|
20
|
-
-- When theme changes
|
|
17
|
+
-- When theme prop changes
|
|
21
18
|
useEffect(function()
|
|
22
|
-
|
|
23
|
-
type = "set",
|
|
24
|
-
newTheme = theme or DefaultTheme,
|
|
25
|
-
})
|
|
19
|
+
setTheme(theme or DefaultTheme)
|
|
26
20
|
end, { theme })
|
|
27
|
-
return
|
|
21
|
+
return React.createElement("frame", {
|
|
22
|
+
key = `ThemeWrapper-{themeProducer:getState().type}`,
|
|
28
23
|
BackgroundTransparency = 1,
|
|
29
24
|
Size = UDim2.new(1, 0, 1, 0),
|
|
30
25
|
ZIndex = 500000,
|
|
31
|
-
|
|
32
|
-
},
|
|
26
|
+
ref = ref,
|
|
27
|
+
}, children)
|
|
33
28
|
end
|
|
34
|
-
local default =
|
|
29
|
+
local default = ThemeWrapper
|
|
35
30
|
return {
|
|
36
31
|
default = default,
|
|
37
32
|
}
|
|
@@ -5,6 +5,4 @@ exports.ThemeProvider = TS.import(script, script, "ThemeProvider").default
|
|
|
5
5
|
for _k, _v in TS.import(script, script, "ThemeProvider") or {} do
|
|
6
6
|
exports[_k] = _v
|
|
7
7
|
end
|
|
8
|
-
exports.themeReducer = TS.import(script, script, "ThemeStore").themeReducer
|
|
9
|
-
exports.themeStore = TS.import(script, script, "ThemeStore").themeStore
|
|
10
8
|
return exports
|
package/out/theme/init.luau
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local exports = {}
|
|
4
4
|
exports.ThemeProvider = TS.import(script, script, "components").ThemeProvider
|
|
5
|
-
exports.themeStore = TS.import(script, script, "components").themeStore
|
|
6
5
|
for _k, _v in TS.import(script, script, "components") or {} do
|
|
7
6
|
exports[_k] = _v
|
|
8
7
|
end
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local DefaultTheme = TS.import(script, script.Parent.Parent.Parent, "themes").default
|
|
4
|
-
local
|
|
4
|
+
local themeProducer = TS.import(script, script.Parent.Parent.Parent, "components", "ThemeProducer").themeProducer
|
|
5
5
|
local makeStyles = function(f)
|
|
6
6
|
return function(props)
|
|
7
7
|
local _exitType, _returns = TS.try(function()
|
|
8
|
-
local theme =
|
|
8
|
+
local theme = themeProducer:getState()
|
|
9
9
|
local _fn = f
|
|
10
10
|
local _exp = theme or DefaultTheme
|
|
11
11
|
local _condition = props
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
4
|
-
local
|
|
5
|
-
local
|
|
6
|
-
local useState = _roact_hooked.useState
|
|
3
|
+
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local React = _react
|
|
5
|
+
local useState = _react.useState
|
|
7
6
|
local useButtonStyles = TS.import(script, script.Parent, "Button.styles").default
|
|
8
7
|
local function Button(props)
|
|
9
8
|
local _binding = props
|
|
@@ -47,8 +46,12 @@ local function Button(props)
|
|
|
47
46
|
local corner = _binding_1.corner
|
|
48
47
|
local stroke = _binding_1.stroke
|
|
49
48
|
local hovering, setHovering = useState(false)
|
|
50
|
-
local _attributes =
|
|
51
|
-
|
|
49
|
+
local _attributes = {
|
|
50
|
+
key = "Button",
|
|
51
|
+
}
|
|
52
|
+
for _k, _v in root do
|
|
53
|
+
_attributes[_k] = _v
|
|
54
|
+
end
|
|
52
55
|
for _k, _v in font do
|
|
53
56
|
_attributes[_k] = _v
|
|
54
57
|
end
|
|
@@ -134,17 +137,17 @@ local function Button(props)
|
|
|
134
137
|
if _condition then
|
|
135
138
|
local _attributes_1 = table.clone(stroke)
|
|
136
139
|
setmetatable(_attributes_1, nil)
|
|
137
|
-
_condition =
|
|
140
|
+
_condition = React.createElement("uistroke", _attributes_1)
|
|
138
141
|
end
|
|
139
142
|
local _condition_1 = rounded
|
|
140
143
|
if _condition_1 then
|
|
141
144
|
local _attributes_1 = table.clone(corner)
|
|
142
145
|
setmetatable(_attributes_1, nil)
|
|
143
|
-
_condition_1 =
|
|
146
|
+
_condition_1 = React.createElement("uicorner", _attributes_1)
|
|
144
147
|
end
|
|
145
|
-
return
|
|
148
|
+
return React.createElement("textbutton", _attributes, _condition, _condition_1, children)
|
|
146
149
|
end
|
|
147
|
-
local default =
|
|
150
|
+
local default = Button
|
|
148
151
|
return {
|
|
149
152
|
default = default,
|
|
150
153
|
}
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
3
|
+
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local useDividerStyles = TS.import(script, script.Parent, "Divider.styles").default
|
|
5
5
|
local function Divider(props)
|
|
6
6
|
local _binding = props
|
|
7
7
|
local className = _binding.className
|
|
8
8
|
local _binding_1 = useDividerStyles(props)
|
|
9
9
|
local root = _binding_1.root
|
|
10
|
-
local _attributes =
|
|
11
|
-
|
|
10
|
+
local _attributes = {
|
|
11
|
+
key = "Divider",
|
|
12
|
+
}
|
|
13
|
+
for _k, _v in root do
|
|
14
|
+
_attributes[_k] = _v
|
|
15
|
+
end
|
|
12
16
|
_attributes.BorderSizePixel = 0
|
|
13
17
|
if className ~= 0 and className == className and className ~= "" and className then
|
|
14
18
|
for _k, _v in className do
|
|
15
19
|
_attributes[_k] = _v
|
|
16
20
|
end
|
|
17
21
|
end
|
|
18
|
-
return
|
|
22
|
+
return React.createElement("frame", _attributes)
|
|
19
23
|
end
|
|
20
24
|
local default = Divider
|
|
21
25
|
return {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
4
|
-
local markPureComponent = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src).markPureComponent
|
|
3
|
+
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
5
4
|
local useIconStyles = TS.import(script, script.Parent, "Icon.styles").default
|
|
6
5
|
local function Icon(props)
|
|
7
6
|
local _binding = props
|
|
@@ -10,8 +9,12 @@ local function Icon(props)
|
|
|
10
9
|
local className = _binding.className
|
|
11
10
|
local _binding_1 = useIconStyles(props)
|
|
12
11
|
local container = _binding_1.container
|
|
13
|
-
local _attributes =
|
|
14
|
-
|
|
12
|
+
local _attributes = {
|
|
13
|
+
key = "Icon",
|
|
14
|
+
}
|
|
15
|
+
for _k, _v in container do
|
|
16
|
+
_attributes[_k] = _v
|
|
17
|
+
end
|
|
15
18
|
if className then
|
|
16
19
|
for _k, _v in className do
|
|
17
20
|
_attributes[_k] = _v
|
|
@@ -19,9 +22,9 @@ local function Icon(props)
|
|
|
19
22
|
end
|
|
20
23
|
_attributes.Image = tostring(icon)
|
|
21
24
|
_attributes.ImageColor3 = tint or container.ImageColor3
|
|
22
|
-
return
|
|
25
|
+
return React.createElement("imagelabel", _attributes)
|
|
23
26
|
end
|
|
24
|
-
local default =
|
|
27
|
+
local default = Icon
|
|
25
28
|
return {
|
|
26
29
|
default = default,
|
|
27
30
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
4
|
-
local
|
|
5
|
-
local
|
|
6
|
-
local useState = _roact_hooked.useState
|
|
3
|
+
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local React = _react
|
|
5
|
+
local useState = _react.useState
|
|
7
6
|
local useIconButtonStyles = TS.import(script, script.Parent, "IconButton.styles").default
|
|
8
7
|
local function IconButton(props)
|
|
9
8
|
local _binding = props
|
|
@@ -15,8 +14,12 @@ local function IconButton(props)
|
|
|
15
14
|
local _binding_1 = useIconButtonStyles(props)
|
|
16
15
|
local container = _binding_1.container
|
|
17
16
|
local hovering, setHovering = useState(false)
|
|
18
|
-
local _attributes =
|
|
19
|
-
|
|
17
|
+
local _attributes = {
|
|
18
|
+
key = "IconButton",
|
|
19
|
+
}
|
|
20
|
+
for _k, _v in container do
|
|
21
|
+
_attributes[_k] = _v
|
|
22
|
+
end
|
|
20
23
|
if className then
|
|
21
24
|
for _k, _v in className do
|
|
22
25
|
_attributes[_k] = _v
|
|
@@ -38,9 +41,9 @@ local function IconButton(props)
|
|
|
38
41
|
setHovering(false)
|
|
39
42
|
end,
|
|
40
43
|
}
|
|
41
|
-
return
|
|
44
|
+
return React.createElement("imagebutton", _attributes)
|
|
42
45
|
end
|
|
43
|
-
local default =
|
|
46
|
+
local default = IconButton
|
|
44
47
|
return {
|
|
45
48
|
default = default,
|
|
46
49
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
4
|
-
local
|
|
5
|
-
local useState =
|
|
6
|
-
local markPureComponent = _roact_hooked.markPureComponent
|
|
3
|
+
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local React = _react
|
|
5
|
+
local useState = _react.useState
|
|
7
6
|
local classNames = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").classNames
|
|
8
7
|
local Divider = TS.import(script, script.Parent.Parent.Parent, "divider").Divider
|
|
9
8
|
local Orientations = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Orientations
|
|
@@ -50,17 +49,29 @@ local function Input(props)
|
|
|
50
49
|
_condition = ""
|
|
51
50
|
end
|
|
52
51
|
local input, setInput = useState(_condition)
|
|
53
|
-
local _attributes =
|
|
54
|
-
|
|
52
|
+
local _attributes = {
|
|
53
|
+
key = "Input",
|
|
54
|
+
}
|
|
55
|
+
for _k, _v in root do
|
|
56
|
+
_attributes[_k] = _v
|
|
57
|
+
end
|
|
55
58
|
if className then
|
|
56
59
|
for _k, _v in className do
|
|
57
60
|
_attributes[_k] = _v
|
|
58
61
|
end
|
|
59
62
|
end
|
|
60
|
-
local _attributes_1 =
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
local _attributes_1 = {
|
|
64
|
+
key = "Margin",
|
|
65
|
+
}
|
|
66
|
+
for _k, _v in margin do
|
|
67
|
+
_attributes_1[_k] = _v
|
|
68
|
+
end
|
|
69
|
+
local _attributes_2 = {
|
|
70
|
+
key = "Field",
|
|
71
|
+
}
|
|
72
|
+
for _k, _v in font do
|
|
73
|
+
_attributes_2[_k] = _v
|
|
74
|
+
end
|
|
64
75
|
for _k, _v in box do
|
|
65
76
|
_attributes_2[_k] = _v
|
|
66
77
|
end
|
|
@@ -94,16 +105,16 @@ local function Input(props)
|
|
|
94
105
|
if _condition_1 then
|
|
95
106
|
local _attributes_3 = table.clone(stroke)
|
|
96
107
|
setmetatable(_attributes_3, nil)
|
|
97
|
-
_condition_1 =
|
|
108
|
+
_condition_1 = React.createElement("uistroke", _attributes_3)
|
|
98
109
|
end
|
|
99
110
|
local _condition_2 = rounded
|
|
100
111
|
if _condition_2 then
|
|
101
112
|
local _attributes_3 = table.clone(corner)
|
|
102
113
|
setmetatable(_attributes_3, nil)
|
|
103
|
-
_condition_2 =
|
|
114
|
+
_condition_2 = React.createElement("uicorner", _attributes_3)
|
|
104
115
|
end
|
|
105
|
-
local _exp =
|
|
106
|
-
local _exp_1 =
|
|
116
|
+
local _exp = React.createElement("textbox", _attributes_2, _condition_1, _condition_2)
|
|
117
|
+
local _exp_1 = React.createElement(Divider, {
|
|
107
118
|
padding = 0,
|
|
108
119
|
orientation = Orientations.Horizontal,
|
|
109
120
|
className = classNames({
|
|
@@ -113,8 +124,12 @@ local function Input(props)
|
|
|
113
124
|
})
|
|
114
125
|
local _condition_3 = helperText ~= nil
|
|
115
126
|
if _condition_3 then
|
|
116
|
-
local _attributes_3 =
|
|
117
|
-
|
|
127
|
+
local _attributes_3 = {
|
|
128
|
+
key = "HelperText",
|
|
129
|
+
}
|
|
130
|
+
for _k, _v in font do
|
|
131
|
+
_attributes_3[_k] = _v
|
|
132
|
+
end
|
|
118
133
|
for _k, _v in helper do
|
|
119
134
|
_attributes_3[_k] = _v
|
|
120
135
|
end
|
|
@@ -124,11 +139,11 @@ local function Input(props)
|
|
|
124
139
|
_attributes_3[_k] = _v
|
|
125
140
|
end
|
|
126
141
|
_attributes_3.Text = helperText
|
|
127
|
-
_condition_3 = (
|
|
142
|
+
_condition_3 = (React.createElement("textlabel", _attributes_3))
|
|
128
143
|
end
|
|
129
|
-
return
|
|
144
|
+
return React.createElement("frame", _attributes, React.createElement("frame", _attributes_1, _exp, _exp_1, _condition_3))
|
|
130
145
|
end
|
|
131
|
-
local default =
|
|
146
|
+
local default = Input
|
|
132
147
|
return {
|
|
133
148
|
default = default,
|
|
134
149
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
4
|
-
local markPureComponent = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src).markPureComponent
|
|
3
|
+
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
5
4
|
local useProgressBarStyles = TS.import(script, script.Parent, "ProgressBar.styles").default
|
|
6
5
|
local function ProgressBar(_param)
|
|
7
6
|
local progress = _param.progress
|
|
@@ -13,34 +12,54 @@ local function ProgressBar(_param)
|
|
|
13
12
|
local inner = _binding.inner
|
|
14
13
|
local fill = _binding.fill
|
|
15
14
|
local corner = _binding.corner
|
|
16
|
-
local _attributes =
|
|
17
|
-
|
|
15
|
+
local _attributes = {
|
|
16
|
+
key = "ProgressBar",
|
|
17
|
+
}
|
|
18
|
+
for _k, _v in container do
|
|
19
|
+
_attributes[_k] = _v
|
|
20
|
+
end
|
|
18
21
|
if className then
|
|
19
22
|
for _k, _v in className do
|
|
20
23
|
_attributes[_k] = _v
|
|
21
24
|
end
|
|
22
25
|
end
|
|
23
|
-
local _attributes_1 =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
local _attributes_1 = {
|
|
27
|
+
key = "Bar",
|
|
28
|
+
}
|
|
29
|
+
for _k, _v in outer do
|
|
30
|
+
_attributes_1[_k] = _v
|
|
31
|
+
end
|
|
32
|
+
local _attributes_2 = {
|
|
33
|
+
key = "Corner",
|
|
34
|
+
}
|
|
35
|
+
for _k, _v in corner do
|
|
36
|
+
_attributes_2[_k] = _v
|
|
37
|
+
end
|
|
38
|
+
local _exp = React.createElement("uicorner", _attributes_2)
|
|
28
39
|
local _attributes_3 = table.clone(stroke)
|
|
29
40
|
setmetatable(_attributes_3, nil)
|
|
30
|
-
local _exp_1 =
|
|
41
|
+
local _exp_1 = React.createElement("uistroke", _attributes_3)
|
|
31
42
|
local _attributes_4 = table.clone(inner)
|
|
32
43
|
setmetatable(_attributes_4, nil)
|
|
33
|
-
local _attributes_5 =
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
local _attributes_5 = {
|
|
45
|
+
key = "Corner",
|
|
46
|
+
}
|
|
47
|
+
for _k, _v in corner do
|
|
48
|
+
_attributes_5[_k] = _v
|
|
49
|
+
end
|
|
50
|
+
local _exp_2 = React.createElement("uicorner", _attributes_5)
|
|
36
51
|
local _attributes_6 = table.clone(fill)
|
|
37
52
|
setmetatable(_attributes_6, nil)
|
|
38
53
|
_attributes_6.Size = UDim2.new(progress / 100, 0, 1, 0)
|
|
39
|
-
local _attributes_7 =
|
|
40
|
-
|
|
41
|
-
|
|
54
|
+
local _attributes_7 = {
|
|
55
|
+
key = "Corner",
|
|
56
|
+
}
|
|
57
|
+
for _k, _v in corner do
|
|
58
|
+
_attributes_7[_k] = _v
|
|
59
|
+
end
|
|
60
|
+
return React.createElement("frame", _attributes, React.createElement("frame", _attributes_1, _exp, _exp_1, React.createElement("frame", _attributes_4, _exp_2, React.createElement("frame", _attributes_6, React.createElement("uicorner", _attributes_7)))))
|
|
42
61
|
end
|
|
43
|
-
local default =
|
|
62
|
+
local default = ProgressBar
|
|
44
63
|
return {
|
|
45
64
|
default = default,
|
|
46
65
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
4
|
-
local
|
|
5
|
-
local
|
|
6
|
-
local
|
|
7
|
-
local useState = _roact_hooked.useState
|
|
3
|
+
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local React = _react
|
|
5
|
+
local useEffect = _react.useEffect
|
|
6
|
+
local useState = _react.useState
|
|
8
7
|
local useShadowStyles = TS.import(script, script.Parent, "Shadow.styles").default
|
|
9
8
|
local function Shadow()
|
|
10
9
|
local _binding = useShadowStyles()
|
|
@@ -42,8 +41,12 @@ local function Shadow()
|
|
|
42
41
|
setZIndex(_condition_1 - 1)
|
|
43
42
|
parent.ClipsDescendants = false
|
|
44
43
|
end, { parent })
|
|
45
|
-
local _attributes =
|
|
46
|
-
|
|
44
|
+
local _attributes = {
|
|
45
|
+
key = "Shadow",
|
|
46
|
+
}
|
|
47
|
+
for _k, _v in container do
|
|
48
|
+
_attributes[_k] = _v
|
|
49
|
+
end
|
|
47
50
|
_attributes.ZIndex = zIndex
|
|
48
51
|
_attributes.Event = {
|
|
49
52
|
AncestryChanged = function(rbx, parent)
|
|
@@ -52,11 +55,12 @@ local function Shadow()
|
|
|
52
55
|
end
|
|
53
56
|
end,
|
|
54
57
|
}
|
|
55
|
-
return
|
|
58
|
+
return React.createElement("frame", _attributes, cornerRadius ~= nil and React.createElement("uicorner", {
|
|
59
|
+
key = "Corner",
|
|
56
60
|
CornerRadius = cornerRadius,
|
|
57
61
|
}))
|
|
58
62
|
end
|
|
59
|
-
local default =
|
|
63
|
+
local default = Shadow
|
|
60
64
|
return {
|
|
61
65
|
default = default,
|
|
62
66
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
3
|
+
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
4
|
local useSidebarStyles = TS.import(script, script.Parent, "Sidebar.styles").default
|
|
5
5
|
local function Sidebar(props)
|
|
6
6
|
local _binding = props
|
|
@@ -9,16 +9,24 @@ local function Sidebar(props)
|
|
|
9
9
|
local _binding_1 = useSidebarStyles(props)
|
|
10
10
|
local root = _binding_1.root
|
|
11
11
|
local container = _binding_1.container
|
|
12
|
-
local _attributes =
|
|
13
|
-
|
|
12
|
+
local _attributes = {
|
|
13
|
+
key = "Sidebar",
|
|
14
|
+
}
|
|
15
|
+
for _k, _v in root do
|
|
16
|
+
_attributes[_k] = _v
|
|
17
|
+
end
|
|
14
18
|
if className ~= 0 and className == className and className ~= "" and className then
|
|
15
19
|
for _k, _v in className do
|
|
16
20
|
_attributes[_k] = _v
|
|
17
21
|
end
|
|
18
22
|
end
|
|
19
|
-
local _attributes_1 =
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
local _attributes_1 = {
|
|
24
|
+
key = "Container",
|
|
25
|
+
}
|
|
26
|
+
for _k, _v in container do
|
|
27
|
+
_attributes_1[_k] = _v
|
|
28
|
+
end
|
|
29
|
+
return React.createElement("frame", _attributes, React.createElement("frame", _attributes_1, children))
|
|
22
30
|
end
|
|
23
31
|
local default = Sidebar
|
|
24
32
|
return {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local BoatTween = TS.import(script, TS.getModule(script, "@rbxts", "boat-tween").src).BoatTween
|
|
4
|
-
local
|
|
5
|
-
local
|
|
6
|
-
local
|
|
7
|
-
local
|
|
8
|
-
local useRef = _roact_hooked.useRef
|
|
4
|
+
local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
5
|
+
local React = _react
|
|
6
|
+
local useEffect = _react.useEffect
|
|
7
|
+
local useRef = _react.useRef
|
|
9
8
|
local DefaultTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").DefaultTheme
|
|
10
9
|
local Directions = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Directions
|
|
11
10
|
local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
|
|
@@ -27,7 +26,7 @@ local function Toast(props)
|
|
|
27
26
|
local inActivePosition = _binding_1.inActivePosition
|
|
28
27
|
local frameRef = useRef()
|
|
29
28
|
local tween = function(direction)
|
|
30
|
-
local frame = frameRef
|
|
29
|
+
local frame = frameRef.current
|
|
31
30
|
if not frame then
|
|
32
31
|
return nil
|
|
33
32
|
end
|
|
@@ -55,21 +54,31 @@ local function Toast(props)
|
|
|
55
54
|
end
|
|
56
55
|
end, {})
|
|
57
56
|
local _attributes = {
|
|
58
|
-
|
|
57
|
+
key = "Toast",
|
|
58
|
+
ref = frameRef,
|
|
59
59
|
}
|
|
60
60
|
for _k, _v in container do
|
|
61
61
|
_attributes[_k] = _v
|
|
62
62
|
end
|
|
63
|
-
local _exp =
|
|
63
|
+
local _exp = React.createElement("uicorner", {
|
|
64
|
+
key = "Corner",
|
|
64
65
|
CornerRadius = UDim.new(0, DefaultTheme.shape.borderRadius),
|
|
65
66
|
})
|
|
66
|
-
local _exp_1 =
|
|
67
|
-
local _attributes_1 =
|
|
68
|
-
|
|
67
|
+
local _exp_1 = React.createElement(Shadow)
|
|
68
|
+
local _attributes_1 = {
|
|
69
|
+
key = "Label",
|
|
70
|
+
}
|
|
71
|
+
for _k, _v in label do
|
|
72
|
+
_attributes_1[_k] = _v
|
|
73
|
+
end
|
|
69
74
|
_attributes_1.Text = text
|
|
70
|
-
local _exp_2 =
|
|
71
|
-
local _attributes_2 =
|
|
72
|
-
|
|
75
|
+
local _exp_2 = React.createElement("textlabel", _attributes_1)
|
|
76
|
+
local _attributes_2 = {
|
|
77
|
+
key = "Close",
|
|
78
|
+
}
|
|
79
|
+
for _k, _v in close do
|
|
80
|
+
_attributes_2[_k] = _v
|
|
81
|
+
end
|
|
73
82
|
_attributes_2.Event = {
|
|
74
83
|
MouseButton1Click = function()
|
|
75
84
|
tween(Directions.Out)
|
|
@@ -78,9 +87,9 @@ local function Toast(props)
|
|
|
78
87
|
end
|
|
79
88
|
end,
|
|
80
89
|
}
|
|
81
|
-
return
|
|
90
|
+
return React.createElement("frame", _attributes, _exp, _exp_1, _exp_2, React.createElement("imagebutton", _attributes_2))
|
|
82
91
|
end
|
|
83
|
-
local default =
|
|
92
|
+
local default = Toast
|
|
84
93
|
return {
|
|
85
94
|
default = default,
|
|
86
95
|
}
|