@rbxts/uiblox 0.1.11 → 0.1.14

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.
Files changed (38) hide show
  1. package/README.md +3 -4
  2. package/out/theme/components/ThemeProducer.d.ts +7 -0
  3. package/out/theme/components/ThemeProducer.luau +12 -0
  4. package/out/theme/components/ThemeProvider.d.ts +2 -4
  5. package/out/theme/components/ThemeProvider.luau +10 -9
  6. package/out/theme/components/ThemeWrapper.d.ts +2 -4
  7. package/out/theme/components/ThemeWrapper.luau +15 -20
  8. package/out/theme/components/index.d.ts +2 -5
  9. package/out/theme/components/init.luau +0 -2
  10. package/out/theme/index.d.ts +0 -1
  11. package/out/theme/init.luau +0 -1
  12. package/out/theme/styles/utilities/makeStyles.luau +2 -2
  13. package/out/theme/types/types.d.ts +3 -4
  14. package/out/ui/packages/button/components/Button.d.ts +2 -4
  15. package/out/ui/packages/button/components/Button.luau +13 -10
  16. package/out/ui/packages/divider/components/Divider.d.ts +1 -2
  17. package/out/ui/packages/divider/components/Divider.luau +8 -4
  18. package/out/ui/packages/icon/components/Icon.d.ts +2 -4
  19. package/out/ui/packages/icon/components/Icon.luau +9 -6
  20. package/out/ui/packages/iconButton/components/IconButton.d.ts +2 -4
  21. package/out/ui/packages/iconButton/components/IconButton.luau +11 -8
  22. package/out/ui/packages/input/components/Input.d.ts +2 -4
  23. package/out/ui/packages/input/components/Input.luau +34 -19
  24. package/out/ui/packages/progressBar/components/ProgressBar.d.ts +2 -4
  25. package/out/ui/packages/progressBar/components/ProgressBar.luau +36 -17
  26. package/out/ui/packages/shadow/components/Shadow.d.ts +2 -4
  27. package/out/ui/packages/shadow/components/Shadow.luau +13 -9
  28. package/out/ui/packages/sidebar/components/Sidebar.d.ts +1 -2
  29. package/out/ui/packages/sidebar/components/Sidebar.luau +14 -6
  30. package/out/ui/packages/toast/components/Toast.d.ts +2 -4
  31. package/out/ui/packages/toast/components/Toast.luau +25 -16
  32. package/out/ui/packages/treeView/components/TreeView.d.ts +2 -4
  33. package/out/ui/packages/treeView/components/TreeView.luau +40 -25
  34. package/out/ui/packages/typography/components/Typography.d.ts +1 -2
  35. package/out/ui/packages/typography/components/Typography.luau +8 -4
  36. package/package.json +15 -12
  37. package/out/theme/components/ThemeStore.d.ts +0 -13
  38. package/out/theme/components/ThemeStore.luau +0 -29
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 Roact from "@rbxts/roact";
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,7 @@
1
+ import { Theme } from "../interfaces/theme/index";
2
+ import { InferState } from "@rbxts/reflex";
3
+ export declare const themeProducer: import("@rbxts/reflex").Producer<Theme, {
4
+ setTheme: (_state: Theme, theme: Theme) => Theme;
5
+ }>;
6
+ export type ThemeProducer = typeof themeProducer;
7
+ export type ThemeState = InferState<ThemeProducer>;
@@ -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,9 +1,7 @@
1
- import Roact from "@rbxts/roact";
2
1
  import { Theme } from "../interfaces/theme/index";
3
2
  import { CustomizedProps } from "../types/index";
4
3
  export interface ThemeProviderProps {
5
4
  theme?: Theme;
6
5
  }
