@aurora-ds/components 0.22.2 → 0.22.4
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.
- package/dist/cjs/components/layout/card/Card.props.d.ts +3 -0
- package/dist/cjs/index.js +7 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/layout/card/Card.props.d.ts +3 -0
- package/dist/esm/index.js +7 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -11,6 +11,8 @@ export type CardProps = {
|
|
|
11
11
|
width?: CSSProperties['width'];
|
|
12
12
|
/** Height of the card */
|
|
13
13
|
height?: CSSProperties['height'];
|
|
14
|
+
/** Maximum height of the card */
|
|
15
|
+
maxHeight?: CSSProperties['maxHeight'];
|
|
14
16
|
/** Gap between children (theme spacing key) */
|
|
15
17
|
gap?: keyof ThemeContract['spacing'];
|
|
16
18
|
/** Border radius of the card */
|
|
@@ -55,6 +57,7 @@ export type CardStyleParams = {
|
|
|
55
57
|
padding?: keyof ThemeContract['spacing'];
|
|
56
58
|
width?: CSSProperties['width'];
|
|
57
59
|
height?: CSSProperties['height'];
|
|
60
|
+
maxHeight?: CSSProperties['maxHeight'];
|
|
58
61
|
gap?: keyof ThemeContract['spacing'];
|
|
59
62
|
radius: keyof ThemeContract['radius'];
|
|
60
63
|
shadow: keyof ThemeContract['shadows'];
|
package/dist/esm/index.js
CHANGED
|
@@ -1971,6 +1971,7 @@ const BOX_STYLES = createStyles((theme) => ({
|
|
|
1971
1971
|
cursor,
|
|
1972
1972
|
boxShadow: shadow ? theme.shadows[shadow] : undefined,
|
|
1973
1973
|
boxSizing: 'border-box',
|
|
1974
|
+
transition: `background-color ${theme.transition.normal}, border-color ${theme.transition.normal}`,
|
|
1974
1975
|
}),
|
|
1975
1976
|
}));
|
|
1976
1977
|
|
|
@@ -2036,12 +2037,13 @@ Box.displayName = 'Box';
|
|
|
2036
2037
|
* Card styles using createStyles from @aurora-ds/theme
|
|
2037
2038
|
*/
|
|
2038
2039
|
const CARD_STYLES = createStyles((theme) => ({
|
|
2039
|
-
root: ({ direction, padding, width, height, gap, radius, shadow, align, justify, backgroundColor, borderColor }) => ({
|
|
2040
|
+
root: ({ direction, padding, width, height, maxHeight, gap, radius, shadow, align, justify, backgroundColor, borderColor }) => ({
|
|
2040
2041
|
display: 'flex',
|
|
2041
2042
|
flexDirection: direction,
|
|
2042
2043
|
padding: padding ? theme.spacing[padding] : undefined,
|
|
2043
2044
|
width,
|
|
2044
2045
|
height,
|
|
2046
|
+
maxHeight,
|
|
2045
2047
|
gap: gap ? theme.spacing[gap] : undefined,
|
|
2046
2048
|
borderRadius: theme.radius[radius],
|
|
2047
2049
|
boxShadow: theme.shadows[shadow],
|
|
@@ -2050,7 +2052,8 @@ const CARD_STYLES = createStyles((theme) => ({
|
|
|
2050
2052
|
alignItems: align,
|
|
2051
2053
|
justifyContent: justify,
|
|
2052
2054
|
boxSizing: 'border-box',
|
|
2053
|
-
flexShrink: 0
|
|
2055
|
+
flexShrink: 0,
|
|
2056
|
+
transition: `background-color ${theme.transition.normal}, border-color ${theme.transition.normal}`,
|
|
2054
2057
|
}),
|
|
2055
2058
|
}));
|
|
2056
2059
|
|
|
@@ -2064,12 +2067,13 @@ const CARD_STYLES = createStyles((theme) => ({
|
|
|
2064
2067
|
* - `column`: Vertical layout (default)
|
|
2065
2068
|
* - `row`: Horizontal layout
|
|
2066
2069
|
*/
|
|
2067
|
-
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, }) => {
|
|
2070
|
+
const Card = ({ children, direction = 'column', padding = 'md', width, height, maxHeight, gap, radius = 'md', shadow = 'none', align, justify, backgroundColor = 'surface', borderColor = 'border', ariaLabel, ariaLabelledBy, ariaDescribedBy, role, tabIndex, onDragOver, onDragLeave, onDrop, onDragStart, onDragEnd, onDragEnter, draggable, }) => {
|
|
2068
2071
|
return (jsx("div", { className: CARD_STYLES.root({
|
|
2069
2072
|
direction,
|
|
2070
2073
|
padding,
|
|
2071
2074
|
width,
|
|
2072
2075
|
height,
|
|
2076
|
+
maxHeight,
|
|
2073
2077
|
gap,
|
|
2074
2078
|
radius,
|
|
2075
2079
|
shadow,
|