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.mjs CHANGED
@@ -20168,26 +20168,40 @@ var Drawer = ({
20168
20168
  side = "left",
20169
20169
  handleClose,
20170
20170
  styles,
20171
+ backdropStyles,
20171
20172
  showBackdrop = true,
20172
- closeOnBackdropClick = true
20173
+ closeOnBackdropClick = true,
20174
+ offsetTop = "0px",
20175
+ offsetBottom = "0px"
20173
20176
  }) => {
20174
20177
  const isHorizontal = side === "left" || side === "right";
20175
20178
  const isMobile = useIsMobile_default();
20179
+ const hasOffset = offsetTop !== "0px" || offsetBottom !== "0px";
20180
+ const drawerStyle = isHorizontal ? {
20181
+ top: offsetTop,
20182
+ bottom: offsetBottom,
20183
+ height: hasOffset ? `calc(100vh - ${offsetTop} - ${offsetBottom})` : void 0
20184
+ } : void 0;
20176
20185
  return /* @__PURE__ */ jsxs(Fragment, { children: [
20177
20186
  isMobile && showBackdrop && /* @__PURE__ */ jsx(TransitionFade_default, { visibility, leaveDuration: 200, children: /* @__PURE__ */ jsx(
20178
20187
  "div",
20179
20188
  {
20180
- className: "fixed inset-0 bg-black/50 z-40",
20189
+ className: classNames17(
20190
+ "fixed inset-0 bg-black/50 z-40",
20191
+ backdropStyles
20192
+ ),
20181
20193
  onClick: closeOnBackdropClick ? handleClose : void 0
20182
20194
  }
20183
20195
  ) }),
20184
20196
  /* @__PURE__ */ jsx(TransitionSlide_default, { visibility, side, leaveDuration: 200, children: /* @__PURE__ */ jsx(
20185
20197
  "div",
20186
20198
  {
20199
+ style: drawerStyle,
20187
20200
  className: classNames17(
20188
20201
  "fixed shadow-lg z-50",
20189
20202
  {
20190
- "h-full w-[300px] top-0": isHorizontal,
20203
+ "h-full w-[300px] top-0": isHorizontal && !hasOffset,
20204
+ "w-[300px]": isHorizontal && hasOffset,
20191
20205
  "w-full h-[300px] left-0": !isHorizontal,
20192
20206
  "left-0": side === "left",
20193
20207
  "right-0": side === "right",
@@ -23533,12 +23547,7 @@ function MyReviewPanel({
23533
23547
  maxRating: config.maxRating
23534
23548
  }
23535
23549
  ),
23536
- config.allowRecommendation && /* @__PURE__ */ jsx(
23537
- RecommendationComponent,
23538
- {
23539
- isRecommended: myReview.isRecommended
23540
- }
23541
- )
23550
+ config.allowRecommendation && /* @__PURE__ */ jsx(RecommendationComponent, { isRecommended: myReview.isRecommended })
23542
23551
  ] })
23543
23552
  ] }) })
23544
23553
  ] });
@@ -23912,7 +23921,13 @@ function ReviewItem({
23912
23921
  ] }),
23913
23922
  /* @__PURE__ */ jsx(ContentComponent, { review }),
23914
23923
  /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
23915
- /* @__PURE__ */ jsx(RatingComponent, { rating: review.rating, maxRating: config.maxRating }),
23924
+ /* @__PURE__ */ jsx(
23925
+ RatingComponent,
23926
+ {
23927
+ rating: review.rating,
23928
+ maxRating: config.maxRating
23929
+ }
23930
+ ),
23916
23931
  config.allowRecommendation && /* @__PURE__ */ jsx(RecommendationComponent, { isRecommended: review.isRecommended })
23917
23932
  ] }),
23918
23933
  /* @__PURE__ */ jsx(
@@ -23963,13 +23978,7 @@ function ReviewList({
23963
23978
  const ItemComponent = components?.Item ?? ReviewItem_default;
23964
23979
  const EmptyStateComponent = components?.EmptyState ?? ReviewEmptyState_default;
23965
23980
  if (!reviews.length) {
23966
- return /* @__PURE__ */ jsx(
23967
- EmptyStateComponent,
23968
- {
23969
- title: config.emptyTitle,
23970
- text: config.emptyText
23971
- }
23972
- );
23981
+ return /* @__PURE__ */ jsx(EmptyStateComponent, { title: config.emptyTitle, text: config.emptyText });
23973
23982
  }
23974
23983
  return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-5", children: reviews.map((review) => /* @__PURE__ */ jsx(
23975
23984
  ItemComponent,
@@ -24192,12 +24201,7 @@ function useReviewThreadState({
24192
24201
  setIsCreatingReviewReply(false);
24193
24202
  }
24194
24203
  },
24195
- [
24196
- applyReview,
24197
- applyReviewUpdater,
24198
- config.maxRepliesPerReview,
24199
- dataSource
24200
- ]
24204
+ [applyReview, applyReviewUpdater, config.maxRepliesPerReview, dataSource]
24201
24205
  );
24202
24206
  const updateReviewReply2 = useCallback(
24203
24207
  async (input) => {