7
- declare function ThemeProvider(props: CustomizedProps<Instance, ThemeProviderProps>): Roact.Element;
8
- declare const _default: typeof ThemeProvider;
9
- export default _default;
6
+ declare function ThemeProvider(props: CustomizedProps<Instance, ThemeProviderProps>): JSX.Element;
7
+ export default ThemeProvider;
@@ -1,21 +1,22 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
- local markPureComponent = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src).markPureComponent
4
- local StoreProvider = TS.import(script, TS.getModule(script, "@rbxts", "roact-rodux-hooked").src).StoreProvider
5
- local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src.ts)
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 Roact.jsx(StoreProvider, {
13
- store = themeStore,
14
- }, Roact.jsx(ThemeWrapper, {
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 = markPureComponent(ThemeProvider)
19
+ local default = ThemeProvider
19
20
  return {
20
21
  default = default,
21
22
  }
@@ -1,9 +1,7 @@
1
- import Roact from "@rbxts/roact";
2
1
  import { Theme } from "../interfaces/theme/index";
3
2
  import { CustomizedProps } from "../types/index";
4
3
  export interface ThemeWrapperProps {
5
4
  theme?: Theme;
6
5
  }
7
- declare function ThemeWrapper(props: CustomizedProps<Instance, ThemeWrapperProps>): Roact.Element;
8
- declare const _default: typeof ThemeWrapper;
9
- export default _default;
6
+ declare function ThemeWrapper(props: CustomizedProps<Instance, ThemeWrapperProps>): JSX.Element;
7
+ export default ThemeWrapper;
@@ -1,37 +1,32 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
- local _roact_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src)
4
- local markPureComponent = _roact_hooked.markPureComponent
5
- local useEffect = _roact_hooked.useEffect
6
- local useRef = _roact_hooked.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 dispatch = useDispatch()
14
+ local _binding_1 = useProducer()
15
+ local setTheme = _binding_1.setTheme
18
16
  local ref = useRef()
19
- local currentTheme = useSelector(selectTheme)
20
- -- When theme changes
17
+ -- When theme prop changes
21
18
  useEffect(function()
22
- dispatch({
23
- type = "set",
24
- newTheme = theme or DefaultTheme,
25
- })
19
+ setTheme(theme or DefaultTheme)
26
20
  end, { theme })
27
- return Roact.jsx("frame", {
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
- Ref = ref,
32
- }, currentTheme and children)
26
+ ref = ref,
27
+ }, children)
33
28
  end
34
- local default = markPureComponent(ThemeWrapper)
29
+ local default = ThemeWrapper
35
30
  return {
36
31
  default = default,
37
32
  }
@@ -1,8 +1,5 @@
1
1
  export { default as ThemeProvider } from "./ThemeProvider";
2
2
  export { ThemeProviderProps } from "./ThemeProvider";
3
3
  export * from "./ThemeProvider";
4
- export { ThemeState } from "./ThemeStore";
5
- export { ThemeAction } from "./ThemeStore";
6
- export { themeReducer } from "./ThemeStore";
7
- export { themeStore } from "./ThemeStore";
8
- export { TThemeStore } from "./ThemeStore";
4
+ export { ThemeState } from "./ThemeProducer";
5
+ export { ThemeProducer } from "./ThemeProducer";
@@ -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
@@ -1,6 +1,5 @@
1
1
  export { default as Theme } from "./interfaces/theme/Theme";
2
2
  export { ThemeProvider } from "./components/index";
3
- export { themeStore } from "./components/index";
4
3
  export { ThemeState } from "./components/index";
5
4
  export * from "./components/index";
6
5
  export * from "./constants/index";
@@ -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 themeStore = TS.import(script, script.Parent.Parent.Parent, "components", "ThemeStore").themeStore
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 = themeStore:getState().theme
8
+ local theme = themeProducer:getState()
9
9
  local _fn = f
10
10
  local _exp = theme or DefaultTheme
11
11
  local _condition = props
@@ -1,13 +1,12 @@
1
- import Roact, { Element, PropsWithChildren } from "@rbxts/roact";
1
+ import React, { PropsWithChildren } from "@rbxts/react";
2
2
  import { WriteableStyle } from "../interfaces/index";
3
3
  export interface CommonProps<T extends Instance> extends PropsWithChildren {
4
4
  className?: WriteableStyle<T>;
5
5
  component?: T;
6
- children?: Roact.Children;
7
6
  }
8
7
  export type BaseDefaultProps<T extends Instance, P> = CommonProps<T> & P;
9
8
  export type BaseCustomizedProps<T extends Instance, P> = BaseDefaultProps<T, P>;
10
9
  export type DefaultProps<T extends Instance, P = {}> = BaseDefaultProps<T, P>;
11
10
  export type CustomizedProps<T extends Instance, P = {}> = BaseCustomizedProps<T, P>;
12
- export type CustomizedRef<T extends Instance> = T extends Instance ? any : T extends keyof Roact.JsxInstance<T> ? WritableInstanceProperties<T> : never;
13
- export type CustomizedForwardRefComponent<D extends Instance, P = {}> = <T extends Instance = D>(props: CustomizedProps<T, P> & WritableInstanceProperties<CustomizedRef<T>>) => Element | undefined;
11
+ export type CustomizedRef<T extends Instance> = T extends Instance ? any : T extends keyof React.ReactElement<T> ? WritableInstanceProperties<T> : never;
12
+ export type CustomizedForwardRefComponent<D extends Instance, P = {}> = <T extends Instance = D>(props: CustomizedProps<T, P> & WritableInstanceProperties<CustomizedRef<T>>) => React.Element | undefined;
@@ -1,4 +1,3 @@
1
- import Roact from "@rbxts/roact";
2
1
  import { CustomizedProps } from "../../../../theme/index";
