@janbox/storefront-ui 2.0.28 → 2.0.29
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/lib/box/box.js +5 -21
- package/dist/lib/flexbox/flexbox/flexbox.d.ts +1 -1
- package/dist/lib/flexbox/flexbox/flexbox.js +16 -20
- package/dist/lib/grid/grid/grid.d.ts +1 -1
- package/dist/lib/grid/grid/grid.js +20 -25
- package/dist/lib/table/table-row/table-row.d.ts +1 -1
- package/dist/lib/table/table-row/table-row.js +4 -4
- package/dist/lib/table/table-row/types.d.ts +2 -2
- package/dist/lib/unordered-list/list-item/list-item.d.ts +1 -1
- package/dist/lib/unordered-list/list-item/list-item.js +8 -10
- package/dist/lib/unordered-list/list-item/types.d.ts +2 -2
- package/package.json +1 -1
package/dist/lib/box/box.js
CHANGED
|
@@ -10,32 +10,16 @@ const Box = ({ children, ref, ..._props }) => {
|
|
|
10
10
|
...rest,
|
|
11
11
|
sx: {
|
|
12
12
|
...container ? containerStyle : {},
|
|
13
|
-
...
|
|
14
|
-
sm:
|
|
15
|
-
md:
|
|
16
|
-
lg:
|
|
13
|
+
...sx,
|
|
14
|
+
sm: { ...sx.sm },
|
|
15
|
+
md: { ...sx.md },
|
|
16
|
+
lg: { ...sx.lg }
|
|
17
17
|
},
|
|
18
18
|
ref,
|
|
19
|
-
children
|
|
20
|
-
Primitive,
|
|
21
|
-
{
|
|
22
|
-
sx: {
|
|
23
|
-
width: "100%",
|
|
24
|
-
height: "100%"
|
|
25
|
-
},
|
|
26
|
-
children
|
|
27
|
-
}
|
|
28
|
-
)
|
|
19
|
+
children
|
|
29
20
|
}
|
|
30
21
|
);
|
|
31
22
|
};
|
|
32
|
-
const createStyle = ({ width, height, ...css } = {}) => {
|
|
33
|
-
return {
|
|
34
|
-
width,
|
|
35
|
-
height,
|
|
36
|
-
"& > *": css
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
23
|
export {
|
|
40
24
|
Box
|
|
41
25
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FlexboxProps } from './types';
|
|
2
|
-
export declare const Flexbox: ({ children, container, ref, ..._props }: FlexboxProps) => import("
|
|
2
|
+
export declare const Flexbox: ({ children, container, ref, ..._props }: FlexboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,29 +1,25 @@
|
|
|
1
|
-
import { jsx } from "
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getFlexboxProps } from "./helpers.js";
|
|
3
|
-
import { mediaQuery } from "../../../theme/screens.js";
|
|
4
|
-
import "../../../theme/palette.js";
|
|
5
3
|
import { containerStyle } from "../../../constants/emotion.js";
|
|
4
|
+
import { Primitive } from "../../primitive/primitive.js";
|
|
6
5
|
const Flexbox = ({ children, container, ref, ..._props }) => {
|
|
7
6
|
const { sx = {}, ...rest } = getFlexboxProps(_props);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
container && containerStyle,
|
|
11
|
-
createStyle(restSx),
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
Primitive,
|
|
12
9
|
{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
...rest,
|
|
11
|
+
sx: {
|
|
12
|
+
display: "flex",
|
|
13
|
+
...container ? containerStyle : {},
|
|
14
|
+
...sx,
|
|
15
|
+
sm: { ...sx.sm },
|
|
16
|
+
md: { ...sx.md },
|
|
17
|
+
lg: { ...sx.lg }
|
|
18
|
+
},
|
|
19
|
+
ref,
|
|
20
|
+
children
|
|
16
21
|
}
|
|
17
|
-
|
|
18
|
-
return /* @__PURE__ */ jsx("div", { css, ...rest, ref, children: /* @__PURE__ */ jsx("div", { css: { display: "flex", width: "100%", height: "100%" }, children }) });
|
|
19
|
-
};
|
|
20
|
-
const createStyle = (sx = {}) => {
|
|
21
|
-
const { width, height, ...css } = sx;
|
|
22
|
-
return {
|
|
23
|
-
width,
|
|
24
|
-
height,
|
|
25
|
-
"& > *": css
|
|
26
|
-
};
|
|
22
|
+
);
|
|
27
23
|
};
|
|
28
24
|
export {
|
|
29
25
|
Flexbox
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GridProps } from './types';
|
|
2
2
|
export declare const GRID_MINIMUM_COLS = 1;
|
|
3
3
|
export declare const GRID_MAXIMUM_COLS = 24;
|
|
4
|
-
export declare const Grid: ({ children, ref, ..._props }: GridProps) => import("
|
|
4
|
+
export declare const Grid: ({ children, ref, ..._props }: GridProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,38 +1,33 @@
|
|
|
1
|
-
import { jsx } from "
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { isNil } from "lodash-es";
|
|
3
3
|
import { getGridProps } from "./helpers.js";
|
|
4
|
-
import { mediaQuery } from "../../../theme/screens.js";
|
|
5
|
-
import "../../../theme/palette.js";
|
|
6
4
|
import { containerStyle } from "../../../constants/emotion.js";
|
|
5
|
+
import { Primitive } from "../../primitive/primitive.js";
|
|
7
6
|
const GRID_MINIMUM_COLS = 1;
|
|
8
7
|
const GRID_MAXIMUM_COLS = 24;
|
|
9
8
|
const Grid = ({ children, ref, ..._props }) => {
|
|
10
9
|
const { cols, sm, md, lg, container, sx = {}, ...rest } = getGridProps(_props);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
container && containerStyle,
|
|
14
|
-
createStyle({ cols }, sxXs),
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
Primitive,
|
|
15
12
|
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
sx: {
|
|
14
|
+
display: "grid",
|
|
15
|
+
...container ? containerStyle : {},
|
|
16
|
+
...createStyle({ cols }),
|
|
17
|
+
...sx,
|
|
18
|
+
sm: { ...createStyle(sm), ...sx.sm },
|
|
19
|
+
md: { ...createStyle(md), ...sx.md },
|
|
20
|
+
lg: { ...createStyle(lg), ...sx.lg }
|
|
21
|
+
},
|
|
22
|
+
...rest,
|
|
23
|
+
ref,
|
|
24
|
+
children
|
|
19
25
|
}
|
|
20
|
-
|
|
21
|
-
return /* @__PURE__ */ jsx("div", { css, ...rest, ref, children: /* @__PURE__ */ jsx("div", { css: { display: "grid", width: "100%", height: "100%" }, children }) });
|
|
22
|
-
};
|
|
23
|
-
const createStyle = ({ cols } = {}, sx = {}) => {
|
|
24
|
-
const { width, height, ...css } = sx;
|
|
25
|
-
return [
|
|
26
|
-
{
|
|
27
|
-
width,
|
|
28
|
-
height,
|
|
29
|
-
"& > *": {
|
|
30
|
-
gridTemplateColumns: isNil(cols) ? void 0 : `repeat(${cols}, minmax(0, 1fr))`,
|
|
31
|
-
...css
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
];
|
|
26
|
+
);
|
|
35
27
|
};
|
|
28
|
+
const createStyle = ({ cols } = {}) => ({
|
|
29
|
+
gridTemplateColumns: isNil(cols) ? void 0 : `repeat(${cols}, minmax(0, 1fr))`
|
|
30
|
+
});
|
|
36
31
|
export {
|
|
37
32
|
GRID_MAXIMUM_COLS,
|
|
38
33
|
GRID_MINIMUM_COLS,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TableRowProps } from './types';
|
|
2
|
-
export declare const TableRow: (
|
|
2
|
+
export declare const TableRow: (props: TableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx } from "
|
|
2
|
-
import {
|
|
3
|
-
const TableRow = (
|
|
4
|
-
return /* @__PURE__ */ jsx(
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Primitive } from "../../primitive/primitive.js";
|
|
3
|
+
const TableRow = (props) => {
|
|
4
|
+
return /* @__PURE__ */ jsx(Primitive, { ...props, as: "tr" });
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
TableRow
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export type TableRowProps =
|
|
2
|
+
import { PrimitiveProps } from '../../primitive';
|
|
3
|
+
export type TableRowProps = PrimitiveProps<JSX.IntrinsicElements['tr']>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ListItemProps } from './types';
|
|
2
|
-
export declare const ListItem: ({ ref, ..._props }: ListItemProps) => import("
|
|
2
|
+
export declare const ListItem: ({ ref, ..._props }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import { jsx } from "
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { isNil } from "lodash-es";
|
|
3
3
|
import { getListItemProps } from "./helpers.js";
|
|
4
|
-
import {
|
|
4
|
+
import { Primitive } from "../../primitive/primitive.js";
|
|
5
5
|
const ListItem = ({ ref, ..._props }) => {
|
|
6
6
|
const { sx, children, dangerouslySetInnerHTML, ...rest } = getListItemProps(_props);
|
|
7
|
-
const css = [
|
|
8
|
-
{
|
|
9
|
-
display: "inline-flex"
|
|
10
|
-
},
|
|
11
|
-
createSxInterpolation(sx)
|
|
12
|
-
];
|
|
13
7
|
return /* @__PURE__ */ jsx(
|
|
14
|
-
|
|
8
|
+
Primitive,
|
|
15
9
|
{
|
|
16
|
-
css,
|
|
17
10
|
suppressContentEditableWarning: true,
|
|
18
11
|
dangerouslySetInnerHTML: isNil(children) ? dangerouslySetInnerHTML : void 0,
|
|
19
12
|
...rest,
|
|
20
13
|
ref,
|
|
14
|
+
sx: {
|
|
15
|
+
display: "inline-flex",
|
|
16
|
+
...sx
|
|
17
|
+
},
|
|
18
|
+
as: "li",
|
|
21
19
|
children: isNil(dangerouslySetInnerHTML) ? children : null
|
|
22
20
|
}
|
|
23
21
|
);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export type ListItemProps =
|
|
2
|
+
import { PrimitiveProps } from '../../primitive';
|
|
3
|
+
export type ListItemProps = PrimitiveProps<JSX.IntrinsicElements['li']>;
|