@rbxts/react-clean-ui 1.0.36 → 1.1.0

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 (91) hide show
  1. package/out/Components/Decorator/Corners.luau +5 -1
  2. package/out/Components/Decorator/Padding.luau +1 -1
  3. package/out/Components/Input/Button.d.ts +9 -0
  4. package/out/Components/Input/Button.luau +155 -46
  5. package/out/Components/Input/Checkbox.luau +22 -6
  6. package/out/Components/Input/Increment.d.ts +11 -0
  7. package/out/Components/Input/Increment.luau +107 -0
  8. package/out/Components/Input/Increment.step.d.ts +1 -0
  9. package/out/Components/Input/Increment.step.luau +25 -0
  10. package/out/Components/Input/Input.d.ts +4 -3
  11. package/out/Components/Input/Input.luau +115 -18
  12. package/out/Components/Input/Input.validation.d.ts +4 -0
  13. package/out/Components/Input/Input.validation.luau +42 -0
  14. package/out/Components/Input/Select.d.ts +4 -3
  15. package/out/Components/Input/Select.luau +23 -18
  16. package/out/Components/Input/Slider.d.ts +1 -1
  17. package/out/Components/Input/Slider.luau +68 -34
  18. package/out/Components/Input/index.d.ts +1 -0
  19. package/out/Components/Input/init.luau +3 -0
  20. package/out/Components/Layout/Accordion.d.ts +4 -4
  21. package/out/Components/Layout/Accordion.luau +75 -23
  22. package/out/Components/Layout/Container.d.ts +4 -2
  23. package/out/Components/Layout/Container.luau +12 -3
  24. package/out/Components/Layout/Draggable.luau +1 -1
  25. package/out/Components/Layout/Fieldset.d.ts +1 -1
  26. package/out/Components/Layout/Fieldset.luau +40 -6
  27. package/out/Components/Layout/FlexItem.d.ts +2 -1
  28. package/out/Components/Layout/FlexItem.luau +1 -0
  29. package/out/Components/Layout/Group.luau +30 -8
  30. package/out/Components/Layout/HStack.luau +1 -0
  31. package/out/Components/Layout/Row.luau +43 -9
  32. package/out/Components/Layout/Scroller.d.ts +1 -0
  33. package/out/Components/Layout/Scroller.luau +20 -5
  34. package/out/Components/Layout/Tabs.d.ts +5 -3
  35. package/out/Components/Layout/Tabs.luau +48 -16
  36. package/out/Components/Navigation/Menu.d.ts +1 -1
  37. package/out/Components/Navigation/Menu.luau +2 -0
  38. package/out/Components/Surface/Box.d.ts +4 -2
  39. package/out/Components/Surface/Box.luau +25 -22
  40. package/out/Components/Surface/Card.d.ts +12 -6
  41. package/out/Components/Surface/Card.luau +456 -26
  42. package/out/Components/Surface/Icon.luau +42 -4
  43. package/out/Components/Typography/Text.d.ts +1 -0
  44. package/out/Components/Typography/Text.luau +119 -10
  45. package/out/Contexts/row.context.d.ts +1 -1
  46. package/out/Contexts/theme.context.d.ts +2 -2
  47. package/out/Helpers/color.helper.d.ts +5 -3
  48. package/out/Helpers/color.helper.luau +62 -34
  49. package/out/Helpers/create-ui-story.d.ts +2 -2
  50. package/out/Helpers/create-ui-story.luau +33 -1
  51. package/out/Helpers/css.helper.d.ts +28 -2
  52. package/out/Helpers/css.helper.luau +208 -0
  53. package/out/Helpers/index.d.ts +1 -0
  54. package/out/Helpers/init.luau +3 -0
  55. package/out/Helpers/size.helper.d.ts +3 -1
  56. package/out/Helpers/size.helper.luau +10 -9
  57. package/out/Helpers/spacing.helper.d.ts +5 -4
  58. package/out/Helpers/spacing.helper.luau +102 -18
  59. package/out/Helpers/typography.helper.d.ts +2 -2
  60. package/out/Interfaces/css.types.d.ts +30 -0
  61. package/out/Interfaces/css.types.luau +21 -0
  62. package/out/Interfaces/element.props.d.ts +61 -0
  63. package/out/Interfaces/element.props.luau +1 -0
  64. package/out/Interfaces/index.d.ts +5 -3
  65. package/out/Interfaces/init.luau +1 -7
  66. package/out/Interfaces/responsive.types.d.ts +26 -0
  67. package/out/Interfaces/semantics.d.ts +3 -0
  68. package/out/Interfaces/semantics.luau +2 -0
  69. package/out/Providers/app.provider.d.ts +2 -2
  70. package/out/Providers/theme.provider.d.ts +2 -2
  71. package/out/Theme/index.d.ts +1 -0
  72. package/out/Theme/theme.factory.d.ts +3 -3
  73. package/out/Theme/theme.style.d.ts +48 -0
  74. package/out/Theme/theme.style.luau +1 -0
  75. package/out/Theme/theme.template.d.ts +34 -26
  76. package/out/Theme/themes/dark.theme.d.ts +1 -1
  77. package/out/Theme/themes/dark.theme.luau +28 -0
  78. package/out/Theme/themes/default.theme.d.ts +2 -2
  79. package/out/Theme/themes/default.theme.luau +11 -1
  80. package/out/Theme/themes/index.d.ts +1 -0
  81. package/out/Theme/themes/init.luau +3 -0
  82. package/out/Theme/themes/sandstone.theme.d.ts +1 -1
  83. package/out/Theme/themes/sandstone.theme.luau +25 -0
  84. package/out/Theme/themes/wooden.theme.d.ts +1 -0
  85. package/out/Theme/themes/wooden.theme.luau +554 -0
  86. package/out/index.d.ts +8 -8
  87. package/package.json +19 -7
  88. package/out/Interfaces/clean.element.props.d.ts +0 -114
  89. /package/out/{Interfaces/userinput.d.ts → Helpers/input.helper.d.ts} +0 -0
  90. /package/out/{Interfaces/userinput.luau → Helpers/input.helper.luau} +0 -0
  91. /package/out/Interfaces/{clean.element.props.luau → responsive.types.luau} +0 -0
