@rbxts/react-clean-ui 1.1.0 → 1.2.2

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 (89) hide show
  1. package/out/Components/Chart/BarChart.d.ts +1 -0
  2. package/out/Components/Chart/BarChart.luau +149 -112
  3. package/out/Components/Chart/Pie.d.ts +1 -0
  4. package/out/Components/Chart/Pie.luau +21 -5
  5. package/out/Components/Decorator/BoxShadow.d.ts +1 -0
  6. package/out/Components/Decorator/BoxShadow.luau +12 -5
  7. package/out/Components/Decorator/Corners.d.ts +1 -0
  8. package/out/Components/Decorator/Corners.luau +8 -3
  9. package/out/Components/Decorator/Padding.d.ts +3 -1
  10. package/out/Components/Decorator/Padding.luau +11 -6
  11. package/out/Components/Input/Button.d.ts +1 -0
  12. package/out/Components/Input/Button.luau +44 -33
  13. package/out/Components/Input/Checkbox.d.ts +1 -0
  14. package/out/Components/Input/Checkbox.luau +22 -16
  15. package/out/Components/Input/HoverButton.d.ts +1 -0
  16. package/out/Components/Input/HoverButton.luau +44 -40
  17. package/out/Components/Input/Increment.d.ts +1 -0
  18. package/out/Components/Input/Increment.luau +10 -3
  19. package/out/Components/Input/Input.d.ts +3 -1
  20. package/out/Components/Input/Input.luau +85 -66
  21. package/out/Components/Input/Select.d.ts +9 -0
  22. package/out/Components/Input/Select.luau +311 -34
  23. package/out/Components/Input/Slider.luau +44 -29
  24. package/out/Components/Input/Switch.d.ts +9 -0
  25. package/out/Components/Input/Switch.luau +147 -0
  26. package/out/Components/Input/index.d.ts +1 -0
  27. package/out/Components/Input/init.luau +3 -0
  28. package/out/Components/Interaction/Modal.d.ts +14 -0
  29. package/out/Components/Interaction/Modal.luau +276 -0
  30. package/out/Components/Interaction/Toast.d.ts +2 -1
  31. package/out/Components/Interaction/Toast.luau +53 -28
  32. package/out/Components/Interaction/Tooltip.luau +36 -24
  33. package/out/Components/Interaction/index.d.ts +1 -0
  34. package/out/Components/Interaction/init.luau +3 -0
  35. package/out/Components/Layout/Accordion.d.ts +1 -0
  36. package/out/Components/Layout/Accordion.luau +51 -55
  37. package/out/Components/Layout/Column.d.ts +1 -0
  38. package/out/Components/Layout/Column.luau +11 -6
  39. package/out/Components/Layout/Container.d.ts +1 -0
  40. package/out/Components/Layout/Container.luau +22 -16
  41. package/out/Components/Layout/Draggable.luau +25 -3
  42. package/out/Components/Layout/Fieldset.d.ts +1 -0
  43. package/out/Components/Layout/Fieldset.luau +14 -42
  44. package/out/Components/Layout/FlexItem.luau +7 -0
  45. package/out/Components/Layout/Group.d.ts +1 -0
  46. package/out/Components/Layout/Group.luau +16 -33
  47. package/out/Components/Layout/HStack.d.ts +4 -0
  48. package/out/Components/Layout/HStack.luau +17 -10
  49. package/out/Components/Layout/Pagination.d.ts +32 -0
  50. package/out/Components/Layout/Pagination.luau +405 -0
  51. package/out/Components/Layout/Row.d.ts +1 -0
  52. package/out/Components/Layout/Row.luau +20 -48
  53. package/out/Components/Layout/Scroller.d.ts +1 -0
  54. package/out/Components/Layout/Scroller.luau +26 -34
  55. package/out/Components/Layout/Table.d.ts +31 -0
  56. package/out/Components/Layout/Table.luau +342 -0
  57. package/out/Components/Layout/Tabs.d.ts +18 -9
  58. package/out/Components/Layout/Tabs.luau +134 -119
  59. package/out/Components/Layout/VStack.d.ts +3 -0
  60. package/out/Components/Layout/VStack.luau +17 -10
  61. package/out/Components/Layout/index.d.ts +2 -0
  62. package/out/Components/Layout/init.luau +6 -0
  63. package/out/Components/Navigation/Menu.d.ts +1 -0
  64. package/out/Components/Navigation/Menu.luau +12 -3
  65. package/out/Components/Surface/Box.d.ts +1 -0
  66. package/out/Components/Surface/Box.luau +12 -4
  67. package/out/Components/Surface/Card.d.ts +1 -0
  68. package/out/Components/Surface/Card.luau +54 -51
  69. package/out/Components/Surface/Icon.d.ts +1 -0
  70. package/out/Components/Surface/Icon.luau +25 -16
  71. package/out/Components/Typography/Text.d.ts +1 -0
  72. package/out/Components/Typography/Text.luau +57 -47
  73. package/out/Contexts/index.d.ts +1 -0
  74. package/out/Contexts/init.luau +3 -0
  75. package/out/Contexts/modal.context.d.ts +15 -0
  76. package/out/Contexts/modal.context.luau +26 -0
  77. package/out/Contexts/toast.context.d.ts +1 -0
  78. package/out/Providers/app.provider.luau +2 -1
  79. package/out/Providers/index.d.ts +1 -0
  80. package/out/Providers/init.luau +3 -0
  81. package/out/Providers/modal.provider.d.ts +6 -0
  82. package/out/Providers/modal.provider.luau +86 -0
  83. package/out/Providers/overlay.provider.luau +1 -0
  84. package/out/Theme/theme.template.d.ts +85 -0
  85. package/out/Theme/themes/dark.theme.luau +103 -0
  86. package/out/Theme/themes/default.theme.luau +130 -0
  87. package/out/Theme/themes/sandstone.theme.luau +103 -0
  88. package/out/Theme/themes/wooden.theme.luau +122 -0
  89. package/package.json +1 -1