3
2
  import { ButtonSize, ButtonColor, ButtonVariant } from "../types/index";
4
3
  export type DefaultButtonComponent = TextButton;
@@ -21,6 +20,5 @@ export interface ButtonProps {
21
20
  mouseEnter?: () => void;
22
21
  mouseLeave?: () => void;
23
22
  }
24
- declare function Button(props: CustomizedProps<DefaultButtonComponent, ButtonProps>): Roact.Element;
25
- declare const _default: typeof Button;
26
- export default _default;
23
+ declare function Button(props: CustomizedProps<DefaultButtonComponent, ButtonProps>): JSX.Element;
24
+ export default Button;
@@ -1,9 +1,8 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
- local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src.ts)
4
- local _roact_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src)
5
- local markPureComponent = _roact_hooked.markPureComponent
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 = table.clone(root)
51
- setmetatable(_attributes, nil)
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 = Roact.jsx("uistroke", _attributes_1)
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 = Roact.jsx("uicorner", _attributes_1)
146
+ _condition_1 = React.createElement("uicorner", _attributes_1)
144
147
  end
145
- return Roact.jsx("textbutton", _attributes, _condition, _condition_1, children)
148
+ return React.createElement("textbutton", _attributes, _condition, _condition_1, children)
146
149
  end
147
- local default = markPureComponent(Button)
150
+ local default = Button
148
151
  return {
149
152
  default = default,
150
153
  }
@@ -1,4 +1,3 @@
1
- import Roact from "@rbxts/roact";
2
1
  import { CustomizedProps } from "../../../../theme/index";
3
2
  import { Orientations } from "../../../enums/index";
4
3
  type DefaultDividerComponent = Frame;
@@ -10,5 +9,5 @@ export interface DividerProps {
10
9
  transparency?: number;
11
10
  weight?: number;
12
11
  }
13
- declare function Divider<T extends DefaultDividerComponent>(props: CustomizedProps<T, DividerProps>): Roact.Element;
12
+ declare function Divider<T extends DefaultDividerComponent>(props: CustomizedProps<T, DividerProps>): JSX.Element;
14
13
  export default Divider;
@@ -1,21 +1,25 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
- local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src.ts)
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 = table.clone(root)
11
- setmetatable(_attributes, nil)
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 Roact.jsx("frame", _attributes)
22
+ return React.createElement("frame", _attributes)
19
23
  end
20
24
  local default = Divider
21
25
  return {
@@ -1,4 +1,3 @@
1
- import Roact from "@rbxts/roact";
2
1
  import { Icons } from "../../../enums/index";
3
2
  import { CustomizedProps } from "../../../../theme/index";
4
3
  export interface IconProps {
@@ -7,6 +6,5 @@ export interface IconProps {
7
6
  tint?: Color3;
8
7
  }
9
8
  type DefaultIconComponent = ImageLabel;
10
- declare function Icon(props: CustomizedProps<DefaultIconComponent, IconProps>): Roact.Element;
11
- declare const _default: typeof Icon;
12
- export default _default;
9
+ declare function Icon(props: CustomizedProps<DefaultIconComponent, IconProps>): JSX.Element;
10
+ export default Icon;
@@ -1,7 +1,6 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
- local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src.ts)
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 = table.clone(container)
14
- setmetatable(_attributes, nil)
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 Roact.jsx("imagelabel", _attributes)
25
+ return React.createElement("imagelabel", _attributes)
23
26
  end
24
- local default = markPureComponent(Icon)
27
+ local default = Icon
25
28
  return {
26
29
  default = default,
27
30
  }
@@ -1,4 +1,3 @@
1
- import Roact from "@rbxts/roact";
2
1
  import { Icons } from "../../../enums/index";
3
2
  import { CustomizedProps } from "../../../../theme/index";
4
3
  export interface IconButtonProps {
@@ -9,6 +8,5 @@ export interface IconButtonProps {
9
8
  onClick?: () => void;
10
9
  }
11
10
  type DefaultIconButtonComponent = ImageButton;
12
- declare function IconButton(props: CustomizedProps<DefaultIconButtonComponent, IconButtonProps>): Roact.Element;
13
- declare const _default: typeof IconButton;
14
- export default _default;
11
+ declare function IconButton(props: CustomizedProps<DefaultIconButtonComponent, IconButtonProps>): JSX.Element;
12
+ export default IconButton;
@@ -1,9 +1,8 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
- local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src.ts)
4
- local _roact_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src)
5
- local markPureComponent = _roact_hooked.markPureComponent
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 = table.clone(container)
19
- setmetatable(_attributes, nil)
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 Roact.jsx("imagebutton", _attributes)
44
+ return React.createElement("imagebutton", _attributes)
42
45
  end
