@rbxts/uiblox 0.1.2 → 0.1.4
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 +20 -23
- package/out/theme/components/ThemeProvider.d.ts +4 -2
- package/out/theme/components/ThemeProvider.lua +4 -4
- package/out/theme/components/ThemeWrapper.d.ts +4 -2
- package/out/theme/components/ThemeWrapper.lua +4 -4
- package/out/ui/packages/button/components/Button.d.ts +4 -2
- package/out/ui/packages/button/components/Button.lua +4 -4
- package/out/ui/packages/icon/components/Icon.d.ts +6 -2
- package/out/ui/packages/icon/components/Icon.lua +4 -4
- package/out/ui/packages/iconButton/components/IconButton.d.ts +6 -2
- package/out/ui/packages/iconButton/components/IconButton.lua +4 -4
- package/out/ui/packages/input/components/Input.d.ts +4 -2
- package/out/ui/packages/input/components/Input.lua +4 -4
- package/out/ui/packages/progressBar/components/ProgressBar.d.ts +4 -2
- package/out/ui/packages/progressBar/components/ProgressBar.lua +4 -4
- package/out/ui/packages/shadow/components/Shadow.d.ts +4 -2
- package/out/ui/packages/shadow/components/Shadow.lua +4 -4
- package/out/ui/packages/toast/components/Toast.d.ts +4 -2
- package/out/ui/packages/toast/components/Toast.lua +4 -4
- package/out/ui/packages/treeView/components/TreeView.d.ts +6 -2
- package/out/ui/packages/treeView/components/TreeView.lua +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -129,7 +129,7 @@ instead of `makeStyles<MyComponentProps>((theme, props) => {})`).
|
|
|
129
129
|
|
|
130
130
|
```javascript
|
|
131
131
|
import Roact from "@rbxts/roact";
|
|
132
|
-
import { useState } from "@rbxts/roact-hooked";
|
|
132
|
+
import { useState, markPureComponent } from "@rbxts/roact-hooked";
|
|
133
133
|
import useMyComponentStyles from "./MyComponent.styles";
|
|
134
134
|
import { Button } from "@rbxts/uiblox";
|
|
135
135
|
|
|
@@ -140,28 +140,25 @@ export interface MyComponentProps {
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
// Hooked components are very handy
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
export default MyComponent;
|
|
143
|
+
function MyComponent(props: MyComponentProps) {
|
|
144
|
+
const { title, bolded = false } = props;
|
|
145
|
+
const { root, button } = useMyComponentStyles(props);
|
|
146
|
+
|
|
147
|
+
return (
|
|
148
|
+
<frame Key="MyComponent" {...root}>
|
|
149
|
+
<Button
|
|
150
|
+
variant="outlined"
|
|
151
|
+
text={title}
|
|
152
|
+
size="small"
|
|
153
|
+
color="secondary"
|
|
154
|
+
family={bolded ? "bold" : "default"}
|
|
155
|
+
className={button}
|
|
156
|
+
></Button>
|
|
157
|
+
</frame>
|
|
158
|
+
);
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export default markPureComponent(MyComponent);
|
|
165
162
|
```
|
|
166
163
|
|
|
167
164
|
#### src/shared/ui/myComponent/MyComponent.styles.ts
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
/// <reference types="roact" />
|
|
1
2
|
import Roact from "@rbxts/roact";
|
|
2
3
|
import { Theme } from "../interfaces/theme";
|
|
3
4
|
export interface ThemeProviderProps {
|
|
4
5
|
theme?: Theme;
|
|
5
6
|
}
|
|
6
|
-
declare
|
|
7
|
-
|
|
7
|
+
declare function ThemeProvider(props: Roact.PropsWithChildren<ThemeProviderProps>): Roact.Element;
|
|
8
|
+
declare const _default: typeof ThemeProvider;
|
|
9
|
+
export default _default;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v2.2.0
|
|
2
2
|
local TS = _G[script]
|
|
3
|
-
local
|
|
3
|
+
local markPureComponent = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src).markPureComponent
|
|
4
4
|
local StoreProvider = TS.import(script, TS.getModule(script, "@rbxts", "roact-rodux-hooked").src).StoreProvider
|
|
5
5
|
local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src)
|
|
6
6
|
local themeStore = TS.import(script, script.Parent, "ThemeStore").themeStore
|
|
7
7
|
local ThemeWrapper = TS.import(script, script.Parent, "ThemeWrapper").default
|
|
8
|
-
local ThemeProvider
|
|
8
|
+
local function ThemeProvider(props)
|
|
9
9
|
local _binding = props
|
|
10
10
|
local theme = _binding.theme
|
|
11
11
|
local children = _binding[Roact.Children]
|
|
@@ -30,8 +30,8 @@ local ThemeProvider = withHooks(function(props)
|
|
|
30
30
|
end
|
|
31
31
|
_children[_length + 1] = Roact.createElement(ThemeWrapper, _attributes_1, _children_1)
|
|
32
32
|
return Roact.createElement(StoreProvider, _attributes, _children)
|
|
33
|
-
end
|
|
34
|
-
local default = ThemeProvider
|
|
33
|
+
end
|
|
34
|
+
local default = markPureComponent(ThemeProvider)
|
|
35
35
|
return {
|
|
36
36
|
default = default,
|
|
37
37
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
/// <reference types="roact" />
|
|
1
2
|
import Roact from "@rbxts/roact";
|
|
2
3
|
import { Theme } from "../interfaces/theme";
|
|
3
4
|
export interface ThemeWrapperProps {
|
|
4
5
|
theme?: Theme;
|
|
5
6
|
}
|
|
6
|
-
declare
|
|
7
|
-
|
|
7
|
+
declare function ThemeWrapper(props: Roact.PropsWithChildren<ThemeWrapperProps>): Roact.Element;
|
|
8
|
+
declare const _default: typeof ThemeWrapper;
|
|
9
|
+
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v2.2.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local _roact_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src)
|
|
4
|
-
local
|
|
4
|
+
local markPureComponent = _roact_hooked.markPureComponent
|
|
5
5
|
local useEffect = _roact_hooked.useEffect
|
|
6
6
|
local useRef = _roact_hooked.useRef
|
|
7
7
|
local _roact_rodux_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-rodux-hooked").src)
|
|
@@ -10,7 +10,7 @@ local useSelector = _roact_rodux_hooked.useSelector
|
|
|
10
10
|
local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src)
|
|
11
11
|
local selectTheme = TS.import(script, script.Parent, "ThemeStore").selectTheme
|
|
12
12
|
local DefaultTheme = TS.import(script, script.Parent.Parent, "themes").default
|
|
13
|
-
local ThemeWrapper
|
|
13
|
+
local function ThemeWrapper(props)
|
|
14
14
|
local _binding = props
|
|
15
15
|
local theme = _binding.theme
|
|
16
16
|
local children = _binding[Roact.Children]
|
|
@@ -45,8 +45,8 @@ local ThemeWrapper = withHooks(function(props)
|
|
|
45
45
|
return Roact.createFragment({
|
|
46
46
|
["ThemeWrapper-" .. currentTheme.type] = Roact.createElement("Frame", _attributes, _children),
|
|
47
47
|
})
|
|
48
|
-
end
|
|
49
|
-
local default = ThemeWrapper
|
|
48
|
+
end
|
|
49
|
+
local default = markPureComponent(ThemeWrapper)
|
|
50
50
|
return {
|
|
51
51
|
default = default,
|
|
52
52
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="@rbxts/types" />
|
|
2
|
+
/// <reference types="roact" />
|
|
2
3
|
import Roact from "@rbxts/roact";
|
|
3
4
|
import { CustomizedProps } from "../../../../theme";
|
|
4
5
|
import { ButtonSize, ButtonColor, ButtonVariant } from "../types";
|
|
@@ -22,5 +23,6 @@ export interface ButtonProps {
|
|
|
22
23
|
mouseEnter?: () => void;
|
|
23
24
|
mouseLeave?: () => void;
|
|
24
25
|
}
|
|
25
|
-
declare
|
|
26
|
-
|
|
26
|
+
declare function Button(props: Roact.PropsWithChildren<CustomizedProps<DefaultButtonComponent, ButtonProps>>): Roact.Element;
|
|
27
|
+
declare const _default: typeof Button;
|
|
28
|
+
export default _default;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src)
|
|
4
4
|
local _roact_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src)
|
|
5
|
-
local
|
|
5
|
+
local markPureComponent = _roact_hooked.markPureComponent
|
|
6
6
|
local useState = _roact_hooked.useState
|
|
7
7
|
local useButtonStyles = TS.import(script, script.Parent, "Button.styles").default
|
|
8
|
-
local Button
|
|
8
|
+
local function Button(props)
|
|
9
9
|
local _binding = props
|
|
10
10
|
local text = _binding.text
|
|
11
11
|
if text == nil then
|
|
@@ -168,8 +168,8 @@ local Button = withHooks(function(props)
|
|
|
168
168
|
return Roact.createFragment({
|
|
169
169
|
Button = Roact.createElement("TextButton", _attributes, _children),
|
|
170
170
|
})
|
|
171
|
-
end
|
|
172
|
-
local default = Button
|
|
171
|
+
end
|
|
172
|
+
local default = markPureComponent(Button)
|
|
173
173
|
return {
|
|
174
174
|
default = default,
|
|
175
175
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/// <reference types="@rbxts/types" />
|
|
2
|
+
/// <reference types="@rbxts/types" />
|
|
3
|
+
/// <reference types="roact" />
|
|
2
4
|
import Roact from "@rbxts/roact";
|
|
3
5
|
import { Icons } from "../../../enums";
|
|
4
6
|
import { CustomizedProps } from "../../../../theme";
|
|
@@ -7,5 +9,7 @@ export interface IconProps {
|
|
|
7
9
|
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
8
10
|
tint?: Color3;
|
|
9
11
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
type DefaultIconComponent = ImageLabel;
|
|
13
|
+
declare function Icon(props: CustomizedProps<DefaultIconComponent, IconProps>): Roact.Element;
|
|
14
|
+
declare const _default: typeof Icon;
|
|
15
|
+
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v2.2.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src)
|
|
4
|
-
local
|
|
4
|
+
local markPureComponent = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src).markPureComponent
|
|
5
5
|
local useIconStyles = TS.import(script, script.Parent, "Icon.styles").default
|
|
6
|
-
local Icon
|
|
6
|
+
local function Icon(props)
|
|
7
7
|
local _binding = props
|
|
8
8
|
local icon = _binding.icon
|
|
9
9
|
local tint = _binding.tint
|
|
@@ -24,8 +24,8 @@ local Icon = withHooks(function(props)
|
|
|
24
24
|
return Roact.createFragment({
|
|
25
25
|
Icon = Roact.createElement("ImageLabel", _attributes),
|
|
26
26
|
})
|
|
27
|
-
end
|
|
28
|
-
local default = Icon
|
|
27
|
+
end
|
|
28
|
+
local default = markPureComponent(Icon)
|
|
29
29
|
return {
|
|
30
30
|
default = default,
|
|
31
31
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/// <reference types="@rbxts/types" />
|
|
2
|
+
/// <reference types="@rbxts/types" />
|
|
3
|
+
/// <reference types="roact" />
|
|
2
4
|
import Roact from "@rbxts/roact";
|
|
3
5
|
import { Icons } from "../../../enums";
|
|
4
6
|
import { CustomizedProps } from "../../../../theme";
|
|
@@ -9,5 +11,7 @@ export interface IconButtonProps {
|
|
|
9
11
|
selected?: boolean;
|
|
10
12
|
onClick?: () => void;
|
|
11
13
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
type DefaultIconButtonComponent = ImageButton;
|
|
15
|
+
declare function IconButton(props: CustomizedProps<DefaultIconButtonComponent, IconButtonProps>): Roact.Element;
|
|
16
|
+
declare const _default: typeof IconButton;
|
|
17
|
+
export default _default;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src)
|
|
4
4
|
local _roact_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src)
|
|
5
|
-
local
|
|
5
|
+
local markPureComponent = _roact_hooked.markPureComponent
|
|
6
6
|
local useState = _roact_hooked.useState
|
|
7
7
|
local useIconButtonStyles = TS.import(script, script.Parent, "IconButton.styles").default
|
|
8
|
-
local IconButton
|
|
8
|
+
local function IconButton(props)
|
|
9
9
|
local _binding = props
|
|
10
10
|
local icon = _binding.icon
|
|
11
11
|
local selected = _binding.selected
|
|
@@ -41,8 +41,8 @@ local IconButton = withHooks(function(props)
|
|
|
41
41
|
return Roact.createFragment({
|
|
42
42
|
IconButton = Roact.createElement("ImageButton", _attributes),
|
|
43
43
|
})
|
|
44
|
-
end
|
|
45
|
-
local default = IconButton
|
|
44
|
+
end
|
|
45
|
+
local default = markPureComponent(IconButton)
|
|
46
46
|
return {
|
|
47
47
|
default = default,
|
|
48
48
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="@rbxts/types" />
|
|
2
2
|
/// <reference types="@rbxts/types" />
|
|
3
3
|
/// <reference types="@rbxts/types" />
|
|
4
|
+
/// <reference types="roact" />
|
|
4
5
|
import Roact from "@rbxts/roact";
|
|
5
6
|
import { CustomizedProps } from "../../../../theme";
|
|
6
7
|
import { InputColor, InputMargin, InputVariant } from "../types";
|
|
@@ -22,5 +23,6 @@ export interface InputProps {
|
|
|
22
23
|
onBlur?: () => void;
|
|
23
24
|
onEnterPressed?: (text: string) => void;
|
|
24
25
|
}
|
|
25
|
-
declare
|
|
26
|
-
|
|
26
|
+
declare function Input(props: CustomizedProps<DefaultInputComponent, InputProps>): Roact.Element;
|
|
27
|
+
declare const _default: typeof Input;
|
|
28
|
+
export default _default;
|
|
@@ -3,12 +3,12 @@ local TS = _G[script]
|
|
|
3
3
|
local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src)
|
|
4
4
|
local _roact_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src)
|
|
5
5
|
local useState = _roact_hooked.useState
|
|
6
|
-
local
|
|
6
|
+
local markPureComponent = _roact_hooked.markPureComponent
|
|
7
7
|
local classNames = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").classNames
|
|
8
8
|
local Divider = TS.import(script, script.Parent.Parent.Parent, "divider").Divider
|
|
9
9
|
local Orientations = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Orientations
|
|
10
10
|
local useInputStyles = TS.import(script, script.Parent, "Input.styles").default
|
|
11
|
-
local Input
|
|
11
|
+
local function Input(props)
|
|
12
12
|
local _binding = props
|
|
13
13
|
local text = _binding.text
|
|
14
14
|
local placeholder = _binding.placeholder
|
|
@@ -158,8 +158,8 @@ local Input = withHooks(function(props)
|
|
|
158
158
|
return Roact.createFragment({
|
|
159
159
|
Input = Roact.createElement("Frame", _attributes, _children),
|
|
160
160
|
})
|
|
161
|
-
end
|
|
162
|
-
local default = Input
|
|
161
|
+
end
|
|
162
|
+
local default = markPureComponent(Input)
|
|
163
163
|
return {
|
|
164
164
|
default = default,
|
|
165
165
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/// <reference types="@rbxts/types" />
|
|
2
|
+
/// <reference types="roact" />
|
|
2
3
|
import Roact from "@rbxts/roact";
|
|
3
4
|
import { WriteableStyle } from "../../../../theme";
|
|
4
5
|
export interface ProgressBarProps {
|
|
5
6
|
progress: number;
|
|
6
7
|
className?: WriteableStyle<Frame>;
|
|
7
8
|
}
|
|
8
|
-
declare
|
|
9
|
-
|
|
9
|
+
declare function ProgressBar({ progress, className }: ProgressBarProps): Roact.Element;
|
|
10
|
+
declare const _default: typeof ProgressBar;
|
|
11
|
+
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v2.2.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src)
|
|
4
|
-
local
|
|
4
|
+
local markPureComponent = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src).markPureComponent
|
|
5
5
|
local useProgressBarStyles = TS.import(script, script.Parent, "ProgressBar.styles").default
|
|
6
|
-
local ProgressBar
|
|
6
|
+
local function ProgressBar(_param)
|
|
7
7
|
local progress = _param.progress
|
|
8
8
|
local className = _param.className
|
|
9
9
|
local _binding = useProgressBarStyles()
|
|
@@ -69,8 +69,8 @@ local ProgressBar = withHooks(function(_param)
|
|
|
69
69
|
return Roact.createFragment({
|
|
70
70
|
ProgressBar = Roact.createElement("Frame", _attributes, _children),
|
|
71
71
|
})
|
|
72
|
-
end
|
|
73
|
-
local default = ProgressBar
|
|
72
|
+
end
|
|
73
|
+
local default = markPureComponent(ProgressBar)
|
|
74
74
|
return {
|
|
75
75
|
default = default,
|
|
76
76
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src)
|
|
4
4
|
local _roact_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src)
|
|
5
|
-
local
|
|
5
|
+
local markPureComponent = _roact_hooked.markPureComponent
|
|
6
6
|
local useEffect = _roact_hooked.useEffect
|
|
7
7
|
local useState = _roact_hooked.useState
|
|
8
8
|
local useShadowStyles = TS.import(script, script.Parent, "Shadow.styles").default
|
|
9
|
-
local Shadow
|
|
9
|
+
local function Shadow()
|
|
10
10
|
local _binding = useShadowStyles()
|
|
11
11
|
local container = _binding.container
|
|
12
12
|
local parent, setParent = useState(nil)
|
|
@@ -65,8 +65,8 @@ local Shadow = withHooks(function()
|
|
|
65
65
|
return Roact.createFragment({
|
|
66
66
|
Shadow = Roact.createElement("Frame", _attributes, _children),
|
|
67
67
|
})
|
|
68
|
-
end
|
|
69
|
-
local default = Shadow
|
|
68
|
+
end
|
|
69
|
+
local default = markPureComponent(Shadow)
|
|
70
70
|
return {
|
|
71
71
|
default = default,
|
|
72
72
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="roact" />
|
|
1
2
|
import Roact from "@rbxts/roact";
|
|
2
3
|
import ToastVariants from "../enums/ToastVariants";
|
|
3
4
|
export interface ToastProps {
|
|
@@ -7,5 +8,6 @@ export interface ToastProps {
|
|
|
7
8
|
variant?: ToastVariants;
|
|
8
9
|
toggledAt?: number;
|
|
9
10
|
}
|
|
10
|
-
declare
|
|
11
|
-
|
|
11
|
+
declare function Toast(props: ToastProps): Roact.Element;
|
|
12
|
+
declare const _default: typeof Toast;
|
|
13
|
+
export default _default;
|
|
@@ -3,7 +3,7 @@ local TS = _G[script]
|
|
|
3
3
|
local BoatTween = TS.import(script, TS.getModule(script, "@rbxts", "boat-tween").src).BoatTween
|
|
4
4
|
local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src)
|
|
5
5
|
local _roact_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src)
|
|
6
|
-
local
|
|
6
|
+
local markPureComponent = _roact_hooked.markPureComponent
|
|
7
7
|
local useEffect = _roact_hooked.useEffect
|
|
8
8
|
local useRef = _roact_hooked.useRef
|
|
9
9
|
local DefaultTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").DefaultTheme
|
|
@@ -11,7 +11,7 @@ local Directions = TS.import(script, script.Parent.Parent.Parent.Parent, "enums"
|
|
|
11
11
|
local Shadow = TS.import(script, script.Parent.Parent.Parent, "shadow").Shadow
|
|
12
12
|
local useToastStyles = TS.import(script, script.Parent, "Toast.styles").default
|
|
13
13
|
local TWEEN_DURATION = 0.5
|
|
14
|
-
local Toast
|
|
14
|
+
local function Toast(props)
|
|
15
15
|
local _binding = props
|
|
16
16
|
local text = _binding.text
|
|
17
17
|
local onDismiss = _binding.onDismiss
|
|
@@ -87,8 +87,8 @@ local Toast = withHooks(function(props)
|
|
|
87
87
|
return Roact.createFragment({
|
|
88
88
|
Toast = Roact.createElement("Frame", _attributes, _children),
|
|
89
89
|
})
|
|
90
|
-
end
|
|
91
|
-
local default = Toast
|
|
90
|
+
end
|
|
91
|
+
local default = markPureComponent(Toast)
|
|
92
92
|
return {
|
|
93
93
|
default = default,
|
|
94
94
|
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
/// <reference types="@rbxts/types" />
|
|
2
|
+
/// <reference types="roact" />
|
|
1
3
|
import Roact from "@rbxts/roact";
|
|
2
4
|
import { CustomizedProps } from "../../../../theme";
|
|
3
5
|
import { Icons } from "../../../enums";
|
|
4
6
|
import Tree from "../interfaces/Tree";
|
|
7
|
+
type DefaultTreeViewComponent = Frame;
|
|
5
8
|
export interface TreeViewProps {
|
|
6
9
|
tree: Tree;
|
|
7
10
|
icon?: Icons;
|
|
8
11
|
filter?: string;
|
|
9
12
|
}
|
|
10
|
-
declare
|
|
11
|
-
|
|
13
|
+
declare function TreeView(props: CustomizedProps<DefaultTreeViewComponent, TreeViewProps>): Roact.Element;
|
|
14
|
+
declare const _default: typeof TreeView;
|
|
15
|
+
export default _default;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src)
|
|
4
4
|
local _roact_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src)
|
|
5
|
-
local
|
|
5
|
+
local markPureComponent = _roact_hooked.markPureComponent
|
|
6
6
|
local useCallback = _roact_hooked.useCallback
|
|
7
7
|
local useEffect = _roact_hooked.useEffect
|
|
8
8
|
local useState = _roact_hooked.useState
|
|
@@ -11,7 +11,7 @@ local Icon = TS.import(script, script.Parent.Parent.Parent, "icon").Icon
|
|
|
11
11
|
local Typography = TS.import(script, script.Parent.Parent.Parent, "typography").Typography
|
|
12
12
|
local Icons = TS.import(script, script.Parent.Parent.Parent.Parent, "enums").Icons
|
|
13
13
|
local useTreeViewStyles = TS.import(script, script.Parent, "TreeView.styles").default
|
|
14
|
-
local TreeView
|
|
14
|
+
local function TreeView(props)
|
|
15
15
|
local _binding = props
|
|
16
16
|
local tree = _binding.tree
|
|
17
17
|
local icon = _binding.icon
|
|
@@ -332,8 +332,8 @@ local TreeView = withHooks(function(props)
|
|
|
332
332
|
return Roact.createFragment({
|
|
333
333
|
TreeView = Roact.createElement("Frame", _attributes, _children),
|
|
334
334
|
})
|
|
335
|
-
end
|
|
336
|
-
local default = TreeView
|
|
335
|
+
end
|
|
336
|
+
local default = markPureComponent(TreeView)
|
|
337
337
|
return {
|
|
338
338
|
default = default,
|
|
339
339
|
}
|