@@ -18,15 +18,14 @@ local TypographyHelper = _Helpers.TypographyHelper
18
18
  local _HoverButton = TS.import(script, script.Parent.Parent, "Input", "HoverButton")
19
19
  local HoverButton = _HoverButton.HoverButton
20
20
  local HoverButtonContext = _HoverButton.HoverButtonContext
21
- local function Tab(_props)
22
- return nil
23
- end
24
- local function TabTitle(_props)
25
- return nil
26
- end
27
- local function TabContent(props)
28
- return nil
29
- end
21
+ -- Selection only — Tabs.List/Tabs.Body/Tabs.Title/Tabs.Content each render
22
+ -- themselves for real (see Card.tsx's CardHeader/CardFooter for the same
23
+ -- "Root provides Context, subparts consume it independently" pattern), so
24
+ -- there's nothing here to scan or harvest from children.
25
+ local TabsContext = React.createContext({
26
+ selected = nil,
27
+ setSelected = function() end,
28
+ })
30
29
  local function TabButtonContent(props)
31
30
  local theme = React.useContext(CleanThemeContext)
32
31
  local hover = React.useContext(HoverButtonContext)
@@ -52,57 +51,106 @@ local function TabButtonContent(props)
52
51
  }), React.createElement(BoxShadow, {
53
52
  value = intent.boxShadow,
54
53
  }), React.createElement(Text, {
54
+ name = "TabTitleText",
55
55
  TextColor3 = intent.textColor,
56
56
  text = props.text,
57
57
  typography = TypographyHelper:getTypography(theme, nil, intent.typography),
58
58
  }))
59
59
  end