43
- local default = markPureComponent(IconButton)
46
+ local default = IconButton
44
47
  return {
45
48
  default = default,
46
49
  }
@@ -1,4 +1,3 @@
1
- import Roact from "@rbxts/roact";
2
1
  import { CustomizedProps } from "../../../../theme/index";
3
2
  import { InputColor, InputMargin, InputVariant } from "../types/index";
4
3
  export type DefaultInputComponent = Frame;
@@ -19,6 +18,5 @@ export interface InputProps {
19
18
  onBlur?: () => void;
20
19
  onEnterPressed?: (text: string) => void;
21
20
  }
22
- declare function Input(props: CustomizedProps<DefaultInputComponent, InputProps>): Roact.Element;
23
- declare const _default: typeof Input;
24
- export default _default;
21
+ declare function Input(props: CustomizedProps<DefaultInputComponent, InputProps>): JSX.Element;
22
+ export default Input;
@@ -1,9 +1,8 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
- local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src.ts)
4
- local _roact_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src)
5
- local useState = _roact_hooked.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 = table.clone(root)
54
- setmetatable(_attributes, nil)
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 = table.clone(margin)
61
- setmetatable(_attributes_1, nil)
62
- local _attributes_2 = table.clone(font)
63
- setmetatable(_attributes_2, nil)
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 = Roact.jsx("uistroke", _attributes_3)
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 = Roact.jsx("uicorner", _attributes_3)
114
+ _condition_2 = React.createElement("uicorner", _attributes_3)
104
115
  end