@@ -5,11 +5,16 @@ local React = _react
5
5
  local useRef = _react.useRef
6
6
  local useState = _react.useState
7
7
  local CleanThemeContext = TS.import(script, script.Parent.Parent.Parent, "Contexts").CleanThemeContext
8
- local TypographyHelper = TS.import(script, script.Parent.Parent.Parent, "Helpers").TypographyHelper
8
+ local _Helpers = TS.import(script, script.Parent.Parent.Parent, "Helpers")
9
+ local CssHelper = _Helpers.CssHelper
10
+ local TypographyHelper = _Helpers.TypographyHelper
9
11
  local _Decorator = TS.import(script, script.Parent.Parent, "Decorator")
10
12
  local Corners = _Decorator.Corners
11
13
  local Padding = _Decorator.Padding
12
14
  local FieldsetContext = TS.import(script, script.Parent.Parent, "Layout").FieldsetContext
15
+ local _Input_validation = TS.import(script, script.Parent, "Input.validation")
16
+ local resolveClampedText = _Input_validation.resolveClampedText
17
+ local resolveValidatedText = _Input_validation.resolveValidatedText
13
18
  local function Input(props)
14
19
  local theme = React.useContext(CleanThemeContext)
15
20
  local fieldset = React.useContext(FieldsetContext)
@@ -20,7 +25,12 @@ local function Input(props)
20
25
  local labelActivated = _labelActivated
21
26
  local ref = useRef()
22
27
  local value, setValue = useState(props.value)
28
+ local lastValidText = useRef(props.value)
23
29
  local typography = TypographyHelper:getTypography(theme, props.scale, theme.components.input.typography)
