@rbxts/react-clean-ui 1.2.6 → 1.2.7

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.
@@ -18,6 +18,35 @@ local HStack = TS.import(script, script.Parent.Parent, "Layout").HStack
18
18
  local _ = TS.import(script, script.Parent.Parent, "Layout")
19
19
  local Group = _.Group
20
20
  local GroupContext = _.GroupContext
21
+ local function resolveOwnIntentTransparency(intent, state, intents)
22
+ if intent == nil or intent == "primary" then
23
+ return nil
24
+ end
25
+ local _entry = intents
26
+ if _entry ~= nil then
27
+ _entry = _entry[intent]
28
+ end
29
+ local entry = _entry
30
+ local _result = entry
31
+ if _result ~= nil then
32
+ _result = _result[state]
33
+ if _result ~= nil then
34
+ _result = _result.backgroundTransparency
35
+ end
36
+ end
37
+ local _condition = _result
38
+ if _condition == nil then
39
+ local _result_1 = entry
40
+ if _result_1 ~= nil then
41
+ _result_1 = _result_1.default
42
+ if _result_1 ~= nil then
43
+ _result_1 = _result_1.backgroundTransparency
44
+ end
45
+ end
46
+ _condition = _result_1
47
+ end
48
+ return _condition
49
+ end
21
50
  local function ButtonText(props)
22
51
  local theme = React.useContext(CleanThemeContext)