105
- local _exp = Roact.jsx("textbox", _attributes_2, _condition_1, _condition_2)
106
- local _exp_1 = Roact.jsx(Divider, {
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 = table.clone(font)
117
- setmetatable(_attributes_3, nil)
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 = (Roact.jsx("textlabel", _attributes_3))
142
+ _condition_3 = (React.createElement("textlabel", _attributes_3))
128
143
  end
129
- return Roact.jsx("frame", _attributes, Roact.jsx("frame", _attributes_1, _exp, _exp_1, _condition_3))
144
+ return React.createElement("frame", _attributes, React.createElement("frame", _attributes_1, _exp, _exp_1, _condition_3))
130
145
  end
131
- local default = markPureComponent(Input)
146
+ local default = Input
132
147
  return {
133
148
  default = default,
134
149
  }
@@ -1,9 +1,7 @@
1
- import Roact from "@rbxts/roact";
2
1
  import { WriteableStyle } from "../../../../theme/index";
3
2
  export interface ProgressBarProps {
4
3
  progress: number;
5
4
  className?: WriteableStyle<Frame>;
6
5
  }
7
- declare function ProgressBar({ progress, className }: ProgressBarProps): Roact.Element;
8
- declare const _default: typeof ProgressBar;
9
- export default _default;
6
+ declare function ProgressBar({ progress, className }: ProgressBarProps): JSX.Element;
7
+ export default ProgressBar;
@@ -1,7 +1,6 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
- local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src.ts)
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 = table.clone(container)
17
- setmetatable(_attributes, nil)
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 = table.clone(outer)
24
- setmetatable(_attributes_1, nil)
25
- local _attributes_2 = table.clone(corner)
26
- setmetatable(_attributes_2, nil)
27
- local _exp = Roact.jsx("uicorner", _attributes_2)
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 = Roact.jsx("uistroke", _attributes_3)
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 = table.clone(corner)
34
- setmetatable(_attributes_5, nil)
35
- local _exp_2 = Roact.jsx("uicorner", _attributes_5)
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 = table.clone(corner)
40
- setmetatable(_attributes_7, nil)
41
- return Roact.jsx("frame", _attributes, Roact.jsx("frame", _attributes_1, _exp, _exp_1, Roact.jsx("frame", _attributes_4, _exp_2, Roact.jsx("frame", _attributes_6, Roact.jsx("uicorner", _attributes_7)))))
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 = markPureComponent(ProgressBar)
62
+ local default = ProgressBar
44
63
  return {
45
64
  default = default,
46
65
  }
@@ -1,4 +1,2 @@
1
- import Roact from "@rbxts/roact";
2
- declare function Shadow(): Roact.Element;
3
- declare const _default: typeof Shadow;
4
- export default _default;
1
+ declare function Shadow(): JSX.Element;
2
+ export default Shadow;
@@ -1,10 +1,9 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
- local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src.ts)
4
- local _roact_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src)
5
- local markPureComponent = _roact_hooked.markPureComponent
6
- local useEffect = _roact_hooked.useEffect
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 = table.clone(container)
46
- setmetatable(_attributes, nil)
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 Roact.jsx("frame", _attributes, cornerRadius ~= nil and Roact.jsx("uicorner", {
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 = markPureComponent(Shadow)
63
+ local default = Shadow
60
64
  return {
61
65
  default = default,
62
66
  }
@@ -1,9 +1,8 @@
1
- import Roact from "@rbxts/roact";
2
1
  import { CustomizedProps } from "../../../../theme/index";
3
2
  export type DefaultSidebarComponent = Frame;
4
3
  export interface SidebarProps {
5
4
  size: "compact" | "large";
6
5
  ignoreInset?: boolean;
7
6
  }
8
- declare function Sidebar<T extends DefaultSidebarComponent>(props: CustomizedProps<T, SidebarProps>): Roact.Element;
7
+ declare function Sidebar<T extends DefaultSidebarComponent>(props: CustomizedProps<T, SidebarProps>): JSX.Element;
9
8
  export default Sidebar;
@@ -1,6 +1,6 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
- local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src.ts)
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 = table.clone(root)
13
- setmetatable(_attributes, nil)
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 = table.clone(container)
20
- setmetatable(_attributes_1, nil)
21
- return Roact.jsx("frame", _attributes, Roact.jsx("frame", _attributes_1, children))
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,4 +1,3 @@
1
- import Roact from "@rbxts/roact";
2
1
  import ToastVariants from "../enums/ToastVariants";
3
2
  export interface ToastProps {
4
3
  text: string;
@@ -7,6 +6,5 @@ export interface ToastProps {
7
6
  variant?: ToastVariants;
8
7
  toggledAt?: number;
9
8
  }
10
- declare function Toast(props: ToastProps): Roact.Element;
11
- declare const _default: typeof Toast;
12
- export default _default;
9
+ declare function Toast(props: ToastProps): JSX.Element;
10
+ export default Toast;
@@ -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 Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src.ts)
5
- local _roact_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src)
6
- local markPureComponent = _roact_hooked.markPureComponent
7
- local useEffect = _roact_hooked.useEffect
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:getValue()
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
- Ref = frameRef,
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 = Roact.jsx("uicorner", {
63
+ local _exp = React.createElement("uicorner", {
64
+ key = "Corner",
64
65
  CornerRadius = UDim.new(0, DefaultTheme.shape.borderRadius),
65
66
  })
66
- local _exp_1 = Roact.jsx(Shadow)
67
- local _attributes_1 = table.clone(label)
68
- setmetatable(_attributes_1, nil)
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 = Roact.jsx("textlabel", _attributes_1)
71
- local _attributes_2 = table.clone(close)
72
- setmetatable(_attributes_2, nil)
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 Roact.jsx("frame", _attributes, _exp, _exp_1, _exp_2, Roact.jsx("imagebutton", _attributes_2))
90
+ return React.createElement("frame", _attributes, _exp, _exp_1, _exp_2, React.createElement("imagebutton", _attributes_2))
82
91
  end
83
- local default = markPureComponent(Toast)
92
+ local default = Toast
84
93
  return {
85
94
  default = default,
86
95
  }
@@ -1,4 +1,3 @@
1
- import Roact from "@rbxts/roact";
2
1
  import { CustomizedProps } from "../../../../theme/index";
3
2
  import { Icons } from "../../../enums/index";
4
3
  import Tree from "../interfaces/Tree";
@@ -8,6 +7,5 @@ export interface TreeViewProps {
8
7
  icon?: Icons;
9
8
  filter?: string;
10
9
  }
11
- declare function TreeView(props: CustomizedProps<DefaultTreeViewComponent, TreeViewProps>): Roact.Element;
12
- declare const _default: typeof TreeView;
13
- export default _default;
10
+ declare function TreeView(props: CustomizedProps<DefaultTreeViewComponent, TreeViewProps>): JSX.Element;
11
+ export default TreeView;
@@ -1,11 +1,10 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
- local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src.ts)
4
- local _roact_hooked = TS.import(script, TS.getModule(script, "@rbxts", "roact-hooked").src)
5
- local markPureComponent = _roact_hooked.markPureComponent
6
- local useCallback = _roact_hooked.useCallback
7
- local useEffect = _roact_hooked.useEffect
8
- local useState = _roact_hooked.useState
3
+ local _react = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
+ local React = _react
5
+ local useCallback = _react.useCallback
6
+ local useEffect = _react.useEffect
7
+ local useState = _react.useState
9
8
  local DefaultTheme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "theme").DefaultTheme
10
9
  local Icon = TS.import(script, script.Parent.Parent.Parent, "icon").Icon
11
10
  local Typography = TS.import(script, script.Parent.Parent.Parent, "typography").Typography
@@ -134,8 +133,12 @@ local function TreeView(props)
134
133
  -- Set expanded to new array
135
134
  setExpanded(newExpanded)
136
135
  end, { tree, filter })
