@rbxts/react-clean-ui 1.1.0 → 1.2.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/out/Components/Chart/BarChart.d.ts +1 -0
- package/out/Components/Chart/BarChart.luau +149 -112
- package/out/Components/Chart/Pie.d.ts +1 -0
- package/out/Components/Chart/Pie.luau +21 -6
- package/out/Components/Decorator/BoxShadow.d.ts +1 -0
- package/out/Components/Decorator/BoxShadow.luau +12 -5
- package/out/Components/Decorator/Corners.d.ts +1 -0
- package/out/Components/Decorator/Corners.luau +8 -3
- package/out/Components/Decorator/Gradient.d.ts +8 -0
- package/out/Components/Decorator/Gradient.luau +23 -0
- package/out/Components/Decorator/Padding.d.ts +3 -1
- package/out/Components/Decorator/Padding.luau +11 -6
- package/out/Components/Decorator/index.d.ts +1 -0
- package/out/Components/Decorator/init.luau +3 -0
- package/out/Components/Input/Button.d.ts +1 -0
- package/out/Components/Input/Button.luau +49 -34
- package/out/Components/Input/Checkbox.d.ts +1 -0
- package/out/Components/Input/Checkbox.luau +28 -18
- package/out/Components/Input/HoverButton.d.ts +1 -0
- package/out/Components/Input/HoverButton.luau +44 -42
- package/out/Components/Input/Increment.d.ts +1 -0
- package/out/Components/Input/Increment.luau +10 -3
- package/out/Components/Input/Input.d.ts +3 -1
- package/out/Components/Input/Input.luau +89 -68
- package/out/Components/Input/Select.d.ts +11 -1
- package/out/Components/Input/Select.luau +315 -39
- package/out/Components/Input/Slider.luau +44 -53
- package/out/Components/Input/Switch.d.ts +9 -0
- package/out/Components/Input/Switch.luau +145 -0
- package/out/Components/Input/index.d.ts +1 -0
- package/out/Components/Input/init.luau +3 -0
- package/out/Components/Interaction/Modal.d.ts +14 -0
- package/out/Components/Interaction/Modal.luau +262 -0
- package/out/Components/Interaction/Toast.d.ts +2 -1
- package/out/Components/Interaction/Toast.luau +53 -28
- package/out/Components/Interaction/Tooltip.luau +36 -25
- package/out/Components/Interaction/index.d.ts +1 -0
- package/out/Components/Interaction/init.luau +3 -0
- package/out/Components/Layout/Accordion.d.ts +1 -0
- package/out/Components/Layout/Accordion.luau +51 -55
- package/out/Components/Layout/Column.d.ts +1 -0
- package/out/Components/Layout/Column.luau +11 -6
- package/out/Components/Layout/Container.d.ts +3 -0
- package/out/Components/Layout/Container.luau +26 -17
- package/out/Components/Layout/Draggable.luau +25 -3
- package/out/Components/Layout/Fieldset.d.ts +1 -0
- package/out/Components/Layout/Fieldset.luau +14 -42
- package/out/Components/Layout/FlexItem.luau +7 -0
- package/out/Components/Layout/Grid.d.ts +10 -0
- package/out/Components/Layout/Grid.luau +172 -0
- package/out/Components/Layout/Group.d.ts +1 -0
- package/out/Components/Layout/Group.luau +48 -60
- package/out/Components/Layout/HStack.d.ts +4 -0
- package/out/Components/Layout/HStack.luau +17 -10
- package/out/Components/Layout/Pagination.d.ts +32 -0
- package/out/Components/Layout/Pagination.luau +400 -0
- package/out/Components/Layout/Row.d.ts +1 -0
- package/out/Components/Layout/Row.luau +20 -48
- package/out/Components/Layout/Scroller.d.ts +1 -0
- package/out/Components/Layout/Scroller.luau +26 -34
- package/out/Components/Layout/Table.d.ts +31 -0
- package/out/Components/Layout/Table.luau +342 -0
- package/out/Components/Layout/Tabs.d.ts +20 -10
- package/out/Components/Layout/Tabs.luau +113 -119
- package/out/Components/Layout/VStack.d.ts +3 -0
- package/out/Components/Layout/VStack.luau +17 -10
- package/out/Components/Layout/index.d.ts +3 -0
- package/out/Components/Layout/init.luau +9 -0
- package/out/Components/Navigation/Menu.d.ts +1 -0
- package/out/Components/Navigation/Menu.luau +12 -3
- package/out/Components/Surface/Box.d.ts +3 -1
- package/out/Components/Surface/Box.luau +15 -4
- package/out/Components/Surface/Card.d.ts +1 -0
- package/out/Components/Surface/Card.luau +56 -154
- package/out/Components/Surface/Icon.d.ts +1 -0
- package/out/Components/Surface/Icon.luau +25 -16
- package/out/Components/Surface/ProgressBar.d.ts +14 -0
- package/out/Components/Surface/ProgressBar.luau +230 -0
- package/out/Components/Surface/index.d.ts +1 -0
- package/out/Components/Surface/init.luau +3 -0
- package/out/Components/Typography/Text.d.ts +1 -0
- package/out/Components/Typography/Text.luau +57 -53
- package/out/Contexts/index.d.ts +1 -0
- package/out/Contexts/init.luau +3 -0
- package/out/Contexts/modal.context.d.ts +15 -0
- package/out/Contexts/modal.context.luau +23 -0
- package/out/Contexts/toast.context.d.ts +1 -0
- package/out/Helpers/color.helper.luau +28 -0
- package/out/Helpers/css.helper.d.ts +4 -1
- package/out/Helpers/css.helper.luau +76 -6
- package/out/Helpers/gui.helper.luau +0 -3
- package/out/Helpers/size.helper.luau +0 -2
- package/out/Helpers/spacing.helper.luau +0 -3
- package/out/Helpers/typography.helper.luau +0 -2
- package/out/Interfaces/css.types.d.ts +7 -0
- package/out/Interfaces/css.types.luau +0 -20
- package/out/Providers/app.provider.luau +2 -1
- package/out/Providers/index.d.ts +1 -0
- package/out/Providers/init.luau +3 -0
- package/out/Providers/modal.provider.d.ts +6 -0
- package/out/Providers/modal.provider.luau +86 -0
- package/out/Providers/overlay.provider.luau +1 -0
- package/out/Providers/registry.provider.luau +0 -2
- package/out/Theme/theme.style.d.ts +2 -1
- package/out/Theme/theme.template.d.ts +126 -1
- package/out/Theme/themes/dark.theme.luau +225 -0
- package/out/Theme/themes/default.theme.luau +210 -0
- package/out/Theme/themes/sandstone.theme.luau +173 -0
- package/out/Theme/themes/wooden.theme.luau +195 -0
- package/package.json +1 -1
|
@@ -10,9 +10,14 @@ local function Corners(props)
|
|
|
10
10
|
if radius.Scale == 0 and radius.Offset == 0 then
|
|
11
11
|
return nil
|
|
12
12
|
end
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
local _attributes = {}
|
|
14
|
+
local _condition = props.name
|
|
15
|
+
if _condition == nil then
|
|
16
|
+
_condition = "Corners"
|
|
17
|
+
end
|
|
18
|
+
_attributes.key = _condition
|
|
19
|
+
_attributes.CornerRadius = radius
|
|
20
|
+
return React.createElement("uicorner", _attributes)
|
|
16
21
|
end
|
|
17
22
|
return {
|
|
18
23
|
Corners = Corners,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "@rbxts/react";
|
|
2
|
+
import { CssBackgroundGradient } from "../../Interfaces/";
|
|
3
|
+
interface GradientProps {
|
|
4
|
+
value?: Partial<CssBackgroundGradient>;
|
|
5
|
+
name?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function Gradient(props: GradientProps): React.JSX.Element | undefined;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
|
|
4
|
+
local CssHelper = TS.import(script, script.Parent.Parent.Parent, "Helpers").CssHelper
|
|
5
|
+
local function Gradient(props)
|
|
6
|
+
local resolved = CssHelper:resolveBackgroundGradient(props.value)
|
|
7
|
+
if resolved == nil then
|
|
8
|
+
return nil
|
|
9
|
+
end
|
|
10
|
+
local _attributes = {}
|
|
11
|
+
local _condition = props.name
|
|
12
|
+
if _condition == nil then
|
|
13
|
+
_condition = "Gradient"
|
|
14
|
+
end
|
|
15
|
+
_attributes.key = _condition
|
|
16
|
+
for _k, _v in resolved do
|
|
17
|
+
_attributes[_k] = _v
|
|
18
|
+
end
|
|
19
|
+
return React.createElement("uigradient", _attributes)
|
|
20
|
+
end
|
|
21
|
+
return {
|
|
22
|
+
Gradient = Gradient,
|
|
23
|
+
}
|
|
@@ -6,12 +6,17 @@ local SpacingHelper = TS.import(script, script.Parent.Parent.Parent, "Helpers").
|
|
|
6
6
|
local function Padding(props)
|
|
7
7
|
local theme = React.useContext(CleanThemeContext)
|
|
8
8
|
local padding = SpacingHelper:GetResolvedPadding(theme, props)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
local _attributes = {}
|
|
10
|
+
local _condition = props.name
|
|
11
|
+
if _condition == nil then
|
|
12
|
+
_condition = "Padding"
|
|
13
|
+
end
|
|
14
|
+
_attributes.key = _condition
|
|
15
|
+
_attributes.PaddingTop = UDim.new(0, padding.top)
|
|
16
|
+
_attributes.PaddingBottom = UDim.new(0, padding.bottom)
|
|
17
|
+
_attributes.PaddingLeft = UDim.new(0, padding.left)
|
|
18
|
+
_attributes.PaddingRight = UDim.new(0, padding.right)
|
|
19
|
+
return React.createElement("uipadding", _attributes)
|
|
15
20
|
end
|
|
16
21
|
return {
|
|
17
22
|
Padding = Padding,
|
|
@@ -7,6 +7,9 @@ end
|
|
|
7
7
|
for _k, _v in TS.import(script, script, "Corners") or {} do
|
|
8
8
|
exports[_k] = _v
|
|
9
9
|
end
|
|
10
|
+
for _k, _v in TS.import(script, script, "Gradient") or {} do
|
|
11
|
+
exports[_k] = _v
|
|
12
|
+
end
|
|
10
13
|
for _k, _v in TS.import(script, script, "Padding") or {} do
|
|
11
14
|
exports[_k] = _v
|
|
12
15
|
end
|
|
@@ -12,6 +12,7 @@ export interface ButtonProps extends SpacedElementProps, ShadowElementProps, ZIn
|
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
LayoutOrder?: number;
|
|
14
14
|
styleOverride?: ButtonStyleOverride;
|
|
15
|
+
name?: string;
|
|
15
16
|
}
|
|
16
17
|
export interface ButtonTextProps extends ScalableElementProps, IntentElementProps {
|
|
17
18
|
children?: string;
|
|
@@ -5,6 +5,7 @@ local CleanThemeContext = TS.import(script, script.Parent.Parent.Parent, "Contex
|
|
|
5
5
|
local _Decorator = TS.import(script, script.Parent.Parent, "Decorator")
|
|
6
6
|
local BoxShadow = _Decorator.BoxShadow
|
|
7
7
|
local Corners = _Decorator.Corners
|
|
8
|
+
local Gradient = _Decorator.Gradient
|
|
8
9
|
local Padding = _Decorator.Padding
|
|
9
10
|
local Text = TS.import(script, script.Parent.Parent, "Typography").Text
|
|
10
11
|
local _Helpers = TS.import(script, script.Parent.Parent.Parent, "Helpers")
|
|
@@ -20,6 +21,7 @@ local GroupContext = _.GroupContext
|
|
|
20
21
|
local function ButtonText(props)
|
|
21
22
|
local theme = React.useContext(CleanThemeContext)
|
|
22
23
|
local _attributes = {
|
|
24
|
+
name = "ButtonText",
|
|
23
25
|
text = props.text,
|
|
24
26
|
}
|
|
25
27
|
local _exp = props.scale
|
|
@@ -52,12 +54,16 @@ local function ButtonText(props)
|
|
|
52
54
|
end
|
|
53
55
|
local function ButtonIcon(props)
|
|
54
56
|
local theme = React.useContext(CleanThemeContext)
|
|
55
|
-
local _attributes = {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
local _attributes = {}
|
|
58
|
+
local _condition = props.name
|
|
59
|
+
if _condition == nil then
|
|
60
|
+
_condition = "ButtonIcon"
|
|
61
|
+
end
|
|
62
|
+
_attributes.name = _condition
|
|
63
|
+
_attributes.scale = props.scale
|
|
64
|
+
_attributes.icon = props.icon
|
|
65
|
+
_attributes.spinning = props.spinning
|
|
66
|
+
_attributes.speed = props.speed
|
|
61
67
|
local _exp = props.intent
|
|
62
68
|
local _exp_1 = if props.disabled then "disabled" else "default"
|
|
63
69
|
local _exp_2 = theme.components.button.intents
|
|
@@ -87,10 +93,14 @@ local Button = React.forwardRef(function(props, ref)
|
|
|
87
93
|
end
|
|
88
94
|
local intentColors = ColorHelper:getIntentColors(theme, _exp, state, _exp_1, _result)
|
|
89
95
|
local backgroundImage = CssHelper:resolveBackgroundImage(intentColors.backgroundImage)
|
|
90
|
-
local _attributes = {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
96
|
+
local _attributes = {}
|
|
97
|
+
local _condition = props.name
|
|
98
|
+
if _condition == nil then
|
|
99
|
+
_condition = "Button"
|
|
100
|
+
end
|
|
101
|
+
_attributes.key = _condition
|
|
102
|
+
_attributes.ref = ref
|
|
103
|
+
_attributes.Active = not props.disabled
|
|
94
104
|
local _object = {}
|
|
95
105
|
local _spread = props.Event
|
|
96
106
|
if _spread then
|
|
@@ -144,28 +154,28 @@ local Button = React.forwardRef(function(props, ref)
|
|
|
144
154
|
_result_2 = _result_2.X
|
|
145
155
|
end
|
|
146
156
|
end
|
|
147
|
-
local
|
|
148
|
-
if
|
|
149
|
-
|
|
157
|
+
local _condition_1 = _result_2
|
|
158
|
+
if _condition_1 == nil then
|
|
159
|
+
_condition_1 = 0
|
|
150
160
|
end
|
|
151
|
-
_result_1 =
|
|
161
|
+
_result_1 = _condition_1
|
|
152
162
|
else
|
|
153
163
|
_result_1 = 0
|
|
154
164
|
end
|
|
155
165
|
_attributes.Size = UDim2.fromOffset(_result_1, 0)
|
|
156
166
|
_attributes.AutomaticSize = Enum.AutomaticSize.XY
|
|
157
|
-
local
|
|
158
|
-
if
|
|
167
|
+
local _condition_1 = props.BackgroundTransparency
|
|
168
|
+
if _condition_1 == nil then
|
|
159
169
|
local _result_2 = props.styleOverride
|
|
160
170
|
if _result_2 ~= nil then
|
|
161
171
|
_result_2 = _result_2.backgroundTransparency
|
|
162
172
|
end
|
|
163
|
-
|
|
164
|
-
if
|
|
165
|
-
|
|
173
|
+
_condition_1 = _result_2
|
|
174
|
+
if _condition_1 == nil then
|
|
175
|
+
_condition_1 = theme.components.button.backgroundTransparency
|
|
166
176
|
end
|
|
167
177
|
end
|
|
168
|
-
_attributes.BackgroundTransparency =
|
|
178
|
+
_attributes.BackgroundTransparency = _condition_1
|
|
169
179
|
_attributes.BackgroundColor3 = intentColors.backgroundColor
|
|
170
180
|
_attributes.AutoButtonColor = false
|
|
171
181
|
_attributes.LayoutOrder = props.LayoutOrder
|
|
@@ -182,22 +192,24 @@ local Button = React.forwardRef(function(props, ref)
|
|
|
182
192
|
if _result_2 ~= nil then
|
|
183
193
|
_result_2 = _result_2.cornerRadius
|
|
184
194
|
end
|
|
185
|
-
local
|
|
186
|
-
if
|
|
187
|
-
|
|
195
|
+
local _condition_2 = _result_2
|
|
196
|
+
if _condition_2 == nil then
|
|
197
|
+
_condition_2 = theme.components.button.cornerRadius
|
|
188
198
|
end
|
|
189
|
-
_attributes_1.radius =
|
|
199
|
+
_attributes_1.radius = _condition_2
|
|
190
200
|
local _exp_2 = React.createElement(Corners, _attributes_1)
|
|
191
|
-
local _attributes_2 = {
|
|
201
|
+
local _attributes_2 = {
|
|
202
|
+
key = "Stroke",
|
|
203
|
+
}
|
|
192
204
|
local _result_3 = props.styleOverride
|
|
193
205
|
if _result_3 ~= nil then
|
|
194
206
|
_result_3 = _result_3.borderThickness
|
|
195
207
|
end
|
|
196
|
-
local
|
|
197
|
-
if
|
|
198
|
-
|
|
208
|
+
local _condition_3 = _result_3
|
|
209
|
+
if _condition_3 == nil then
|
|
210
|
+
_condition_3 = theme.components.button.borderThickness
|
|
199
211
|
end
|
|
200
|
-
_attributes_2.Thickness =
|
|
212
|
+
_attributes_2.Thickness = _condition_3
|
|
201
213
|
_attributes_2.BorderStrokePosition = Enum.BorderStrokePosition.Inner
|
|
202
214
|
_attributes_2.Color = intentColors.borderColor
|
|
203
215
|
local _exp_3 = React.createElement("uistroke", _attributes_2)
|
|
@@ -207,15 +219,18 @@ local Button = React.forwardRef(function(props, ref)
|
|
|
207
219
|
if _result_4 ~= nil then
|
|
208
220
|
_result_4 = _result_4.boxShadow
|
|
209
221
|
end
|
|
210
|
-
local
|
|
211
|
-
if
|
|
212
|
-
|
|
222
|
+
local _condition_4 = _result_4
|
|
223
|
+
if _condition_4 == nil then
|
|
224
|
+
_condition_4 = theme.components.button.boxShadow
|
|
213
225
|
end
|
|
214
|
-
_attributes_3.value =
|
|
226
|
+
_attributes_3.value = _condition_4
|
|
215
227
|
local _exp_4 = React.createElement(BoxShadow, _attributes_3)
|
|
228
|
+
local _exp_5 = React.createElement(Gradient, {
|
|
229
|
+
value = intentColors.backgroundGradient,
|
|
230
|
+
})
|
|
216
231
|
local _attributes_4 = table.clone(props)
|
|
217
232
|
setmetatable(_attributes_4, nil)
|
|
218
|
-
return React.createElement("imagebutton", _attributes, _exp_2, _exp_3, _exp_4, React.createElement(Padding, _attributes_4), React.createElement(Group.Element, {
|
|
233
|
+
return React.createElement("imagebutton", _attributes, _exp_2, _exp_3, _exp_4, _exp_5, React.createElement(Padding, _attributes_4), React.createElement(Group.Element, {
|
|
219
234
|
enabled = props.group,
|
|
220
235
|
padding = padding,
|
|
221
236
|
}, (props.icon ~= nil or props.text ~= nil) and React.createElement(HStack, {
|
|
@@ -7,6 +7,7 @@ interface CheckboxProps extends IntentElementProps, PaddingProps, BackgroundElem
|
|
|
7
7
|
'icon-unchecked'?: IconName;
|
|
8
8
|
'intent-checked'?: Intent;
|
|
9
9
|
'intent-unchecked'?: Intent;
|
|
10
|
+
name?: string;
|
|
10
11
|
}
|
|
11
12
|
export declare function Checkbox(props: CheckboxProps): React.JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -6,6 +6,7 @@ local CleanThemeContext = TS.import(script, script.Parent.Parent.Parent, "Contex
|
|
|
6
6
|
local FieldsetContext = TS.import(script, script.Parent.Parent, "Layout").FieldsetContext
|
|
7
7
|
local _Decorator = TS.import(script, script.Parent.Parent, "Decorator")
|
|
8
8
|
local Corners = _Decorator.Corners
|
|
9
|
+
local Gradient = _Decorator.Gradient
|
|
9
10
|
local Padding = _Decorator.Padding
|
|
10
11
|
local _Helpers = TS.import(script, script.Parent.Parent.Parent, "Helpers")
|
|
11
12
|
local ColorHelper = _Helpers.ColorHelper
|
|
@@ -46,21 +47,25 @@ local function Checkbox(props)
|
|
|
46
47
|
end
|
|
47
48
|
end, { checked })
|
|
48
49
|
local backgroundImage = CssHelper:resolveBackgroundImage(theme.components.checkbox.backgroundImage)
|
|
49
|
-
local _attributes = {
|
|
50
|
-
|
|
51
|
-
AutomaticSize = Enum.AutomaticSize.XY,
|
|
52
|
-
Event = {
|
|
53
|
-
Activated = function()
|
|
54
|
-
setChecked(not checked)
|
|
55
|
-
end,
|
|
56
|
-
},
|
|
57
|
-
}
|
|
58
|
-
local _condition_1 = props.BackgroundTransparency
|
|
50
|
+
local _attributes = {}
|
|
51
|
+
local _condition_1 = props.name
|
|
59
52
|
if _condition_1 == nil then
|
|
60
|
-
_condition_1 =
|
|
53
|
+
_condition_1 = "Checkbox"
|
|
54
|
+
end
|
|
55
|
+
_attributes.key = _condition_1
|
|
56
|
+
_attributes.Size = UDim2.fromOffset(0, 0)
|
|
57
|
+
_attributes.AutomaticSize = Enum.AutomaticSize.XY
|
|
58
|
+
_attributes.Event = {
|
|
59
|
+
Activated = function()
|
|
60
|
+
setChecked(not checked)
|
|
61
|
+
end,
|
|
62
|
+
}
|
|
63
|
+
local _condition_2 = props.BackgroundTransparency
|
|
64
|
+
if _condition_2 == nil then
|
|
65
|
+
_condition_2 = theme.components.button.backgroundTransparency
|
|
61
66
|
end
|
|
62
|
-
_attributes.BackgroundTransparency =
|
|
63
|
-
_attributes.BackgroundColor3 = ColorHelper:getIntentColors(theme, props.intent, "default", theme.components.
|
|
67
|
+
_attributes.BackgroundTransparency = _condition_2
|
|
68
|
+
_attributes.BackgroundColor3 = ColorHelper:getIntentColors(theme, props.intent, "default", theme.components.checkbox.intents).backgroundColor
|
|
64
69
|
_attributes.AutoButtonColor = false
|
|
65
70
|
_attributes.Image = backgroundImage.Image
|
|
66
71
|
_attributes.ImageColor3 = backgroundImage.ImageColor3
|
|
@@ -72,19 +77,24 @@ local function Checkbox(props)
|
|
|
72
77
|
local _exp = React.createElement(Corners, {
|
|
73
78
|
radius = theme.components.checkbox.cornerRadius,
|
|
74
79
|
})
|
|
80
|
+
local _exp_1 = React.createElement(Gradient, {
|
|
81
|
+
value = theme.components.checkbox.backgroundGradient,
|
|
82
|
+
})
|
|
75
83
|
local _attributes_1 = {
|
|
84
|
+
key = "Stroke",
|
|
76
85
|
Thickness = theme.components.checkbox.borderThickness,
|
|
77
86
|
BorderStrokePosition = Enum.BorderStrokePosition.Inner,
|
|
78
87
|
}
|
|
79
|
-
local
|
|
80
|
-
if
|
|
81
|
-
|
|
88
|
+
local _condition_3 = theme.components.checkbox.borderTransparency
|
|
89
|
+
if _condition_3 == nil then
|
|
90
|
+
_condition_3 = 0
|
|
82
91
|
end
|
|
83
|
-
_attributes_1.Transparency =
|
|
92
|
+
_attributes_1.Transparency = _condition_3
|
|
84
93
|
_attributes_1.Color = ColorHelper:getIntentColors(theme, if checked then props["intent-checked"] or "success" else props["intent-unchecked"] or "primary", "default", theme.components.checkbox.intents).borderColor
|
|
85
|
-
return React.createElement("imagebutton", _attributes, _exp, React.createElement("uistroke", _attributes_1), React.createElement(Padding, {
|
|
94
|
+
return React.createElement("imagebutton", _attributes, _exp, _exp_1, React.createElement("uistroke", _attributes_1), React.createElement(Padding, {
|
|
86
95
|
resolvedPadding = SpacingHelper:GetResolvedPadding(theme, props, theme.components.checkbox.spacing, theme.components.checkbox.padding),
|
|
87
96
|
}), React.createElement(Icon, {
|
|
97
|
+
name = "CheckboxIcon",
|
|
88
98
|
scale = props.scale,
|
|
89
99
|
icon = if checked then props["icon-checked"] or "check" else props["icon-unchecked"],
|
|
90
100
|
color = ColorHelper:getIntentColors(theme, if checked then props["intent-checked"] or "success" else props["intent-unchecked"] or "primary", "default", theme.components.checkbox.intents).textColor,
|
|
@@ -6,8 +6,6 @@ local function HoverButton(propSet)
|
|
|
6
6
|
local hovering, setHovering = React.useState(false)
|
|
7
7
|
local state = if propSet.isSelected then "focus" elseif hovering then "hover" else "default"
|
|
8
8
|
local stateProps = propSet[state]
|
|
9
|
-
-- Object spreading into a new object is supported.
|
|
10
|
-
-- It is object rest destructuring that roblox-ts does not support.
|
|
11
9
|
local _object = table.clone(propSet.default)
|
|
12
10
|
setmetatable(_object, nil)
|
|
13
11
|
if stateProps then
|
|
@@ -22,46 +20,50 @@ local function HoverButton(propSet)
|
|
|
22
20
|
_stateEvents = _stateEvents.Event
|
|
23
21
|
end
|
|
24
22
|
local stateEvents = _stateEvents
|
|
25
|
-
local _attributes = {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
23
|
+
local _attributes = {}
|
|
24
|
+
local _condition = propSet.name
|
|
25
|
+
if _condition == nil then
|
|
26
|
+
_condition = "HoverButton"
|
|
27
|
+
end
|
|
28
|
+
_attributes.key = _condition
|
|
29
|
+
_attributes.Active = props.Active
|
|
30
|
+
_attributes.AnchorPoint = props.AnchorPoint
|
|
31
|
+
_attributes.Archivable = props.Archivable
|
|
32
|
+
_attributes.AutoButtonColor = props.AutoButtonColor
|
|
33
|
+
_attributes.AutomaticSize = props.AutomaticSize
|
|
34
|
+
_attributes.BackgroundColor3 = props.BackgroundColor3
|
|
35
|
+
_attributes.BackgroundTransparency = props.BackgroundTransparency
|
|
36
|
+
_attributes.BorderColor3 = props.BorderColor3
|
|
37
|
+
_attributes.BorderMode = props.BorderMode
|
|
38
|
+
_attributes.BorderSizePixel = props.BorderSizePixel
|
|
39
|
+
_attributes.ClipsDescendants = props.ClipsDescendants
|
|
40
|
+
_attributes.LayoutOrder = props.LayoutOrder
|
|
41
|
+
_attributes.NextSelectionDown = props.NextSelectionDown
|
|
42
|
+
_attributes.NextSelectionLeft = props.NextSelectionLeft
|
|
43
|
+
_attributes.NextSelectionRight = props.NextSelectionRight
|
|
44
|
+
_attributes.NextSelectionUp = props.NextSelectionUp
|
|
45
|
+
_attributes.Position = props.Position
|
|
46
|
+
_attributes.Rotation = props.Rotation
|
|
47
|
+
_attributes.Selectable = props.Selectable
|
|
48
|
+
_attributes.SelectionBehaviorDown = props.SelectionBehaviorDown
|
|
49
|
+
_attributes.SelectionBehaviorLeft = props.SelectionBehaviorLeft
|
|
50
|
+
_attributes.SelectionBehaviorRight = props.SelectionBehaviorRight
|
|
51
|
+
_attributes.SelectionBehaviorUp = props.SelectionBehaviorUp
|
|
52
|
+
_attributes.SelectionGroup = props.SelectionGroup
|
|
53
|
+
_attributes.Size = props.Size
|
|
54
|
+
_attributes.SizeConstraint = props.SizeConstraint
|
|
55
|
+
_attributes.Visible = props.Visible
|
|
56
|
+
_attributes.ZIndex = props.ZIndex
|
|
57
|
+
_attributes.Image = props.Image
|
|
58
|
+
_attributes.ImageColor3 = props.ImageColor3
|
|
59
|
+
_attributes.ImageRectOffset = props.ImageRectOffset
|
|
60
|
+
_attributes.ImageRectSize = props.ImageRectSize
|
|
61
|
+
_attributes.ImageTransparency = props.ImageTransparency
|
|
62
|
+
_attributes.ResampleMode = props.ResampleMode
|
|
63
|
+
_attributes.ScaleType = props.ScaleType
|
|
64
|
+
_attributes.SliceCenter = props.SliceCenter
|
|
65
|
+
_attributes.SliceScale = props.SliceScale
|
|
66
|
+
_attributes.TileSize = props.TileSize
|
|
65
67
|
local _object_1 = {}
|
|
66
68
|
if defaultEvents then
|
|
67
69
|
for _k, _v in defaultEvents do
|
|
@@ -7,5 +7,6 @@ export interface IncrementProps extends ScalableElementProps, SpacedElementProps
|
|
|
7
7
|
min?: number;
|
|
8
8
|
max?: number;
|
|
9
9
|
controlled?: boolean;
|
|
10
|
+
name?: string;
|
|
10
11
|
}
|
|
11
12
|
export declare const Increment: React.ForwardRefExoticComponent<Omit<IncrementProps, "ref"> & React.RefAttributes<ImageLabel>>;
|
|
@@ -34,9 +34,13 @@ local Increment = React.forwardRef(function(props, ref)
|
|
|
34
34
|
_result(nextValue)
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
|
-
local _attributes = {
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
local _attributes = {}
|
|
38
|
+
local _condition_1 = props.name
|
|
39
|
+
if _condition_1 == nil then
|
|
40
|
+
_condition_1 = "Increment"
|
|
41
|
+
end
|
|
42
|
+
_attributes.name = _condition_1
|
|
43
|
+
_attributes.ref = ref
|
|
40
44
|
for _k, _v in props do
|
|
41
45
|
_attributes[_k] = _v
|
|
42
46
|
end
|
|
@@ -47,6 +51,7 @@ local Increment = React.forwardRef(function(props, ref)
|
|
|
47
51
|
valign = "Center",
|
|
48
52
|
spacing = props.spacing,
|
|
49
53
|
}, React.createElement(Button, {
|
|
54
|
+
name = "DecrementButton",
|
|
50
55
|
icon = "minus",
|
|
51
56
|
intent = props.intent,
|
|
52
57
|
scale = props.scale,
|
|
@@ -67,6 +72,7 @@ local Increment = React.forwardRef(function(props, ref)
|
|
|
67
72
|
HorizontalFlex = "Fill",
|
|
68
73
|
LayoutOrder = 1,
|
|
69
74
|
}, React.createElement(Input, {
|
|
75
|
+
name = "IncrementInput",
|
|
70
76
|
Size = UDim2.fromScale(0, 0),
|
|
71
77
|
scale = props.scale,
|
|
72
78
|
spacing = props.spacing,
|
|
@@ -84,6 +90,7 @@ local Increment = React.forwardRef(function(props, ref)
|
|
|
84
90
|
applyValue(parsed)
|
|
85
91
|
end,
|
|
86
92
|
})), React.createElement(Button, {
|
|
93
|
+
name = "IncrementButton",
|
|
87
94
|
icon = "plus",
|
|
88
95
|
intent = props.intent,
|
|
89
96
|
scale = props.scale,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "@rbxts/react";
|
|
2
|
-
import { ScalableElementProps, SpacedElementProps } from "../../Interfaces";
|
|
2
|
+
import { IconName, ScalableElementProps, SpacedElementProps } from "../../Interfaces";
|
|
3
3
|
export interface InputProps extends ScalableElementProps, SpacedElementProps, React.InstanceProps<TextBox> {
|
|
4
4
|
value: string;
|
|
5
5
|
placeholder?: string;
|
|
@@ -9,5 +9,7 @@ export interface InputProps extends ScalableElementProps, SpacedElementProps, Re
|
|
|
9
9
|
onChange?: (value: string) => void;
|
|
10
10
|
Event?: React.InstanceEvent<TextBox>;
|
|
11
11
|
controlled?: boolean;
|
|
12
|
+
icon?: IconName;
|
|
13
|
+
name?: string;
|
|
12
14
|
}
|
|
13
15
|
export declare function Input(props: InputProps): React.JSX.Element;
|