@aurora-ds/components 0.17.13 → 0.17.15
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/grid/Grid.props.d.ts +0 -3
- package/dist/cjs/components/navigation/tabs/tab-item/TabItem.props.d.ts +3 -2
- package/dist/cjs/index.js +6 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/layout/grid/Grid.props.d.ts +0 -3
- package/dist/esm/components/navigation/tabs/tab-item/TabItem.props.d.ts +3 -2
- package/dist/esm/index.js +6 -11
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +3 -5
- package/package.json +1 -1
|
@@ -7,8 +7,6 @@ export type GridProps = {
|
|
|
7
7
|
columns?: number | string;
|
|
8
8
|
/** Number of rows (number or CSS grid-template-rows value). */
|
|
9
9
|
rows?: number | string;
|
|
10
|
-
/** Gap between items (theme spacing key) */
|
|
11
|
-
gap?: keyof Theme['spacing'];
|
|
12
10
|
/** Gap between columns (theme spacing key) */
|
|
13
11
|
columnGap?: keyof Theme['spacing'];
|
|
14
12
|
/** Gap between rows (theme spacing key) */
|
|
@@ -45,7 +43,6 @@ export type GridProps = {
|
|
|
45
43
|
export type GridStyleParams = {
|
|
46
44
|
columns?: number | string;
|
|
47
45
|
rows?: number | string;
|
|
48
|
-
gap?: keyof Theme['spacing'];
|
|
49
46
|
columnGap?: keyof Theme['spacing'];
|
|
50
47
|
rowGap?: keyof Theme['spacing'];
|
|
51
48
|
width?: CSSProperties['width'];
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
1
2
|
export type TabItemProps = {
|
|
2
3
|
/** Label of the tab */
|
|
3
4
|
label?: string;
|
|
4
5
|
/** Start icon of the tab */
|
|
5
|
-
startIcon?:
|
|
6
|
+
startIcon?: ReactElement;
|
|
6
7
|
/** End icon of the tab */
|
|
7
|
-
endIcon?:
|
|
8
|
+
endIcon?: ReactElement;
|
|
8
9
|
/** Optional value associated with the tab */
|
|
9
10
|
value?: string | number;
|
|
10
11
|
/** Whether the tab is active */
|
package/dist/cjs/index.js
CHANGED
|
@@ -1934,16 +1934,13 @@ const getGridTemplateRows = (rows) => {
|
|
|
1934
1934
|
* Grid styles using createStyles from @aurora-ds/theme
|
|
1935
1935
|
*/
|
|
1936
1936
|
const GRID_STYLES = theme.createStyles((theme) => ({
|
|
1937
|
-
root: ({ columns, rows,
|
|
1938
|
-
const gapValue = gap ? theme.spacing[gap] : undefined;
|
|
1939
|
-
const columnGapValue = columnGap ? theme.spacing[columnGap] : gapValue;
|
|
1937
|
+
root: ({ columns, rows, columnGap = 'md', rowGap = 'md', width, height, minHeight, alignItems, justifyItems, alignContent, justifyContent, padding, minChildWidth, }) => {
|
|
1940
1938
|
return {
|
|
1941
1939
|
display: 'grid',
|
|
1942
1940
|
gridTemplateColumns: getGridTemplateColumns(columns, minChildWidth),
|
|
1943
1941
|
gridTemplateRows: getGridTemplateRows(rows),
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
rowGap: rowGap ? theme.spacing[rowGap] : undefined,
|
|
1942
|
+
columnGap: theme.spacing[columnGap],
|
|
1943
|
+
rowGap: theme.spacing[rowGap],
|
|
1947
1944
|
width,
|
|
1948
1945
|
height,
|
|
1949
1946
|
minHeight,
|
|
@@ -1951,8 +1948,7 @@ const GRID_STYLES = theme.createStyles((theme) => ({
|
|
|
1951
1948
|
justifyItems,
|
|
1952
1949
|
alignContent,
|
|
1953
1950
|
justifyContent,
|
|
1954
|
-
padding: padding ? theme.spacing[padding] : undefined
|
|
1955
|
-
'--grid-gap': columnGapValue || gapValue || '0px',
|
|
1951
|
+
padding: padding ? theme.spacing[padding] : undefined
|
|
1956
1952
|
};
|
|
1957
1953
|
},
|
|
1958
1954
|
}));
|
|
@@ -1968,11 +1964,10 @@ const GRID_STYLES = theme.createStyles((theme) => ({
|
|
|
1968
1964
|
* - Use `minChildWidth` for responsive auto-fill grids
|
|
1969
1965
|
* - Combine `columns` + `minChildWidth` for responsive grid with max columns limit
|
|
1970
1966
|
*/
|
|
1971
|
-
const Grid = ({ children, columns = 1, rows,
|
|
1967
|
+
const Grid = ({ children, columns = 1, rows, columnGap, rowGap, width, height, minHeight, alignItems, justifyItems, alignContent, justifyContent, padding, minChildWidth, ariaLabel, ariaLabelledBy, ariaDescribedBy, role, tabIndex, }) => {
|
|
1972
1968
|
return (jsxRuntime.jsx("div", { className: GRID_STYLES.root({
|
|
1973
1969
|
columns,
|
|
1974
1970
|
rows,
|
|
1975
|
-
gap,
|
|
1976
1971
|
columnGap,
|
|
1977
1972
|
rowGap,
|
|
1978
1973
|
width,
|
|
@@ -2485,7 +2480,7 @@ const TAB_ITEM_STYLES = theme.createStyles((theme) => ({
|
|
|
2485
2480
|
display: 'flex',
|
|
2486
2481
|
alignItems: 'center',
|
|
2487
2482
|
justifyContent: 'center',
|
|
2488
|
-
gap: theme.spacing.
|
|
2483
|
+
gap: theme.spacing.sm,
|
|
2489
2484
|
backgroundColor: isActive ? theme.colors.background : 'transparent',
|
|
2490
2485
|
color: isActive ? theme.colors.text : theme.colors.textSecondary,
|
|
2491
2486
|
boxShadow: isActive ? theme.shadows.sm : undefined,
|