@janbox/storefront-ui 4.0.7 → 4.0.8
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/components/scroll-view.d.ts +3 -2
- package/dist/components/scroll-view.js +5 -3
- package/dist/components/virtualized-list.d.ts +3 -3
- package/dist/lib/accordion/accordion-content/accordion-content.js +1 -1
- package/dist/lib/button/button.js +2 -2
- package/dist/lib/cascader/cascader-floating-content.d.ts +1 -1
- package/dist/lib/cascader/cascader-floating-content.js +52 -73
- package/dist/lib/cascader/cascader.d.ts +1 -1
- package/dist/lib/cascader/cascader.js +10 -12
- package/dist/lib/collapse/collapse.d.ts +1 -1
- package/dist/lib/collapse/collapse.js +12 -4
- package/dist/lib/collapse/types.d.ts +3 -3
- package/dist/lib/count-up/README.md +22 -0
- package/dist/lib/count-up/count-up.d.ts +1 -1
- package/dist/lib/count-up/count-up.js +22 -5
- package/dist/lib/count-up/types.d.ts +9 -3
- package/dist/lib/date-picker/date-picker.js +25 -10
- package/dist/lib/dialog/dialog/dialog.d.ts +1 -1
- package/dist/lib/dialog/dialog/dialog.js +25 -28
- package/dist/lib/dialog/dialog-body/dialog-body.d.ts +1 -1
- package/dist/lib/dialog/dialog-body/dialog-body.js +10 -11
- package/dist/lib/dialog/dialog-body/types.d.ts +2 -3
- package/dist/lib/dialog/dialog-close/dialog-close.d.ts +1 -1
- package/dist/lib/dialog/dialog-footer/dialog-footer.js +2 -3
- package/dist/lib/dialog/dialog-header/dialog-header.d.ts +1 -1
- package/dist/lib/dialog/dialog-header/dialog-header.js +24 -27
- package/dist/lib/drawer/drawer/drawer.d.ts +1 -1
- package/dist/lib/drawer/drawer/drawer.js +39 -26
- package/dist/lib/drawer/drawer-close/drawer-close.d.ts +1 -1
- package/dist/lib/filter-panel/checkbox-filter-panel.d.ts +1 -1
- package/dist/lib/filter-panel/checkbox-filter-panel.js +2 -2
- package/dist/lib/filter-panel/filter-panel.d.ts +1 -1
- package/dist/lib/filter-panel/filter-panel.js +30 -15
- package/dist/lib/filter-panel/radio-filter-panel.d.ts +1 -1
- package/dist/lib/filter-panel/radio-filter-panel.js +3 -3
- package/dist/lib/floating/floating-close/floating-close.d.ts +1 -1
- package/dist/lib/floating/floating-close/floating-close.js +3 -2
- package/dist/lib/floating/floating-content/floating-content.d.ts +1 -1
- package/dist/lib/floating/floating-content/floating-content.js +8 -6
- package/dist/lib/form-label/form-label.d.ts +4 -3
- package/dist/lib/form-label/form-label.js +10 -8
- package/dist/lib/highlight-words/highlight-words.d.ts +1 -1
- package/dist/lib/highlight-words/highlight-words.js +3 -2
- package/dist/lib/input/input.js +1 -3
- package/dist/lib/lightbox/lightbox.d.ts +1 -1
- package/dist/lib/lightbox/lightbox.js +44 -32
- package/dist/lib/linear-progress/linear-progress.d.ts +1 -1
- package/dist/lib/linear-progress/linear-progress.js +50 -51
- package/dist/lib/loading/image-skeleton/image-skeleton.d.ts +1 -1
- package/dist/lib/loading/image-skeleton/image-skeleton.js +9 -4
- package/dist/lib/loading/loading-overlay/loading-overlay.d.ts +1 -1
- package/dist/lib/loading/loading-overlay/loading-overlay.js +2 -2
- package/dist/lib/menu/menu-item/menu-item.d.ts +1 -1
- package/dist/lib/menu/menu-item/menu-item.js +2 -2
- package/dist/lib/multiple-select/multiple-select.d.ts +1 -1
- package/dist/lib/multiple-select/multiple-select.js +38 -39
- package/dist/lib/notifications/notifications.d.ts +1 -1
- package/dist/lib/notifications/notifications.js +7 -7
- package/dist/lib/otp-input/otp-input.d.ts +1 -1
- package/dist/lib/otp-input/otp-input.js +43 -30
- package/dist/lib/pagination/pagination.d.ts +1 -1
- package/dist/lib/pagination/pagination.js +60 -54
- package/dist/lib/phone-input/phone-input.js +12 -11
- package/dist/lib/popover/popover-close/popover-close.d.ts +1 -1
- package/dist/lib/progress/progress.d.ts +1 -1
- package/dist/lib/progress/progress.js +26 -29
- package/dist/lib/progress/types.d.ts +5 -4
- package/dist/lib/select/select.js +15 -11
- package/dist/lib/star-rating/README.md +11 -3
- package/dist/lib/star-rating/star-rating.d.ts +1 -1
- package/dist/lib/star-rating/star-rating.js +40 -28
- package/dist/lib/star-rating/types.d.ts +3 -4
- package/dist/lib/stepper/step.js +8 -6
- package/dist/lib/stepper/stepper.d.ts +1 -1
- package/dist/lib/stepper/stepper.js +10 -9
- package/dist/lib/stepper/types.d.ts +2 -1
- package/dist/lib/swiper/swiper-dots-paging/swiper-dots-paging.d.ts +1 -1
- package/dist/lib/swiper/swiper-dots-paging/swiper-dots-paging.js +8 -7
- package/dist/lib/tabs/tab-indicator/tab-indicator.js +1 -1
- package/dist/lib/tabs/tabs/tabs.d.ts +1 -1
- package/dist/lib/tabs/tabs/tabs.js +1 -1
- package/dist/lib/time-picker/time-picker.js +16 -22
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { jsx, jsxs } from "
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getDialogProps, getDialogSizeInNumber } from "./helpers.js";
|
|
3
3
|
import { FLOATING_Z_INDEX } from "../../../theme/index.js";
|
|
4
4
|
import { Floating } from "../../floating/floating/floating.js";
|
|
5
5
|
import { FloatingContent } from "../../floating/floating-content/floating-content.js";
|
|
6
|
+
import { Primitive } from "../../primitive/primitive.js";
|
|
6
7
|
import { getColorVar } from "../../../theme/palette.js";
|
|
7
8
|
import { mediaQuery } from "../../../theme/screens.js";
|
|
8
9
|
const Dialog = (_props) => {
|
|
@@ -31,7 +32,7 @@ const Dialog = (_props) => {
|
|
|
31
32
|
zIndex: FLOATING_Z_INDEX
|
|
32
33
|
}
|
|
33
34
|
},
|
|
34
|
-
|
|
35
|
+
sx: {
|
|
35
36
|
maxHeight: "100%",
|
|
36
37
|
maxWidth: "100%",
|
|
37
38
|
overflow: "hidden",
|
|
@@ -40,9 +41,9 @@ const Dialog = (_props) => {
|
|
|
40
41
|
},
|
|
41
42
|
children: [
|
|
42
43
|
/* @__PURE__ */ jsx(
|
|
43
|
-
|
|
44
|
+
Primitive,
|
|
44
45
|
{
|
|
45
|
-
|
|
46
|
+
sx: {
|
|
46
47
|
backdropFilter: "blur(2px)",
|
|
47
48
|
position: "fixed",
|
|
48
49
|
inset: 0,
|
|
@@ -52,33 +53,29 @@ const Dialog = (_props) => {
|
|
|
52
53
|
}
|
|
53
54
|
),
|
|
54
55
|
/* @__PURE__ */ jsx(
|
|
55
|
-
|
|
56
|
+
Primitive,
|
|
56
57
|
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
58
|
+
sx: {
|
|
59
|
+
width: getDialogSizeInNumber(size),
|
|
60
|
+
backgroundColor: getColorVar("surface.default"),
|
|
61
|
+
maxWidth: "100%",
|
|
62
|
+
overflow: "hidden",
|
|
63
|
+
display: "flex",
|
|
64
|
+
flexDirection: "column",
|
|
65
|
+
borderRadius: "0.5rem",
|
|
66
|
+
paddingTop: "0.5rem",
|
|
67
|
+
paddingBottom: "0.5rem",
|
|
68
|
+
position: "relative",
|
|
69
|
+
sm: {
|
|
70
|
+
width: getDialogSizeInNumber(sm == null ? void 0 : sm.size)
|
|
69
71
|
},
|
|
70
|
-
{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
width: getDialogSizeInNumber(md == null ? void 0 : md.size)
|
|
76
|
-
},
|
|
77
|
-
[mediaQuery("lg")]: {
|
|
78
|
-
width: getDialogSizeInNumber(lg == null ? void 0 : lg.size)
|
|
79
|
-
}
|
|
72
|
+
md: {
|
|
73
|
+
width: getDialogSizeInNumber(md == null ? void 0 : md.size)
|
|
74
|
+
},
|
|
75
|
+
lg: {
|
|
76
|
+
width: getDialogSizeInNumber(lg == null ? void 0 : lg.size)
|
|
80
77
|
}
|
|
81
|
-
|
|
78
|
+
},
|
|
82
79
|
children
|
|
83
80
|
}
|
|
84
81
|
)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DialogBodyProps } from './types';
|
|
2
|
-
export declare const DialogBody: (props: DialogBodyProps) => import("
|
|
2
|
+
export declare const DialogBody: (props: DialogBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { jsx } from "
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ScrollView } from "../../../components/scroll-view.js";
|
|
3
|
-
import { mediaQuery } from "../../../theme/screens.js";
|
|
4
|
-
import "../../../theme/palette.js";
|
|
5
3
|
const DialogBody = (props) => {
|
|
4
|
+
var _a;
|
|
6
5
|
return /* @__PURE__ */ jsx(
|
|
7
6
|
ScrollView,
|
|
8
7
|
{
|
|
9
|
-
|
|
8
|
+
...props,
|
|
9
|
+
sx: {
|
|
10
10
|
flex: "1 1 0%",
|
|
11
11
|
paddingTop: "0.5rem",
|
|
12
12
|
paddingBottom: "0.5rem",
|
|
13
13
|
overflow: "auto",
|
|
14
|
-
"&:first-of-type": { paddingTop:
|
|
15
|
-
"&:last-of-type": { paddingBottom:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
...props
|
|
14
|
+
"&:first-of-type": { paddingTop: 12 },
|
|
15
|
+
"&:last-of-type": { paddingBottom: 12 },
|
|
16
|
+
paddingInline: 16,
|
|
17
|
+
...props.sx,
|
|
18
|
+
md: { paddingInline: 20, ...(_a = props.sx) == null ? void 0 : _a.md }
|
|
19
|
+
}
|
|
21
20
|
}
|
|
22
21
|
);
|
|
23
22
|
};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { ScrollViewProps } from '../../../components';
|
|
2
|
-
|
|
3
|
-
export type DialogBodyProps = ShallowMerge<ScrollViewProps, {}>;
|
|
1
|
+
import { ScrollViewProps } from '../../../components/scroll-view';
|
|
2
|
+
export type DialogBodyProps = ScrollViewProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const DialogClose: ({ event, reason, ref, ...props }: import('../../floating').FloatingCloseProps) => import("
|
|
1
|
+
export declare const DialogClose: ({ event, reason, ref, ...props }: import('../../floating').FloatingCloseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,11 +10,10 @@ const DialogFooter = ({ sx, ...props }) => {
|
|
|
10
10
|
gap: 8,
|
|
11
11
|
paddingTop: 8,
|
|
12
12
|
paddingBottom: 8,
|
|
13
|
-
|
|
14
|
-
paddingRight: 16,
|
|
13
|
+
paddingInline: 16,
|
|
15
14
|
position: "relative",
|
|
16
15
|
...sx,
|
|
17
|
-
|
|
16
|
+
md: { paddingInline: 20, gap: 12, ...sx == null ? void 0 : sx.md }
|
|
18
17
|
},
|
|
19
18
|
...props
|
|
20
19
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DialogHeaderProps } from './types';
|
|
2
|
-
export declare const DialogHeader: ({ children, closeable, ...props }: DialogHeaderProps) => import("
|
|
2
|
+
export declare const DialogHeader: ({ children, closeable, ...props }: DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,46 +1,43 @@
|
|
|
1
|
-
import { jsxs, jsx } from "
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import CloseIcon from "../../../assets/svg/times-close-delete.svg.js";
|
|
3
|
-
import
|
|
3
|
+
import "lodash-es";
|
|
4
4
|
import "../../../theme/palette.js";
|
|
5
5
|
import { getTypographyVar } from "../../../theme/typography.js";
|
|
6
6
|
import { DialogClose } from "../dialog-close/dialog-close.js";
|
|
7
|
+
import { Primitive } from "../../primitive/primitive.js";
|
|
7
8
|
import { IconButton } from "../../icon-button/icon-button.js";
|
|
8
9
|
const DialogHeader = ({ children, closeable = true, ...props }) => {
|
|
9
10
|
return /* @__PURE__ */ jsxs(
|
|
10
|
-
|
|
11
|
+
Primitive,
|
|
11
12
|
{
|
|
12
|
-
css: [
|
|
13
|
-
{
|
|
14
|
-
paddingTop: "0.5rem",
|
|
15
|
-
paddingBottom: "0.5rem",
|
|
16
|
-
paddingLeft: "1rem",
|
|
17
|
-
paddingRight: "1rem",
|
|
18
|
-
gap: "0.5rem",
|
|
19
|
-
position: "relative",
|
|
20
|
-
fontSize: getTypographyVar("lg").fontSize,
|
|
21
|
-
lineHeight: getTypographyVar("lg").lineHeight,
|
|
22
|
-
fontWeight: 500,
|
|
23
|
-
[mediaQuery("sm")]: {
|
|
24
|
-
paddingLeft: "1.25rem",
|
|
25
|
-
paddingRight: "1.25rem",
|
|
26
|
-
fontSize: getTypographyVar("xl").fontSize,
|
|
27
|
-
lineHeight: getTypographyVar("xl").lineHeight
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
closeable && { paddingRight: "3rem" }
|
|
31
|
-
],
|
|
32
13
|
...props,
|
|
14
|
+
sx: {
|
|
15
|
+
paddingLeft: 16,
|
|
16
|
+
paddingRight: closeable ? 48 : 20,
|
|
17
|
+
paddingBlock: 8,
|
|
18
|
+
gap: 8,
|
|
19
|
+
position: "relative",
|
|
20
|
+
fontSize: getTypographyVar("lg").fontSize,
|
|
21
|
+
lineHeight: getTypographyVar("lg").lineHeight,
|
|
22
|
+
fontWeight: 500,
|
|
23
|
+
md: {
|
|
24
|
+
paddingLeft: 20,
|
|
25
|
+
paddingRight: closeable ? 52 : 20,
|
|
26
|
+
fontSize: getTypographyVar("xl").fontSize,
|
|
27
|
+
lineHeight: getTypographyVar("xl").lineHeight
|
|
28
|
+
}
|
|
29
|
+
},
|
|
33
30
|
children: [
|
|
34
31
|
children,
|
|
35
32
|
closeable && /* @__PURE__ */ jsx(DialogClose, { children: /* @__PURE__ */ jsx(
|
|
36
|
-
|
|
33
|
+
Primitive,
|
|
37
34
|
{
|
|
38
|
-
|
|
35
|
+
sx: {
|
|
39
36
|
position: "absolute",
|
|
40
|
-
right:
|
|
37
|
+
right: 8,
|
|
41
38
|
top: "50%",
|
|
42
39
|
transform: "translateY(-50%)",
|
|
43
|
-
|
|
40
|
+
md: { right: 12 }
|
|
44
41
|
},
|
|
45
42
|
children: /* @__PURE__ */ jsx(
|
|
46
43
|
IconButton,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DrawerProps } from './types';
|
|
2
|
-
export declare const Drawer: ({ children, placement, ...props }: DrawerProps) => import("
|
|
2
|
+
export declare const Drawer: ({ children, placement, ...props }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { jsx, jsxs } from "
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { motion } from "motion/react";
|
|
4
4
|
import { FLOATING_Z_INDEX } from "../../../theme/index.js";
|
|
5
5
|
import { Floating } from "../../floating/floating/floating.js";
|
|
6
6
|
import { FloatingContent } from "../../floating/floating-content/floating-content.js";
|
|
7
|
+
import { Primitive } from "../../primitive/primitive.js";
|
|
8
|
+
import { Stylesheet } from "../../stylesheet/stylesheet.js";
|
|
7
9
|
const Drawer = ({ children, placement = "left", ...props }) => {
|
|
8
10
|
const initial = useMemo(() => {
|
|
9
11
|
switch (placement) {
|
|
@@ -44,7 +46,7 @@ const Drawer = ({ children, placement = "left", ...props }) => {
|
|
|
44
46
|
zIndex: FLOATING_Z_INDEX
|
|
45
47
|
}
|
|
46
48
|
},
|
|
47
|
-
|
|
49
|
+
sx: {
|
|
48
50
|
maxHeight: "100%",
|
|
49
51
|
maxWidth: "100%",
|
|
50
52
|
overflow: "hidden",
|
|
@@ -53,9 +55,9 @@ const Drawer = ({ children, placement = "left", ...props }) => {
|
|
|
53
55
|
},
|
|
54
56
|
children: [
|
|
55
57
|
/* @__PURE__ */ jsx(
|
|
56
|
-
|
|
58
|
+
Primitive,
|
|
57
59
|
{
|
|
58
|
-
|
|
60
|
+
sx: {
|
|
59
61
|
position: "fixed",
|
|
60
62
|
top: 0,
|
|
61
63
|
right: 0,
|
|
@@ -66,29 +68,40 @@ const Drawer = ({ children, placement = "left", ...props }) => {
|
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
),
|
|
69
|
-
/* @__PURE__ */ jsx(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
71
|
+
/* @__PURE__ */ jsx(Stylesheet, { children: ({ css }) => {
|
|
72
|
+
const placementStyle = (() => {
|
|
73
|
+
switch (placement) {
|
|
74
|
+
case "left":
|
|
75
|
+
return { top: 0, bottom: 0, left: 0 };
|
|
76
|
+
case "right":
|
|
77
|
+
return { top: 0, bottom: 0, right: 0 };
|
|
78
|
+
case "top":
|
|
79
|
+
return { left: 0, right: 0, top: 0 };
|
|
80
|
+
case "bottom":
|
|
81
|
+
return { left: 0, right: 0, bottom: 0 };
|
|
82
|
+
default:
|
|
83
|
+
return {};
|
|
84
|
+
}
|
|
85
|
+
})();
|
|
86
|
+
return /* @__PURE__ */ jsx(
|
|
87
|
+
motion.div,
|
|
88
|
+
{
|
|
89
|
+
initial,
|
|
90
|
+
animate,
|
|
91
|
+
exit: initial,
|
|
92
|
+
transition: {
|
|
93
|
+
duration: 0.2,
|
|
94
|
+
ease: "easeInOut"
|
|
83
95
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
96
|
+
className: css({
|
|
97
|
+
position: "fixed",
|
|
98
|
+
backgroundColor: "white",
|
|
99
|
+
...placementStyle
|
|
100
|
+
}),
|
|
101
|
+
children
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
} })
|
|
92
105
|
]
|
|
93
106
|
}
|
|
94
107
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const DrawerClose: ({ event, reason, ref, ...props }: import('../../floating').FloatingCloseProps) => import("
|
|
1
|
+
export declare const DrawerClose: ({ event, reason, ref, ...props }: import('../../floating').FloatingCloseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CheckboxFilterPanelProps } from './types';
|
|
2
|
-
export declare const CheckboxFilterPanel: ({ value, options, inputSearchProps: _inputSearchProps, onChange, queryParam, name, listProps, }: CheckboxFilterPanelProps) => import("
|
|
2
|
+
export declare const CheckboxFilterPanel: ({ value, options, inputSearchProps: _inputSearchProps, onChange, queryParam, name, listProps, }: CheckboxFilterPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx } from "
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useMemo } from "react";
|
|
3
3
|
import { trimStart } from "lodash-es";
|
|
4
4
|
import { VirtualizedList } from "../../components/virtualized-list.js";
|
|
@@ -96,7 +96,7 @@ const CheckboxFilterPanel = ({
|
|
|
96
96
|
maxHeight: ROW_HEIGHT * DISPLAY_ROW_COUNT,
|
|
97
97
|
...listProps == null ? void 0 : listProps.style
|
|
98
98
|
},
|
|
99
|
-
|
|
99
|
+
sx: { paddingInline: 8 },
|
|
100
100
|
...listProps
|
|
101
101
|
}
|
|
102
102
|
)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FilterPanelProps } from './types';
|
|
2
|
-
export declare const FilterPanel: ({ label, defaultOpen, ...props }: FilterPanelProps) => import("
|
|
2
|
+
export declare const FilterPanel: ({ label, defaultOpen, ...props }: FilterPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx, Fragment } from "
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { isValidElement } from "react";
|
|
3
3
|
import { useToggle } from "../../hooks/use-toggle/index.js";
|
|
4
4
|
import { CheckboxFilterPanel } from "./checkbox-filter-panel.js";
|
|
@@ -7,23 +7,38 @@ import { InputTextFilterPanel } from "./input-text-filter-panel.js";
|
|
|
7
7
|
import { RadioFilterPanel } from "./radio-filter-panel.js";
|
|
8
8
|
import ArrowDownIcon from "../../assets/svg/arrow-down.svg.js";
|
|
9
9
|
import { Collapse } from "../collapse/collapse.js";
|
|
10
|
+
import { Primitive } from "../primitive/primitive.js";
|
|
10
11
|
import { Icon } from "../icon/icon.js";
|
|
11
12
|
const FilterPanel = ({ label, defaultOpen = true, ...props }) => {
|
|
12
13
|
const [open, toggle] = useToggle(defaultOpen);
|
|
13
|
-
return /* @__PURE__ */ jsxs(
|
|
14
|
-
/* @__PURE__ */ jsxs(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
return /* @__PURE__ */ jsxs(Primitive, { sx: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
15
|
+
/* @__PURE__ */ jsxs(
|
|
16
|
+
Primitive,
|
|
17
|
+
{
|
|
18
|
+
role: "button",
|
|
19
|
+
sx: { display: "flex", alignItems: "center", gap: 8, textAlign: "left" },
|
|
20
|
+
onClick: toggle,
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ jsx(
|
|
23
|
+
Primitive,
|
|
24
|
+
{
|
|
25
|
+
sx: { flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", fontWeight: 500 },
|
|
26
|
+
children: isValidElement(label) ? label : /* @__PURE__ */ jsx("span", { children: label })
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
Icon,
|
|
31
|
+
{
|
|
32
|
+
sx: {
|
|
33
|
+
transition: "transform 150ms",
|
|
34
|
+
...open ? { transform: "rotate(-180deg)" } : {}
|
|
35
|
+
},
|
|
36
|
+
source: ArrowDownIcon
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
),
|
|
27
42
|
/* @__PURE__ */ jsx(Collapse, { open, children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
28
43
|
props.fieldType === "checkbox" && /* @__PURE__ */ jsx(CheckboxFilterPanel, { ...props }),
|
|
29
44
|
props.fieldType === "radio" && /* @__PURE__ */ jsx(RadioFilterPanel, { ...props }),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RadioFilterPanelProps } from './types';
|
|
2
|
-
export declare const RadioFilterPanel: ({ options, inputSearchProps: _inputSearchProps, value, onChange, queryParam, fallbackValue, }: RadioFilterPanelProps) => import("
|
|
2
|
+
export declare const RadioFilterPanel: ({ options, inputSearchProps: _inputSearchProps, value, onChange, queryParam, fallbackValue, }: RadioFilterPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx } from "
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useId, useState, useMemo } from "react";
|
|
3
3
|
import { trimStart, isNil } from "lodash-es";
|
|
4
4
|
import { VirtualizedList } from "../../components/virtualized-list.js";
|
|
@@ -61,7 +61,7 @@ const RadioFilterPanel = ({
|
|
|
61
61
|
}
|
|
62
62
|
onChange == null ? void 0 : onChange(e);
|
|
63
63
|
};
|
|
64
|
-
return /* @__PURE__ */ jsx(
|
|
64
|
+
return /* @__PURE__ */ jsx(Primitive, { sx: { paddingBlock: 4 }, children: /* @__PURE__ */ jsx(
|
|
65
65
|
RadioButton,
|
|
66
66
|
{
|
|
67
67
|
name: uniqueId,
|
|
@@ -77,7 +77,7 @@ const RadioFilterPanel = ({
|
|
|
77
77
|
/* @__PURE__ */ jsx(
|
|
78
78
|
VirtualizedList,
|
|
79
79
|
{
|
|
80
|
-
|
|
80
|
+
sx: { paddingInline: 8 },
|
|
81
81
|
options: {
|
|
82
82
|
count: displayOptions.length,
|
|
83
83
|
estimateSize: () => ROW_HEIGHT
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FloatingCloseProps } from './types';
|
|
2
|
-
export declare const FloatingClose: ({ event, reason, ref, ...props }: FloatingCloseProps) => import("
|
|
2
|
+
export declare const FloatingClose: ({ event, reason, ref, ...props }: FloatingCloseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { jsx } from "
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useRef, useEffect } from "react";
|
|
3
3
|
import { useMergeRefs } from "@floating-ui/react";
|
|
4
4
|
import { useFloatingContext } from "../floating/helpers.js";
|
|
5
|
+
import { Primitive } from "../../primitive/primitive.js";
|
|
5
6
|
const FloatingClose = ({ event = "click", reason, ref, ...props }) => {
|
|
6
7
|
const wrapperRef = useRef(null);
|
|
7
8
|
const {
|
|
@@ -19,7 +20,7 @@ const FloatingClose = ({ event = "click", reason, ref, ...props }) => {
|
|
|
19
20
|
wrapperEl.removeEventListener(event, handleEvent);
|
|
20
21
|
};
|
|
21
22
|
}, [event, onOpenChange, reason]);
|
|
22
|
-
return /* @__PURE__ */ jsx(
|
|
23
|
+
return /* @__PURE__ */ jsx(Primitive, { sx: { display: "contents" }, ...props, ref: mergedRefs });
|
|
23
24
|
};
|
|
24
25
|
export {
|
|
25
26
|
FloatingClose
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FloatingContentProps } from './types';
|
|
2
|
-
export declare const FloatingContent: ({ style, floatingPortalProps, floatingFocusManagerProps, floatingOverlayProps, sx, ref, ...props }: FloatingContentProps) => import("
|
|
2
|
+
export declare const FloatingContent: ({ style, floatingPortalProps, floatingFocusManagerProps, floatingOverlayProps, sx, ref, ...props }: FloatingContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx } from "
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMergeRefs, FloatingPortal, FloatingOverlay, FloatingFocusManager } from "@floating-ui/react";
|
|
3
3
|
import { AnimatePresence, motion } from "motion/react";
|
|
4
4
|
import { useFloatingContext } from "../floating/helpers.js";
|
|
5
5
|
import { FLOATING_Z_INDEX } from "../../../theme/index.js";
|
|
6
6
|
import { useIsHydrated } from "../../../hooks/use-is-hydrated/index.js";
|
|
7
|
-
import { createSxInterpolation } from "../../../utils/stylesheet.js";
|
|
8
7
|
import { usePortalContainer } from "../../../theme/provider.js";
|
|
8
|
+
import { Stylesheet } from "../../stylesheet/stylesheet.js";
|
|
9
9
|
const FloatingContent = ({
|
|
10
10
|
style,
|
|
11
11
|
floatingPortalProps,
|
|
@@ -29,7 +29,7 @@ const FloatingContent = ({
|
|
|
29
29
|
display: (floatingOverlayProps == null ? void 0 : floatingOverlayProps.disabled) ?? true ? "contents" : void 0,
|
|
30
30
|
...floatingOverlayProps == null ? void 0 : floatingOverlayProps.style
|
|
31
31
|
},
|
|
32
|
-
children: /* @__PURE__ */ jsx(FloatingFocusManager, { disabled: true, context, ...floatingFocusManagerProps, children: /* @__PURE__ */ jsx(
|
|
32
|
+
children: /* @__PURE__ */ jsx(FloatingFocusManager, { disabled: true, context, ...floatingFocusManagerProps, children: /* @__PURE__ */ jsx(Stylesheet, { children: ({ cx, css }) => /* @__PURE__ */ jsx(
|
|
33
33
|
motion.div,
|
|
34
34
|
{
|
|
35
35
|
initial: { opacity: 0 },
|
|
@@ -40,12 +40,14 @@ const FloatingContent = ({
|
|
|
40
40
|
...style,
|
|
41
41
|
zIndex: FLOATING_Z_INDEX
|
|
42
42
|
},
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
...getFloatingProps({
|
|
44
|
+
...props,
|
|
45
|
+
className: cx(css(sx), props.className)
|
|
46
|
+
}),
|
|
45
47
|
ref: mergedRefs,
|
|
46
48
|
children: props.children
|
|
47
49
|
}
|
|
48
|
-
) })
|
|
50
|
+
) }) })
|
|
49
51
|
}
|
|
50
52
|
) }) });
|
|
51
53
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
2
|
import { ShallowMerge } from '../../types';
|
|
3
|
-
|
|
3
|
+
import { PrimitiveProps } from '../primitive';
|
|
4
|
+
export type FormLabelProps = PrimitiveProps<ShallowMerge<JSX.IntrinsicElements['div'], {
|
|
4
5
|
required?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare const FormLabel: ({ required, children, ...props }: FormLabelProps) => import("
|
|
6
|
+
}>>;
|
|
7
|
+
export declare const FormLabel: ({ required, children, ...props }: FormLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import { jsxs, jsx } from "
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { isString } from "lodash-es";
|
|
3
|
-
import { mediaQuery } from "../../theme/screens.js";
|
|
4
3
|
import { getColorVar } from "../../theme/palette.js";
|
|
4
|
+
import { Primitive } from "../primitive/primitive.js";
|
|
5
5
|
const FormLabel = ({ required, children, ...props }) => {
|
|
6
|
+
var _a;
|
|
6
7
|
return /* @__PURE__ */ jsxs(
|
|
7
|
-
|
|
8
|
+
Primitive,
|
|
8
9
|
{
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
...props,
|
|
11
|
+
sx: {
|
|
12
|
+
marginBottom: 6,
|
|
11
13
|
display: "inline-flex",
|
|
12
|
-
|
|
14
|
+
...props.sx,
|
|
15
|
+
md: { marginBottom: 8, ...(_a = props.sx) == null ? void 0 : _a.md }
|
|
13
16
|
},
|
|
14
|
-
...props,
|
|
15
17
|
children: [
|
|
16
18
|
isString(children) ? /* @__PURE__ */ jsx("label", { children }) : children,
|
|
17
|
-
required && /* @__PURE__ */ jsx("span",
|
|
19
|
+
required && /* @__PURE__ */ jsx(Primitive, { as: "span", sx: { color: getColorVar("red.600") }, children: " *" })
|
|
18
20
|
]
|
|
19
21
|
}
|
|
20
22
|
);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { HighlightWordsProps } from './types';
|
|
2
|
-
export declare const HighlightWords: ({ highlightClassName, ...props }: HighlightWordsProps) => import("
|
|
2
|
+
export declare const HighlightWords: ({ highlightClassName, ...props }: HighlightWordsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { jsx } from "
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Fragment } from "react";
|
|
3
3
|
import { findAll } from "highlight-words-core";
|
|
4
|
+
import { Primitive } from "../primitive/primitive.js";
|
|
4
5
|
const HighlightWords = ({ highlightClassName, ...props }) => {
|
|
5
6
|
const chunks = findAll(props);
|
|
6
7
|
return /* @__PURE__ */ jsx(Fragment, { children: chunks.map((chunk, index) => {
|
|
7
8
|
const { end, highlight, start } = chunk;
|
|
8
9
|
const text = props.textToHighlight.substring(start, end);
|
|
9
|
-
return /* @__PURE__ */ jsx(Fragment, { children: highlight ? /* @__PURE__ */ jsx("span",
|
|
10
|
+
return /* @__PURE__ */ jsx(Fragment, { children: highlight ? /* @__PURE__ */ jsx(Primitive, { as: "span", sx: { fontWeight: 500 }, className: highlightClassName, children: text }) : text }, index);
|
|
10
11
|
}) });
|
|
11
12
|
};
|
|
12
13
|
export {
|
package/dist/lib/input/input.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { LightboxProps } from './types';
|
|
2
|
-
export declare const Lightbox: ({ slides, defaultActiveIndex, ...props }: LightboxProps) => import("
|
|
2
|
+
export declare const Lightbox: ({ slides, defaultActiveIndex, ...props }: LightboxProps) => import("react/jsx-runtime").JSX.Element;
|