@rbxts/react-clean-ui 1.0.38 → 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.
- 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 -5
- 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 +12 -3
- package/out/Components/Decorator/Padding.d.ts +3 -1
- package/out/Components/Decorator/Padding.luau +12 -7
- package/out/Components/Input/Button.d.ts +1 -0
- package/out/Components/Input/Button.luau +44 -33
- package/out/Components/Input/Checkbox.d.ts +1 -0
- package/out/Components/Input/Checkbox.luau +23 -17
- package/out/Components/Input/HoverButton.d.ts +1 -0
- package/out/Components/Input/HoverButton.luau +44 -40
- 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 +96 -87
- package/out/Components/Input/Input.validation.d.ts +1 -0
- package/out/Components/Input/Input.validation.luau +21 -0
- package/out/Components/Input/Select.d.ts +9 -0
- package/out/Components/Input/Select.luau +311 -34
- package/out/Components/Input/Slider.luau +44 -29
- package/out/Components/Input/Switch.d.ts +9 -0
- package/out/Components/Input/Switch.luau +147 -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 +276 -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 -24
- package/out/Components/Interaction/index.d.ts +1 -0
- package/out/Components/Interaction/init.luau +3 -0
- package/out/Components/Layout/Accordion.d.ts +4 -3
- package/out/Components/Layout/Accordion.luau +68 -21
- package/out/Components/Layout/Column.d.ts +1 -0
- package/out/Components/Layout/Column.luau +11 -6
- package/out/Components/Layout/Container.d.ts +1 -0
- package/out/Components/Layout/Container.luau +22 -16
- package/out/Components/Layout/Draggable.luau +25 -3
- package/out/Components/Layout/Fieldset.d.ts +1 -0
- package/out/Components/Layout/Fieldset.luau +14 -8
- package/out/Components/Layout/FlexItem.luau +7 -0
- package/out/Components/Layout/Group.d.ts +1 -0
- package/out/Components/Layout/Group.luau +14 -9
- package/out/Components/Layout/HStack.d.ts +4 -0
- package/out/Components/Layout/HStack.luau +17 -9
- package/out/Components/Layout/Pagination.d.ts +32 -0
- package/out/Components/Layout/Pagination.luau +405 -0
- package/out/Components/Layout/Row.d.ts +1 -0
- package/out/Components/Layout/Row.luau +22 -16
- package/out/Components/Layout/Scroller.d.ts +1 -0
- package/out/Components/Layout/Scroller.luau +22 -15
- package/out/Components/Layout/Table.d.ts +31 -0
- package/out/Components/Layout/Table.luau +342 -0
- package/out/Components/Layout/Tabs.d.ts +22 -11
- package/out/Components/Layout/Tabs.luau +139 -122
- package/out/Components/Layout/VStack.d.ts +3 -0
- package/out/Components/Layout/VStack.luau +17 -10
- package/out/Components/Layout/index.d.ts +2 -0
- package/out/Components/Layout/init.luau +6 -0
- package/out/Components/Navigation/Menu.d.ts +1 -0
- package/out/Components/Navigation/Menu.luau +14 -3
- package/out/Components/Surface/Box.d.ts +1 -0
- package/out/Components/Surface/Box.luau +29 -27
- package/out/Components/Surface/Card.d.ts +7 -2
- package/out/Components/Surface/Card.luau +106 -65
- package/out/Components/Surface/Icon.d.ts +1 -0
- package/out/Components/Surface/Icon.luau +25 -16
- package/out/Components/Typography/Text.d.ts +1 -0
- package/out/Components/Typography/Text.luau +57 -47
- 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 +26 -0
- package/out/Contexts/toast.context.d.ts +1 -0
- package/out/Helpers/spacing.helper.d.ts +3 -2
- package/out/Helpers/spacing.helper.luau +102 -18
- package/out/Interfaces/css.types.d.ts +2 -0
- package/out/Interfaces/css.types.luau +4 -0
- package/out/Interfaces/index.d.ts +4 -4
- package/out/Interfaces/init.luau +0 -12
- 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/Theme/theme.template.d.ts +99 -3
- package/out/Theme/themes/dark.theme.luau +103 -0
- package/out/Theme/themes/default.theme.luau +130 -0
- package/out/Theme/themes/sandstone.theme.luau +103 -0
- package/out/Theme/themes/wooden.theme.luau +235 -2
- package/package.json +2 -2
|
@@ -6,9 +6,18 @@ local function Corners(props)
|
|
|
6
6
|
if props.radius == nil then
|
|
7
7
|
return nil
|
|
8
8
|
end
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
local radius = SizeHelper:toUDim(props.radius)
|
|
10
|
+
if radius.Scale == 0 and radius.Offset == 0 then
|
|
11
|
+
return nil
|
|
12
|
+
end
|
|
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)
|
|
12
21
|
end
|
|
13
22
|
return {
|
|
14
23
|
Corners = Corners,
|
|
@@ -5,13 +5,18 @@ 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 Padding(props)
|
|
7
7
|
local theme = React.useContext(CleanThemeContext)
|
|
8
|
-
local padding =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
local padding = SpacingHelper:GetResolvedPadding(theme, props)
|
|
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,
|
|
@@ -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;
|
|
@@ -20,6 +20,7 @@ local GroupContext = _.GroupContext
|
|
|
20
20
|
local function ButtonText(props)
|
|
21
21
|
local theme = React.useContext(CleanThemeContext)
|
|
22
22
|
local _attributes = {
|
|
23
|
+
name = "ButtonText",
|
|
23
24
|
text = props.text,
|
|
24
25
|
}
|
|
25
26
|
local _exp = props.scale
|
|
@@ -52,12 +53,16 @@ local function ButtonText(props)
|
|
|
52
53
|
end
|
|
53
54
|
local function ButtonIcon(props)
|
|
54
55
|
local theme = React.useContext(CleanThemeContext)
|
|
55
|
-
local _attributes = {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
local _attributes = {}
|
|
57
|
+
local _condition = props.name
|
|
58
|
+
if _condition == nil then
|
|
59
|
+
_condition = "ButtonIcon"
|
|
60
|
+
end
|
|
61
|
+
_attributes.name = _condition
|
|
62
|
+
_attributes.scale = props.scale
|
|
63
|
+
_attributes.icon = props.icon
|
|
64
|
+
_attributes.spinning = props.spinning
|
|
65
|
+
_attributes.speed = props.speed
|
|
61
66
|
local _exp = props.intent
|
|
62
67
|
local _exp_1 = if props.disabled then "disabled" else "default"
|
|
63
68
|
local _exp_2 = theme.components.button.intents
|
|
@@ -87,10 +92,14 @@ local Button = React.forwardRef(function(props, ref)
|
|
|
87
92
|
end
|
|
88
93
|
local intentColors = ColorHelper:getIntentColors(theme, _exp, state, _exp_1, _result)
|
|
89
94
|
local backgroundImage = CssHelper:resolveBackgroundImage(intentColors.backgroundImage)
|
|
90
|
-
local _attributes = {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
local _attributes = {}
|
|
96
|
+
local _condition = props.name
|
|
97
|
+
if _condition == nil then
|
|
98
|
+
_condition = "Button"
|
|
99
|
+
end
|
|
100
|
+
_attributes.key = _condition
|
|
101
|
+
_attributes.ref = ref
|
|
102
|
+
_attributes.Active = not props.disabled
|
|
94
103
|
local _object = {}
|
|
95
104
|
local _spread = props.Event
|
|
96
105
|
if _spread then
|
|
@@ -144,28 +153,28 @@ local Button = React.forwardRef(function(props, ref)
|
|
|
144
153
|
_result_2 = _result_2.X
|
|
145
154
|
end
|
|
146
155
|
end
|
|
147
|
-
local
|
|
148
|
-
if
|
|
149
|
-
|
|
156
|
+
local _condition_1 = _result_2
|
|
157
|
+
if _condition_1 == nil then
|
|
158
|
+
_condition_1 = 0
|
|
150
159
|
end
|
|
151
|
-
_result_1 =
|
|
160
|
+
_result_1 = _condition_1
|
|
152
161
|
else
|
|
153
162
|
_result_1 = 0
|
|
154
163
|
end
|
|
155
164
|
_attributes.Size = UDim2.fromOffset(_result_1, 0)
|
|
156
165
|
_attributes.AutomaticSize = Enum.AutomaticSize.XY
|
|
157
|
-
local
|
|
158
|
-
if
|
|
166
|
+
local _condition_1 = props.BackgroundTransparency
|
|
167
|
+
if _condition_1 == nil then
|
|
159
168
|
local _result_2 = props.styleOverride
|
|
160
169
|
if _result_2 ~= nil then
|
|
161
170
|
_result_2 = _result_2.backgroundTransparency
|
|
162
171
|
end
|
|
163
|
-
|
|
164
|
-
if
|
|
165
|
-
|
|
172
|
+
_condition_1 = _result_2
|
|
173
|
+
if _condition_1 == nil then
|
|
174
|
+
_condition_1 = theme.components.button.backgroundTransparency
|
|
166
175
|
end
|
|
167
176
|
end
|
|
168
|
-
_attributes.BackgroundTransparency =
|
|
177
|
+
_attributes.BackgroundTransparency = _condition_1
|
|
169
178
|
_attributes.BackgroundColor3 = intentColors.backgroundColor
|
|
170
179
|
_attributes.AutoButtonColor = false
|
|
171
180
|
_attributes.LayoutOrder = props.LayoutOrder
|
|
@@ -182,22 +191,24 @@ local Button = React.forwardRef(function(props, ref)
|
|
|
182
191
|
if _result_2 ~= nil then
|
|
183
192
|
_result_2 = _result_2.cornerRadius
|
|
184
193
|
end
|
|
185
|
-
local
|
|
186
|
-
if
|
|
187
|
-
|
|
194
|
+
local _condition_2 = _result_2
|
|
195
|
+
if _condition_2 == nil then
|
|
196
|
+
_condition_2 = theme.components.button.cornerRadius
|
|
188
197
|
end
|
|
189
|
-
_attributes_1.radius =
|
|
198
|
+
_attributes_1.radius = _condition_2
|
|
190
199
|
local _exp_2 = React.createElement(Corners, _attributes_1)
|
|
191
|
-
local _attributes_2 = {
|
|
200
|
+
local _attributes_2 = {
|
|
201
|
+
key = "Stroke",
|
|
202
|
+
}
|
|
192
203
|
local _result_3 = props.styleOverride
|
|
193
204
|
if _result_3 ~= nil then
|
|
194
205
|
_result_3 = _result_3.borderThickness
|
|
195
206
|
end
|
|
196
|
-
local
|
|
197
|
-
if
|
|
198
|
-
|
|
207
|
+
local _condition_3 = _result_3
|
|
208
|
+
if _condition_3 == nil then
|
|
209
|
+
_condition_3 = theme.components.button.borderThickness
|
|
199
210
|
end
|
|
200
|
-
_attributes_2.Thickness =
|
|
211
|
+
_attributes_2.Thickness = _condition_3
|
|
201
212
|
_attributes_2.BorderStrokePosition = Enum.BorderStrokePosition.Inner
|
|
202
213
|
_attributes_2.Color = intentColors.borderColor
|
|
203
214
|
local _exp_3 = React.createElement("uistroke", _attributes_2)
|
|
@@ -207,11 +218,11 @@ local Button = React.forwardRef(function(props, ref)
|
|
|
207
218
|
if _result_4 ~= nil then
|
|
208
219
|
_result_4 = _result_4.boxShadow
|
|
209
220
|
end
|
|
210
|
-
local
|
|
211
|
-
if
|
|
212
|
-
|
|
221
|
+
local _condition_4 = _result_4
|
|
222
|
+
if _condition_4 == nil then
|
|
223
|
+
_condition_4 = theme.components.button.boxShadow
|
|
213
224
|
end
|
|
214
|
-
_attributes_3.value =
|
|
225
|
+
_attributes_3.value = _condition_4
|
|
215
226
|
local _exp_4 = React.createElement(BoxShadow, _attributes_3)
|
|
216
227
|
local _attributes_4 = table.clone(props)
|
|
217
228
|
setmetatable(_attributes_4, nil)
|
|
@@ -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 {};
|
|
@@ -46,20 +46,24 @@ local function Checkbox(props)
|
|
|
46
46
|
end
|
|
47
47
|
end, { checked })
|
|
48
48
|
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
|
|
49
|
+
local _attributes = {}
|
|
50
|
+
local _condition_1 = props.name
|
|
59
51
|
if _condition_1 == nil then
|
|
60
|
-
_condition_1 =
|
|
52
|
+
_condition_1 = "Checkbox"
|
|
61
53
|
end
|
|
62
|
-
_attributes.
|
|
54
|
+
_attributes.key = _condition_1
|
|
55
|
+
_attributes.Size = UDim2.fromOffset(0, 0)
|
|
56
|
+
_attributes.AutomaticSize = Enum.AutomaticSize.XY
|
|
57
|
+
_attributes.Event = {
|
|
58
|
+
Activated = function()
|
|
59
|
+
setChecked(not checked)
|
|
60
|
+
end,
|
|
61
|
+
}
|
|
62
|
+
local _condition_2 = props.BackgroundTransparency
|
|
63
|
+
if _condition_2 == nil then
|
|
64
|
+
_condition_2 = theme.components.button.backgroundTransparency
|
|
65
|
+
end
|
|
66
|
+
_attributes.BackgroundTransparency = _condition_2
|
|
63
67
|
_attributes.BackgroundColor3 = ColorHelper:getIntentColors(theme, props.intent, "default", theme.components.button.intents).backgroundColor
|
|
64
68
|
_attributes.AutoButtonColor = false
|
|
65
69
|
_attributes.Image = backgroundImage.Image
|
|
@@ -73,18 +77,20 @@ local function Checkbox(props)
|
|
|
73
77
|
radius = theme.components.checkbox.cornerRadius,
|
|
74
78
|
})
|
|
75
79
|
local _attributes_1 = {
|
|
80
|
+
key = "Stroke",
|
|
76
81
|
Thickness = theme.components.checkbox.borderThickness,
|
|
77
82
|
BorderStrokePosition = Enum.BorderStrokePosition.Inner,
|
|
78
83
|
}
|
|
79
|
-
local
|
|
80
|
-
if
|
|
81
|
-
|
|
84
|
+
local _condition_3 = theme.components.checkbox.borderTransparency
|
|
85
|
+
if _condition_3 == nil then
|
|
86
|
+
_condition_3 = 0
|
|
82
87
|
end
|
|
83
|
-
_attributes_1.Transparency =
|
|
88
|
+
_attributes_1.Transparency = _condition_3
|
|
84
89
|
_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
90
|
return React.createElement("imagebutton", _attributes, _exp, React.createElement("uistroke", _attributes_1), React.createElement(Padding, {
|
|
86
|
-
resolvedPadding = SpacingHelper:GetResolvedPadding(theme, props, theme.components.checkbox.spacing),
|
|
91
|
+
resolvedPadding = SpacingHelper:GetResolvedPadding(theme, props, theme.components.checkbox.spacing, theme.components.checkbox.padding),
|
|
87
92
|
}), React.createElement(Icon, {
|
|
93
|
+
name = "CheckboxIcon",
|
|
88
94
|
scale = props.scale,
|
|
89
95
|
icon = if checked then props["icon-checked"] or "check" else props["icon-unchecked"],
|
|
90
96
|
color = ColorHelper:getIntentColors(theme, if checked then props["intent-checked"] or "success" else props["intent-unchecked"] or "primary", "default", theme.components.checkbox.intents).textColor,
|
|
@@ -22,46 +22,50 @@ local function HoverButton(propSet)
|
|
|
22
22
|
_stateEvents = _stateEvents.Event
|
|
23
23
|
end
|
|
24
24
|
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
|
-
|
|
25
|
+
local _attributes = {}
|
|
26
|
+
local _condition = propSet.name
|
|
27
|
+
if _condition == nil then
|
|
28
|
+
_condition = "HoverButton"
|
|
29
|
+
end
|
|
30
|
+
_attributes.key = _condition
|
|
31
|
+
_attributes.Active = props.Active
|
|
32
|
+
_attributes.AnchorPoint = props.AnchorPoint
|
|
33
|
+
_attributes.Archivable = props.Archivable
|
|
34
|
+
_attributes.AutoButtonColor = props.AutoButtonColor
|
|
35
|
+
_attributes.AutomaticSize = props.AutomaticSize
|
|
36
|
+
_attributes.BackgroundColor3 = props.BackgroundColor3
|
|
37
|
+
_attributes.BackgroundTransparency = props.BackgroundTransparency
|
|
38
|
+
_attributes.BorderColor3 = props.BorderColor3
|
|
39
|
+
_attributes.BorderMode = props.BorderMode
|
|
40
|
+
_attributes.BorderSizePixel = props.BorderSizePixel
|
|
41
|
+
_attributes.ClipsDescendants = props.ClipsDescendants
|
|
42
|
+
_attributes.LayoutOrder = props.LayoutOrder
|
|
43
|
+
_attributes.NextSelectionDown = props.NextSelectionDown
|
|
44
|
+
_attributes.NextSelectionLeft = props.NextSelectionLeft
|
|
45
|
+
_attributes.NextSelectionRight = props.NextSelectionRight
|
|
46
|
+
_attributes.NextSelectionUp = props.NextSelectionUp
|
|
47
|
+
_attributes.Position = props.Position
|
|
48
|
+
_attributes.Rotation = props.Rotation
|
|
49
|
+
_attributes.Selectable = props.Selectable
|
|
50
|
+
_attributes.SelectionBehaviorDown = props.SelectionBehaviorDown
|
|
51
|
+
_attributes.SelectionBehaviorLeft = props.SelectionBehaviorLeft
|
|
52
|
+
_attributes.SelectionBehaviorRight = props.SelectionBehaviorRight
|
|
53
|
+
_attributes.SelectionBehaviorUp = props.SelectionBehaviorUp
|
|
54
|
+
_attributes.SelectionGroup = props.SelectionGroup
|
|
55
|
+
_attributes.Size = props.Size
|
|
56
|
+
_attributes.SizeConstraint = props.SizeConstraint
|
|
57
|
+
_attributes.Visible = props.Visible
|
|
58
|
+
_attributes.ZIndex = props.ZIndex
|
|
59
|
+
_attributes.Image = props.Image
|
|
60
|
+
_attributes.ImageColor3 = props.ImageColor3
|
|
61
|
+
_attributes.ImageRectOffset = props.ImageRectOffset
|
|
62
|
+
_attributes.ImageRectSize = props.ImageRectSize
|
|
63
|
+
_attributes.ImageTransparency = props.ImageTransparency
|
|
64
|
+
_attributes.ResampleMode = props.ResampleMode
|
|
65
|
+
_attributes.ScaleType = props.ScaleType
|
|
66
|
+
_attributes.SliceCenter = props.SliceCenter
|
|
67
|
+
_attributes.SliceScale = props.SliceScale
|
|
68
|
+
_attributes.TileSize = props.TileSize
|
|
65
69
|
local _object_1 = {}
|
|
66
70
|
if defaultEvents then
|
|
67
71
|
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;
|