23
52
  local _attributes = {
@@ -93,12 +122,22 @@ local Button = React.forwardRef(function(props, ref)
93
122
  end
94
123
  local intentColors = ColorHelper:getIntentColors(theme, _exp, state, _exp_1, _result)
95
124
  local backgroundImage = CssHelper:resolveBackgroundImage(intentColors.backgroundImage)
96
- local _attributes = {}
97
- local _condition = props.name
125
+ local _exp_2 = props.intent
126
+ local _result_1 = props.styleOverride
127
+ if _result_1 ~= nil then
128
+ _result_1 = _result_1.intents
129
+ end
130
+ local _condition = resolveOwnIntentTransparency(_exp_2, state, _result_1)
98
131
  if _condition == nil then
99
- _condition = "Button"
132
+ _condition = resolveOwnIntentTransparency(props.intent, state, theme.components.button.intents)
133
+ end
134
+ local intentBackgroundTransparency = _condition
135
+ local _attributes = {}
136
+ local _condition_1 = props.name
137
+ if _condition_1 == nil then
138
+ _condition_1 = "Button"
100
139
  end
101
- _attributes.key = _condition
140
+ _attributes.key = _condition_1
102
141
  _attributes.ref = ref
103
142
  _attributes.Active = not props.disabled
104
143
  local _object = {}
@@ -112,11 +151,11 @@ local Button = React.forwardRef(function(props, ref)
112
151
  if not props.disabled then
113
152
  setHover(true)
114
153
  end
115
- local _result_1 = props.Event
116
- if _result_1 ~= nil then
117
- _result_1 = _result_1.MouseEnter
118
- if _result_1 ~= nil then
119
- _result_1(button, x, y)
154
+ local _result_2 = props.Event
155
+ if _result_2 ~= nil then
156
+ _result_2 = _result_2.MouseEnter
157
+ if _result_2 ~= nil then
158
+ _result_2(button, x, y)
120
159
  end
121
160
  end
122
161
  end
@@ -124,11 +163,11 @@ local Button = React.forwardRef(function(props, ref)
124
163
  if not props.disabled then
125
164
  setHover(false)
126
165
  end
127
- local _result_1 = props.Event
128
- if _result_1 ~= nil then
129
- _result_1 = _result_1.MouseLeave
130
- if _result_1 ~= nil then
131
- _result_1(button, x, y)
166
+ local _result_2 = props.Event
167
+ if _result_2 ~= nil then
168
+ _result_2 = _result_2.MouseLeave
169
+ if _result_2 ~= nil then
170
+ _result_2(button, x, y)
132
171
  end
133
172
  end
134
173
  end
@@ -136,46 +175,49 @@ local Button = React.forwardRef(function(props, ref)
136
175
  if props.disabled then
137
176
  return nil
138
177
  end
139
- local _result_1 = props.Event
140
- if _result_1 ~= nil then
141
- _result_1 = _result_1.Activated
142
- if _result_1 ~= nil then
143
- _result_1(button, inputObject, clickCount)
178
+ local _result_2 = props.Event
179
+ if _result_2 ~= nil then
180
+ _result_2 = _result_2.Activated
181
+ if _result_2 ~= nil then
182
+ _result_2(button, inputObject, clickCount)
144
183
  end
145
184
  end
146
185
  end
147
186
  _attributes.Event = _object
148
- local _result_1
187
+ local _result_2
149
188
  if props.group then
150
- local _result_2 = group
151
- if _result_2 ~= nil then
152
- _result_2 = _result_2.size
153
- if _result_2 ~= nil then
154
- _result_2 = _result_2.X
189
+ local _result_3 = group
190
+ if _result_3 ~= nil then
191
+ _result_3 = _result_3.size
192
+ if _result_3 ~= nil then
193
+ _result_3 = _result_3.X
155
194
  end
156
195
  end
157
- local _condition_1 = _result_2
158
- if _condition_1 == nil then
159
- _condition_1 = 0
196
+ local _condition_2 = _result_3
197
+ if _condition_2 == nil then
198
+ _condition_2 = 0
160
199
  end
161
- _result_1 = _condition_1
200
+ _result_2 = _condition_2
162
201
  else
163
- _result_1 = 0
202
+ _result_2 = 0
164
203
  end
165
- _attributes.Size = UDim2.fromOffset(_result_1, 0)
204
+ _attributes.Size = UDim2.fromOffset(_result_2, 0)
166
205
  _attributes.AutomaticSize = Enum.AutomaticSize.XY
167
- local _condition_1 = props.BackgroundTransparency
168
- if _condition_1 == nil then
169
- local _result_2 = props.styleOverride
170
- if _result_2 ~= nil then
171
- _result_2 = _result_2.backgroundTransparency
206
+ local _condition_2 = props.BackgroundTransparency
207
+ if _condition_2 == nil then
208
+ local _result_3 = props.styleOverride
209
+ if _result_3 ~= nil then
210
+ _result_3 = _result_3.backgroundTransparency
172
211
  end
173
- _condition_1 = _result_2
174
- if _condition_1 == nil then
175
- _condition_1 = theme.components.button.backgroundTransparency
212
+ _condition_2 = _result_3
213
+ if _condition_2 == nil then
214
+ _condition_2 = intentBackgroundTransparency
215
+ if _condition_2 == nil then
216
+ _condition_2 = theme.components.button.backgroundTransparency
217
+ end
176
218
  end
177
219
  end
178
- _attributes.BackgroundTransparency = _condition_1
220
+ _attributes.BackgroundTransparency = _condition_2
179
221
  _attributes.BackgroundColor3 = intentColors.backgroundColor
180
222
  _attributes.AutoButtonColor = false
181
223
  _attributes.LayoutOrder = props.LayoutOrder
@@ -188,49 +230,52 @@ local Button = React.forwardRef(function(props, ref)
188
230
  _attributes.SliceScale = backgroundImage.SliceScale
189
231
  _attributes.TileSize = backgroundImage.TileSize
190
232
  local _attributes_1 = {}
191
- local _result_2 = props.styleOverride
192
- if _result_2 ~= nil then
193
- _result_2 = _result_2.cornerRadius
194
- end
195
- local _condition_2 = _result_2
196
- if _condition_2 == nil then
197
- _condition_2 = theme.components.button.cornerRadius
198
- end
199
- _attributes_1.radius = _condition_2
200
- local _exp_2 = React.createElement(Corners, _attributes_1)
201
- local _attributes_2 = {
202
- key = "Stroke",
203
- }
204
233
  local _result_3 = props.styleOverride
205
234
  if _result_3 ~= nil then
206
- _result_3 = _result_3.borderThickness
235
+ _result_3 = _result_3.cornerRadius
207
236
  end
208
237
  local _condition_3 = _result_3
209
238
  if _condition_3 == nil then
210
- _condition_3 = theme.components.button.borderThickness
239
+ _condition_3 = theme.components.button.cornerRadius
211
240
  end
212
- _attributes_2.Thickness = _condition_3
241
+ _attributes_1.radius = _condition_3
242
+ local _exp_3 = React.createElement(Corners, _attributes_1)
243
+ local _attributes_2 = {
244
+ key = "Stroke",
245
+ }
246
+ local _condition_4 = intentColors.borderThickness
247
+ if _condition_4 == nil then
248
+ local _result_4 = props.styleOverride
249
+ if _result_4 ~= nil then
250
+ _result_4 = _result_4.borderThickness
251
+ end
252
+ _condition_4 = _result_4
253
+ if _condition_4 == nil then
254
+ _condition_4 = theme.components.button.borderThickness
255
+ end
256
+ end
257
+ _attributes_2.Thickness = _condition_4
213
258
  _attributes_2.BorderStrokePosition = Enum.BorderStrokePosition.Inner
214
259
  _attributes_2.Color = intentColors.borderColor
215
- local _exp_3 = React.createElement("uistroke", _attributes_2)
260
+ local _exp_4 = React.createElement("uistroke", _attributes_2)
216
261
  local _attributes_3 = table.clone(props)
217
262
  setmetatable(_attributes_3, nil)
218
263
  local _result_4 = props.styleOverride
219
264
  if _result_4 ~= nil then
220
265
  _result_4 = _result_4.boxShadow
221
266
  end
222
- local _condition_4 = _result_4
223
- if _condition_4 == nil then
224
- _condition_4 = theme.components.button.boxShadow
267
+ local _condition_5 = _result_4
268
+ if _condition_5 == nil then
269
+ _condition_5 = theme.components.button.boxShadow
225
270
  end
226
- _attributes_3.value = _condition_4
227
- local _exp_4 = React.createElement(BoxShadow, _attributes_3)
228
- local _exp_5 = React.createElement(Gradient, {
271
+ _attributes_3.value = _condition_5
272
+ local _exp_5 = React.createElement(BoxShadow, _attributes_3)
273
+ local _exp_6 = React.createElement(Gradient, {
229
274
  value = intentColors.backgroundGradient,
230
275
  })
231
276
  local _attributes_4 = table.clone(props)
232
277
  setmetatable(_attributes_4, nil)
233
- return React.createElement("imagebutton", _attributes, _exp_2, _exp_3, _exp_4, _exp_5, React.createElement(Padding, _attributes_4), React.createElement(Group.Element, {
278
+ return React.createElement("imagebutton", _attributes, _exp_3, _exp_4, _exp_5, _exp_6, React.createElement(Padding, _attributes_4), React.createElement(Group.Element, {
234
279
  enabled = props.group,
235
280
  padding = padding,
236
281
  }, (props.icon ~= nil or props.text ~= nil) and React.createElement(HStack, {
@@ -56,7 +56,12 @@ local function Input(props)
56
56
  _attributes.key = _condition
57
57
  _attributes.Size = props.Size or UDim2.fromScale(1, 0)
58
58
  _attributes.AutomaticSize = Enum.AutomaticSize.Y
59
- _attributes.BackgroundTransparency = 1
59
+ _attributes.BackgroundColor3 = theme.components.input.backgroundColor
60
+ local _condition_1 = theme.components.input.backgroundTransparency
61
+ if _condition_1 == nil then
62
+ _condition_1 = 1
63
+ end
64
+ _attributes.BackgroundTransparency = _condition_1
60
65
  _attributes.AnchorPoint = props.AnchorPoint
61
66
  _attributes.Position = props.Position
62
67
  _attributes.LayoutOrder = props.LayoutOrder
@@ -99,21 +104,21 @@ local function Input(props)
99
104
  FontFace = Font.fromName(typography.font.Name, typography.weight or Enum.FontWeight.Regular),
100
105
  FontSize = typography.size,
101
106
  }
102
- local _condition_1 = props.PlaceholderText
103
- if _condition_1 == nil then
104
- _condition_1 = props.placeholder
107
+ local _condition_2 = props.PlaceholderText
108
+ if _condition_2 == nil then
109
+ _condition_2 = props.placeholder
105
110
  end
106
- _attributes_2.PlaceholderText = _condition_1
111
+ _attributes_2.PlaceholderText = _condition_2
107
112
  _attributes_2.PlaceholderColor3 = props.PlaceholderColor3 or placeholderTypography.color
108
113
  _attributes_2.TextScaled = props.TextScaled
109
114
  _attributes_2.LineHeight = typography.lineHeight
110
115
  _attributes_2.Text = if props.controlled then props.value else value
111
116
  _attributes_2.TextColor3 = props.TextColor3 or typography.color or theme.colors.intents.primary.default.textColor
112
- local _condition_2 = props.TextTransparency
113
- if _condition_2 == nil then
114
- _condition_2 = typography.transparency
117
+ local _condition_3 = props.TextTransparency
118
+ if _condition_3 == nil then
119
+ _condition_3 = typography.transparency
115
120
  end
116
- _attributes_2.TextTransparency = _condition_2
121
+ _attributes_2.TextTransparency = _condition_3
117
122
  _attributes_2.Active = props.Active
118
123
  _attributes_2.Archivable = props.Archivable
119
124
  _attributes_2.BorderColor3 = props.BorderColor3
@@ -133,11 +138,11 @@ local function Input(props)
133
138
  _attributes_2.NextSelectionUp = props.NextSelectionUp
134
139
  _attributes_2.SelectionGroup = props.SelectionGroup
135
140
  _attributes_2.SelectionOrder = props.SelectionOrder
136
- local _condition_3 = props.ClearTextOnFocus
137
- if _condition_3 == nil then
138
- _condition_3 = false
141
+ local _condition_4 = props.ClearTextOnFocus
142
+ if _condition_4 == nil then
143
+ _condition_4 = false
139
144
  end
140
- _attributes_2.ClearTextOnFocus = _condition_3
145
+ _attributes_2.ClearTextOnFocus = _condition_4
141
146
  _attributes_2.CursorPosition = props.CursorPosition
142
147
  _attributes_2.MultiLine = props.MultiLine
143
148
  _attributes_2.SelectionStart = props.SelectionStart
@@ -417,37 +417,51 @@ local Select = React.forwardRef(function(props, ref)
417
417
  _result_1 = _result_1.labelActivated
418
418
  end
419
419
  React.useEffect(_exp, { _result_1, activateSelect })
420
+ local _condition_3 = theme.components.select.backgroundTransparency
421
+ if _condition_3 == nil then
422
+ _condition_3 = 1
423
+ end
424
+ local themeBackgroundTransparency = _condition_3
420
425
  if open and overlay.overlay == nil then
421
426
  warn("You have used a Select component without using the Overlay Provider")
422
427
  end
423
428
  local _attributes = {}
424
- local _condition_3 = props.name
425
- if _condition_3 == nil then
426
- _condition_3 = "Select"
429
+ local _condition_4 = props.name
430
+ if _condition_4 == nil then
431
+ _condition_4 = "Select"
427
432
  end
428
- _attributes.name = _condition_3
433
+ _attributes.name = _condition_4
429
434
  _attributes.ref = ref
430
435
  for _k, _v in props do
431
436
  _attributes[_k] = _v
432
437
  end
433
438
  _attributes.Size = UDim2.fromScale(1, 0)
434
439
  _attributes.AutomaticSize = Enum.AutomaticSize.Y
440
+ _attributes.BackgroundColor3 = props.BackgroundColor3 or theme.components.select.backgroundColor
441
+ local _condition_5 = props.BackgroundTransparency
442
+ if _condition_5 == nil then
443
+ _condition_5 = themeBackgroundTransparency
444
+ end
445
+ _attributes.BackgroundTransparency = _condition_5
435
446
  _attributes.backgroundImage = props.backgroundImage or theme.components.select.backgroundImage
436
- local _exp_1 = React.createElement(Gradient, {
447
+ local _exp_1 = themeBackgroundTransparency < 1 and React.createElement(Corners, {
448
+ radius = theme.components.select.cornerRadius,
449
+ })
450
+ local _exp_2 = React.createElement(Gradient, {
437
451
  value = props.backgroundGradient or theme.components.select.backgroundGradient,
438
452
  })
439
- local _exp_2 = React.createElement("uistroke", {
453
+ local _exp_3 = React.createElement("uistroke", {
440
454
  key = "Stroke",
441
455
  Thickness = theme.components.select.borderThickness,
442
456
  BorderStrokePosition = Enum.BorderStrokePosition.Inner,
443
457
  Color = theme.components.select.borderColor,
444
458
  })
445
- local _exp_3 = React.createElement(Corners, {
459
+ local _exp_4 = React.createElement(Corners, {
446
460
  radius = theme.components.select.cornerRadius,
447
461
  })
448
462
  local _attributes_1 = table.clone(props)
449
463
  setmetatable(_attributes_1, nil)
450
- local _exp_4 = React.createElement(Padding, _attributes_1)
464
+ local _exp_5 = React.createElement(Padding, _attributes_1)
451
465
  local _attributes_2 = {
452
466
  name = "SelectedText",
453
467
  }
@@ -455,19 +469,20 @@ local Select = React.forwardRef(function(props, ref)
455
469
  if _result_2 ~= nil then
456
470
  _result_2 = _result_2.props.text
457
471
  end
458
- local _condition_4 = _result_2
459
- if _condition_4 == nil then
460
- _condition_4 = "No Options"
472
+ local _condition_6 = _result_2
473
+ if _condition_6 == nil then
474
+ _condition_6 = "No Options"
461
475
  end
462
- _attributes_2.text = _condition_4
476
+ _attributes_2.text = _condition_6
463
477
  _attributes_2.typography = typography
464
- local _exp_5 = React.createElement(HStack, nil, React.createElement(FlexItem, nil, React.createElement(Text, _attributes_2)), React.createElement(Icon, {
478
+ _attributes_2.TextColor3 = theme.components.select.textColor
479
+ local _exp_6 = React.createElement(HStack, nil, React.createElement(FlexItem, nil, React.createElement(Text, _attributes_2)), React.createElement(Icon, {
465
480
  name = "SelectCaret",
466
481
  icon = "caret-down",
467
- color = theme.colors.intents.primary.default.textColor,
482
+ color = theme.components.select.iconColor or theme.colors.intents.primary.default.textColor,
468
483
  }))
469
- local _condition_5 = open and overlay.overlay ~= nil
470
- if _condition_5 then
484
+ local _condition_7 = open and overlay.overlay ~= nil
485
+ if _condition_7 then
471
486
  local _attributes_3 = {
472
487
  key = "SelectDropdown",
473
488
  BackgroundTransparency = 0,
@@ -479,7 +494,7 @@ local Select = React.forwardRef(function(props, ref)
479
494
  _attributes_3.Size = UDim2.fromOffset(dropdownSize.X.Offset, 0)
480
495
  _attributes_3.AutomaticSize = Enum.AutomaticSize.Y
481
496
  _attributes_3.ClipsDescendants = true
482
- _condition_5 = ReactRoblox.createPortal(React.createElement("frame", _attributes_3, React.createElement("uistroke", {
497
+ _condition_7 = ReactRoblox.createPortal(React.createElement("frame", _attributes_3, React.createElement("uistroke", {
483
498
  key = "Stroke",
484
499
  Thickness = theme.components.select.borderThickness,
485
500
  BorderStrokePosition = Enum.BorderStrokePosition.Outer,
@@ -509,7 +524,7 @@ local Select = React.forwardRef(function(props, ref)
509
524
  typography = typography,
510
525
  }))))), overlay.overlay)
511
526
  end
512
- return React.createElement(Container, _attributes, _exp_1, React.createElement(SelectContext.Provider, {
527
+ return React.createElement(Container, _attributes, _exp_1, _exp_2, React.createElement(SelectContext.Provider, {
513
528
  value = context,
514
529
  }, React.createElement("imagebutton", {
515
530
  key = "SelectButton",
@@ -520,7 +535,7 @@ local Select = React.forwardRef(function(props, ref)
520
535
  Event = {
521
536
  Activated = activateSelect,
522
537
  },
523
- }, _exp_2, _exp_3, _exp_4, _exp_5, _condition_5)))
538
+ }, _exp_3, _exp_4, _exp_5, _exp_6, _condition_7)))
524
539
  end)
525
540
  Select.Option = SelectOption
526
541
  Select.OptGroup = SelectOptGroup
@@ -12,6 +12,7 @@ interface TabContentProps {
12
12
  }
13
13
  declare function TabContent(props: TabContentProps): React.JSX.Element;
14
14
  interface TabsListProps extends ScalableElementProps {
15
+ fill?: boolean;
15
16
  children?: React.ReactNode;
16
17
  }
17
18
  declare const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<ImageLabel>>;
@@ -24,6 +25,8 @@ declare const TabsBody: React.ForwardRefExoticComponent<TabsBodyProps & React.Re
24
25
  export interface TabsProps {
25
26
  children?: React.ReactNode;
26
27
  defaultValue?: string;
28
+ value?: string;
29
+ onValueChange?: (value: string) => void;
27
30
  }
28
31
  type TabsComponent = React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<Frame>> & {
29
32
  List: typeof TabsList;
@@ -14,6 +14,7 @@ local Padding = _Decorator.Padding
14
14
  local _Helpers = TS.import(script, script.Parent.Parent.Parent, "Helpers")
15
15
  local ColorHelper = _Helpers.ColorHelper
16
16
  local CssHelper = _Helpers.CssHelper
17
+ local SizeHelper = _Helpers.SizeHelper
17
18
  local SpacingHelper = _Helpers.SpacingHelper
18
19
  local TypographyHelper = _Helpers.TypographyHelper
19
20
  local _HoverButton = TS.import(script, script.Parent.Parent, "Input", "HoverButton")
@@ -21,11 +22,44 @@ local HoverButton = _HoverButton.HoverButton
21
22
  local HoverButtonContext = _HoverButton.HoverButtonContext
22
23
  local TabsContext = React.createContext({
23
24
  selected = nil,
24
- setSelected = function() end,
25
+ claimTab = function() end,
26
+ selectTab = function() end,
25
27
  })
28
+ local TabsListContext = React.createContext({
29
+ fill = false,
30
+ })
31
+ local function TabButtonCorners()
32
+ local theme = React.useContext(CleanThemeContext)
33
+ local cornerRadius = theme.components.tabs.button.cornerRadius
34
+ if not (type(cornerRadius) == "table") then
35
+ return React.createElement(Corners, {
36
+ radius = theme.components.tabs.list.cornerRadius,
37
+ })
38
+ end
39
+ local fallback = SizeHelper:toUDim(theme.components.tabs.list.cornerRadius)
40
+ local topLeftRadius = if cornerRadius.topLeft ~= nil then CssHelper:parseCssSize(cornerRadius.topLeft) else fallback
41
+ local topRightRadius = if cornerRadius.topRight ~= nil then CssHelper:parseCssSize(cornerRadius.topRight) else fallback
42
+ local bottomLeftRadius = if cornerRadius.bottomLeft ~= nil then CssHelper:parseCssSize(cornerRadius.bottomLeft) else fallback
43
+ local bottomRightRadius = if cornerRadius.bottomRight ~= nil then CssHelper:parseCssSize(cornerRadius.bottomRight) else fallback
44
+ local isZero = function(radius)
45
+ return radius.Scale == 0 and radius.Offset == 0
46
+ end
47
+ if isZero(topLeftRadius) and isZero(topRightRadius) and isZero(bottomLeftRadius) and isZero(bottomRightRadius) then
48
+ return nil
49
+ end
50
+ return React.createElement("uicorner", {
51
+ key = "Corners",
52
+ TopLeftRadius = topLeftRadius,
53
+ TopRightRadius = topRightRadius,
54
+ BottomLeftRadius = bottomLeftRadius,
55
+ BottomRightRadius = bottomRightRadius,
56
+ })
57
+ end
26
58
  local function TabButtonContent(props)
27
59
  local theme = React.useContext(CleanThemeContext)
28
60
  local hover = React.useContext(HoverButtonContext)
61
+ local _binding = React.useContext(TabsListContext)
62
+ local fill = _binding.fill
29
63
  local _result = hover
30
64
  if _result ~= nil then
31
65
  _result = _result.isSelected
@@ -41,13 +75,29 @@ local function TabButtonContent(props)
41
75
  _result_1 = if _result_2 then "hover" else "default"
42
76
  end
43
77
  local intent = ColorHelper:getIntentColors(theme, "primary", _result_1, theme.components.tabs.button.intents)
44
- return React.createElement(React.Fragment, nil, React.createElement(Corners, {
45
- radius = theme.components.tabs.list.cornerRadius,
78
+ local _condition = intent.borderThickness
79
+ if _condition == nil then
80
+ _condition = theme.components.tabs.button.borderThickness
81
+ end
82
+ local borderThickness = _condition
83
+ return React.createElement(React.Fragment, nil, React.createElement(TabButtonCorners), borderThickness > 0 and (React.createElement("uistroke", {
84
+ key = "Stroke",
85
+ Thickness = borderThickness,
86
+ BorderStrokePosition = Enum.BorderStrokePosition.Inner,
87
+ Color = intent.borderColor,
88
+ })), React.createElement(Gradient, {
89
+ value = intent.backgroundGradient,
46
90
  }), React.createElement(Padding, {
47
91
  resolvedPadding = SpacingHelper:GetResolvedPadding(theme, props, theme.components.tabs.button.spacing, theme.components.tabs.button.padding),
48
92
  }), React.createElement(BoxShadow, {
49
93
  value = intent.boxShadow,
50
- }), React.createElement(Text, {
94
+ }), fill and (React.createElement("uilistlayout", {
95
+ key = "TitleLayout",
96
+ FillDirection = Enum.FillDirection.Horizontal,
97
+ HorizontalAlignment = Enum.HorizontalAlignment.Center,
98
+ VerticalAlignment = Enum.VerticalAlignment.Center,
99
+ SortOrder = Enum.SortOrder.LayoutOrder,
100
+ })), React.createElement(Text, {
51
101
  name = "TabTitleText",
52
102
  TextColor3 = intent.textColor,
53
103
  text = props.text,
@@ -58,16 +108,13 @@ local function TabTitle(props)
58
108
  local theme = React.useContext(CleanThemeContext)
59
109
  local _binding = React.useContext(TabsContext)
60
110
  local selected = _binding.selected
61
- local setSelected = _binding.setSelected
111
+ local claimTab = _binding.claimTab
112
+ local selectTab = _binding.selectTab
113
+ local _binding_1 = React.useContext(TabsListContext)
114
+ local fill = _binding_1.fill
62
115
  local isSelected = selected == props.value
63
116
  React.useEffect(function()
64
- setSelected(function(current)
65
- local _condition = current
66
- if _condition == nil then
67
- _condition = props.value
68
- end
69
- return _condition
70
- end)
117
+ claimTab(props.value)
71
118
  end, {})
72
119
  local buttonDefault = ColorHelper:getIntentColors(theme, "primary", "default", theme.components.tabs.button.intents)
73
120
  local buttonHover = ColorHelper:getIntentColors(theme, "primary", "hover", theme.components.tabs.button.intents)
@@ -82,7 +129,7 @@ local function TabTitle(props)
82
129
  name = `TabButton-{props.value}`,
83
130
  default = {
84
131
  Size = UDim2.fromScale(0, 0),
85
- AutomaticSize = Enum.AutomaticSize.XY,
132
+ AutomaticSize = if fill then Enum.AutomaticSize.Y else Enum.AutomaticSize.XY,
86
133
  BackgroundColor3 = buttonDefault.backgroundColor,
87
134
  BackgroundTransparency = buttonDefault.backgroundTransparency,
88
135
  BorderSizePixel = 0,
@@ -96,7 +143,7 @@ local function TabTitle(props)
96
143
  TileSize = buttonDefaultBackgroundImage.TileSize,
97
144
  Event = {
98
145
  Activated = function()
99
- setSelected(props.value)
146
+ selectTab(props.value)
100
147
  end,
101
148
  },
102
149
  },
@@ -153,7 +200,15 @@ local TabsList = React.forwardRef(function(props, ref)
153
200
  value = theme.components.tabs.list.backgroundGradient,
154
201
  }), React.createElement(Padding, {
155
202
  resolvedPadding = SpacingHelper:GetResolvedPadding(theme, {}, theme.components.tabs.list.spacing, theme.components.tabs.list.padding),
156
- }), React.createElement(HStack, nil, props.children))
203
+ }), React.createElement(TabsListContext.Provider, {
204
+ value = {
205
+ fill = props.fill == true,
206
+ },
207
+ }, React.createElement(HStack, {
208
+ HorizontalFlex = if props.fill then Enum.UIFlexAlignment.Fill else nil,
209
+ Wraps = if props.fill then false else nil,
210
+ Padding = if theme.components.tabs.list.gap ~= nil then UDim.new(0, theme.components.tabs.list.gap) else nil,
211
+ }, props.children)))
157
212
  end)
158
213
  local TabsBody = React.forwardRef(function(props, ref)
159
214
  local theme = React.useContext(CleanThemeContext)
@@ -162,12 +217,12 @@ local TabsBody = React.forwardRef(function(props, ref)
162
217
  ref = ref,
163
218
  width = "100%",
164
219
  backgroundImage = props.backgroundImage or theme.components.tabs.backgroundImage,
165
- }, React.createElement("uistroke", {
220
+ }, theme.components.tabs.borderThickness > 0 and (React.createElement("uistroke", {
166
221
  key = "Stroke",
167
222
  Thickness = theme.components.tabs.borderThickness,
168
223
  BorderStrokePosition = Enum.BorderStrokePosition.Inner,
169
224
  Color = theme.components.tabs.borderColor,
170
- }), React.createElement(Padding, {
225
+ })), React.createElement(Padding, {
171
226
  resolvedPadding = SpacingHelper:GetResolvedPadding(theme, {}, theme.components.tabs.spacing, theme.components.tabs.padding),
172
227
  }), React.createElement(Corners, {
173
228
  radius = theme.components.tabs.cornerRadius,
@@ -176,16 +231,41 @@ local TabsBody = React.forwardRef(function(props, ref)
176
231
  }), props.children)
177
232
  end)
178
233
  local Tabs = React.forwardRef(function(props, _ref)
179
- local selected, setSelected = React.useState(props.defaultValue)
234
+ local theme = React.useContext(CleanThemeContext)
235
+ local uncontrolledSelected, setUncontrolledSelected = React.useState(props.defaultValue)
236
+ local controlled = props.value ~= nil
237
+ local selected = if controlled then props.value else uncontrolledSelected
238
+ local onValueChange = props.onValueChange
180
239
  local contextValue = React.useMemo(function()
181
240
  return {
182
241
  selected = selected,
183
- setSelected = setSelected,
242
+ claimTab = function(value)
243
+ if not controlled then
244
+ setUncontrolledSelected(function(current)
245
+ local _condition = current
246
+ if _condition == nil then
247
+ _condition = value
248
+ end
249
+ return _condition
250
+ end)
251
+ end
252
+ end,
253
+ selectTab = function(value)
254
+ if not controlled then
255
+ setUncontrolledSelected(value)
256
+ end
257
+ local _result = onValueChange
258
+ if _result ~= nil then
259
+ _result(value)
260
+ end
261
+ end,
184
262
  }
185
- end, { selected })
263
+ end, { selected, controlled, onValueChange })
186
264
  return React.createElement(TabsContext.Provider, {
187
265
  value = contextValue,
188
- }, React.createElement(VStack, nil, props.children))
266
+ }, React.createElement(VStack, {
267
+ Padding = if theme.components.tabs.gap ~= nil then UDim.new(0, theme.components.tabs.gap) else nil,
268
+ }, props.children))
189
269
  end)
190
270
  Tabs.List = TabsList
191
271
  Tabs.Body = TabsBody
@@ -40,7 +40,17 @@ do
40
40
  _overrideMatching = _overrideMatching[selectedIntent]
41
41
  end
42
42
  local overrideMatching = _overrideMatching
43
- local layers = { defaultPrimary.default, defaultMatching.default, defaultPrimary[state], defaultMatching[state], self:resolveComponentDefaultLayer(componentPrimary), self:resolveComponentDefaultLayer(componentMatching), self:resolveComponentStateLayer(componentPrimary, state), self:resolveComponentStateLayer(componentMatching, state), self:resolveComponentDefaultLayer(overridePrimary), self:resolveComponentDefaultLayer(overrideMatching), self:resolveComponentStateLayer(overridePrimary, state), self:resolveComponentStateLayer(overrideMatching, state) }
43
+ local _exp = defaultPrimary.default
44
+ local _result = defaultMatching
45
+ if _result ~= nil then
46
+ _result = _result.default
47
+ end
48
+ local _exp_1 = defaultPrimary[state]
49
+ local _result_1 = defaultMatching
50
+ if _result_1 ~= nil then
51
+ _result_1 = _result_1[state]
52
+ end
53
+ local layers = { _exp, _result, _exp_1, _result_1, self:resolveComponentDefaultLayer(componentPrimary), self:resolveComponentDefaultLayer(componentMatching), self:resolveComponentStateLayer(componentPrimary, state), self:resolveComponentStateLayer(componentMatching, state), self:resolveComponentDefaultLayer(overridePrimary), self:resolveComponentDefaultLayer(overrideMatching), self:resolveComponentStateLayer(overridePrimary, state), self:resolveComponentStateLayer(overrideMatching, state) }
44
54
  return self:mergeLayers(layers)
45
55
  end
46
56
  function ColorHelper:mergeLayers(layers)
@@ -1,3 +1,3 @@
1
1
  export type ButtonFlag = "default" | "hover" | "focus" | "disabled";
2
2
  export type TextVariant = "display" | "title" | "heading" | "body" | "label" | "caption";
3
- export type Intent = "primary" | "success" | "warning" | "danger" | "info";
3
+ export type Intent = "primary" | "secondary" | "success" | "warning" | "danger" | "info";
@@ -14,6 +14,7 @@ export interface IntentScheme {
14
14
  textColor: Color3;
15
15
  backgroundColor: Color3;
16
16
  borderColor: Color3;
17
+ borderThickness?: number;
17
18
  backgroundTransparency?: number;
18
19
  boxShadow?: CssShadow;
19
20
  typography?: Partial<TypographyStyle>;
@@ -2,7 +2,7 @@ import { CssShadow, CssSize, ScaledCssPadding, Breakpoint, BreakpointValue, Scal
2
2
  import { TypographyStyle, ScaledTypographyStyle, IntentScheme, IntentColors, InlineIntentColors, CssBackgroundImage, CssPosition, CssCornerRadius } from "./theme.style";
3
3
  export interface ThemeTemplate {
4
4
  colors: {
5
- intents: Record<Intent, IntentColors>;
5
+ intents: Record<Exclude<Intent, "secondary">, IntentColors> & Partial<Record<"secondary", IntentColors>>;
6
6
  };
7
7
  breakpoints: BreakpointValue<number>;
8
8
  default: {
@@ -78,6 +78,8 @@ export interface ThemeTemplate {
78
78
  borderColor: Color3;
79
79
  borderThickness: number;
80
80
  cornerRadius: CssSize;
81
+ backgroundColor?: Color3;
82
+ backgroundTransparency?: number;
81
83
  typography?: Partial<TypographyStyle> | ScaledTypographyStyle;
82
84
  backgroundImage?: CssBackgroundImage;
83
85
  backgroundGradient?: CssBackgroundGradient;
@@ -88,6 +90,10 @@ export interface ThemeTemplate {
88
90
  borderColor: Color3;
89
91
  borderThickness: number;
90
92
  cornerRadius: CssSize;
93
+ backgroundColor?: Color3;
94
+ backgroundTransparency?: number;
95
+ textColor?: Color3;
96
+ iconColor?: Color3;
91
97
  backgroundImage?: CssBackgroundImage;
92
98
  backgroundGradient?: CssBackgroundGradient;
93
99
  dropDownBackgroundColor: Color3;
@@ -152,7 +158,9 @@ export interface ThemeTemplate {
152
158
  cornerRadius: CssSize;
153
159
  spacing?: ScaleSizeValue<number>;
154
160
  padding?: ScaledCssPadding;
161
+ gap?: number;
155
162
  list: {
163
+ gap?: number;
156
164
  borderColor?: Color3;
157
165
  backgroundColor?: Color3;
158
166
  backgroundTransparency?: number;
@@ -165,7 +173,7 @@ export interface ThemeTemplate {
165
173
  };
166
174
  button: {
167
175
  borderThickness: number;
168
- cornerRadius: CssSize;
176
+ cornerRadius: CssSize | CssCornerRadius;
169
177
  spacing?: ScaleSizeValue<number>;
170
178
  padding?: ScaledCssPadding;
171
179
  boxShadow?: CssShadow;
@@ -17,6 +17,18 @@ local DarkTheme = createTheme({
17
17
  backgroundColor = Color3.fromHex("#4775CC"),
18
18
  },
19
19
  },
20
+ secondary = {
21
+ default = {
22
+ textColor = Color3.fromHex("#D5DAE3"),
23
+ borderColor = Color3.fromHex("#4A5263"),
24
+ backgroundColor = Color3.fromHex("#3A414E"),
25
+ },
26
+ hover = {
27
+ textColor = Color3.fromHex("#FFFFFF"),
28
+ borderColor = Color3.fromHex("#5E687B"),
29
+ backgroundColor = Color3.fromHex("#474F5E"),
30
+ },
31
+ },
20
32
  success = {
21
33
  default = {
22
34
  textColor = Color3.fromHex("#75E0A7"),
@@ -162,6 +174,13 @@ local DarkTheme = createTheme({
162
174
  backgroundTransparency = 0,
163
175
  },
164
176
  },
177
+ secondary = {
178
+ default = {
179
+ textColor = Color3.fromHex("#D5DAE3"),
180
+ backgroundColor = Color3.fromHex("#2A303B"),
181
+ borderColor = Color3.fromHex("#4A5263"),
182
+ },
183
+ },
165
184
  success = {
166
185
  default = {
167
186
  textColor = Color3.fromHex("#75E0A7"),
@@ -216,6 +235,21 @@ local DarkTheme = createTheme({
216
235
  backgroundColor = Color3.fromHex("#b8b8b8"),
217
236
  },
218
237
  },
238
+ secondary = {
239
+ default = {
240
+ textColor = Color3.fromHex("#FFFFFF"),
241
+ borderColor = Color3.fromHex("#5E687B"),
242
+ backgroundGradient = {
243
+ colors = { Color3.fromHex("#3A414E"), Color3.fromHex("#474F5E") },
244
+ rotation = 90,
245
+ },
246
+ },
247
+ disabled = {
248
+ backgroundColor = Color3.fromHex("#1D222B"),
249
+ borderColor = Color3.fromHex("#343B49"),
250
+ textColor = Color3.fromHex("#697386"),
251
+ },
252
+ },
219
253
  success = {
220
254
  default = {
221
255
  textColor = Color3.fromHex("#FFFFFF"),
@@ -531,6 +565,13 @@ local DarkTheme = createTheme({
531
565
  backgroundTransparency = 0,
532
566
  },
533
567
  },
568
+ secondary = {
569
+ default = {
570
+ backgroundColor = Color3.fromHex("#3A414E"),
571
+ backgroundTransparency = 0,
572
+ borderColor = Color3.fromHex("#4A5263"),
573
+ },
574
+ },
534
575
  },
535
576
  },
536
577
  footer = {
@@ -541,6 +582,13 @@ local DarkTheme = createTheme({
541
582
  backgroundTransparency = 0,
542
583
  },
543
584
  },
585
+ secondary = {
586
+ default = {
587
+ backgroundColor = Color3.fromHex("#3A414E"),
588
+ backgroundTransparency = 0,
589
+ borderColor = Color3.fromHex("#4A5263"),
590
+ },
591
+ },
544
592
  },
545
593
  },
546
594
  },
@@ -612,6 +660,15 @@ local DarkTheme = createTheme({
612
660
  },
613
661
  },
614
662
  },
663
+ secondary = {
664
+ default = {
665
+ backgroundColor = Color3.fromHex("#FFFFFF"),
666
+ backgroundGradient = {
667
+ colors = { Color3.fromHex("#6B7486"), Color3.fromHex("#474F5E") },
668
+ rotation = 90,
669
+ },
670
+ },
671
+ },
615
672
  success = {
616
673
  default = {
617
674
  backgroundColor = Color3.fromHex("#FFFFFF"),
@@ -15,6 +15,18 @@ local DefaultTheme = {
15
15
  backgroundColor = Color3.fromHex("F5F5F5"),
16
16
  },
17
17
  },
18
+ secondary = {
19
+ default = {
20
+ textColor = Color3.fromHex("#1D2433"),
21
+ borderColor = Color3.fromHex("#C5CAD3"),
22
+ backgroundColor = Color3.fromHex("#E4E7EC"),
23
+ },
24
+ hover = {
25
+ textColor = Color3.fromHex("#1D2433"),
26
+ borderColor = Color3.fromHex("#B8BEC9"),
27
+ backgroundColor = Color3.fromHex("#D5D9E0"),
28
+ },
29
+ },
18
30
  success = {
19
31
  default = {
20
32
  textColor = Color3.fromHex("#2E9D63"),
@@ -189,6 +201,13 @@ local DefaultTheme = {
189
201
  backgroundTransparency = 0,
190
202
  },
191
203
  },
204
+ secondary = {
205
+ default = {
206
+ textColor = Color3.fromHex("#FFFFFF"),
207
+ backgroundColor = Color3.fromHex("#6B7C93"),
208
+ borderColor = Color3.fromHex("#56657A"),
209
+ },
210
+ },
192
211
  success = {
193
212
  default = {
194
213
  textColor = Color3.fromHex("#FFFFFF"),
@@ -235,6 +254,18 @@ local DefaultTheme = {
235
254
  textColor = Color3.fromHex("#8A8A8A"),
236
255
  },
237
256
  },
257
+ secondary = {
258
+ default = {
259
+ textColor = Color3.fromHex("#1D2433"),
260
+ backgroundColor = Color3.fromHex("#E4E7EC"),
261
+ borderColor = Color3.fromHex("#C5CAD3"),
262
+ },
263
+ hover = {
264
+ textColor = Color3.fromHex("#1D2433"),
265
+ backgroundColor = Color3.fromHex("#D5D9E0"),
266
+ borderColor = Color3.fromHex("#B8BEC9"),
267
+ },
268
+ },
238
269
  success = {
239
270
  default = {
240
271
  textColor = Color3.fromHex("#FFFFFF"),
@@ -549,6 +580,13 @@ local DefaultTheme = {
549
580
  borderColor = Color3.fromHex("#D9DEE8"),
550
581
  },
551
582
  },
583
+ secondary = {
584
+ default = {
585
+ backgroundColor = Color3.fromHex("#6B7C93"),
586
+ backgroundTransparency = 0.7,
587
+ borderColor = Color3.fromHex("#56657A"),
588
+ },
589
+ },
552
590
  success = {
553
591
  default = {
554
592
  backgroundColor = Color3.fromHex("#2E9D63"),
@@ -588,6 +626,13 @@ local DefaultTheme = {
588
626
  borderColor = Color3.fromHex("#D9DEE8"),
589
627
  },
590
628
  },
629
+ secondary = {
630
+ default = {
631
+ backgroundColor = Color3.fromHex("#6B7C93"),
632
+ backgroundTransparency = 0.7,
633
+ borderColor = Color3.fromHex("#56657A"),
634
+ },
635
+ },
591
636
  success = {
592
637
  default = {
593
638
  backgroundColor = Color3.fromHex("#2E9D63"),
@@ -692,6 +737,11 @@ local DefaultTheme = {
692
737
  backgroundColor = Color3.fromHex("#477FE8"),
693
738
  },
694
739
  },
740
+ secondary = {
741
+ default = {
742
+ backgroundColor = Color3.fromHex("#6B7C93"),
743
+ },
744
+ },
695
745
  success = {
696
746
  default = {
697
747
  backgroundColor = Color3.fromHex("#2E9D63"),
@@ -742,6 +792,9 @@ local DefaultTheme = {
742
792
  primary = {
743
793
  backgroundTransparency = 0,
744
794
  },
795
+ secondary = {
796
+ backgroundColor = Color3.fromHex("#E4E7EC"),
797
+ },
745
798
  success = {
746
799
  backgroundColor = Color3.fromHex("#dcf5e8"),
747
800
  },
@@ -765,6 +818,9 @@ local DefaultTheme = {
765
818
  backgroundColor = Color3.fromHex("#000000"),
766
819
  backgroundTransparency = 0.5,
767
820
  },
821
+ secondary = {
822
+ backgroundColor = Color3.fromHex("#6B7C93"),
823
+ },
768
824
  success = {
769
825
  backgroundColor = Color3.fromHex("#237D4D"),
770
826
  },
@@ -793,6 +849,9 @@ local DefaultTheme = {
793
849
  cornerRadius = 8,
794
850
  boxShadow = "2px 2px 2px 2px",
795
851
  intents = {
852
+ secondary = {
853
+ textColor = Color3.fromHex("#1D2433"),
854
+ },
796
855
  success = {
797
856
  textColor = Color3.fromHex("#FFFFFF"),
798
857
  },
@@ -17,6 +17,18 @@ local SandstoneTheme = createTheme({
17
17
  backgroundColor = Color3.fromHex("#C4DDD7"),
18
18
  },
19
19
  },
20
+ secondary = {
21
+ default = {
22
+ textColor = Color3.fromHex("#5E5446"),
23
+ borderColor = Color3.fromHex("#A89A84"),
24
+ backgroundColor = Color3.fromHex("#EAE2D4"),
25
+ },
26
+ hover = {
27
+ textColor = Color3.fromHex("#4A4034"),
28
+ borderColor = Color3.fromHex("#928470"),
29
+ backgroundColor = Color3.fromHex("#DFD5C3"),
30
+ },
31
+ },
20
32
  success = {
21
33
  default = {
22
34
  textColor = Color3.fromHex("#2E6245"),
@@ -162,6 +174,13 @@ local SandstoneTheme = createTheme({
162
174
  backgroundTransparency = 0,
163
175
  },
164
176
  },
177
+ secondary = {
178
+ default = {
179
+ textColor = Color3.fromHex("#5E5446"),
180
+ backgroundColor = Color3.fromHex("#EAE2D4"),
181
+ borderColor = Color3.fromHex("#A89A84"),
182
+ },
183
+ },
165
184
  success = {
166
185
  default = {
167
186
  textColor = Color3.fromHex("#2E6245"),
@@ -207,6 +226,16 @@ local SandstoneTheme = createTheme({
207
226
  textColor = Color3.fromHex("#9B8B73"),
208
227
  },
209
228
  },
229
+ secondary = {
230
+ default = {
231
+ textColor = Color3.fromHex("#5E5446"),
232
+ },
233
+ disabled = {
234
+ backgroundColor = Color3.fromHex("#E8DFCF"),
235
+ borderColor = Color3.fromHex("#D8CDBA"),
236
+ textColor = Color3.fromHex("#9B8B73"),
237
+ },
238
+ },
210
239
  success = {
211
240
  default = {
212
241
  textColor = Color3.fromHex("#2E6245"),
@@ -492,6 +521,13 @@ local SandstoneTheme = createTheme({
492
521
  backgroundTransparency = 0,
493
522
  },
494
523
  },
524
+ secondary = {
525
+ default = {
526
+ backgroundColor = Color3.fromHex("#E3D9C6"),
527
+ backgroundTransparency = 0,
528
+ borderColor = Color3.fromHex("#A89A84"),
529
+ },
530
+ },
495
531
  },
496
532
  },
497
533
  footer = {
@@ -502,6 +538,13 @@ local SandstoneTheme = createTheme({
502
538
  backgroundTransparency = 0,
503
539
  },
504
540
  },
541
+ secondary = {
542
+ default = {
543
+ backgroundColor = Color3.fromHex("#E3D9C6"),
544
+ backgroundTransparency = 0,
545
+ borderColor = Color3.fromHex("#A89A84"),
546
+ },
547
+ },
505
548
  },
506
549
  },
507
550
  },
@@ -566,6 +609,11 @@ local SandstoneTheme = createTheme({
566
609
  backgroundColor = Color3.fromHex("#4E8179"),
567
610
  },
568
611
  },
612
+ secondary = {
613
+ default = {
614
+ backgroundColor = Color3.fromHex("#A89A84"),
615
+ },
616
+ },
569
617
  success = {
570
618
  default = {
571
619
  backgroundColor = Color3.fromHex("#5B8A6A"),
@@ -39,6 +39,13 @@ local WoodenTheme = createTheme({
39
39
  textColor = Color3.fromHex("#FFF7CF"),
40
40
  },
41
41
  },
42
+ secondary = {
43
+ default = {
44
+ textColor = Color3.fromHex("#D3CBA3"),
45
+ borderColor = Color3.fromHex("#3D2712"),
46
+ backgroundColor = Color3.fromHex("#5C3A18"),
47
+ },
48
+ },
42
49
  },
43
50
  },
44
51
  components = {
@@ -82,6 +89,13 @@ local WoodenTheme = createTheme({
82
89
  backgroundTransparency = 0,
83
90
  },
84
91
  },
92
+ secondary = {
93
+ default = {
94
+ textColor = Color3.fromHex("#D3CBA3"),
95
+ borderColor = Color3.fromHex("#3D2712"),
96
+ backgroundColor = Color3.fromHex("#5C3A18"),
97
+ },
98
+ },
85
99
  success = {
86
100
  default = {
87
101
  textColor = Color3.fromHex("#FFF7CF"),
@@ -138,6 +152,27 @@ local WoodenTheme = createTheme({
138
152
  },
139
153
  },
140
154
  },
155
+ secondary = {
156
+ default = {
157
+ textColor = Color3.fromHex("#D3CBA3"),
158
+ borderColor = Color3.fromHex("#3D2712"),
159
+ borderThickness = 3,
160
+ backgroundColor = Color3.fromHex("#FFFFFF"),
161
+ backgroundTransparency = 0,
162
+ backgroundImage = {
163
+ image = "",
164
+ },
165
+ backgroundGradient = {
166
+ colors = { Color3.fromHex("#7A4A20"), Color3.fromHex("#5C3A18") },
167
+ rotation = 90,
168
+ },
169
+ },
170
+ hover = {
171
+ backgroundGradient = {
172
+ colors = { Color3.fromHex("#8A5A28"), Color3.fromHex("#6B4520") },
173
+ },
174
+ },
175
+ },
141
176
  success = {
142
177
  default = {
143
178
  backgroundImage = {
@@ -397,6 +432,15 @@ local WoodenTheme = createTheme({
397
432
  },
398
433
  },
399
434
  },
435
+ secondary = {
436
+ default = {
437
+ textColor = Color3.fromHex("#D3CBA3"),
438
+ backgroundTransparency = 1,
439
+ backgroundImage = {
440
+ tintColor = Color3.fromHex("#5C3A18"),
441
+ },
442
+ },
443
+ },
400
444
  success = {
401
445
  default = {
402
446
  backgroundTransparency = 1,
@@ -458,6 +502,15 @@ local WoodenTheme = createTheme({
458
502
  },
459
503
  },
460
504
  },
505
+ secondary = {
506
+ default = {
507
+ textColor = Color3.fromHex("#D3CBA3"),
508
+ backgroundTransparency = 1,
509
+ backgroundImage = {
510
+ tintColor = Color3.fromHex("#5C3A18"),
511
+ },
512
+ },
513
+ },
461
514
  success = {
462
515
  default = {
463
516
  backgroundTransparency = 1,
@@ -679,6 +732,11 @@ local WoodenTheme = createTheme({
679
732
  backgroundColor = Color3.fromHex("#A16B30"),
680
733
  },
681
734
  },
735
+ secondary = {
736
+ default = {
737
+ backgroundColor = Color3.fromHex("#8C7B62"),
738
+ },
739
+ },
682
740
  success = {
683
741
  default = {
684
742
  backgroundColor = Color3.fromHex("#4E6A24"),
@@ -798,6 +856,10 @@ local WoodenTheme = createTheme({
798
856
  borderColor = Color3.fromHex("#3D2712"),
799
857
  backgroundTransparency = 0,
800
858
  },
859
+ secondary = {
860
+ textColor = Color3.fromHex("#D3CBA3"),
861
+ backgroundColor = Color3.fromHex("#5C3A18"),
862
+ },
801
863
  success = {
802
864
  backgroundColor = Color3.fromHex("#4E6A24"),
803
865
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/react-clean-ui",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "A clean UI library for Roblox TypeScript projects",
5
5
  "main": "out/init.lua",
6
6
  "scripts": {