60
- local Tabs = React.forwardRef(function(props, ref)
60
+ -- The real per-tab button — derives its own default/hover/focus color scheme
61
+ -- from the theme (same per-instance derivation Card.Header/Card.Footer use,
62
+ -- not hoisted to Root) and drives selection itself via TabsContext.
63
+ local function TabTitle(props)
61
64
  local theme = React.useContext(CleanThemeContext)
62
- local selected, setSelected = React.useState(0)
63
- local tabs = React.useMemo(function()
64
- local tabs = {}
65
- React.Children.forEach(props.children, function(child)
66
- if not React.isValidElement(child) or child.type ~= Tab then
67
- return nil
68
- end
69
- local title
70
- local content
71
- local tab = child
72
- React.Children.forEach(tab.props.children, function(tabChild)
73
- if not React.isValidElement(tabChild) then
74
- return nil
75
- end
76
- if tabChild.type == TabTitle then
77
- title = (tabChild.props)
78
- elseif tabChild.type == TabContent then
79
- content = (tabChild.props).children
80
- end
81
- end)
82
- if title ~= nil then
83
- local _arg0 = {
84
- title = title,
85
- content = content,
86
- }
87
- table.insert(tabs, _arg0)
88
- end
89
- end)
90
- return tabs
91
- end, { props.children })
92
- local tabCount = #tabs
65
+ local _binding = React.useContext(TabsContext)
66
+ local selected = _binding.selected
67
+ local setSelected = _binding.setSelected
68
+ local isSelected = selected == props.value
69
+ -- The first-mounted Tabs.Title claims the selection if none is set yet,
70
+ -- preserving "first tab selected by default" now that nothing scans the
71
+ -- tab list up front. Known limitation: if the currently-selected tab's
72
+ -- Tabs.Title unmounts, selection isn't automatically reassigned.
93
73
  React.useEffect(function()
94
- if selected >= tabCount then
95
- setSelected(math.max(0, tabCount - 1))
74
+ if selected == nil then
75
+ setSelected(props.value)
96
76
  end
97
- end, { selected, tabCount })
98
- local selectedTab = tabs[selected + 1]
77
+ end, {})
99
78
  local buttonDefault = ColorHelper:getIntentColors(theme, "primary", "default", theme.components.tabs.button.intents)
100
79
  local buttonHover = ColorHelper:getIntentColors(theme, "primary", "hover", theme.components.tabs.button.intents)
101
80
  local buttonFocus = ColorHelper:getIntentColors(theme, "primary", "focus", theme.components.tabs.button.intents)
102
81
  local buttonDefaultBackgroundImage = CssHelper:resolveBackgroundImage(buttonDefault.backgroundImage)
103
82
  local buttonHoverBackgroundImage = CssHelper:resolveBackgroundImage(buttonHover.backgroundImage)
104
83
  local buttonFocusBackgroundImage = CssHelper:resolveBackgroundImage(buttonFocus.backgroundImage)
