@parto-system-design/ui 1.0.2 → 1.0.4
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 +41 -74
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +41 -74
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -820,6 +820,7 @@ interface InstagramProfileInfo {
|
|
|
820
820
|
avatarUrl?: string;
|
|
821
821
|
}
|
|
822
822
|
interface InstagramPostProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof instagramPostVariants> {
|
|
823
|
+
dir?: "rtl" | "ltr";
|
|
823
824
|
media?: MediaItem[];
|
|
824
825
|
mediaType?: MediaType;
|
|
825
826
|
postType?: 0 | 1 | 2;
|
package/dist/index.d.ts
CHANGED
|
@@ -820,6 +820,7 @@ interface InstagramProfileInfo {
|
|
|
820
820
|
avatarUrl?: string;
|
|
821
821
|
}
|
|
822
822
|
interface InstagramPostProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof instagramPostVariants> {
|
|
823
|
+
dir?: "rtl" | "ltr";
|
|
823
824
|
media?: MediaItem[];
|
|
824
825
|
mediaType?: MediaType;
|
|
825
826
|
postType?: 0 | 1 | 2;
|
package/dist/index.js
CHANGED
|
@@ -576,7 +576,7 @@ var buttonVariants = cva2(
|
|
|
576
576
|
cursor-pointer
|
|
577
577
|
inline-flex
|
|
578
578
|
items-center
|
|
579
|
-
|
|
579
|
+
gap-2
|
|
580
580
|
text-center
|
|
581
581
|
font-regular
|
|
582
582
|
ease-out
|
|
@@ -4275,7 +4275,6 @@ function InputOTPSeparator({ ...props }) {
|
|
|
4275
4275
|
// src/components/ui/instagram-post.tsx
|
|
4276
4276
|
import * as React17 from "react";
|
|
4277
4277
|
import { cva as cva8 } from "class-variance-authority";
|
|
4278
|
-
import ReactPlayer from "react-player";
|
|
4279
4278
|
|
|
4280
4279
|
// src/components/ui/tooltip.tsx
|
|
4281
4280
|
import * as React16 from "react";
|
|
@@ -4367,40 +4366,34 @@ function InstagramPostMedia({
|
|
|
4367
4366
|
const item = media[0];
|
|
4368
4367
|
if (variant === "horizontal") {
|
|
4369
4368
|
return /* @__PURE__ */ jsxs21("div", { className: "w-[20%] shrink-0 relative overflow-hidden group cursor-pointer h-full -my-[1px] -ms-[1px]", children: [
|
|
4370
|
-
/* @__PURE__ */ jsx39("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10
|
|
4371
|
-
/* @__PURE__ */ jsx39(
|
|
4372
|
-
|
|
4369
|
+
/* @__PURE__ */ jsx39("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4370
|
+
/* @__PURE__ */ jsx39(
|
|
4371
|
+
"img",
|
|
4373
4372
|
{
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
controls: true,
|
|
4378
|
-
playing: false,
|
|
4379
|
-
light: true
|
|
4373
|
+
src: item.url,
|
|
4374
|
+
alt: "Post media",
|
|
4375
|
+
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300"
|
|
4380
4376
|
}
|
|
4381
|
-
)
|
|
4377
|
+
)
|
|
4382
4378
|
] });
|
|
4383
4379
|
}
|
|
4384
4380
|
const ratio = getAspectRatio(item.aspectRatio || "16:9");
|
|
4385
4381
|
return /* @__PURE__ */ jsxs21("div", { className: "w-full relative overflow-hidden group cursor-pointer", style: { aspectRatio: ratio }, children: [
|
|
4386
|
-
/* @__PURE__ */ jsx39("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10
|
|
4387
|
-
/* @__PURE__ */ jsx39(
|
|
4388
|
-
|
|
4382
|
+
/* @__PURE__ */ jsx39("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4383
|
+
/* @__PURE__ */ jsx39(
|
|
4384
|
+
"img",
|
|
4389
4385
|
{
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
controls: true,
|
|
4394
|
-
playing: false,
|
|
4395
|
-
light: true
|
|
4386
|
+
src: item.url,
|
|
4387
|
+
alt: "Post media",
|
|
4388
|
+
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300"
|
|
4396
4389
|
}
|
|
4397
|
-
)
|
|
4390
|
+
)
|
|
4398
4391
|
] });
|
|
4399
4392
|
}
|
|
4400
4393
|
if (mediaType === "carousel" || media.length > 1) {
|
|
4401
4394
|
if (variant === "horizontal") {
|
|
4402
4395
|
return /* @__PURE__ */ jsx39("div", { className: "w-[20%] shrink-0 relative overflow-hidden group cursor-pointer h-full -my-[1px] -ms-[1px]", children: /* @__PURE__ */ jsxs21(Carousel, { className: "w-full h-full", children: [
|
|
4403
|
-
/* @__PURE__ */ jsx39(CarouselContent, { className: "h-full", children: media.map((item, index) => /* @__PURE__ */
|
|
4396
|
+
/* @__PURE__ */ jsx39(CarouselContent, { className: "h-full", children: media.map((item, index) => /* @__PURE__ */ jsxs21(CarouselItem, { className: "h-full", children: [
|
|
4404
4397
|
/* @__PURE__ */ jsx39("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4405
4398
|
/* @__PURE__ */ jsx39(
|
|
4406
4399
|
"img",
|
|
@@ -4410,30 +4403,17 @@ function InstagramPostMedia({
|
|
|
4410
4403
|
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300"
|
|
4411
4404
|
}
|
|
4412
4405
|
)
|
|
4413
|
-
] })
|
|
4414
|
-
/* @__PURE__ */ jsx39("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10 pointer-events-none" }),
|
|
4415
|
-
/* @__PURE__ */ jsx39("div", { className: "w-full h-full group-hover:scale-110 transition-transform duration-300", children: /* @__PURE__ */ jsx39(
|
|
4416
|
-
ReactPlayer,
|
|
4417
|
-
{
|
|
4418
|
-
url: item.url,
|
|
4419
|
-
width: "100%",
|
|
4420
|
-
height: "100%",
|
|
4421
|
-
controls: true,
|
|
4422
|
-
playing: false,
|
|
4423
|
-
light: true
|
|
4424
|
-
}
|
|
4425
|
-
) })
|
|
4426
|
-
] }) }, index)) }),
|
|
4406
|
+
] }, index)) }),
|
|
4427
4407
|
/* @__PURE__ */ jsx39(CarouselPrevious, { className: "ms-2" }),
|
|
4428
4408
|
/* @__PURE__ */ jsx39(CarouselNext, { className: "me-2" })
|
|
4429
4409
|
] }) });
|
|
4430
4410
|
}
|
|
4431
4411
|
return /* @__PURE__ */ jsxs21(Carousel, { className: "w-full", children: [
|
|
4432
|
-
/* @__PURE__ */ jsx39(CarouselContent, { children: media.map((item, index) => /* @__PURE__ */ jsx39(CarouselItem, { children:
|
|
4412
|
+
/* @__PURE__ */ jsx39(CarouselContent, { children: media.map((item, index) => /* @__PURE__ */ jsx39(CarouselItem, { children: /* @__PURE__ */ jsxs21(
|
|
4433
4413
|
"div",
|
|
4434
4414
|
{
|
|
4435
4415
|
className: "w-full relative overflow-hidden group cursor-pointer",
|
|
4436
|
-
style: { aspectRatio: getAspectRatio(item.aspectRatio || "1:1") },
|
|
4416
|
+
style: { aspectRatio: getAspectRatio(item.aspectRatio || (item.type === "video" ? "16:9" : "1:1")) },
|
|
4437
4417
|
children: [
|
|
4438
4418
|
/* @__PURE__ */ jsx39("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4439
4419
|
/* @__PURE__ */ jsx39(
|
|
@@ -4446,26 +4426,6 @@ function InstagramPostMedia({
|
|
|
4446
4426
|
)
|
|
4447
4427
|
]
|
|
4448
4428
|
}
|
|
4449
|
-
) : /* @__PURE__ */ jsxs21(
|
|
4450
|
-
"div",
|
|
4451
|
-
{
|
|
4452
|
-
className: "w-full relative overflow-hidden group cursor-pointer",
|
|
4453
|
-
style: { aspectRatio: getAspectRatio(item.aspectRatio || "16:9") },
|
|
4454
|
-
children: [
|
|
4455
|
-
/* @__PURE__ */ jsx39("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10 pointer-events-none" }),
|
|
4456
|
-
/* @__PURE__ */ jsx39("div", { className: "w-full h-full group-hover:scale-110 transition-transform duration-300", children: /* @__PURE__ */ jsx39(
|
|
4457
|
-
ReactPlayer,
|
|
4458
|
-
{
|
|
4459
|
-
url: item.url,
|
|
4460
|
-
width: "100%",
|
|
4461
|
-
height: "100%",
|
|
4462
|
-
controls: true,
|
|
4463
|
-
playing: false,
|
|
4464
|
-
light: true
|
|
4465
|
-
}
|
|
4466
|
-
) })
|
|
4467
|
-
]
|
|
4468
|
-
}
|
|
4469
4429
|
) }, index)) }),
|
|
4470
4430
|
/* @__PURE__ */ jsx39(CarouselPrevious, { className: "ms-2" }),
|
|
4471
4431
|
/* @__PURE__ */ jsx39(CarouselNext, { className: "me-2" })
|
|
@@ -4505,13 +4465,13 @@ function InstagramPostCaption({
|
|
|
4505
4465
|
return /* @__PURE__ */ jsxs21("div", { className: cn(
|
|
4506
4466
|
"px-4 py-2",
|
|
4507
4467
|
variant === "horizontal" && "overflow-visible"
|
|
4508
|
-
),
|
|
4468
|
+
), children: [
|
|
4509
4469
|
/* @__PURE__ */ jsx39(
|
|
4510
4470
|
"p",
|
|
4511
4471
|
{
|
|
4512
4472
|
ref: textRef,
|
|
4513
4473
|
className: cn(
|
|
4514
|
-
"text-sm leading-relaxed text-
|
|
4474
|
+
"text-sm leading-relaxed text-start",
|
|
4515
4475
|
!isExpanded && variant === "vertical" && "line-clamp-3"
|
|
4516
4476
|
// No line clamp for horizontal variant - show full text
|
|
4517
4477
|
),
|
|
@@ -4839,6 +4799,7 @@ var InstagramPost = React17.forwardRef(
|
|
|
4839
4799
|
onOpenInstagram,
|
|
4840
4800
|
instagramUrl,
|
|
4841
4801
|
placeholderText,
|
|
4802
|
+
dir,
|
|
4842
4803
|
...props
|
|
4843
4804
|
}, ref) => {
|
|
4844
4805
|
const isVertical = variant === "vertical";
|
|
@@ -4846,8 +4807,8 @@ var InstagramPost = React17.forwardRef(
|
|
|
4846
4807
|
"div",
|
|
4847
4808
|
{
|
|
4848
4809
|
ref,
|
|
4849
|
-
className: cn(instagramPostVariants({ variant }), className, "group"),
|
|
4850
|
-
dir
|
|
4810
|
+
className: cn(instagramPostVariants({ variant }), className, "group", isVertical && "flex flex-col h-full"),
|
|
4811
|
+
dir,
|
|
4851
4812
|
...props,
|
|
4852
4813
|
children: [
|
|
4853
4814
|
showActions && /* @__PURE__ */ jsx39(
|
|
@@ -4863,7 +4824,7 @@ var InstagramPost = React17.forwardRef(
|
|
|
4863
4824
|
),
|
|
4864
4825
|
isVertical ? /* @__PURE__ */ jsxs21(Fragment4, { children: [
|
|
4865
4826
|
showProfile && /* @__PURE__ */ jsx39(InstagramPostProfile, { profile, variant: variant || "vertical", avatarUrl }),
|
|
4866
|
-
/* @__PURE__ */ jsx39(
|
|
4827
|
+
/* @__PURE__ */ jsx39("div", { className: "mt-2.5", children: /* @__PURE__ */ jsx39(
|
|
4867
4828
|
InstagramPostMedia,
|
|
4868
4829
|
{
|
|
4869
4830
|
media,
|
|
@@ -4871,7 +4832,7 @@ var InstagramPost = React17.forwardRef(
|
|
|
4871
4832
|
variant: variant || "vertical",
|
|
4872
4833
|
placeholderText
|
|
4873
4834
|
}
|
|
4874
|
-
),
|
|
4835
|
+
) }),
|
|
4875
4836
|
/* @__PURE__ */ jsx39(
|
|
4876
4837
|
InstagramPostStats,
|
|
4877
4838
|
{
|
|
@@ -4885,13 +4846,13 @@ var InstagramPost = React17.forwardRef(
|
|
|
4885
4846
|
}
|
|
4886
4847
|
),
|
|
4887
4848
|
showCaption && /* @__PURE__ */ jsx39(InstagramPostCaption, { caption, variant: variant || "vertical" }),
|
|
4888
|
-
/* @__PURE__ */ jsx39(
|
|
4849
|
+
/* @__PURE__ */ jsx39("div", { className: "mt-auto w-full", children: /* @__PURE__ */ jsx39(
|
|
4889
4850
|
InstagramPostTime,
|
|
4890
4851
|
{
|
|
4891
4852
|
publishTime,
|
|
4892
4853
|
timeFormat
|
|
4893
4854
|
}
|
|
4894
|
-
)
|
|
4855
|
+
) })
|
|
4895
4856
|
] }) : /* @__PURE__ */ jsxs21(Fragment4, { children: [
|
|
4896
4857
|
/* @__PURE__ */ jsx39(
|
|
4897
4858
|
InstagramPostMedia,
|
|
@@ -4917,13 +4878,13 @@ var InstagramPost = React17.forwardRef(
|
|
|
4917
4878
|
}
|
|
4918
4879
|
),
|
|
4919
4880
|
showCaption && /* @__PURE__ */ jsx39(InstagramPostCaption, { caption, variant: variant || "horizontal" }),
|
|
4920
|
-
/* @__PURE__ */ jsx39(
|
|
4881
|
+
/* @__PURE__ */ jsx39("div", { className: "mt-auto w-full", children: /* @__PURE__ */ jsx39(
|
|
4921
4882
|
InstagramPostTime,
|
|
4922
4883
|
{
|
|
4923
4884
|
publishTime,
|
|
4924
4885
|
timeFormat
|
|
4925
4886
|
}
|
|
4926
|
-
)
|
|
4887
|
+
) })
|
|
4927
4888
|
] })
|
|
4928
4889
|
] })
|
|
4929
4890
|
]
|
|
@@ -6598,12 +6559,18 @@ var EngagementRate = React22.forwardRef(
|
|
|
6598
6559
|
/* @__PURE__ */ jsx50(
|
|
6599
6560
|
"div",
|
|
6600
6561
|
{
|
|
6601
|
-
className: "absolute -top-
|
|
6562
|
+
className: "absolute -top-1 transform -translate-x-1/2 transition-all duration-500 z-10",
|
|
6602
6563
|
style: { left: `${adjustedTrianglePosition}%` },
|
|
6603
|
-
children: /* @__PURE__ */
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6564
|
+
children: /* @__PURE__ */ jsx50(
|
|
6565
|
+
"svg",
|
|
6566
|
+
{
|
|
6567
|
+
width: "20",
|
|
6568
|
+
height: "14",
|
|
6569
|
+
viewBox: "0 0 20 14",
|
|
6570
|
+
className: "fill-white dark:fill-white drop-shadow-md transition-transform duration-300",
|
|
6571
|
+
children: /* @__PURE__ */ jsx50("path", { d: "M10 14L0 0H20L10 14Z" })
|
|
6572
|
+
}
|
|
6573
|
+
)
|
|
6607
6574
|
}
|
|
6608
6575
|
)
|
|
6609
6576
|
] })
|