elseware-ui 2.37.0 → 2.37.1
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/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +27 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1836,10 +1836,13 @@ interface DrawerProps {
|
|
|
1836
1836
|
side?: "left" | "right" | "top" | "bottom";
|
|
1837
1837
|
handleClose: () => void;
|
|
1838
1838
|
styles?: string;
|
|
1839
|
+
backdropStyles?: string;
|
|
1839
1840
|
showBackdrop?: boolean;
|
|
1840
1841
|
closeOnBackdropClick?: boolean;
|
|
1842
|
+
offsetTop?: string;
|
|
1843
|
+
offsetBottom?: string;
|
|
1841
1844
|
}
|
|
1842
|
-
declare const Drawer: ({ children, visibility, side, handleClose, styles, showBackdrop, closeOnBackdropClick, }: DrawerProps) => React__default.JSX.Element;
|
|
1845
|
+
declare const Drawer: ({ children, visibility, side, handleClose, styles, backdropStyles, showBackdrop, closeOnBackdropClick, offsetTop, offsetBottom, }: DrawerProps) => React__default.JSX.Element;
|
|
1843
1846
|
|
|
1844
1847
|
interface DrawerTogglerProps {
|
|
1845
1848
|
icon?: ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -1836,10 +1836,13 @@ interface DrawerProps {
|
|
|
1836
1836
|
side?: "left" | "right" | "top" | "bottom";
|
|
1837
1837
|
handleClose: () => void;
|
|
1838
1838
|
styles?: string;
|
|
1839
|
+
backdropStyles?: string;
|
|
1839
1840
|
showBackdrop?: boolean;
|
|
1840
1841
|
closeOnBackdropClick?: boolean;
|
|
1842
|
+
offsetTop?: string;
|
|
1843
|
+
offsetBottom?: string;
|
|
1841
1844
|
}
|
|
1842
|
-
declare const Drawer: ({ children, visibility, side, handleClose, styles, showBackdrop, closeOnBackdropClick, }: DrawerProps) => React__default.JSX.Element;
|
|
1845
|
+
declare const Drawer: ({ children, visibility, side, handleClose, styles, backdropStyles, showBackdrop, closeOnBackdropClick, offsetTop, offsetBottom, }: DrawerProps) => React__default.JSX.Element;
|
|
1843
1846
|
|
|
1844
1847
|
interface DrawerTogglerProps {
|
|
1845
1848
|
icon?: ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -20196,26 +20196,40 @@ var Drawer = ({
|
|
|
20196
20196
|
side = "left",
|
|
20197
20197
|
handleClose,
|
|
20198
20198
|
styles,
|
|
20199
|
+
backdropStyles,
|
|
20199
20200
|
showBackdrop = true,
|
|
20200
|
-
closeOnBackdropClick = true
|
|
20201
|
+
closeOnBackdropClick = true,
|
|
20202
|
+
offsetTop = "0px",
|
|
20203
|
+
offsetBottom = "0px"
|
|
20201
20204
|
}) => {
|
|
20202
20205
|
const isHorizontal = side === "left" || side === "right";
|
|
20203
20206
|
const isMobile = useIsMobile_default();
|
|
20207
|
+
const hasOffset = offsetTop !== "0px" || offsetBottom !== "0px";
|
|
20208
|
+
const drawerStyle = isHorizontal ? {
|
|
20209
|
+
top: offsetTop,
|
|
20210
|
+
bottom: offsetBottom,
|
|
20211
|
+
height: hasOffset ? `calc(100vh - ${offsetTop} - ${offsetBottom})` : void 0
|
|
20212
|
+
} : void 0;
|
|
20204
20213
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
20205
20214
|
isMobile && showBackdrop && /* @__PURE__ */ jsxRuntime.jsx(TransitionFade_default, { visibility, leaveDuration: 200, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
20206
20215
|
"div",
|
|
20207
20216
|
{
|
|
20208
|
-
className:
|
|
20217
|
+
className: classNames17__default.default(
|
|
20218
|
+
"fixed inset-0 bg-black/50 z-40",
|
|
20219
|
+
backdropStyles
|
|
20220
|
+
),
|
|
20209
20221
|
onClick: closeOnBackdropClick ? handleClose : void 0
|
|
20210
20222
|
}
|
|
20211
20223
|
) }),
|
|
20212
20224
|
/* @__PURE__ */ jsxRuntime.jsx(TransitionSlide_default, { visibility, side, leaveDuration: 200, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
20213
20225
|
"div",
|
|
20214
20226
|
{
|
|
20227
|
+
style: drawerStyle,
|
|
20215
20228
|
className: classNames17__default.default(
|
|
20216
20229
|
"fixed shadow-lg z-50",
|
|
20217
20230
|
{
|
|
20218
|
-
"h-full w-[300px] top-0": isHorizontal,
|
|
20231
|
+
"h-full w-[300px] top-0": isHorizontal && !hasOffset,
|
|
20232
|
+
"w-[300px]": isHorizontal && hasOffset,
|
|
20219
20233
|
"w-full h-[300px] left-0": !isHorizontal,
|
|
20220
20234
|
"left-0": side === "left",
|
|
20221
20235
|
"right-0": side === "right",
|
|
@@ -23561,12 +23575,7 @@ function MyReviewPanel({
|
|
|
23561
23575
|
maxRating: config.maxRating
|
|
23562
23576
|
}
|
|
23563
23577
|
),
|
|
23564
|
-
config.allowRecommendation && /* @__PURE__ */ jsxRuntime.jsx(
|
|
23565
|
-
RecommendationComponent,
|
|
23566
|
-
{
|
|
23567
|
-
isRecommended: myReview.isRecommended
|
|
23568
|
-
}
|
|
23569
|
-
)
|
|
23578
|
+
config.allowRecommendation && /* @__PURE__ */ jsxRuntime.jsx(RecommendationComponent, { isRecommended: myReview.isRecommended })
|
|
23570
23579
|
] })
|
|
23571
23580
|
] }) })
|
|
23572
23581
|
] });
|
|
@@ -23940,7 +23949,13 @@ function ReviewItem({
|
|
|
23940
23949
|
] }),
|
|
23941
23950
|
/* @__PURE__ */ jsxRuntime.jsx(ContentComponent, { review }),
|
|
23942
23951
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
23943
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23952
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23953
|
+
RatingComponent,
|
|
23954
|
+
{
|
|
23955
|
+
rating: review.rating,
|
|
23956
|
+
maxRating: config.maxRating
|
|
23957
|
+
}
|
|
23958
|
+
),
|
|
23944
23959
|
config.allowRecommendation && /* @__PURE__ */ jsxRuntime.jsx(RecommendationComponent, { isRecommended: review.isRecommended })
|
|
23945
23960
|
] }),
|
|
23946
23961
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -23991,13 +24006,7 @@ function ReviewList({
|
|
|
23991
24006
|
const ItemComponent = components?.Item ?? ReviewItem_default;
|
|
23992
24007
|
const EmptyStateComponent = components?.EmptyState ?? ReviewEmptyState_default;
|
|
23993
24008
|
if (!reviews.length) {
|
|
23994
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
23995
|
-
EmptyStateComponent,
|
|
23996
|
-
{
|
|
23997
|
-
title: config.emptyTitle,
|
|
23998
|
-
text: config.emptyText
|
|
23999
|
-
}
|
|
24000
|
-
);
|
|
24009
|
+
return /* @__PURE__ */ jsxRuntime.jsx(EmptyStateComponent, { title: config.emptyTitle, text: config.emptyText });
|
|
24001
24010
|
}
|
|
24002
24011
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-5", children: reviews.map((review) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
24003
24012
|
ItemComponent,
|
|
@@ -24220,12 +24229,7 @@ function useReviewThreadState({
|
|
|
24220
24229
|
setIsCreatingReviewReply(false);
|
|
24221
24230
|
}
|
|
24222
24231
|
},
|
|
24223
|
-
[
|
|
24224
|
-
applyReview,
|
|
24225
|
-
applyReviewUpdater,
|
|
24226
|
-
config.maxRepliesPerReview,
|
|
24227
|
-
dataSource
|
|
24228
|
-
]
|
|
24232
|
+
[applyReview, applyReviewUpdater, config.maxRepliesPerReview, dataSource]
|
|
24229
24233
|
);
|
|
24230
24234
|
const updateReviewReply2 = React2.useCallback(
|
|
24231
24235
|
async (input) => {
|