@arbidocs/react 0.4.48 → 0.4.49
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.cjs +23 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +23 -13
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -4608,6 +4608,7 @@ function ImageCropper({
|
|
|
4608
4608
|
minZoom = 1,
|
|
4609
4609
|
maxZoom = 3,
|
|
4610
4610
|
className,
|
|
4611
|
+
cropAreaClassName,
|
|
4611
4612
|
onCropComplete
|
|
4612
4613
|
}) {
|
|
4613
4614
|
const [crop, setCrop] = React.useState({ x: 0, y: 0 });
|
|
@@ -4623,21 +4624,30 @@ function ImageCropper({
|
|
|
4623
4624
|
[onCropComplete, activeAspect]
|
|
4624
4625
|
);
|
|
4625
4626
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkS6A6FSG7_cjs.cn("flex flex-col gap-3", className), children: [
|
|
4626
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4627
|
-
|
|
4627
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4628
|
+
"div",
|
|
4628
4629
|
{
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4630
|
+
className: chunkS6A6FSG7_cjs.cn(
|
|
4631
|
+
"relative h-72 w-full overflow-hidden rounded-md bg-foreground/95",
|
|
4632
|
+
cropAreaClassName
|
|
4633
|
+
),
|
|
4634
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4635
|
+
Cropper__default.default,
|
|
4636
|
+
{
|
|
4637
|
+
image,
|
|
4638
|
+
crop,
|
|
4639
|
+
zoom,
|
|
4640
|
+
aspect: activeAspect,
|
|
4641
|
+
cropShape,
|
|
4642
|
+
showGrid: cropShape === "rect",
|
|
4643
|
+
onCropChange: setCrop,
|
|
4644
|
+
onZoomChange: setZoom,
|
|
4645
|
+
onCropComplete: handleComplete,
|
|
4646
|
+
objectFit: "contain"
|
|
4647
|
+
}
|
|
4648
|
+
)
|
|
4639
4649
|
}
|
|
4640
|
-
)
|
|
4650
|
+
),
|
|
4641
4651
|
aspectOptions && aspectOptions.length > 1 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1", "data-testid": "image-cropper-aspects", children: [
|
|
4642
4652
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: "Ratio" }),
|
|
4643
4653
|
aspectOptions.map((opt) => {
|