137
- local _attributes = table.clone(root)
138
- setmetatable(_attributes, nil)
136
+ local _attributes = {
137
+ key = "TreeView",
138
+ }
139
+ for _k, _v in root do
140
+ _attributes[_k] = _v
141
+ end
139
142
  if className then
140
143
  for _k, _v in className do
141
144
  _attributes[_k] = _v
@@ -152,9 +155,13 @@ local function TreeView(props)
152
155
  _attributes_1.color = "textSecondary"
153
156
  _attributes_1.variant = "body"
154
157
  _attributes_1.family = "bold"
155
- local _exp = Roact.jsx(Typography, _attributes_1)
156
- local _attributes_2 = table.clone(list)
157
- setmetatable(_attributes_2, nil)
158
+ local _exp = React.createElement(Typography, _attributes_1)
159
+ local _attributes_2 = {
160
+ key = "List",
161
+ }
162
+ for _k, _v in list do
163
+ _attributes_2[_k] = _v
164
+ end
158
165
  _attributes_2.CanvasSize = canvasSize
159
166
  _attributes_2.Event = {
160
167
  AncestryChanged = resizeScrollingFrame,
@@ -163,7 +170,7 @@ local function TreeView(props)
163
170
  }
164
171
  local _attributes_3 = table.clone(gridLayout)
165
172
  setmetatable(_attributes_3, nil)
166
- local _exp_1 = Roact.jsx("uigridlayout", _attributes_3)
173
+ local _exp_1 = React.createElement("uigridlayout", _attributes_3)
167
174
  local _exp_2 = tree.branches
168
175
  -- ▼ ReadonlyArray.map ▼
