@astral/ui 0.10.2 → 0.11.0
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/Grid/Grid.d.ts +1 -1
- package/Grid/Grid.js +2 -2
- package/Grid/types.d.ts +4 -3
- package/esm/Grid/Grid.d.ts +1 -1
- package/esm/Grid/Grid.js +2 -2
- package/esm/Grid/types.d.ts +4 -3
- package/package.json +2 -2
package/Grid/Grid.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { GridProps } from './types';
|
|
3
|
-
export declare const Grid: ({ container, templateColumns, templateRows, templateAreas, columnSpacing, rowSpacing, spacing, autoColumns, autoRows, autoFlow, column, row, area, children, ...props }: GridProps) => JSX.Element;
|
|
3
|
+
export declare const Grid: ({ container, templateColumns, templateRows, templateAreas, columnSpacing, rowSpacing, spacing, autoColumns, autoRows, autoFlow, column, row, area, component, children, ...props }: GridProps) => JSX.Element;
|
package/Grid/Grid.js
CHANGED
|
@@ -26,7 +26,7 @@ exports.Grid = void 0;
|
|
|
26
26
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
27
|
var styled_1 = require("./styled");
|
|
28
28
|
var Grid = function (_a) {
|
|
29
|
-
var _b = _a.container, container = _b === void 0 ? false : _b, templateColumns = _a.templateColumns, templateRows = _a.templateRows, templateAreas = _a.templateAreas, columnSpacing = _a.columnSpacing, rowSpacing = _a.rowSpacing, spacing = _a.spacing, autoColumns = _a.autoColumns, autoRows = _a.autoRows, autoFlow = _a.autoFlow, column = _a.column, row = _a.row, area = _a.area, children = _a.children, props = __rest(_a, ["container", "templateColumns", "templateRows", "templateAreas", "columnSpacing", "rowSpacing", "spacing", "autoColumns", "autoRows", "autoFlow", "column", "row", "area", "children"]);
|
|
30
|
-
return ((0, jsx_runtime_1.jsx)(styled_1.StyledGrid, __assign({ container: container, gridTemplateColumns: templateColumns, gridTemplateRows: templateRows, gridTemplateAreas: templateAreas, columnGap: columnSpacing, rowGap: rowSpacing, gap: spacing, gridAutoColumns: autoColumns, gridAutoRows: autoRows, gridAutoFlow: autoFlow, gridColumn: column, gridRow: row, gridArea: area }, props, { children: children }), void 0));
|
|
29
|
+
var _b = _a.container, container = _b === void 0 ? false : _b, templateColumns = _a.templateColumns, templateRows = _a.templateRows, templateAreas = _a.templateAreas, columnSpacing = _a.columnSpacing, rowSpacing = _a.rowSpacing, spacing = _a.spacing, autoColumns = _a.autoColumns, autoRows = _a.autoRows, autoFlow = _a.autoFlow, column = _a.column, row = _a.row, area = _a.area, _c = _a.component, component = _c === void 0 ? 'div' : _c, children = _a.children, props = __rest(_a, ["container", "templateColumns", "templateRows", "templateAreas", "columnSpacing", "rowSpacing", "spacing", "autoColumns", "autoRows", "autoFlow", "column", "row", "area", "component", "children"]);
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)(styled_1.StyledGrid, __assign({ container: container, gridTemplateColumns: templateColumns, gridTemplateRows: templateRows, gridTemplateAreas: templateAreas, columnGap: columnSpacing, rowGap: rowSpacing, gap: spacing, gridAutoColumns: autoColumns, gridAutoRows: autoRows, gridAutoFlow: autoFlow, gridColumn: column, gridRow: row, gridArea: area, component: component }, props, { children: children }), void 0));
|
|
31
31
|
};
|
|
32
32
|
exports.Grid = Grid;
|
package/Grid/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CSSProperties, ElementType, ReactNode } from 'react';
|
|
2
2
|
import { Breakpoint } from '@mui/material/styles';
|
|
3
|
-
declare type StyleCSSType<Type extends keyof
|
|
3
|
+
declare type StyleCSSType<Type extends keyof CSSProperties> = CSSProperties[Type] | Partial<Record<Breakpoint, CSSProperties[Type]>>;
|
|
4
4
|
export declare type GridContainerProps = {
|
|
5
5
|
container?: boolean;
|
|
6
6
|
templateColumns?: StyleCSSType<'gridTemplateColumns'>;
|
|
@@ -16,6 +16,7 @@ export declare type GridContainerProps = {
|
|
|
16
16
|
autoColumns?: StyleCSSType<'gridAutoColumns'>;
|
|
17
17
|
autoRows?: StyleCSSType<'gridAutoRows'>;
|
|
18
18
|
autoFlow?: StyleCSSType<'gridAutoFlow'>;
|
|
19
|
+
component?: ElementType;
|
|
19
20
|
};
|
|
20
21
|
export declare type GridElementsProps = {
|
|
21
22
|
column?: StyleCSSType<'gridColumn'>;
|
|
@@ -25,6 +26,6 @@ export declare type GridElementsProps = {
|
|
|
25
26
|
alignSelf?: StyleCSSType<'alignSelf'>;
|
|
26
27
|
};
|
|
27
28
|
export declare type GridProps = GridContainerProps & GridElementsProps & {
|
|
28
|
-
children?:
|
|
29
|
+
children?: ReactNode;
|
|
29
30
|
};
|
|
30
31
|
export {};
|
package/esm/Grid/Grid.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { GridProps } from './types';
|
|
3
|
-
export declare const Grid: ({ container, templateColumns, templateRows, templateAreas, columnSpacing, rowSpacing, spacing, autoColumns, autoRows, autoFlow, column, row, area, children, ...props }: GridProps) => JSX.Element;
|
|
3
|
+
export declare const Grid: ({ container, templateColumns, templateRows, templateAreas, columnSpacing, rowSpacing, spacing, autoColumns, autoRows, autoFlow, column, row, area, component, children, ...props }: GridProps) => JSX.Element;
|
package/esm/Grid/Grid.js
CHANGED
|
@@ -23,6 +23,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import { StyledGrid } from './styled';
|
|
25
25
|
export var Grid = function (_a) {
|
|
26
|
-
var _b = _a.container, container = _b === void 0 ? false : _b, templateColumns = _a.templateColumns, templateRows = _a.templateRows, templateAreas = _a.templateAreas, columnSpacing = _a.columnSpacing, rowSpacing = _a.rowSpacing, spacing = _a.spacing, autoColumns = _a.autoColumns, autoRows = _a.autoRows, autoFlow = _a.autoFlow, column = _a.column, row = _a.row, area = _a.area, children = _a.children, props = __rest(_a, ["container", "templateColumns", "templateRows", "templateAreas", "columnSpacing", "rowSpacing", "spacing", "autoColumns", "autoRows", "autoFlow", "column", "row", "area", "children"]);
|
|
27
|
-
return (_jsx(StyledGrid, __assign({ container: container, gridTemplateColumns: templateColumns, gridTemplateRows: templateRows, gridTemplateAreas: templateAreas, columnGap: columnSpacing, rowGap: rowSpacing, gap: spacing, gridAutoColumns: autoColumns, gridAutoRows: autoRows, gridAutoFlow: autoFlow, gridColumn: column, gridRow: row, gridArea: area }, props, { children: children }), void 0));
|
|
26
|
+
var _b = _a.container, container = _b === void 0 ? false : _b, templateColumns = _a.templateColumns, templateRows = _a.templateRows, templateAreas = _a.templateAreas, columnSpacing = _a.columnSpacing, rowSpacing = _a.rowSpacing, spacing = _a.spacing, autoColumns = _a.autoColumns, autoRows = _a.autoRows, autoFlow = _a.autoFlow, column = _a.column, row = _a.row, area = _a.area, _c = _a.component, component = _c === void 0 ? 'div' : _c, children = _a.children, props = __rest(_a, ["container", "templateColumns", "templateRows", "templateAreas", "columnSpacing", "rowSpacing", "spacing", "autoColumns", "autoRows", "autoFlow", "column", "row", "area", "component", "children"]);
|
|
27
|
+
return (_jsx(StyledGrid, __assign({ container: container, gridTemplateColumns: templateColumns, gridTemplateRows: templateRows, gridTemplateAreas: templateAreas, columnGap: columnSpacing, rowGap: rowSpacing, gap: spacing, gridAutoColumns: autoColumns, gridAutoRows: autoRows, gridAutoFlow: autoFlow, gridColumn: column, gridRow: row, gridArea: area, component: component }, props, { children: children }), void 0));
|
|
28
28
|
};
|
package/esm/Grid/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CSSProperties, ElementType, ReactNode } from 'react';
|
|
2
2
|
import { Breakpoint } from '@mui/material/styles';
|
|
3
|
-
declare type StyleCSSType<Type extends keyof
|
|
3
|
+
declare type StyleCSSType<Type extends keyof CSSProperties> = CSSProperties[Type] | Partial<Record<Breakpoint, CSSProperties[Type]>>;
|
|
4
4
|
export declare type GridContainerProps = {
|
|
5
5
|
container?: boolean;
|
|
6
6
|
templateColumns?: StyleCSSType<'gridTemplateColumns'>;
|
|
@@ -16,6 +16,7 @@ export declare type GridContainerProps = {
|
|
|
16
16
|
autoColumns?: StyleCSSType<'gridAutoColumns'>;
|
|
17
17
|
autoRows?: StyleCSSType<'gridAutoRows'>;
|
|
18
18
|
autoFlow?: StyleCSSType<'gridAutoFlow'>;
|
|
19
|
+
component?: ElementType;
|
|
19
20
|
};
|
|
20
21
|
export declare type GridElementsProps = {
|
|
21
22
|
column?: StyleCSSType<'gridColumn'>;
|
|
@@ -25,6 +26,6 @@ export declare type GridElementsProps = {
|
|
|
25
26
|
alignSelf?: StyleCSSType<'alignSelf'>;
|
|
26
27
|
};
|
|
27
28
|
export declare type GridProps = GridContainerProps & GridElementsProps & {
|
|
28
|
-
children?:
|
|
29
|
+
children?: ReactNode;
|
|
29
30
|
};
|
|
30
31
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astral/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"browser": "./src/index.ts",
|
|
5
5
|
"jest": {
|
|
6
6
|
"moduleNameMapper": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
}
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@astral/icons": "^0.
|
|
11
|
+
"@astral/icons": "^0.11.0",
|
|
12
12
|
"@emotion/cache": "11.7.1",
|
|
13
13
|
"@emotion/react": "11.8.1",
|
|
14
14
|
"@emotion/server": "11.4.0",
|