heroes-of-chess-components 0.5.82 → 0.5.84

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.
@@ -3,28 +3,7 @@ import { HBoxStyledProps } from "./type";
3
3
 
4
4
  export const HBoxContainer = styled.div.withConfig({
5
5
  shouldForwardProp: (prop) =>
6
- ![
7
- "direction",
8
- "gap",
9
- "align",
10
- "justify",
11
- "wrap",
12
- "width",
13
- "height",
14
- "padding",
15
- "margin",
16
- "border",
17
- "borderRadius",
18
- "background",
19
- "overflowX",
20
- "overflowY",
21
- "boxShadow",
22
- "position",
23
- "top",
24
- "bottom",
25
- "left",
26
- "right"
27
- ].includes(prop),
6
+ !["borderRadius", "overflowX", "overflowY", "boxShadow"].includes(prop),
28
7
  })<HBoxStyledProps>`
29
8
  display: flex;
30
9
  flex-direction: ${(props) => props.direction}; /* Dirección (row o column) */
@@ -47,8 +26,8 @@ export const HBoxContainer = styled.div.withConfig({
47
26
  background: ${({ theme, background }) =>
48
27
  (background && theme?.[background]) || background || "transparent"};
49
28
  transition: all 0.3s ease;
50
- overflow-x: ${(props) => props.overflowX ?? "auto"};
51
- overflow-y: ${(props) => props.overflowY ?? "auto"};
29
+ overflow-x: ${(props) => props.overflowX ?? "visible"};
30
+ overflow-y: ${(props) => props.overflowY ?? "visible"};
52
31
  box-shadow: ${({ boxShadow, theme }) =>
53
32
  (boxShadow && theme?.[boxShadow]) || boxShadow || "none"}; /* Sombra */
54
33
 
@@ -24,48 +24,31 @@ const HBox: React.FC<HBoxProps> = ({
24
24
  bottom = "auto", // Posición inferior
25
25
  left = "auto", // Posición izquierda
26
26
  right = "auto", // Posición derecha
27
- ...restProps // Resto de props que no son de estilo
27
+ ...props
28
28
  }) => {
29
- // Separar props de estilo que van al styled component
30
- const styledProps = {
31
- background,
32
- direction,
33
- gap,
34
- align,
35
- justify,
36
- wrap,
37
- width,
38
- height,
39
- padding,
40
- margin,
41
- border,
42
- borderRadius,
43
- overflowX,
44
- overflowY,
45
- boxShadow,
46
- position,
47
- top,
48
- bottom,
49
- left,
50
- right,
51
- };
52
-
53
- // Props que sí queremos pasar al DOM (como onClick, onMouseOver, etc.)
54
- const domProps = Object.fromEntries(
55
- Object.entries(restProps).filter(([key]) =>
56
- key.startsWith('on') ||
57
- key === 'className' ||
58
- key === 'id' ||
59
- key === 'style' ||
60
- key === 'aria-' ||
61
- key === 'data-'
62
- )
63
- );
64
-
65
29
  return (
66
30
  <HBoxContainer
67
- {...styledProps}
68
- {...domProps}
31
+ background={background}
32
+ direction={direction}
33
+ gap={gap}
34
+ align={align}
35
+ justify={justify}
36
+ wrap={wrap}
37
+ width={width}
38
+ height={height}
39
+ padding={padding}
40
+ margin={margin}
41
+ border={border}
42
+ borderRadius={borderRadius}
43
+ overflowX={overflowX}
44
+ overflowY={overflowY}
45
+ boxShadow={boxShadow}
46
+ position={position}
47
+ top={top}
48
+ bottom={bottom}
49
+ left={left}
50
+ right={right}
51
+ {...props}
69
52
  >
70
53
  {children}
71
54
  </HBoxContainer>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heroes-of-chess-components",
3
- "version": "0.5.82",
3
+ "version": "0.5.84",
4
4
  "description": "Reusable React Components for Heroes of Chess Apps",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",