169
176
  local _newValue = table.create(#_exp_2)
@@ -179,8 +186,12 @@ local function TreeView(props)
179
186
  end
180
187
  end
181
188
  if matchesBranchFilter or hasMatchingLeaf then
182
- local _attributes_4 = table.clone(row)
183
- setmetatable(_attributes_4, nil)
189
+ local _attributes_4 = {
190
+ key = `{branch.title}-{branchIndex}`,
191
+ }
192
+ for _k, _v in row do
193
+ _attributes_4[_k] = _v
194
+ end
184
195
  _attributes_4.Event = {
185
196
  MouseButton1Click = function()
186
197
  if branch.onClick then
@@ -231,7 +242,7 @@ local function TreeView(props)
231
242
  _attributes_5.size = "xxs"
232
243
  _attributes_5.className = branchIcon
233
244
  _attributes_5.tint = DefaultTheme.options.constants.extendedPalette.Gray[70]
234
- _condition = (Roact.jsx(Icon, _attributes_5))
245
+ _condition = (React.createElement(Icon, _attributes_5))
235
246
  end
236
247
  local _attributes_5 = {
237
248
  text = branch.title,
@@ -242,7 +253,7 @@ local function TreeView(props)
242
253
  _attributes_5.color = "textPrimary"
243
254
  _attributes_5.variant = "body"
244
255
  _attributes_5.family = if selectedBranch == branch then "bold" else "default"
245
- local _exp_3 = Roact.jsx("textbutton", _attributes_4, _condition, Roact.jsx(Typography, _attributes_5))
256
+ local _exp_3 = React.createElement("textbutton", _attributes_4, _condition, React.createElement(Typography, _attributes_5))
246
257
  local _branch = branch
247
258
  local _condition_1 = table.find(expanded, _branch) ~= nil
248
259
  if _condition_1 then
@@ -252,8 +263,12 @@ local function TreeView(props)
252
263
  local _callback_1 = function(leaf, leafIndex)
253
264
  local matchesLeafFilter = matchesFilter(leaf.title)
254
265
  if matchesBranchFilter or matchesLeafFilter then
255
- local _attributes_6 = table.clone(row)
256
- setmetatable(_attributes_6, nil)
266
+ local _attributes_6 = {
267
+ key = `{branch.title}-{branchIndex}-{leaf.title}-{leafIndex}`,
268
+ }
269
+ for _k, _v in row do
270
+ _attributes_6[_k] = _v
271
+ end
257
272
  _attributes_6.Event = {
258
273
  MouseButton1Click = function()
259
274
  setSelectedLeaf(leaf)
@@ -263,7 +278,7 @@ local function TreeView(props)
263
278
  end
264
279
  end,
265
280
  }
266
- local _exp_5 = Roact.jsx(Icon, {
281
+ local _exp_5 = React.createElement(Icon, {
267
282
  icon = icon or Icons.ListPrimary,
268
283
  size = "xs",
269
284
  className = leafIcon,
@@ -278,9 +293,9 @@ local function TreeView(props)
278
293
  _attributes_7.color = "textPrimary"
279
294
  _attributes_7.variant = "body"
280
295
  _attributes_7.family = if selectedLeaf == leaf then "bold" else "default"
281
- return Roact.jsx("textbutton", _attributes_6, _exp_5, Roact.jsx(Typography, _attributes_7))
296
+ return React.createElement("textbutton", _attributes_6, _exp_5, React.createElement(Typography, _attributes_7))
282
297
  else
283
- return Roact.jsx(Roact.Fragment)
298
+ return React.createElement(React.Fragment)
284
299
  end
285
300
  end
286
301
  for _k, _v in _exp_4 do
@@ -289,18 +304,18 @@ local function TreeView(props)
289
304
  -- ▲ ReadonlyArray.map ▲
290
305
  _condition_1 = _newValue_1
291
306
  end
292
- return Roact.jsx(Roact.Fragment, nil, _exp_3, _condition_1)
307
+ return React.createElement(React.Fragment, nil, _exp_3, _condition_1)
293
308
  else
294
- return Roact.jsx(Roact.Fragment)
309
+ return React.createElement(React.Fragment)
295
310
  end
296
311
  end
297
312
  for _k, _v in _exp_2 do
298
313
  _newValue[_k] = _callback(_v, _k - 1, _exp_2)
299
314
  end
300
315
  -- ▲ ReadonlyArray.map ▲
301
- return Roact.jsx("frame", _attributes, _exp, Roact.jsx("scrollingframe", _attributes_2, _exp_1, _newValue))
316
+ return React.createElement("frame", _attributes, _exp, React.createElement("scrollingframe", _attributes_2, _exp_1, _newValue))
302
317
  end
303
- local default = markPureComponent(TreeView)
318
+ local default = TreeView
304
319
  return {
305
320
  default = default,
306
321
  }
@@ -1,4 +1,3 @@
1
- import Roact from "@rbxts/roact";
2
1
  import { CustomizedProps } from "../../../../theme/index";
3
2
  import { FontFamilyVariant, FontSizeVariant } from "../../../../theme/interfaces/typography/index";
4
3
  import { TypographyAlignment } from "../types/TypographyAlignment";
@@ -15,5 +14,5 @@ export interface TypographyProps {
15
14
  noWrap?: boolean;
16
15
  lineClamp?: boolean;
17
16
  }
18
- declare function Typography<T extends DefaultTypographyComponent>(props: CustomizedProps<T, TypographyProps>): Roact.Element;
17
+ declare function Typography<T extends DefaultTypographyComponent>(props: CustomizedProps<T, TypographyProps>): JSX.Element;
19
18
  export default Typography;
@@ -1,6 +1,6 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
- local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src.ts)
3
+ local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
4
  local useTypographyStyles = TS.import(script, script.Parent, "Typography.styles").default
5
5
  local function Typography(props)
6
6
  local _binding = props
@@ -13,8 +13,12 @@ local function Typography(props)
13
13
  local _binding_1 = useTypographyStyles(props)
14
14
  local root = _binding_1.root
15
15
  local variantToken = _binding_1.variantToken
16
- local _attributes = table.clone(root)
17
- setmetatable(_attributes, nil)
16
+ local _attributes = {
17
+ key = "Typography",
18
+ }
19
+ for _k, _v in root do
20
+ _attributes[_k] = _v
21
+ end
18
22
  _attributes.Text = text
19
23
  if className ~= 0 and className == className and className ~= "" and className then
20
24
  for _k, _v in className do
@@ -24,7 +28,7 @@ local function Typography(props)
24
28
  for _k, _v in variantToken do
25
29
  _attributes[_k] = _v
26
30
  end
27
- return Roact.jsx("textlabel", _attributes, children)
31
+ return React.createElement("textlabel", _attributes, children)
28
32
  end
29
33
  local default = Typography
30
34
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/uiblox",
3
- "version": "0.1.11",
3
+ "version": "0.1.14",
4
4
  "description": "UI Library and theming for roblox-ts projects",
5
5
  "main": "out/init.lua",
6
6
  "scripts": {
@@ -29,27 +29,30 @@
29
29
  "access": "public"
30
30
  },
31
31
  "devDependencies": {
32
+ "@rbxts/attributes": "^1.0.0",
33
+ "@rbxts/compiler-types": "^3.0.0-types.0",
34
+ "@rbxts/types": "^1.0.813",
32
35
  "@typescript-eslint/eslint-plugin": "^8.14.0",
33
36
  "@typescript-eslint/parser": "^8.14.0",
34
37
  "eslint": "^9.14.0",
35
38
  "eslint-config-prettier": "^9.1.0",
36
39
  "eslint-plugin-prettier": "^5.2.1",
37
40
  "eslint-plugin-roblox-ts": "^0.0.36",
38
- "prettier": "^3.3.3"
41
+ "eslint-plugin-simple-import-sort": "^12.1.1",
42
+ "eslint-plugin-unused-imports": "^4.1.4",
43
+ "prettier": "^3.3.3",
44
+ "roblox-ts": "^3.0.0",
45
+ "typescript": "^5.6.3"
39
46
  },
40
47
  "dependencies": {
41
- "@rbxts/attributes": "^1.0.0",
42
48
  "@rbxts/boat-tween": "^1.0.1",
43
- "@rbxts/compiler-types": "^3.0.0-types.0",
44
- "@rbxts/roact": "^3.0.1",
45
- "@rbxts/roact-hooked": "^2.6.2",
46
- "@rbxts/roact-rodux-hooked": "^1.1.3",
47
- "@rbxts/rodux": "^3.0.0-ts.3",
49
+ "@rbxts/pretty-react-hooks": "^0.6.0",
50
+ "@rbxts/react": "^17.2.1",
51
+ "@rbxts/react-reflex": "^0.3.4",
52
+ "@rbxts/react-roblox": "^17.2.1",
53
+ "@rbxts/reflex": "^4.3.1",
48
54
  "@rbxts/roselect": "^0.1.2",
49
- "@rbxts/services": "^1.5.5",
50
- "@rbxts/types": "^1.0.813",
51
- "roblox-ts": "^3.0.0",
52
- "typescript": "^5.6.3"
55
+ "@rbxts/services": "^1.5.5"
53
56
  },
54
57
  "directories": {
55
58
  "doc": "docs"
@@ -1,13 +0,0 @@
1
- import { Theme } from "../interfaces/theme/index";
2
- import { Store } from "@rbxts/rodux";
3
- export type ThemeState = {
4
- theme: Theme;
5
- };
6
- export type ThemeAction = {
7
- type: "set";
8
- newTheme?: Theme;
9
- };
10
- export declare const themeReducer: import("@rbxts/rodux").Reducer<ThemeState, ThemeAction>;
11
- export declare const themeStore: Store<ThemeState, ThemeAction>;
12
- export type TThemeStore = typeof themeStore;
13
- export declare const selectTheme: import("@rbxts/roselect").OutputSelector<ThemeState, Theme, (res: Theme) => Theme>;
@@ -1,29 +0,0 @@
1
- -- Compiled with roblox-ts v3.0.0
2
- local TS = _G[script]
3
- local _rodux = TS.import(script, TS.getModule(script, "@rbxts", "rodux").src)
4
- local createReducer = _rodux.createReducer
5
- local Store = _rodux.Store
6
- local createSelector = TS.import(script, TS.getModule(script, "@rbxts", "roselect").src).createSelector
7
- local DefaultTheme = TS.import(script, script.Parent.Parent, "themes").default
8
- local themeReducer = createReducer({
9
- theme = DefaultTheme,
10
- }, {
11
- set = function(_param, _param_1)
12
- local theme = _param.theme
13
- local newTheme = _param_1.newTheme
14
- return {
15
- theme = newTheme or theme,
16
- }
17
- end,
18
- })
19
- local themeStore = Store.new(themeReducer)
20
- local selectTheme = createSelector(function(state)
21
- return state.theme
22
- end, function(theme)
23
- return theme
24
- end)
25
- return {
26
- themeReducer = themeReducer,
27
- themeStore = themeStore,
28
- selectTheme = selectTheme,
29
- }