@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/esm/index.js
CHANGED
|
@@ -1932,16 +1932,13 @@ const getGridTemplateRows = (rows) => {
|
|
|
1932
1932
|
* Grid styles using createStyles from @aurora-ds/theme
|
|
1933
1933
|
*/
|
|
1934
1934
|
const GRID_STYLES = createStyles((theme) => ({
|
|
1935
|
-
root: ({ columns, rows,
|
|
1936
|
-
const gapValue = gap ? theme.spacing[gap] : undefined;
|
|
1937
|
-
const columnGapValue = columnGap ? theme.spacing[columnGap] : gapValue;
|
|
1935
|
+
root: ({ columns, rows, columnGap = 'md', rowGap = 'md', width, height, minHeight, alignItems, justifyItems, alignContent, justifyContent, padding, minChildWidth, }) => {
|
|
1938
1936
|
return {
|
|
1939
1937
|
display: 'grid',
|
|
1940
1938
|
gridTemplateColumns: getGridTemplateColumns(columns, minChildWidth),
|
|
1941
1939
|
gridTemplateRows: getGridTemplateRows(rows),
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
rowGap: rowGap ? theme.spacing[rowGap] : undefined,
|
|
1940
|
+
columnGap: theme.spacing[columnGap],
|
|
1941
|
+
rowGap: theme.spacing[rowGap],
|
|
1945
1942
|
width,
|
|
1946
1943
|
height,
|
|
1947
1944
|
minHeight,
|
|
@@ -1949,8 +1946,7 @@ const GRID_STYLES = createStyles((theme) => ({
|
|
|
1949
1946
|
justifyItems,
|
|
1950
1947
|
alignContent,
|
|
1951
1948
|
justifyContent,
|
|
1952
|
-
padding: padding ? theme.spacing[padding] : undefined
|
|
1953
|
-
'--grid-gap': columnGapValue || gapValue || '0px',
|
|
1949
|
+
padding: padding ? theme.spacing[padding] : undefined
|
|
1954
1950
|
};
|
|
1955
1951
|
},
|
|
1956
1952
|
}));
|
|
@@ -1966,11 +1962,10 @@ const GRID_STYLES = createStyles((theme) => ({
|
|
|
1966
1962
|
* - Use `minChildWidth` for responsive auto-fill grids
|
|
1967
1963
|
* - Combine `columns` + `minChildWidth` for responsive grid with max columns limit
|
|
1968
1964
|
*/
|
|
1969
|
-
const Grid = ({ children, columns = 1, rows,
|
|
1965
|
+
const Grid = ({ children, columns = 1, rows, columnGap, rowGap, width, height, minHeight, alignItems, justifyItems, alignContent, justifyContent, padding, minChildWidth, ariaLabel, ariaLabelledBy, ariaDescribedBy, role, tabIndex, }) => {
|
|
1970
1966
|
return (jsx("div", { className: GRID_STYLES.root({
|
|
1971
1967
|
columns,
|
|
1972
1968
|
rows,
|
|
1973
|
-
gap,
|
|
1974
1969
|
columnGap,
|
|
1975
1970
|
rowGap,
|
|
1976
1971
|
width,
|
|
@@ -2483,7 +2478,7 @@ const TAB_ITEM_STYLES = createStyles((theme) => ({
|
|
|
2483
2478
|
display: 'flex',
|
|
2484
2479
|
alignItems: 'center',
|
|
2485
2480
|
justifyContent: 'center',
|
|
2486
|
-
gap: theme.spacing.
|
|
2481
|
+
gap: theme.spacing.sm,
|
|
2487
2482
|
backgroundColor: isActive ? theme.colors.background : 'transparent',
|
|
2488
2483
|
color: isActive ? theme.colors.text : theme.colors.textSecondary,
|
|
2489
2484
|
boxShadow: isActive ? theme.shadows.sm : undefined,
|