@aurora-ds/components 0.22.0 → 0.22.1

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.
@@ -1,4 +1,4 @@
1
- import { CSSProperties, ReactNode } from 'react';
1
+ import { CSSProperties, DragEvent, ReactNode } from 'react';
2
2
  import { ThemeContract } from '@/interfaces';
3
3
  export type BoxProps = {
4
4
  /** Box children elements */
@@ -87,6 +87,20 @@ export type BoxProps = {
87
87
  onMouseEnter?: () => void;
88
88
  /** onMouseLeave handler */
89
89
  onMouseLeave?: () => void;
90
+ /** Drag over event handler */
91
+ onDragOver?: (event: DragEvent<HTMLDivElement>) => void;
92
+ /** Drag leave event handler */
93
+ onDragLeave?: (event: DragEvent<HTMLDivElement>) => void;
94
+ /** Drop event handler */
95
+ onDrop?: (event: DragEvent<HTMLDivElement>) => void;
96
+ /** Drag start event handler */
97
+ onDragStart?: (event: DragEvent<HTMLDivElement>) => void;
98
+ /** Drag end event handler */
99
+ onDragEnd?: (event: DragEvent<HTMLDivElement>) => void;
100
+ /** Drag enter event handler */
101
+ onDragEnter?: (event: DragEvent<HTMLDivElement>) => void;
102
+ /** Whether the element is draggable */
103
+ draggable?: boolean;
90
104
  };
91
105
  export type BoxStyleParams = {
92
106
  width?: CSSProperties['width'];
@@ -1,4 +1,4 @@
1
- import { CSSProperties, ReactNode } from 'react';
1
+ import { CSSProperties, DragEvent, ReactNode } from 'react';
2
2
  import { ThemeContract } from '@/interfaces';
3
3
  export type CardProps = {
4
4
  /** Card children elements */
@@ -35,6 +35,20 @@ export type CardProps = {
35
35
  role?: string;
36
36
  /** Tab index for keyboard navigation */
37
37
  tabIndex?: number;
38
+ /** Drag over event handler */
39
+ onDragOver?: (event: DragEvent<HTMLDivElement>) => void;
40
+ /** Drag leave event handler */
41
+ onDragLeave?: (event: DragEvent<HTMLDivElement>) => void;
42
+ /** Drop event handler */
43
+ onDrop?: (event: DragEvent<HTMLDivElement>) => void;
44
+ /** Drag start event handler */
45
+ onDragStart?: (event: DragEvent<HTMLDivElement>) => void;
46
+ /** Drag end event handler */
47
+ onDragEnd?: (event: DragEvent<HTMLDivElement>) => void;
48
+ /** Drag enter event handler */
49
+ onDragEnter?: (event: DragEvent<HTMLDivElement>) => void;
50
+ /** Whether the element is draggable */
51
+ draggable?: boolean;
38
52
  };
39
53
  export type CardStyleParams = {
40
54
  direction: CSSProperties['flexDirection'];
package/dist/cjs/index.js CHANGED
@@ -1995,7 +1995,7 @@ const BOX_STYLES = theme.createStyles((theme) => ({
1995
1995
  * </Box>
1996
1996
  * ```
1997
1997
  */
1998
- const Box = ({ children, width, height, minWidth, minHeight, maxWidth, maxHeight, padding, margin, backgroundColor, radius, display = 'block', position, top, right, bottom, left, overflow, overflowX, overflowY, borderColor, borderWidth, flexDirection, alignItems, justifyContent, gap, flexWrap, flexGrow, flexShrink, flexBasis, zIndex, opacity, cursor, shadow, ariaLabel, ariaLabelledBy, ariaDescribedBy, role, tabIndex, id, onClick, onMouseEnter, onMouseLeave, }) => {
1998
+ const Box = ({ children, width, height, minWidth, minHeight, maxWidth, maxHeight, padding, margin, backgroundColor, radius, display = 'block', position, top, right, bottom, left, overflow, overflowX, overflowY, borderColor, borderWidth, flexDirection, alignItems, justifyContent, gap, flexWrap, flexGrow, flexShrink, flexBasis, zIndex, opacity, cursor, shadow, ariaLabel, ariaLabelledBy, ariaDescribedBy, role, tabIndex, id, onClick, onMouseEnter, onMouseLeave, onDragOver, onDragLeave, onDrop, onDragStart, onDragEnd, onDragEnter, draggable, }) => {
1999
1999
  return (jsxRuntime.jsx("div", { id: id, className: BOX_STYLES.root({
2000
2000
  width,
2001
2001
  height,
@@ -2030,7 +2030,7 @@ const Box = ({ children, width, height, minWidth, minHeight, maxWidth, maxHeight
2030
2030
  opacity,
2031
2031
  cursor,
2032
2032
  shadow,
2033
- }), "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, role: role, tabIndex: tabIndex, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: children }));
2033
+ }), "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, role: role, tabIndex: tabIndex, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onDragOver: onDragOver, onDragLeave: onDragLeave, onDrop: onDrop, onDragStart: onDragStart, onDragEnd: onDragEnd, onDragEnter: onDragEnter, draggable: draggable, children: children }));
2034
2034
  };
2035
2035
  Box.displayName = 'Box';
2036
2036
 
@@ -2065,7 +2065,7 @@ const CARD_STYLES = theme.createStyles((theme) => ({
2065
2065
  * - `column`: Vertical layout (default)
2066
2066
  * - `row`: Horizontal layout
2067
2067
  */
2068
- const Card = ({ children, direction = 'column', padding = 'md', width, height, gap, radius = 'md', shadow = 'none', align, justify, backgroundColor = 'surface', borderColor = 'border', ariaLabel, ariaLabelledBy, ariaDescribedBy, role, tabIndex, }) => {
2068
+ const Card = ({ children, direction = 'column', padding = 'md', width, height, gap, radius = 'md', shadow = 'none', align, justify, backgroundColor = 'surface', borderColor = 'border', ariaLabel, ariaLabelledBy, ariaDescribedBy, role, tabIndex, onDragOver, onDragLeave, onDrop, onDragStart, onDragEnd, onDragEnter, draggable, }) => {
2069
2069
  return (jsxRuntime.jsx("div", { className: CARD_STYLES.root({
2070
2070
  direction,
2071
2071
  padding,
@@ -2078,7 +2078,7 @@ const Card = ({ children, direction = 'column', padding = 'md', width, height, g
2078
2078
  justify,
2079
2079
  backgroundColor,
2080
2080
  borderColor
2081
- }), "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, role: role, tabIndex: tabIndex, children: children }));
2081
+ }), "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, role: role, tabIndex: tabIndex, onDragOver: onDragOver, onDragLeave: onDragLeave, onDrop: onDrop, onDragStart: onDragStart, onDragEnd: onDragEnd, onDragEnter: onDragEnter, draggable: draggable, children: children }));
2082
2082
  };
2083
2083
  Card.displayName = 'Card';
2084
2084