84
+ local _attributes = table.clone(props)
85
+ setmetatable(_attributes, nil)
86
+ return React.createElement(HoverButton, {
87
+ isSelected = isSelected,
88
+ name = `TabButton-{props.value}`,
89
+ default = {
90
+ Size = UDim2.fromScale(0, 0),
91
+ AutomaticSize = Enum.AutomaticSize.XY,
92
+ BackgroundColor3 = buttonDefault.backgroundColor,
93
+ BackgroundTransparency = buttonDefault.backgroundTransparency,
94
+ BorderSizePixel = 0,
95
+ AutoButtonColor = false,
96
+ Image = buttonDefaultBackgroundImage.Image,
97
+ ImageColor3 = buttonDefaultBackgroundImage.ImageColor3,
98
+ ImageTransparency = buttonDefaultBackgroundImage.ImageTransparency,
99
+ ScaleType = buttonDefaultBackgroundImage.ScaleType,
100
+ SliceCenter = buttonDefaultBackgroundImage.SliceCenter,
101
+ SliceScale = buttonDefaultBackgroundImage.SliceScale,
102
+ TileSize = buttonDefaultBackgroundImage.TileSize,
103
+ Event = {
104
+ Activated = function()
105
+ setSelected(props.value)
106
+ end,
107
+ },
108
+ },
109
+ hover = {
110
+ BackgroundColor3 = buttonHover.backgroundColor,
111
+ BackgroundTransparency = buttonHover.backgroundTransparency,
112
+ Image = buttonHoverBackgroundImage.Image,
113
+ ImageColor3 = buttonHoverBackgroundImage.ImageColor3,
114
+ ImageTransparency = buttonHoverBackgroundImage.ImageTransparency,
115
+ ScaleType = buttonHoverBackgroundImage.ScaleType,
116
+ SliceCenter = buttonHoverBackgroundImage.SliceCenter,
117
+ SliceScale = buttonHoverBackgroundImage.SliceScale,
118
+ TileSize = buttonHoverBackgroundImage.TileSize,
119
+ },
120
+ focus = {
121
+ BackgroundColor3 = buttonFocus.backgroundColor,
122
+ BackgroundTransparency = buttonFocus.backgroundTransparency,
123
+ Image = buttonFocusBackgroundImage.Image,
124
+ ImageColor3 = buttonFocusBackgroundImage.ImageColor3,
125
+ ImageTransparency = buttonFocusBackgroundImage.ImageTransparency,
126
+ ScaleType = buttonFocusBackgroundImage.ScaleType,
127
+ SliceCenter = buttonFocusBackgroundImage.SliceCenter,
128
+ SliceScale = buttonFocusBackgroundImage.SliceScale,
129
+ TileSize = buttonFocusBackgroundImage.TileSize,
130
+ },
131
+ }, React.createElement(TabButtonContent, _attributes))
132
+ end
133
+ -- Always mounted — visibility is toggled rather than the panel being
134
+ -- unmounted/remounted, so per-tab local state (e.g. a Scroller's scroll
135
+ -- position) survives switching tabs. Roblox excludes a GuiObject with
136
+ -- Visible=false from its ancestors' AutomaticSize/UIListLayout
137
+ -- content-size calculations, so the hidden panels don't inflate Tabs.Body's
138
+ -- own AutomaticSize; since only one panel is ever visible at a time, the
139
+ -- default (unset) Position/AnchorPoint every panel shares never causes a
140
+ -- visible overlap either.
141
+ local function TabContent(props)
142
+ local _binding = React.useContext(TabsContext)
143
+ local selected = _binding.selected
144
+ return React.createElement(Container, {
145
+ name = `TabContent_{props.value}`,
146
+ width = "100%",
147
+ Visible = selected == props.value,
148
+ }, props.children)
149
+ end
150
+ local TabsList = React.forwardRef(function(props, ref)
151
+ local theme = React.useContext(CleanThemeContext)
105
152
  local _attributes = {
153
+ name = "TabsList",
106
154
  ref = ref,
107
155
  BackgroundColor3 = theme.components.tabs.list.backgroundColor,
108
156
  width = "100%",
@@ -113,89 +161,56 @@ local Tabs = React.forwardRef(function(props, ref)
113
161
  end
114
162
  _attributes.BackgroundTransparency = _condition
115
163
  _attributes.backgroundImage = theme.components.tabs.list.backgroundImage
116
- local _exp = React.createElement(Corners, {
164
+ return React.createElement(Container, _attributes, React.createElement(Corners, {
117
165
  radius = theme.components.tabs.list.cornerRadius,
118
- })
119
- local _exp_1 = React.createElement(Padding, {
166
+ }), React.createElement(Padding, {
120
167
  resolvedPadding = SpacingHelper:GetResolvedPadding(theme, {}, theme.components.tabs.list.spacing, theme.components.tabs.list.padding),
121
- })
122
- -- ▼ ReadonlyArray.map ▼
123
- local _newValue = table.create(#tabs)
124
- local _callback = function(tab, index)
125
- local _attributes_1 = table.clone(tab.title)
126
- setmetatable(_attributes_1, nil)
127
- return React.createElement(HoverButton, {
128
- isSelected = selected == index,
129
- default = {
130
- Size = UDim2.fromScale(0, 0),
131
- AutomaticSize = Enum.AutomaticSize.XY,
132
- BackgroundColor3 = buttonDefault.backgroundColor,
133
- BackgroundTransparency = buttonDefault.backgroundTransparency,
134
- BorderSizePixel = 0,
135
- AutoButtonColor = false,
136
- Image = buttonDefaultBackgroundImage.Image,
137
- ImageColor3 = buttonDefaultBackgroundImage.ImageColor3,
138
- ImageTransparency = buttonDefaultBackgroundImage.ImageTransparency,
139
- ScaleType = buttonDefaultBackgroundImage.ScaleType,
140
- SliceCenter = buttonDefaultBackgroundImage.SliceCenter,
141
- SliceScale = buttonDefaultBackgroundImage.SliceScale,
142
- TileSize = buttonDefaultBackgroundImage.TileSize,
143
- Event = {
144
- Activated = function()
145
- setSelected(index)
146
- end,
147
- },
148
- },
149
- hover = {
150
- BackgroundColor3 = buttonHover.backgroundColor,
151
- BackgroundTransparency = buttonHover.backgroundTransparency,
152
- Image = buttonHoverBackgroundImage.Image,
153
- ImageColor3 = buttonHoverBackgroundImage.ImageColor3,
154
- ImageTransparency = buttonHoverBackgroundImage.ImageTransparency,
155
- ScaleType = buttonHoverBackgroundImage.ScaleType,
156
- SliceCenter = buttonHoverBackgroundImage.SliceCenter,
157
- SliceScale = buttonHoverBackgroundImage.SliceScale,
158
- TileSize = buttonHoverBackgroundImage.TileSize,
159
- },
160
- focus = {
161
- BackgroundColor3 = buttonFocus.backgroundColor,
162
- BackgroundTransparency = buttonFocus.backgroundTransparency,
163
- Image = buttonFocusBackgroundImage.Image,
164
- ImageColor3 = buttonFocusBackgroundImage.ImageColor3,
165
- ImageTransparency = buttonFocusBackgroundImage.ImageTransparency,
166
- ScaleType = buttonFocusBackgroundImage.ScaleType,
167
- SliceCenter = buttonFocusBackgroundImage.SliceCenter,
168
- SliceScale = buttonFocusBackgroundImage.SliceScale,
169
- TileSize = buttonFocusBackgroundImage.TileSize,
170
- },
171
- }, React.createElement(TabButtonContent, _attributes_1))
172
- end
173
- for _k, _v in tabs do
174
- _newValue[_k] = _callback(_v, _k - 1, tabs)
175
- end
176
- -- ▲ ReadonlyArray.map ▲
177
- local _exp_2 = React.createElement(Container, _attributes, _exp, _exp_1, React.createElement(HStack, nil, _newValue))
178
- local _exp_3 = React.createElement("uistroke", {
168
+ }), React.createElement(HStack, nil, props.children))
169
+ end)
170
+ local TabsBody = React.forwardRef(function(props, ref)
171
+ local theme = React.useContext(CleanThemeContext)
172
+ return React.createElement(Container, {
173
+ name = "TabsBody",
174
+ ref = ref,
175
+ width = "100%",
176
+ backgroundImage = props.backgroundImage or theme.components.tabs.backgroundImage,
177
+ }, React.createElement("uistroke", {
178
+ key = "Stroke",
179
179
  Thickness = theme.components.tabs.borderThickness,
180
180
  BorderStrokePosition = Enum.BorderStrokePosition.Inner,
181
181
  Color = theme.components.tabs.borderColor,
182
- })
183
- local _exp_4 = React.createElement(Padding, {
182
+ }), React.createElement(Padding, {
184
183
  resolvedPadding = SpacingHelper:GetResolvedPadding(theme, {}, theme.components.tabs.spacing, theme.components.tabs.padding),
185
- })
186
- local _exp_5 = React.createElement(Corners, {
184
+ }), React.createElement(Corners, {
187
185
  radius = theme.components.tabs.cornerRadius,
188
- })
189
- local _result = selectedTab
190
- if _result ~= nil then
191
- _result = _result.content
192
- end
193
- return React.createElement(VStack, nil, _exp_2, React.createElement(Container, {
194
- backgroundImage = props.backgroundImage or theme.components.tabs.backgroundImage,
195
- }, _exp_3, _exp_4, _exp_5, _result))
186
+ }), props.children)
187
+ end)
188
+ -- Root doesn't render a real Roblox Instance of its own (just a Context
189
+ -- Provider around a VStack, itself just a Fragment) — see Group.tsx for the
190
+ -- same shape. It's still wrapped in React.forwardRef, not a plain function,
191
+ -- because roblox-ts compiles a bare arrow function to an actual Lua
192
+ -- `function` value, and Lua functions can't have table-style properties
193
+ -- (Tabs.List = ...) assigned onto them — forwardRef's return value compiles
194
+ -- to a table instead. The ref itself is genuinely unused: there's no
195
+ -- sensible Instance for it to point at, so RefAttributes<Frame> below is a
196
+ -- type-level placeholder to keep this consistent with every other compound
197
+ -- component's shape, not a real forwarded ref — Tabs does not support a
198
+ -- `ref` prop in practice.
199
+ local Tabs = React.forwardRef(function(props, _ref)
200
+ local selected, setSelected = React.useState(props.defaultValue)
201
+ local contextValue = React.useMemo(function()
202
+ return {
203
+ selected = selected,
204
+ setSelected = setSelected,
205
+ }
206
+ end, { selected })
207
+ return React.createElement(TabsContext.Provider, {
208
+ value = contextValue,
209
+ }, React.createElement(VStack, nil, props.children))
196
210
  end)
211
+ Tabs.List = TabsList
212
+ Tabs.Body = TabsBody
197
213
  Tabs.Title = TabTitle
198
- Tabs.Tab = Tab
199
214
  Tabs.Content = TabContent
200
215
  return {
201
216
  Tabs = Tabs,
@@ -4,11 +4,14 @@ interface VStackProps extends SpacedElementProps {
4
4
  valign?: Enum.VerticalAlignment | "Center" | "Top" | "Bottom" | React.Binding<Enum.VerticalAlignment> | undefined;
5
5
  children?: React.ReactNode;
6
6
  HorizontalFlex?: Enum.UIFlexAlignment;
7
+ HorizontalAlignment?: Enum.HorizontalAlignment;
7
8
  VerticalFlex?: Enum.UIFlexAlignment;
8
9
  VerticalAlignment?: Enum.VerticalAlignment;
9
10
  Event?: React.InstanceEvent<UIListLayout>;
10
11
  Change?: React.InstanceChangeEvent<UIListLayout>;
11
12
  Padding?: UDim | Binding<UDim>;
13
+ Wraps?: boolean;
14
+ name?: string;
12
15
  }
13
16
  export declare function VStack(props: VStackProps): React.JSX.Element;
14
17
  export {};
@@ -5,16 +5,23 @@ local CleanThemeContext = TS.import(script, script.Parent.Parent.Parent, "Contex
5
5
  local SpacingHelper = TS.import(script, script.Parent.Parent.Parent, "Helpers").SpacingHelper
6
6
  local function VStack(props)
7
7
  local theme = React.useContext(CleanThemeContext)
8
- return React.createElement(React.Fragment, nil, React.createElement("uilistlayout", {
9
- FillDirection = Enum.FillDirection.Vertical,
10
- HorizontalFlex = props.HorizontalFlex or Enum.UIFlexAlignment.Fill,
11
- VerticalFlex = props.VerticalFlex,
12
- VerticalAlignment = props.VerticalAlignment or props.valign,
13
- Padding = props.Padding or UDim.new(0, SpacingHelper:GetPadding(theme, props.spacing)),
14
- SortOrder = Enum.SortOrder.LayoutOrder,
15
- Change = props.Change,
16
- Event = props.Event,
17
- }), props.children)
8
+ local _attributes = {}
9
+ local _condition = props.name
10
+ if _condition == nil then
11
+ _condition = "VStack"
12
+ end
13
+ _attributes.key = _condition
14
+ _attributes.FillDirection = Enum.FillDirection.Vertical
15
+ _attributes.HorizontalFlex = props.HorizontalFlex or Enum.UIFlexAlignment.Fill
16
+ _attributes.VerticalFlex = props.VerticalFlex
17
+ _attributes.VerticalAlignment = props.VerticalAlignment or props.valign
18
+ _attributes.HorizontalAlignment = props.HorizontalAlignment
19
+ _attributes.Padding = props.Padding or UDim.new(0, SpacingHelper:GetPadding(theme, props.spacing))
20
+ _attributes.Wraps = props.Wraps
21
+ _attributes.SortOrder = Enum.SortOrder.LayoutOrder
22
+ _attributes.Change = props.Change
23
+ _attributes.Event = props.Event
24
+ return React.createElement(React.Fragment, nil, React.createElement("uilistlayout", _attributes), props.children)
18
25
  end
19
26
  return {
20
27
  VStack = VStack,
@@ -7,7 +7,9 @@ export * from './Fieldset';
7
7
  export * from './FlexItem';
8
8
  export * from './Group';
9
9
  export * from './HStack';
10
+ export * from './Pagination';
10
11
  export * from './Row';
11
12
  export * from './Scroller';
12
13
  export * from './Tabs';
14
+ export * from './Table';
13
15
  export * from './VStack';
@@ -28,6 +28,9 @@ end
28
28
  for _k, _v in TS.import(script, script, "HStack") or {} do
29
29
  exports[_k] = _v
30
30
  end
31
+ for _k, _v in TS.import(script, script, "Pagination") or {} do
32
+ exports[_k] = _v
33
+ end
31
34
  for _k, _v in TS.import(script, script, "Row") or {} do
32
35
  exports[_k] = _v
33
36
  end
@@ -37,6 +40,9 @@ end
37
40
  for _k, _v in TS.import(script, script, "Tabs") or {} do
38
41
  exports[_k] = _v
39
42
  end
43
+ for _k, _v in TS.import(script, script, "Table") or {} do
44
+ exports[_k] = _v
45
+ end
40
46
  for _k, _v in TS.import(script, script, "VStack") or {} do
41
47
  exports[_k] = _v
42
48
  end
@@ -7,6 +7,7 @@ export declare function MenuItem(props: MenuItemProps): React.JSX.Element;
7
7
  interface MenuProps {
8
8
  title: string;
9
9
  collapsed?: boolean;
10
+ name?: string;
10
11
  }
11
12
  type MenuComponent = React.ForwardRefExoticComponent<MenuProps & React.RefAttributes<ImageLabel>> & {
12
13
  Item: typeof MenuItem;
@@ -14,6 +14,7 @@ local NavigationContext = TS.import(script, script.Parent.Parent.Parent, "Contex
14
14
  local function MenuItem(props)
15
15
  local context = React.useContext(NavigationContext)
16
16
  return React.createElement(Button, {
17
+ name = "MenuItem",
17
18
  text = if not context.collapsed then props.title else nil,
18
19
  icon = props.icon,
19
20
  Event = props.Event,
@@ -26,19 +27,26 @@ local Menu = React.forwardRef(function(props, ref)
26
27
  _condition = false
27
28
  end
28
29
  local collapsed, setCollapsed = React.useState(_condition)
30
+ local _attributes = {}
31
+ local _condition_1 = props.name
32
+ if _condition_1 == nil then
33
+ _condition_1 = "Menu"
34
+ end
35
+ _attributes.name = _condition_1
36
+ _attributes.ref = ref
29
37
  return React.createElement(NavigationContext.Provider, {
30
38
  value = {
31
39
  collapsed = collapsed,
32
40
  },
33
- }, React.createElement(Container, {
34
- ref = ref,
35
- }, React.createElement(Group, nil, React.createElement(VStack, {
41
+ }, React.createElement(Container, _attributes, React.createElement(Group, nil, React.createElement(VStack, {
36
42
  spacing = "sm",
37
43
  }, React.createElement(Container, {
44
+ name = "MenuHeader",
38
45
  group = true,
39
46
  }, React.createElement(HStack, {
40
47
  valign = "Center",
41
48
  }, React.createElement(Button, {
49
+ name = "MenuToggleButton",
42
50
  icon = "bars",
43
51
  LayoutOrder = 1,
44
52
  Event = {
@@ -47,6 +55,7 @@ local Menu = React.forwardRef(function(props, ref)
47
55
  end,
48
56
  },
49
57
  }), not collapsed and React.createElement(Text, {
58
+ name = "MenuTitle",
50
59
  text = props.title,
51
60
  variant = "heading",
52
61
  LayoutOrder = 2,
@@ -5,5 +5,6 @@ export interface BoxProps extends SpacedElementProps, ShadowElementProps, Backgr
5
5
  'border-thickness'?: number;
6
6
  'border-color'?: Color3;
7
7
  'background-image'?: CssBackgroundImage;
8
+ name?: string;
8
9
  }
9
10
  export declare const Box: React.ForwardRefExoticComponent<Omit<BoxProps, "ref"> & React.RefAttributes<ImageLabel>>;
@@ -17,7 +17,13 @@ local Box = React.forwardRef(function(props, ref)
17
17
  _condition = theme.components.box.borderThickness
18
18
  end
19
19
  local borderThickness = _condition
20
+ local _condition_1 = props.name
21
+ if _condition_1 == nil then
22
+ _condition_1 = "Box"
23
+ end
24
+ local name = _condition_1
20
25
  local _attributes = {
26
+ name = name,
21
27
  ref = ref,
22
28
  }
23
29
  for _k, _v in props do
@@ -25,16 +31,17 @@ local Box = React.forwardRef(function(props, ref)
25
31
  end
26
32
  _attributes.Size = SizeHelper:GetSize(props, UDim2.fromScale(1, 1))
27
33
  _attributes.AutomaticSize = SizeHelper:GetAutoSize(props)
28
- local _condition_1 = props.BackgroundTransparency
29
- if _condition_1 == nil then
30
- _condition_1 = theme.components.box.backgroundTransparency
34
+ local _condition_2 = props.BackgroundTransparency
35
+ if _condition_2 == nil then
36
+ _condition_2 = theme.components.box.backgroundTransparency
31
37
  end
32
- _attributes.BackgroundTransparency = _condition_1
38
+ _attributes.BackgroundTransparency = _condition_2
33
39
  _attributes.BackgroundColor3 = props.BackgroundColor3 or theme.components.box.backgroundColor
34
40
  _attributes.ZIndex = props.ZIndex
35
41
  _attributes.Event = props.Event
36
42
  _attributes.backgroundImage = props["background-image"] or theme.components.box.backgroundImage
37
43
  local _exp = borderThickness > 0 and (React.createElement("uistroke", {
44
+ key = "Stroke",
38
45
  Thickness = borderThickness,
39
46
  BorderStrokePosition = Enum.BorderStrokePosition.Inner,
40
47
  Color = props["border-color"] or theme.components.box.borderColor,
@@ -42,6 +49,7 @@ local Box = React.forwardRef(function(props, ref)
42
49
  local _attributes_1 = table.clone(props)
43
50
  setmetatable(_attributes_1, nil)
44
51
  _attributes_1.value = theme.components.box.boxShadow
52
+ _attributes_1.name = `{name}BoxShadow`
45
53
  return React.createElement(Container, _attributes, _exp, React.createElement(BoxShadow, _attributes_1), React.createElement(Padding, {
46
54
  resolvedPadding = SpacingHelper:GetResolvedPadding(theme, props, theme.components.box.spacing, theme.components.box.padding),
47
55
  }), React.createElement(Corners, {
@@ -23,6 +23,7 @@ type CardComponent = React.ForwardRefExoticComponent<CardProps & React.RefAttrib
23
23
  Header: typeof CardHeader;
24
24
  Footer: typeof CardFooter;
25
25
  Body: typeof CardBody;
26
+ name?: string;
26
27
  };
27
28
  declare const Card: CardComponent;
28
29
  export { Card };