30
+ -- Roblox's TextBox has no PlaceholderTransparency and shares font/size/weight/lineHeight
31
+ -- between Text and PlaceholderText, so only `.color` from this resolution is actually used below.
32
+ local placeholderTypography = TypographyHelper:getTypography(theme, props.scale, theme.components.input.placeholder)
33
+ local backgroundImage = CssHelper:resolveBackgroundImage(theme.components.input.backgroundImage)
24
34
  React.useEffect(function()
25
35
  if not labelActivated then
26
36
  return nil
@@ -60,31 +70,118 @@ local function Input(props)
60
70
  _condition = props.placeholder
61
71
  end
62
72
  _attributes_1.PlaceholderText = _condition
63
- _attributes_1.PlaceholderColor3 = props.PlaceholderColor3
73
+ _attributes_1.PlaceholderColor3 = props.PlaceholderColor3 or placeholderTypography.color
64
74
  _attributes_1.TextScaled = props.TextScaled
65
75
  _attributes_1.LineHeight = typography.lineHeight
66
76
  _attributes_1.Text = if props.controlled then props.value else value
67
- _attributes_1.TextColor3 = props.TextColor3 or theme.colors.intents.primary.default.textColor
68
- _attributes_1.ClearTextOnFocus = false
69
- _attributes_1.Event = props.Event
70
- _attributes_1.Change = {
71
- Text = function(rbx)
72
- local number = tonumber(rbx.Text)
73
- if (props.validation == "Number" or props.validation == "Int") and number == nil and rbx.Text ~= "" and rbx.Text ~= "-" then
74
- ref.current.Text = props.value
75
- return nil
76
- end
77
- setValue(rbx.Text)
77
+ _attributes_1.TextColor3 = props.TextColor3 or typography.color or theme.colors.intents.primary.default.textColor
78
+ local _condition_1 = props.TextTransparency
79
+ if _condition_1 == nil then
80
+ _condition_1 = typography.transparency
81
+ end
82
+ _attributes_1.TextTransparency = _condition_1
83
+ _attributes_1.Active = props.Active
84
+ _attributes_1.Archivable = props.Archivable
85
+ _attributes_1.BorderColor3 = props.BorderColor3
86
+ _attributes_1.BorderMode = props.BorderMode
87
+ _attributes_1.BorderSizePixel = props.BorderSizePixel
88
+ _attributes_1.ClipsDescendants = props.ClipsDescendants
89
+ _attributes_1.Rotation = props.Rotation
90
+ _attributes_1.Selectable = props.Selectable
91
+ _attributes_1.SelectionImageObject = props.SelectionImageObject
92
+ _attributes_1.SizeConstraint = props.SizeConstraint
93
+ _attributes_1.Tag = props.Tag
94
+ _attributes_1.AutoLocalize = props.AutoLocalize
95
+ _attributes_1.RootLocalizationTable = props.RootLocalizationTable
96
+ _attributes_1.NextSelectionDown = props.NextSelectionDown
97
+ _attributes_1.NextSelectionLeft = props.NextSelectionLeft
98
+ _attributes_1.NextSelectionRight = props.NextSelectionRight
99
+ _attributes_1.NextSelectionUp = props.NextSelectionUp
100
+ _attributes_1.SelectionGroup = props.SelectionGroup
101
+ _attributes_1.SelectionOrder = props.SelectionOrder
102
+ local _condition_2 = props.ClearTextOnFocus
103
+ if _condition_2 == nil then
104
+ _condition_2 = false
105
+ end
106
+ _attributes_1.ClearTextOnFocus = _condition_2
107
+ _attributes_1.CursorPosition = props.CursorPosition
108
+ _attributes_1.MultiLine = props.MultiLine
109
+ _attributes_1.SelectionStart = props.SelectionStart
110
+ _attributes_1.ShowNativeInput = props.ShowNativeInput
111
+ _attributes_1.TextEditable = props.TextEditable
112
+ _attributes_1.TextTruncate = props.TextTruncate
113
+ _attributes_1.RichText = props.RichText
114
+ local _object = {}
115
+ local _spread = props.Event
116
+ if _spread then
117
+ for _k, _v in _spread do
118
+ _object[_k] = _v
119
+ end
120
+ end
121
+ _object.FocusLost = function(rbx, enterPressed, inputThatCausedFocusLoss)
122
+ local clampedText = resolveClampedText(props.validation, rbx.Text, props.min, props.max)
123
+ if clampedText ~= nil then
124
+ ref.current.Text = clampedText
125
+ lastValidText.current = clampedText
126
+ setValue(clampedText)
78
127
  local _result = props.onChange
79
128
  if _result ~= nil then
80
- _result(rbx.Text)
129
+ _result(clampedText)
81
130
  end
82
- end,
83
- }
84
- return React.createElement("frame", {
85
- Size = UDim2.fromScale(1, 0),
131
+ end
132
+ local _result = props.Event
133
+ if _result ~= nil then
134
+ _result = _result.FocusLost
135
+ if _result ~= nil then
136
+ _result(rbx, enterPressed, inputThatCausedFocusLoss)
137
+ end
138
+ end
139
+ end
140
+ _attributes_1.Event = _object
141
+ local _object_1 = {}
142
+ local _spread_1 = props.Change
143
+ if _spread_1 then
144
+ for _k, _v in _spread_1 do
145
+ _object_1[_k] = _v
146
+ end
147
+ end
148
+ _object_1.Text = function(rbx)
149
+ local resolved = resolveValidatedText(props.validation, rbx.Text, lastValidText.current)
150
+ if resolved ~= rbx.Text then
151
+ ref.current.Text = resolved
152
+ return nil
153
+ end
154
+ lastValidText.current = rbx.Text
155
+ setValue(rbx.Text)
156
+ local _result = props.onChange
157
+ if _result ~= nil then
158
+ _result(rbx.Text)
159
+ end
160
+ local _result_1 = props.Change
161
+ if _result_1 ~= nil then
162
+ _result_1 = _result_1.Text
163
+ if _result_1 ~= nil then
164
+ _result_1(rbx)
165
+ end
166
+ end
167
+ end
168
+ _attributes_1.Change = _object_1
169
+ return React.createElement("imagelabel", {
170
+ Size = props.Size or UDim2.fromScale(1, 0),
86
171
  AutomaticSize = Enum.AutomaticSize.Y,
87
172
  BackgroundTransparency = 1,
173
+ AnchorPoint = props.AnchorPoint,
174
+ Position = props.Position,
175
+ LayoutOrder = props.LayoutOrder,
176
+ Visible = props.Visible,
177
+ ZIndex = props.ZIndex,
178
+ Image = backgroundImage.Image,
179
+ ImageColor3 = backgroundImage.ImageColor3,
180
+ ImageTransparency = backgroundImage.ImageTransparency,
181
+ ScaleType = backgroundImage.ScaleType,
182
+ SliceCenter = backgroundImage.SliceCenter,
183
+ SliceScale = backgroundImage.SliceScale,
184
+ TileSize = backgroundImage.TileSize,
88
185
  }, _exp, _exp_1, _exp_2, React.createElement("textbox", _attributes_1))
89
186
  end
90
187
  return {
@@ -0,0 +1,4 @@
1
+ import { InputProps } from "./Input";
2
+ export declare const CHARACTER_ALLOW_LIST_PATTERNS: Partial<Record<NonNullable<InputProps["validation"]>, string>>;
3
+ export declare function resolveValidatedText(validation: InputProps["validation"], candidateText: string, lastValidText: string): string;
4
+ export declare function resolveClampedText(validation: InputProps["validation"], text: string, min: number | undefined, max: number | undefined): string | undefined;
@@ -0,0 +1,42 @@
1
+ -- Compiled with roblox-ts v3.0.0
2
+ local CHARACTER_ALLOW_LIST_PATTERNS = {
3
+ Telephone = "^[%d%+%-%s%(%)]*$",
4
+ Alphanumeric = "^[%w]*$",
5
+ Email = "^[%w@%._%-+]*$",
6
+ }
7
+ local function resolveValidatedText(validation, candidateText, lastValidText)
8
+ local number = tonumber(candidateText)
9
+ if (validation == "Number" or validation == "Int") and number == nil and candidateText ~= "" and candidateText ~= "-" then
10
+ return lastValidText
11
+ end
12
+ local allowedPattern = CHARACTER_ALLOW_LIST_PATTERNS[validation or "None"]
13
+ if allowedPattern ~= nil and (string.match(candidateText, allowedPattern)) == nil then
14
+ return lastValidText
15
+ end
16
+ return candidateText
17
+ end
18
+ local function resolveClampedText(validation, text, min, max)
19
+ if validation ~= "Number" and validation ~= "Int" then
20
+ return nil
21
+ end
22
+ local number = tonumber(text)
23
+ if number == nil then
24
+ return nil
25
+ end
26
+ local clamped = number
27
+ if min ~= nil and clamped < min then
28
+ clamped = min
29
+ end
30
+ if max ~= nil and clamped > max then
31
+ clamped = max
32
+ end
33
+ if clamped == number then
34
+ return nil
35
+ end
36
+ return tostring(clamped)
37
+ end
38
+ return {
39
+ resolveValidatedText = resolveValidatedText,
40
+ resolveClampedText = resolveClampedText,
41
+ CHARACTER_ALLOW_LIST_PATTERNS = CHARACTER_ALLOW_LIST_PATTERNS,
42
+ }
@@ -1,10 +1,11 @@
1
1
  import React from "@rbxts/react";
2
2
  import { CssSize, ScalableElementProps, SpacedElementProps } from "../../Interfaces";
3
- interface SelectProps extends ScalableElementProps, SpacedElementProps, React.InstanceProps<TextBox> {
3
+ import { CssBackgroundImage } from "../../Theme";
4
+ export interface SelectProps extends ScalableElementProps, SpacedElementProps, React.InstanceProps<ImageLabel> {
4
5
  selected?: number;
5
6
  'max-height'?: CssSize;
7
+ backgroundImage?: CssBackgroundImage;
6
8
  onChange?: (selected: number, value?: string) => void;
7
- Event?: React.InstanceEvent<TextBox>;
8
9
  }
9
10
  interface SelectOptionProps {
10
11
  text?: string;
@@ -15,7 +16,7 @@ interface SelectOptionProps {
15
16
  BackgroundColor3?: Color3;
16
17
  }
17
18
  declare function SelectOption(props: SelectOptionProps): React.JSX.Element;
18
- type SelectComponent = React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<Frame>> & {
19
+ type SelectComponent = React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<ImageLabel>> & {
19
20
  Option: typeof SelectOption;
20
21
  };
21
22
  declare const Select: SelectComponent;
@@ -161,6 +161,15 @@ local Select = React.forwardRef(function(props, ref)
161
161
  if open and overlay.overlay == nil then
162
162
  warn("You have used a Select component without using the Overlay Provider")
163
163
  end
164
+ local _attributes = {
165
+ ref = ref,
166
+ }
167
+ for _k, _v in props do
168
+ _attributes[_k] = _v
169
+ end
170
+ _attributes.Size = UDim2.fromScale(1, 0)
171
+ _attributes.AutomaticSize = Enum.AutomaticSize.Y
172
+ _attributes.backgroundImage = props.backgroundImage or theme.components.select.backgroundImage
164
173
  local _exp_1 = React.createElement("uistroke", {
165
174
  Thickness = theme.components.select.borderThickness,
166
175
  BorderStrokePosition = Enum.BorderStrokePosition.Inner,
@@ -169,10 +178,10 @@ local Select = React.forwardRef(function(props, ref)
169
178
  local _exp_2 = React.createElement(Corners, {
170
179
  radius = theme.components.select.cornerRadius,
171
180
  })
172
- local _attributes = table.clone(props)
173
- setmetatable(_attributes, nil)
174
- local _exp_3 = React.createElement(Padding, _attributes)
175
- local _attributes_1 = {}
181
+ local _attributes_1 = table.clone(props)
182
+ setmetatable(_attributes_1, nil)
183
+ local _exp_3 = React.createElement(Padding, _attributes_1)
184
+ local _attributes_2 = {}
176
185
  local _result_1 = selectedOption
177
186
  if _result_1 ~= nil then
178
187
  _result_1 = _result_1.props.text
@@ -181,25 +190,25 @@ local Select = React.forwardRef(function(props, ref)
181
190
  if _condition_1 == nil then
182
191
  _condition_1 = "No Options"
183
192
  end
184
- _attributes_1.text = _condition_1
185
- _attributes_1.typography = typography
186
- local _exp_4 = React.createElement(HStack, nil, React.createElement(FlexItem, nil, React.createElement(Text, _attributes_1)), React.createElement(Icon, {
193
+ _attributes_2.text = _condition_1
194
+ _attributes_2.typography = typography
195
+ local _exp_4 = React.createElement(HStack, nil, React.createElement(FlexItem, nil, React.createElement(Text, _attributes_2)), React.createElement(Icon, {
187
196
  icon = "caret-down",
188
197
  color = theme.colors.intents.primary.default.textColor,
189
198
  }))
190
199
  local _condition_2 = open and overlay.overlay ~= nil
191
200
  if _condition_2 then
192
- local _attributes_2 = {
201
+ local _attributes_3 = {
193
202
  BackgroundTransparency = 0,
194
203
  BackgroundColor3 = theme.components.select.dropDownBackgroundColor,
195
204
  AnchorPoint = Vector2.zero,
196
205
  }
197
206
  local _uDim2 = UDim2.new(0, 0, 0, dropdownSize.Y.Offset)
198
- _attributes_2.Position = dropdownPosition + _uDim2
199
- _attributes_2.Size = UDim2.fromOffset(dropdownSize.X.Offset, 0)
200
- _attributes_2.AutomaticSize = Enum.AutomaticSize.Y
201
- _attributes_2.ClipsDescendants = true
202
- _condition_2 = ReactRoblox.createPortal(React.createElement("frame", _attributes_2, React.createElement("uistroke", {
207
+ _attributes_3.Position = dropdownPosition + _uDim2
208
+ _attributes_3.Size = UDim2.fromOffset(dropdownSize.X.Offset, 0)
209
+ _attributes_3.AutomaticSize = Enum.AutomaticSize.Y
210
+ _attributes_3.ClipsDescendants = true
211
+ _condition_2 = ReactRoblox.createPortal(React.createElement("frame", _attributes_3, React.createElement("uistroke", {
203
212
  Thickness = theme.components.select.borderThickness,
204
213
  BorderStrokePosition = Enum.BorderStrokePosition.Outer,
205
214
  Color = theme.components.select.borderColor,
@@ -226,11 +235,7 @@ local Select = React.forwardRef(function(props, ref)
226
235
  })
227
236
  end)))), overlay.overlay)
228
237
  end
229
- return React.createElement(Container, {
230
- ref = ref,
231
- Size = UDim2.fromScale(1, 0),
232
- AutomaticSize = Enum.AutomaticSize.Y,
233
- }, React.createElement(SelectContext.Provider, {
238
+ return React.createElement(Container, _attributes, React.createElement(SelectContext.Provider, {
234
239
  value = context,
235
240
  }, React.createElement("imagebutton", {
236
241
  ref = buttonRef,
@@ -2,7 +2,7 @@ import React from "@rbxts/react";
2
2
  import { ContainerProps } from "../Layout";
3
3
  type SliderValue = number | Vector2;
4
4
  type HighlightOption = "start" | "end" | "middle";
5
- export interface SliderProps extends ContainerProps {
5
+ export interface SliderProps extends Omit<ContainerProps, keyof React.InstanceProps<ImageLabel>>, React.InstanceProps<Frame> {
6
6
  "max-value": number;
7
7
  "min-value"?: number;
8
8
  value?: SliderValue;
@@ -1,7 +1,7 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
3
  local React = TS.import(script, TS.getModule(script, "@rbxts", "react"))
4
- local CustomInputService = TS.import(script, script.Parent.Parent.Parent, "Interfaces").CustomInputService
4
+ local CustomInputService = TS.import(script, script.Parent.Parent.Parent, "Helpers").CustomInputService
5
5
  local CleanThemeContext = TS.import(script, script.Parent.Parent.Parent, "Contexts").CleanThemeContext
6
6
  local SizeHelper = TS.import(script, script.Parent.Parent.Parent, "Helpers").SizeHelper
7
7
  local BoxShadow = TS.import(script, script.Parent.Parent, "Decorator").BoxShadow
@@ -248,6 +248,44 @@ local Slider = React.forwardRef(function(props, ref)
248
248
  }
249
249
  table.insert(handles, _arg0)
250
250
  end
251
+ local _attributes = {
252
+ ref = ref,
253
+ Archivable = props.Archivable,
254
+ Tag = props.Tag,
255
+ Active = props.Active,
256
+ AnchorPoint = SizeHelper:GetAnchor(props),
257
+ BackgroundColor3 = props.BackgroundColor3,
258
+ }
259
+ local _condition_1 = props.BackgroundTransparency
260
+ if _condition_1 == nil then
261
+ _condition_1 = 1
262
+ end
263
+ _attributes.BackgroundTransparency = _condition_1
264
+ _attributes.BorderColor3 = props.BorderColor3
265
+ _attributes.BorderMode = props.BorderMode
266
+ _attributes.BorderSizePixel = props.BorderSizePixel
267
+ _attributes.ClipsDescendants = props.ClipsDescendants
268
+ _attributes.Interactable = props.Interactable
269
+ _attributes.LayoutOrder = props.LayoutOrder
270
+ _attributes.NextSelectionDown = props.NextSelectionDown
271
+ _attributes.NextSelectionLeft = props.NextSelectionLeft
272
+ _attributes.NextSelectionRight = props.NextSelectionRight
273
+ _attributes.NextSelectionUp = props.NextSelectionUp
274
+ _attributes.Position = SizeHelper:GetPosition(props)
275
+ _attributes.Rotation = props.Rotation
276
+ _attributes.Selectable = props.Selectable
277
+ _attributes.SelectionGroup = props.SelectionGroup
278
+ _attributes.SelectionImageObject = props.SelectionImageObject
279
+ _attributes.SelectionOrder = props.SelectionOrder
280
+ _attributes.Size = SizeHelper:GetSize(props, UDim2.new(UDim.new(1, 0), height))
281
+ _attributes.SizeConstraint = props.SizeConstraint
282
+ _attributes.Visible = props.Visible
283
+ _attributes.ZIndex = props.ZIndex
284
+ _attributes.AutoLocalize = props.AutoLocalize
285
+ _attributes.RootLocalizationTable = props.RootLocalizationTable
286
+ _attributes.Style = props.Style
287
+ _attributes.Change = props.Change
288
+ _attributes.Event = props.Event
251
289
  local _exp = React.createElement("frame", {
252
290
  Size = UDim2.new(UDim.new(1, 0), SizeHelper:toUDim(theme.bar.height)),
253
291
  Position = UDim2.fromScale(0.5, 0.5),
@@ -260,18 +298,18 @@ local Slider = React.forwardRef(function(props, ref)
260
298
  }), React.createElement("uicorner", {
261
299
  CornerRadius = SizeHelper:toUDim(theme.bar.cornerRadius),
262
300
  }))
263
- local _attributes = {
301
+ local _attributes_1 = {
264
302
  ref = containerRef,
265
303
  }
266
304
  local _exp_1 = UDim2.fromScale(1, 1)
267
305
  local _uDim2 = UDim2.new(padding + padding, UDim.new(0, 0))
268
- _attributes.Size = _exp_1 - _uDim2
269
- _attributes.BackgroundTransparency = 1
270
- _attributes.Position = UDim2.fromScale(0.5, 0.5)
271
- _attributes.AnchorPoint = Vector2.new(0.5, 0.5)
272
- local _condition_1 = props.highlight ~= nil
273
- if _condition_1 then
274
- local _attributes_1 = {
306
+ _attributes_1.Size = _exp_1 - _uDim2
307
+ _attributes_1.BackgroundTransparency = 1
308
+ _attributes_1.Position = UDim2.fromScale(0.5, 0.5)
309
+ _attributes_1.AnchorPoint = Vector2.new(0.5, 0.5)
310
+ local _condition_2 = props.highlight ~= nil
311
+ if _condition_2 then
312
+ local _attributes_2 = {
275
313
  BackgroundColor3 = theme.bar.highlight.backgroundColor,
276
314
  BackgroundTransparency = theme.bar.highlight.backgroundTransparency,
277
315
  }
@@ -291,8 +329,8 @@ local Slider = React.forwardRef(function(props, ref)
291
329
  end
292
330
  _result = _result_1
293
331
  end
294
- _attributes_1.Position = _result
295
- _attributes_1.AnchorPoint = if props.highlight == "end" then Vector2.new(1, 0.5) else Vector2.new(0, 0.5)
332
+ _attributes_2.Position = _result
333
+ _attributes_2.AnchorPoint = if props.highlight == "end" then Vector2.new(1, 0.5) else Vector2.new(0, 0.5)
296
334
  local _result_1
297
335
  if props.highlight == "start" then
298
336
  local _uDim2_1 = UDim2.new(UDim.new(firstPosition, 0), SizeHelper:toUDim(theme.bar.height))
@@ -301,24 +339,24 @@ local Slider = React.forwardRef(function(props, ref)
301
339
  else
302
340
  local _result_2
303
341
  if props.highlight == "end" then
304
- local _condition_2 = secondPosition
305
- if _condition_2 == nil then
306
- _condition_2 = firstPosition
342
+ local _condition_3 = secondPosition
343
+ if _condition_3 == nil then
344
+ _condition_3 = firstPosition
307
345
  end
308
- local _uDim2_1 = UDim2.new(UDim.new(1 - _condition_2, 0), SizeHelper:toUDim(theme.bar.height))
346
+ local _uDim2_1 = UDim2.new(UDim.new(1 - _condition_3, 0), SizeHelper:toUDim(theme.bar.height))
309
347
  local _uDim2_2 = UDim2.new(padding, UDim.new(0, 0))
310
348
  _result_2 = _uDim2_1 + _uDim2_2
311
349
  else
312
- local _condition_2 = secondPosition
313
- if _condition_2 == nil then
314
- _condition_2 = 0
350
+ local _condition_3 = secondPosition
351
+ if _condition_3 == nil then
352
+ _condition_3 = 0
315
353
  end
316
- _result_2 = UDim2.new(UDim.new(_condition_2 - firstPosition, 0), SizeHelper:toUDim(theme.bar.height))
354
+ _result_2 = UDim2.new(UDim.new(_condition_3 - firstPosition, 0), SizeHelper:toUDim(theme.bar.height))
317
355
  end
318
356
  _result_1 = _result_2
319
357
  end
320
- _attributes_1.Size = _result_1
321
- _condition_1 = (React.createElement("frame", _attributes_1, React.createElement("uistroke", {
358
+ _attributes_2.Size = _result_1
359
+ _condition_2 = (React.createElement("frame", _attributes_2, React.createElement("uistroke", {
322
360
  Thickness = theme.bar.borderThickness,
323
361
  Color = theme.bar.highlight.borderColor,
324
362
  }), React.createElement("uicorner", {
@@ -340,14 +378,14 @@ local Slider = React.forwardRef(function(props, ref)
340
378
  local _exp_4 = (hoveredHandle == index or (dragging and activeHandleRef.current == index)) and (React.createElement(BoxShadow, {
341
379
  ["box-shadow"] = theme.handle.boxShadow,
342
380
  }))
343
- local _attributes_1 = {}
344
- local _condition_2 = theme.handle.aspectRation
345
- if _condition_2 == nil then
346
- _condition_2 = 1
381
+ local _attributes_2 = {}
382
+ local _condition_3 = theme.handle.aspectRatio
383
+ if _condition_3 == nil then
384
+ _condition_3 = 1
347
385
  end
348
- _attributes_1.AspectRatio = _condition_2
349
- _attributes_1.DominantAxis = Enum.DominantAxis.Height
350
- _attributes_1.AspectType = Enum.AspectType.ScaleWithParentSize
386
+ _attributes_2.AspectRatio = _condition_3
387
+ _attributes_2.DominantAxis = Enum.DominantAxis.Height
388
+ _attributes_2.AspectType = Enum.AspectType.ScaleWithParentSize
351
389
  return React.createElement("frame", {
352
390
  key = index,
353
391
  Position = UDim2.fromScale(position, 0.5),
@@ -369,17 +407,13 @@ local Slider = React.forwardRef(function(props, ref)
369
407
  end)
370
408
  end,
371
409
  },
372
- }, _exp_2, _exp_3, _exp_4, React.createElement("uiaspectratioconstraint", _attributes_1))
410
+ }, _exp_2, _exp_3, _exp_4, React.createElement("uiaspectratioconstraint", _attributes_2))
373
411
  end
374
412
  for _k, _v in handles do
375
413
  _newValue[_k] = _callback(_v, _k - 1, handles)
376
414
  end
377
415
  -- ▲ ReadonlyArray.map ▲
378
- return React.createElement("frame", {
379
- ref = ref,
380
- Size = UDim2.new(UDim.new(1, 0), height),
381
- BackgroundTransparency = 1,
382
- }, _exp, React.createElement("frame", _attributes, _condition_1, _newValue))
416
+ return React.createElement("frame", _attributes, _exp, React.createElement("frame", _attributes_1, _condition_2, _newValue))
383
417
  end)
384
418
  return {
385
419
  Slider = Slider,
@@ -1,6 +1,7 @@
1
1
  export * from './Button';
2
2
  export * from './Checkbox';
3
3
  export * from './HoverButton';
4
+ export * from './Increment';
4
5
  export * from './Input';
5
6
  export * from './Select';
6
7
  export * from './Slider';
@@ -10,6 +10,9 @@ end
10
10
  for _k, _v in TS.import(script, script, "HoverButton") or {} do
11
11
  exports[_k] = _v
12
12
  end
13
+ for _k, _v in TS.import(script, script, "Increment") or {} do
14
+ exports[_k] = _v
15
+ end
13
16
  for _k, _v in TS.import(script, script, "Input") or {} do
14
17
  exports[_k] = _v
15
18
  end
@@ -1,18 +1,18 @@
1
1
  import React from "@rbxts/react";
2
- import { IconName, ScalableElementProps } from "../../Interfaces";
2
+ import { IconName, PaddingProps, ScalableElementProps } from "../../Interfaces";
3
3
  interface AccordionItemProps {
4
4
  children?: React.ReactNode;
5
5
  value: string;
6
6
  disabled?: boolean;
7
7
  }
8
8
  declare function AccordionItem(_props: AccordionItemProps): undefined;
9
- interface AccordionHeaderProps {
9
+ interface AccordionHeaderProps extends PaddingProps {
10
10
  children?: React.ReactNode | string;
11
11
  icon?: IconName;
12
12
  text?: string;
13
13
  }
14
14
  declare function AccordionHeader(_props: AccordionHeaderProps): undefined;
15
- interface AccordionContentProps {
15
+ interface AccordionContentProps extends PaddingProps {
16
16
  children?: React.ReactNode;
17
17
  text?: string;
18
18
  }
@@ -25,7 +25,7 @@ export interface AccordionProps extends ScalableElementProps {
25
25
  value?: string;
26
26
  onValueChange?: (value: string | undefined) => void;
27
27
  }
28
- type AccordionComponent = React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<Frame>> & {
28
+ type AccordionComponent = React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<ImageLabel>> & {
29
29
  Item: typeof AccordionItem;
30
30
  Header: typeof AccordionHeader;
31
31
  Content: typeof AccordionContent;