@janbox/storefront-ui 3.0.0 → 3.0.2
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/README.md +72 -37
- package/dist/components/svg-loader.d.ts +4 -3
- package/dist/components/svg-loader.js +12 -7
- package/dist/constants/emotion.d.ts +0 -2
- package/dist/constants/emotion.js +0 -24
- package/dist/index.js +2 -0
- package/dist/lib/accordion/accordion-content/accordion-content.d.ts +1 -1
- package/dist/lib/accordion/accordion-content/accordion-content.js +24 -13
- package/dist/lib/accordion/accordion-summary/accordion-summary.d.ts +1 -1
- package/dist/lib/accordion/accordion-summary/accordion-summary.js +21 -13
- package/dist/lib/accordion/accordion-summary/types.d.ts +4 -3
- package/dist/lib/box/README.md +1 -11
- package/dist/lib/box/box.js +1 -3
- package/dist/lib/box/types.d.ts +1 -5
- package/dist/lib/cascader/cascader.js +9 -12
- package/dist/lib/cascader/types.d.ts +3 -2
- package/dist/lib/chip/chip.d.ts +1 -1
- package/dist/lib/chip/chip.js +35 -31
- package/dist/lib/chip/types.d.ts +5 -4
- package/dist/lib/container/README.md +7 -18
- package/dist/lib/container/container.d.ts +1 -1
- package/dist/lib/container/container.js +4 -88
- package/dist/lib/container/helpers.js +24 -1
- package/dist/lib/container/types.d.ts +2 -8
- package/dist/lib/filter-panel/checkbox-filter-panel.js +3 -2
- package/dist/lib/filter-panel/price-range-filter-panel.d.ts +1 -1
- package/dist/lib/filter-panel/price-range-filter-panel.js +4 -3
- package/dist/lib/filter-panel/radio-filter-panel.js +2 -1
- package/dist/lib/flexbox/README.md +1 -2
- package/dist/lib/flexbox/flex-item/flex-item.d.ts +1 -1
- package/dist/lib/flexbox/flex-item/flex-item.js +13 -8
- package/dist/lib/flexbox/flex-item/types.d.ts +2 -2
- package/dist/lib/flexbox/flexbox/flexbox.d.ts +1 -1
- package/dist/lib/flexbox/flexbox/flexbox.js +1 -3
- package/dist/lib/flexbox/flexbox/types.d.ts +2 -6
- package/dist/lib/grid/cell/README.md +66 -0
- package/dist/lib/grid/{README.md → grid/README.md} +5 -6
- package/dist/lib/grid/grid/grid.js +1 -3
- package/dist/lib/grid/grid/types.d.ts +4 -5
- package/dist/lib/icon/icon.d.ts +1 -1
- package/dist/lib/icon/icon.js +23 -21
- package/dist/lib/icon-button/icon-button.js +5 -3
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/lightbox/lightbox.js +2 -1
- package/dist/lib/pagination/pagination.js +1 -1
- package/dist/lib/popover/popover-content/popover-content.d.ts +1 -1
- package/dist/lib/popover/popover-content/popover-content.js +6 -5
- package/dist/lib/primitive/primitive.js +3 -4
- package/dist/lib/select/select.js +4 -4
- package/dist/lib/stepper/stepper.js +2 -1
- package/dist/lib/stylesheet/index.d.ts +2 -0
- package/dist/lib/stylesheet/stylesheet.d.ts +2 -0
- package/dist/lib/stylesheet/stylesheet.js +23 -0
- package/dist/lib/stylesheet/types.d.ts +9 -0
- package/dist/lib/table/table/table.d.ts +1 -1
- package/dist/lib/table/table/table.js +7 -6
- package/dist/lib/table/table/types.d.ts +2 -2
- package/dist/lib/table/table-body/table-body.d.ts +1 -1
- package/dist/lib/table/table-body/table-body.js +21 -22
- package/dist/lib/table/table-body/types.d.ts +2 -2
- package/dist/lib/table/table-footer/table-footer.d.ts +1 -1
- package/dist/lib/table/table-footer/table-footer.js +4 -4
- package/dist/lib/table/table-footer/types.d.ts +2 -2
- package/dist/lib/table/table-head/table-head.d.ts +1 -1
- package/dist/lib/table/table-head/table-head.js +19 -20
- package/dist/lib/table/table-head/types.d.ts +2 -2
- package/dist/lib/tabs/tab-indicator/tab-indicator.d.ts +1 -1
- package/dist/lib/tabs/tab-indicator/tab-indicator.js +12 -14
- package/dist/lib/tabs/tabs/tabs.js +2 -3
- package/dist/lib/time-picker/time-picker.js +15 -11
- package/dist/lib/video/video.d.ts +1 -1
- package/dist/lib/video/video.js +3 -3
- package/package.json +1 -1
|
@@ -277,15 +277,15 @@ const Select = ({
|
|
|
277
277
|
{ flex: 1, textAlign: "left", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
|
|
278
278
|
getTextCss(rest == null ? void 0 : rest.size)
|
|
279
279
|
],
|
|
280
|
-
children: selectedOption ? /* @__PURE__ */ jsx(Fragment, { children: selectedRenderer ? selectedRenderer(selectedOption) : getOptionLabel(selectedOption) }) : /* @__PURE__ */ jsx(
|
|
280
|
+
children: selectedOption ? /* @__PURE__ */ jsx(Fragment, { children: selectedRenderer ? selectedRenderer(selectedOption) : getOptionLabel(selectedOption) }) : /* @__PURE__ */ jsx(Primitive, { css: { color: getColorVar("neutral.400"), display: "block" }, as: "span", children: placeholder })
|
|
281
281
|
}
|
|
282
282
|
)
|
|
283
283
|
}
|
|
284
284
|
) }),
|
|
285
285
|
/* @__PURE__ */ jsx(FloatingContent, { children: /* @__PURE__ */ jsxs(
|
|
286
|
-
|
|
286
|
+
Primitive,
|
|
287
287
|
{
|
|
288
|
-
|
|
288
|
+
sx: {
|
|
289
289
|
paddingTop: 8,
|
|
290
290
|
paddingBottom: 8,
|
|
291
291
|
border: "1px solid",
|
|
@@ -297,7 +297,7 @@ const Select = ({
|
|
|
297
297
|
backgroundColor: getColorVar("surface.default")
|
|
298
298
|
},
|
|
299
299
|
children: [
|
|
300
|
-
searchable && /* @__PURE__ */ jsx(
|
|
300
|
+
searchable && /* @__PURE__ */ jsx(Primitive, { sx: { paddingLeft: 8, paddingRight: 8, paddingBottom: 12, position: "relative" }, children: /* @__PURE__ */ jsx(
|
|
301
301
|
Input,
|
|
302
302
|
{
|
|
303
303
|
size: rest.size,
|
|
@@ -2,6 +2,7 @@ import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { Step } from "./step.js";
|
|
4
4
|
import { Progress } from "../progress/progress.js";
|
|
5
|
+
import { Primitive } from "../primitive/primitive.js";
|
|
5
6
|
const maxPercent = 100;
|
|
6
7
|
const Stepper = forwardRef((props, ref) => {
|
|
7
8
|
const { direction = "horizontal", items, activeIndex = 0, circleSize = 32, ...rest } = props;
|
|
@@ -49,7 +50,7 @@ const Stepper = forwardRef((props, ref) => {
|
|
|
49
50
|
);
|
|
50
51
|
});
|
|
51
52
|
};
|
|
52
|
-
return /* @__PURE__ */ jsxs(
|
|
53
|
+
return /* @__PURE__ */ jsxs(Primitive, { sx: { position: "relative" }, children: [
|
|
53
54
|
/* @__PURE__ */ jsx(
|
|
54
55
|
Progress,
|
|
55
56
|
{
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ClassNames } from "@emotion/react";
|
|
3
|
+
import { mediaQuery } from "../../theme/screens.js";
|
|
4
|
+
import "../../theme/palette.js";
|
|
5
|
+
const Stylesheet = ({ children }) => {
|
|
6
|
+
return /* @__PURE__ */ jsx(ClassNames, { children: ({ css, cx }) => {
|
|
7
|
+
return children({
|
|
8
|
+
css: (sx = {}) => {
|
|
9
|
+
const { sm, md, lg, ...xs } = sx;
|
|
10
|
+
return css({
|
|
11
|
+
...xs,
|
|
12
|
+
[mediaQuery("sm")]: sm,
|
|
13
|
+
[mediaQuery("md")]: md,
|
|
14
|
+
[mediaQuery("lg")]: lg
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
cx
|
|
18
|
+
});
|
|
19
|
+
} });
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
Stylesheet
|
|
23
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PropsWithSx } from '../../types';
|
|
3
|
+
export type StylesheetChildrenProps = {
|
|
4
|
+
css: (sx?: PropsWithSx['sx']) => string;
|
|
5
|
+
cx: (...classNames: Array<string | undefined | null | false>) => string;
|
|
6
|
+
};
|
|
7
|
+
export type StylesheetProps = {
|
|
8
|
+
children: (props: StylesheetChildrenProps) => ReactNode;
|
|
9
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TableProps } from './types';
|
|
2
|
-
export declare const Table: ({ children, sx, ...props }: TableProps) => import("
|
|
2
|
+
export declare const Table: ({ children, sx, ...props }: TableProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { jsx } from "
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import "lodash-es";
|
|
3
3
|
import { getColorVar } from "../../../theme/palette.js";
|
|
4
|
-
import {
|
|
4
|
+
import { Primitive } from "../../primitive/primitive.js";
|
|
5
5
|
const Table = ({ children, sx, ...props }) => {
|
|
6
6
|
return /* @__PURE__ */ jsx(
|
|
7
|
-
|
|
7
|
+
Primitive,
|
|
8
8
|
{
|
|
9
|
-
|
|
9
|
+
...props,
|
|
10
|
+
sx: {
|
|
10
11
|
width: "100%",
|
|
11
12
|
borderTopLeftRadius: "0.5rem",
|
|
12
13
|
borderTopRightRadius: "0.5rem",
|
|
13
14
|
overflow: "hidden",
|
|
14
15
|
backgroundColor: getColorVar("surface.default"),
|
|
15
16
|
...sx
|
|
16
|
-
}
|
|
17
|
-
|
|
17
|
+
},
|
|
18
|
+
as: "table",
|
|
18
19
|
children
|
|
19
20
|
}
|
|
20
21
|
);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export type TableProps =
|
|
2
|
+
import { PrimitiveProps } from '../../primitive';
|
|
3
|
+
export type TableProps = PrimitiveProps<JSX.IntrinsicElements['table'], 'table'>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TableBodyProps } from './types';
|
|
2
|
-
export declare const TableBody: ({
|
|
2
|
+
export declare const TableBody: ({ children, ref, ...props }: TableBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
import { jsx } from "
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import "lodash-es";
|
|
3
3
|
import { getColorVar } from "../../../theme/palette.js";
|
|
4
|
-
import {
|
|
5
|
-
const TableBody = ({
|
|
4
|
+
import { Primitive } from "../../primitive/primitive.js";
|
|
5
|
+
const TableBody = ({ children, ref, ...props }) => {
|
|
6
6
|
return /* @__PURE__ */ jsx(
|
|
7
|
-
|
|
7
|
+
Primitive,
|
|
8
8
|
{
|
|
9
|
-
css: [
|
|
10
|
-
{
|
|
11
|
-
"& > tr": {
|
|
12
|
-
position: "relative",
|
|
13
|
-
"&::after": {
|
|
14
|
-
content: '""',
|
|
15
|
-
position: "absolute",
|
|
16
|
-
bottom: 0,
|
|
17
|
-
left: 0,
|
|
18
|
-
right: 0,
|
|
19
|
-
borderBottomWidth: 1,
|
|
20
|
-
borderBottomStyle: "solid",
|
|
21
|
-
borderBottomColor: getColorVar("neutral.100")
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
createSxInterpolation(sx)
|
|
26
|
-
],
|
|
27
9
|
...props,
|
|
28
10
|
ref,
|
|
11
|
+
sx: {
|
|
12
|
+
"& > tr": {
|
|
13
|
+
position: "relative",
|
|
14
|
+
"&::after": {
|
|
15
|
+
content: '""',
|
|
16
|
+
position: "absolute",
|
|
17
|
+
bottom: 0,
|
|
18
|
+
left: 0,
|
|
19
|
+
right: 0,
|
|
20
|
+
borderBottomWidth: 1,
|
|
21
|
+
borderBottomStyle: "solid",
|
|
22
|
+
borderBottomColor: getColorVar("neutral.100")
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
...props.sx
|
|
26
|
+
},
|
|
27
|
+
as: "tbody",
|
|
29
28
|
children
|
|
30
29
|
}
|
|
31
30
|
);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PrimitiveProps } from '../../primitive';
|
|
2
2
|
import { JSX } from 'react';
|
|
3
|
-
export type TableBodyProps =
|
|
3
|
+
export type TableBodyProps = PrimitiveProps<JSX.IntrinsicElements['tbody'], 'tbody'>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TableFooterProps } from './types';
|
|
2
|
-
export declare const TableFooter: ({
|
|
2
|
+
export declare const TableFooter: ({ children, ...props }: TableFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx } from "
|
|
2
|
-
import {
|
|
3
|
-
const TableFooter = ({
|
|
4
|
-
return /* @__PURE__ */ jsx(
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Primitive } from "../../primitive/primitive.js";
|
|
3
|
+
const TableFooter = ({ children, ...props }) => {
|
|
4
|
+
return /* @__PURE__ */ jsx(Primitive, { ...props, as: "tfoot", children });
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
TableFooter
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export type TableFooterProps =
|
|
2
|
+
import { PrimitiveProps } from '../../primitive';
|
|
3
|
+
export type TableFooterProps = PrimitiveProps<JSX.IntrinsicElements['tfoot'], 'tfoot'>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TableHeadProps } from './types';
|
|
2
|
-
export declare const TableHead: ({ sx, children, ...props }: TableHeadProps) => import("
|
|
2
|
+
export declare const TableHead: ({ sx, children, ...props }: TableHeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import { jsx } from "
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import "lodash-es";
|
|
3
3
|
import { getColorVar } from "../../../theme/palette.js";
|
|
4
|
-
import {
|
|
4
|
+
import { Primitive } from "../../primitive/primitive.js";
|
|
5
5
|
const TableHead = ({ sx, children, ...props }) => {
|
|
6
6
|
return /* @__PURE__ */ jsx(
|
|
7
|
-
|
|
7
|
+
Primitive,
|
|
8
8
|
{
|
|
9
|
-
css: [
|
|
10
|
-
{
|
|
11
|
-
position: "relative",
|
|
12
|
-
fontWeight: 500,
|
|
13
|
-
"&::after": {
|
|
14
|
-
content: '""',
|
|
15
|
-
position: "absolute",
|
|
16
|
-
bottom: 0,
|
|
17
|
-
left: 0,
|
|
18
|
-
right: 0,
|
|
19
|
-
borderTopWidth: 1,
|
|
20
|
-
borderTopStyle: "solid",
|
|
21
|
-
borderTopColor: getColorVar("neutral.200")
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
createSxInterpolation(sx)
|
|
25
|
-
],
|
|
26
9
|
...props,
|
|
10
|
+
sx: {
|
|
11
|
+
position: "relative",
|
|
12
|
+
fontWeight: 500,
|
|
13
|
+
":after": {
|
|
14
|
+
content: '""',
|
|
15
|
+
position: "absolute",
|
|
16
|
+
bottom: 0,
|
|
17
|
+
left: 0,
|
|
18
|
+
right: 0,
|
|
19
|
+
borderTopWidth: 1,
|
|
20
|
+
borderTopStyle: "solid",
|
|
21
|
+
borderTopColor: getColorVar("neutral.200")
|
|
22
|
+
},
|
|
23
|
+
...sx
|
|
24
|
+
},
|
|
25
|
+
as: "thead",
|
|
27
26
|
children
|
|
28
27
|
}
|
|
29
28
|
);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PrimitiveProps } from '../../primitive';
|
|
2
2
|
import { JSX } from 'react';
|
|
3
|
-
export type TableHeadProps =
|
|
3
|
+
export type TableHeadProps = PrimitiveProps<JSX.IntrinsicElements['thead'], 'thead'>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const TabIndicator: () => import("
|
|
1
|
+
export declare const TabIndicator: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx } from "
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useRef, useState, useEffect } from "react";
|
|
3
3
|
import { motion } from "motion/react";
|
|
4
|
-
import {
|
|
4
|
+
import { Stylesheet } from "../../stylesheet/stylesheet.js";
|
|
5
5
|
import { useTabsContext } from "../tabs/helpers.js";
|
|
6
6
|
const TabIndicator = () => {
|
|
7
7
|
const { activeIndex, tabIndicatorProps } = useTabsContext();
|
|
@@ -53,7 +53,7 @@ const TabIndicator = () => {
|
|
|
53
53
|
resizeObserver.disconnect();
|
|
54
54
|
};
|
|
55
55
|
}, [activeTabElement]);
|
|
56
|
-
return /* @__PURE__ */ jsx(
|
|
56
|
+
return /* @__PURE__ */ jsx(Stylesheet, { children: ({ css }) => /* @__PURE__ */ jsx(
|
|
57
57
|
motion.div,
|
|
58
58
|
{
|
|
59
59
|
initial: {
|
|
@@ -65,18 +65,16 @@ const TabIndicator = () => {
|
|
|
65
65
|
transform: `translateX(${indicatorRect.left}px)`
|
|
66
66
|
},
|
|
67
67
|
ref: indicatorEl,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
createSxInterpolation(tabIndicatorProps == null ? void 0 : tabIndicatorProps.sx)
|
|
77
|
-
]
|
|
68
|
+
className: css({
|
|
69
|
+
position: "absolute",
|
|
70
|
+
bottom: 0,
|
|
71
|
+
left: 0,
|
|
72
|
+
backgroundColor: "currentcolor",
|
|
73
|
+
borderRadius: 8,
|
|
74
|
+
...tabIndicatorProps == null ? void 0 : tabIndicatorProps.sx
|
|
75
|
+
})
|
|
78
76
|
}
|
|
79
|
-
);
|
|
77
|
+
) });
|
|
80
78
|
};
|
|
81
79
|
export {
|
|
82
80
|
TabIndicator
|
|
@@ -2,11 +2,10 @@ import { jsx } from "@emotion/react/jsx-runtime";
|
|
|
2
2
|
import { useRef, useMemo } from "react";
|
|
3
3
|
import { getTabsProps, TabsContext } from "./helpers.js";
|
|
4
4
|
import { useControllableState } from "../../../hooks/use-controllable-state.js";
|
|
5
|
-
import {
|
|
5
|
+
import { Primitive } from "../../primitive/primitive.js";
|
|
6
6
|
const Tabs = ({ ref, children, ..._props }) => {
|
|
7
7
|
const {
|
|
8
8
|
defaultActiveIndex,
|
|
9
|
-
sx,
|
|
10
9
|
activeIndex,
|
|
11
10
|
onTabChange,
|
|
12
11
|
tabProps,
|
|
@@ -35,7 +34,7 @@ const Tabs = ({ ref, children, ..._props }) => {
|
|
|
35
34
|
preventActiveTabChange
|
|
36
35
|
};
|
|
37
36
|
}, [activeTabIndex, tabProps, tabIndicatorProps, tabPanelProps, preventActiveTabChange, setActiveTabIndex]);
|
|
38
|
-
return /* @__PURE__ */ jsx(TabsContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
|
|
37
|
+
return /* @__PURE__ */ jsx(TabsContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(Primitive, { ...rest, ref, children }) });
|
|
39
38
|
};
|
|
40
39
|
export {
|
|
41
40
|
Tabs
|
|
@@ -4,13 +4,13 @@ import dayjs from "dayjs";
|
|
|
4
4
|
import { isNil, uniqueId } from "lodash-es";
|
|
5
5
|
import { useWindowScreen } from "../../hooks/use-window-screen/index.js";
|
|
6
6
|
import { useControllableState } from "../../hooks/use-controllable-state.js";
|
|
7
|
-
import { getResponsiveProp, getSizeVariantState } from "../../utils/index.js";
|
|
7
|
+
import { getResponsiveProp, getSizeVariantState, getColorShadesByVariant } from "../../utils/index.js";
|
|
8
8
|
import { VirtualizedList } from "../../components/virtualized-list.js";
|
|
9
9
|
import CloseIcon from "../../assets/svg/times-close-delete.svg.js";
|
|
10
10
|
import ClockIcon from "../../assets/svg/clock-time.svg.js";
|
|
11
11
|
import { getColorVar } from "../../theme/palette.js";
|
|
12
12
|
import { getTypographyVar } from "../../theme/typography.js";
|
|
13
|
-
import {
|
|
13
|
+
import { Primitive } from "../primitive/primitive.js";
|
|
14
14
|
import { Floating } from "../floating/floating/floating.js";
|
|
15
15
|
import { FloatingTrigger } from "../floating/floating-trigger/floating-trigger.js";
|
|
16
16
|
import { FloatingContent } from "../floating/floating-content/floating-content.js";
|
|
@@ -223,12 +223,16 @@ const TimePicker = ({
|
|
|
223
223
|
}
|
|
224
224
|
);
|
|
225
225
|
};
|
|
226
|
-
const { sx: containerSx, ...restContainerProps } = containerProps ?? {};
|
|
227
226
|
return /* @__PURE__ */ jsx(
|
|
228
|
-
|
|
227
|
+
Primitive,
|
|
229
228
|
{
|
|
230
|
-
...
|
|
231
|
-
|
|
229
|
+
...containerProps,
|
|
230
|
+
sx: {
|
|
231
|
+
display: "flex",
|
|
232
|
+
flexDirection: "column",
|
|
233
|
+
width: "100%",
|
|
234
|
+
...containerProps == null ? void 0 : containerProps.sx
|
|
235
|
+
},
|
|
232
236
|
children: /* @__PURE__ */ jsxs(
|
|
233
237
|
Floating,
|
|
234
238
|
{
|
|
@@ -244,15 +248,15 @@ const TimePicker = ({
|
|
|
244
248
|
onOpenChange: prehandleOpenChange,
|
|
245
249
|
ref: floatingRef,
|
|
246
250
|
children: [
|
|
247
|
-
/* @__PURE__ */ jsx(FloatingTrigger, { children: /* @__PURE__ */ jsxs(
|
|
248
|
-
!selectedDate && !!placeholder && /* @__PURE__ */ jsx(
|
|
251
|
+
/* @__PURE__ */ jsx(FloatingTrigger, { children: /* @__PURE__ */ jsxs(Primitive, { sx, children: [
|
|
252
|
+
!selectedDate && !!placeholder && /* @__PURE__ */ jsx(Primitive, { sx: { color: getColorShadesByVariant("neutral").placeholder }, as: "span", children: placeholder }),
|
|
249
253
|
!!selectedDate && /* @__PURE__ */ jsx("span", { children: dayjs(selectedDate).format(TIME_FORMAT) }),
|
|
250
254
|
getIcon()
|
|
251
255
|
] }) }),
|
|
252
256
|
/* @__PURE__ */ jsx(FloatingContent, { children: /* @__PURE__ */ jsx(
|
|
253
|
-
|
|
257
|
+
Primitive,
|
|
254
258
|
{
|
|
255
|
-
|
|
259
|
+
sx: {
|
|
256
260
|
paddingTop: "0.5rem",
|
|
257
261
|
paddingBottom: "0.5rem",
|
|
258
262
|
borderWidth: 1,
|
|
@@ -261,7 +265,7 @@ const TimePicker = ({
|
|
|
261
265
|
boxShadow: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
|
|
262
266
|
fontSize: getTypographyVar("sm").fontSize,
|
|
263
267
|
lineHeight: getTypographyVar("sm").lineHeight,
|
|
264
|
-
backgroundColor: "
|
|
268
|
+
backgroundColor: getColorVar("surface.default")
|
|
265
269
|
},
|
|
266
270
|
children: portalContentRenderer()
|
|
267
271
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { VideoProps } from './types';
|
|
2
|
-
export declare const Video: ({ ref, ..._props }: VideoProps) => import("
|
|
2
|
+
export declare const Video: ({ ref, ..._props }: VideoProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/lib/video/video.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx } from "
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import ReactPlayer from "react-player";
|
|
3
3
|
import { getVideoProps } from "./helpers.js";
|
|
4
|
-
import {
|
|
4
|
+
import { Stylesheet } from "../stylesheet/stylesheet.js";
|
|
5
5
|
const Video = ({ ref, ..._props }) => {
|
|
6
6
|
const { sx, ...rest } = getVideoProps(_props);
|
|
7
|
-
return /* @__PURE__ */ jsx(
|
|
7
|
+
return /* @__PURE__ */ jsx(Stylesheet, { children: ({ cx, css }) => /* @__PURE__ */ jsx(ReactPlayer, { width: "", height: "", ref, ...rest, className: cx(css(sx), rest.className) }) });
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
10
|
Video
|