@rbxts/react-clean-ui 1.2.4 → 1.2.5

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.
@@ -129,6 +129,28 @@ local CardHeader = React.forwardRef(function(props, ref)
129
129
  local intent = ColorHelper:getIntentColors(theme, props.intent or card.intent or "primary", "default", theme.components.card.header.intents)
130
130
  local padding = SpacingHelper:GetResolvedPadding(theme, props, theme.components.card.header.spacing, theme.components.card.header.padding, "md")
131
131
  local corners = CssHelper:parseCssSize(theme.components.card.cornerRadius)
132
+ local headerCorners = theme.components.card.header.cornerRadius
133
+ local noCorner = UDim.new(0, 0)
134
+ local _result = headerCorners
135
+ if _result ~= nil then
136
+ _result = _result.topLeft
137
+ end
138
+ local topLeftRadius = if _result ~= nil then CssHelper:parseCssSize(headerCorners.topLeft) else corners
139
+ local _result_1 = headerCorners
140
+ if _result_1 ~= nil then
141
+ _result_1 = _result_1.topRight
142
+ end
143
+ local topRightRadius = if _result_1 ~= nil then CssHelper:parseCssSize(headerCorners.topRight) else corners
144
+ local _result_2 = headerCorners
145
+ if _result_2 ~= nil then
146
+ _result_2 = _result_2.bottomLeft
147
+ end
148
+ local bottomLeftRadius = if _result_2 ~= nil then CssHelper:parseCssSize(headerCorners.bottomLeft) else noCorner
149
+ local _result_3 = headerCorners
150
+ if _result_3 ~= nil then
151
+ _result_3 = _result_3.bottomRight
152
+ end
153
+ local bottomRightRadius = if _result_3 ~= nil then CssHelper:parseCssSize(headerCorners.bottomRight) else noCorner
132
154
  local _binding = resolveOverlayPosition(props, theme.components.card.header.position)
133
155
  local overlay = _binding.overlay
134
156
  local positionProps = _binding.positionProps
@@ -172,10 +194,10 @@ local CardHeader = React.forwardRef(function(props, ref)
172
194
  _attributes_1.BorderStrokePosition = Enum.BorderStrokePosition.Inner
173
195
  return React.createElement(Container, _attributes, _exp, React.createElement("uistroke", _attributes_1), React.createElement("uicorner", {
174
196
  key = "Corners",
175
- TopLeftRadius = corners,
176
- TopRightRadius = corners,
177
- BottomLeftRadius = UDim.new(0, 0),
178
- BottomRightRadius = UDim.new(0, 0),
197
+ TopLeftRadius = topLeftRadius,
198
+ TopRightRadius = topRightRadius,
199
+ BottomLeftRadius = bottomLeftRadius,
200
+ BottomRightRadius = bottomRightRadius,
179
201
  }), props.children)
180
202
  end)
181
203
  local CardBody = React.forwardRef(function(props, ref)
@@ -208,6 +230,28 @@ local CardFooter = React.forwardRef(function(props, ref)
208
230
  local intent = ColorHelper:getIntentColors(theme, props.intent or card.intent or "primary", "default", theme.components.card.footer.intents)
209
231
  local padding = SpacingHelper:GetResolvedPadding(theme, props, theme.components.card.footer.spacing, theme.components.card.footer.padding, "md")
210
232
  local corners = CssHelper:parseCssSize(theme.components.card.cornerRadius)
233
+ local footerCorners = theme.components.card.footer.cornerRadius
234
+ local noCorner = UDim.new(0, 0)
235
+ local _result = footerCorners
236
+ if _result ~= nil then
237
+ _result = _result.topLeft
238
+ end
239
+ local topLeftRadius = if _result ~= nil then CssHelper:parseCssSize(footerCorners.topLeft) else noCorner
240
+ local _result_1 = footerCorners
241
+ if _result_1 ~= nil then
242
+ _result_1 = _result_1.topRight
243
+ end
244
+ local topRightRadius = if _result_1 ~= nil then CssHelper:parseCssSize(footerCorners.topRight) else noCorner
245
+ local _result_2 = footerCorners
246
+ if _result_2 ~= nil then
247
+ _result_2 = _result_2.bottomLeft
248
+ end
249
+ local bottomLeftRadius = if _result_2 ~= nil then CssHelper:parseCssSize(footerCorners.bottomLeft) else corners
250
+ local _result_3 = footerCorners
251
+ if _result_3 ~= nil then
252
+ _result_3 = _result_3.bottomRight
253
+ end
254
+ local bottomRightRadius = if _result_3 ~= nil then CssHelper:parseCssSize(footerCorners.bottomRight) else corners
211
255
  local _binding = resolveOverlayPosition(props, theme.components.card.footer.position)
212
256
  local overlay = _binding.overlay
213
257
  local positionProps = _binding.positionProps
@@ -251,10 +295,10 @@ local CardFooter = React.forwardRef(function(props, ref)
251
295
  _attributes_1.BorderStrokePosition = Enum.BorderStrokePosition.Inner
252
296
  return React.createElement(Container, _attributes, _exp, React.createElement("uistroke", _attributes_1), React.createElement("uicorner", {
253
297
  key = "Corners",
254
- TopLeftRadius = UDim.new(0, 0),
255
- TopRightRadius = UDim.new(0, 0),
256
- BottomLeftRadius = corners,
257
- BottomRightRadius = corners,
298
+ TopLeftRadius = topLeftRadius,
299
+ TopRightRadius = topRightRadius,
300
+ BottomLeftRadius = bottomLeftRadius,
301
+ BottomRightRadius = bottomRightRadius,
258
302
  }), props.children)
259
303
  end)
260
304
  local Card = React.forwardRef(function(props, ref)
@@ -47,3 +47,9 @@ export interface CssPosition {
47
47
  zIndex?: number;
48
48
  width?: CssCalcSize;
49
49
  }
50
+ export interface CssCornerRadius {
51
+ topLeft?: CssSize;
52
+ topRight?: CssSize;
53
+ bottomLeft?: CssSize;
54
+ bottomRight?: CssSize;
55
+ }
@@ -1,5 +1,5 @@
1
1
  import { CssShadow, CssSize, ScaledCssPadding, Breakpoint, BreakpointValue, ScaleSizeValue, ScaleSize, Intent, IconSet, TextVariant, PositionElementProps, CssBoxShadow, CssBackgroundGradient } from "../Interfaces/";
2
- import { TypographyStyle, ScaledTypographyStyle, IntentScheme, IntentColors, InlineIntentColors, CssBackgroundImage, CssPosition } from "./theme.style";
2
+ import { TypographyStyle, ScaledTypographyStyle, IntentScheme, IntentColors, InlineIntentColors, CssBackgroundImage, CssPosition, CssCornerRadius } from "./theme.style";
3
3
  export interface ThemeTemplate {
4
4
  colors: {
5
5
  intents: Record<Intent, IntentColors>;
@@ -230,6 +230,7 @@ export interface ThemeTemplate {
230
230
  cornerRadius: CssSize;
231
231
  header: {
232
232
  borderThickness?: number;
233
+ cornerRadius?: CssCornerRadius;
233
234
  spacing?: ScaleSizeValue<number>;
234
235
  padding?: ScaledCssPadding;
235
236
  intents?: Partial<Record<Intent, InlineIntentColors>>;
@@ -237,6 +238,7 @@ export interface ThemeTemplate {
237
238
  };
238
239
  footer: {
239
240
  borderThickness?: number;
241
+ cornerRadius?: CssCornerRadius;
240
242
  spacing?: ScaleSizeValue<number>;
241
243
  padding?: ScaledCssPadding;
242
244
  intents?: Partial<Record<Intent, InlineIntentColors>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/react-clean-ui",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "A clean UI library for Roblox TypeScript projects",
5
5
  "main": "out/init.lua",
6
6
  "scripts": {