@parto-system-design/ui 1.0.1 → 1.0.3
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 +61 -52
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +6 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +61 -52
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -81,6 +81,9 @@
|
|
|
81
81
|
.z-\[1\] {
|
|
82
82
|
z-index: 1;
|
|
83
83
|
}
|
|
84
|
+
.z-\[9999\] {
|
|
85
|
+
z-index: 9999;
|
|
86
|
+
}
|
|
84
87
|
.order-1 {
|
|
85
88
|
order: 1;
|
|
86
89
|
}
|
|
@@ -900,6 +903,9 @@
|
|
|
900
903
|
.fill-current {
|
|
901
904
|
fill: currentcolor;
|
|
902
905
|
}
|
|
906
|
+
.fill-primary {
|
|
907
|
+
fill: hsl(var(--brand-default));
|
|
908
|
+
}
|
|
903
909
|
.object-cover {
|
|
904
910
|
object-fit: cover;
|
|
905
911
|
}
|
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
|
|
@@ -4505,13 +4505,13 @@ function InstagramPostCaption({
|
|
|
4505
4505
|
return /* @__PURE__ */ jsxs21("div", { className: cn(
|
|
4506
4506
|
"px-4 py-2",
|
|
4507
4507
|
variant === "horizontal" && "overflow-visible"
|
|
4508
|
-
),
|
|
4508
|
+
), children: [
|
|
4509
4509
|
/* @__PURE__ */ jsx39(
|
|
4510
4510
|
"p",
|
|
4511
4511
|
{
|
|
4512
4512
|
ref: textRef,
|
|
4513
4513
|
className: cn(
|
|
4514
|
-
"text-sm leading-relaxed text-
|
|
4514
|
+
"text-sm leading-relaxed text-start",
|
|
4515
4515
|
!isExpanded && variant === "vertical" && "line-clamp-3"
|
|
4516
4516
|
// No line clamp for horizontal variant - show full text
|
|
4517
4517
|
),
|
|
@@ -4839,6 +4839,7 @@ var InstagramPost = React17.forwardRef(
|
|
|
4839
4839
|
onOpenInstagram,
|
|
4840
4840
|
instagramUrl,
|
|
4841
4841
|
placeholderText,
|
|
4842
|
+
dir,
|
|
4842
4843
|
...props
|
|
4843
4844
|
}, ref) => {
|
|
4844
4845
|
const isVertical = variant === "vertical";
|
|
@@ -4846,8 +4847,8 @@ var InstagramPost = React17.forwardRef(
|
|
|
4846
4847
|
"div",
|
|
4847
4848
|
{
|
|
4848
4849
|
ref,
|
|
4849
|
-
className: cn(instagramPostVariants({ variant }), className, "group"),
|
|
4850
|
-
dir
|
|
4850
|
+
className: cn(instagramPostVariants({ variant }), className, "group", isVertical && "flex flex-col h-full"),
|
|
4851
|
+
dir,
|
|
4851
4852
|
...props,
|
|
4852
4853
|
children: [
|
|
4853
4854
|
showActions && /* @__PURE__ */ jsx39(
|
|
@@ -4863,7 +4864,7 @@ var InstagramPost = React17.forwardRef(
|
|
|
4863
4864
|
),
|
|
4864
4865
|
isVertical ? /* @__PURE__ */ jsxs21(Fragment4, { children: [
|
|
4865
4866
|
showProfile && /* @__PURE__ */ jsx39(InstagramPostProfile, { profile, variant: variant || "vertical", avatarUrl }),
|
|
4866
|
-
/* @__PURE__ */ jsx39(
|
|
4867
|
+
/* @__PURE__ */ jsx39("div", { className: "mt-2.5", children: /* @__PURE__ */ jsx39(
|
|
4867
4868
|
InstagramPostMedia,
|
|
4868
4869
|
{
|
|
4869
4870
|
media,
|
|
@@ -4871,7 +4872,7 @@ var InstagramPost = React17.forwardRef(
|
|
|
4871
4872
|
variant: variant || "vertical",
|
|
4872
4873
|
placeholderText
|
|
4873
4874
|
}
|
|
4874
|
-
),
|
|
4875
|
+
) }),
|
|
4875
4876
|
/* @__PURE__ */ jsx39(
|
|
4876
4877
|
InstagramPostStats,
|
|
4877
4878
|
{
|
|
@@ -4885,13 +4886,13 @@ var InstagramPost = React17.forwardRef(
|
|
|
4885
4886
|
}
|
|
4886
4887
|
),
|
|
4887
4888
|
showCaption && /* @__PURE__ */ jsx39(InstagramPostCaption, { caption, variant: variant || "vertical" }),
|
|
4888
|
-
/* @__PURE__ */ jsx39(
|
|
4889
|
+
/* @__PURE__ */ jsx39("div", { className: "mt-auto w-full", children: /* @__PURE__ */ jsx39(
|
|
4889
4890
|
InstagramPostTime,
|
|
4890
4891
|
{
|
|
4891
4892
|
publishTime,
|
|
4892
4893
|
timeFormat
|
|
4893
4894
|
}
|
|
4894
|
-
)
|
|
4895
|
+
) })
|
|
4895
4896
|
] }) : /* @__PURE__ */ jsxs21(Fragment4, { children: [
|
|
4896
4897
|
/* @__PURE__ */ jsx39(
|
|
4897
4898
|
InstagramPostMedia,
|
|
@@ -4917,13 +4918,13 @@ var InstagramPost = React17.forwardRef(
|
|
|
4917
4918
|
}
|
|
4918
4919
|
),
|
|
4919
4920
|
showCaption && /* @__PURE__ */ jsx39(InstagramPostCaption, { caption, variant: variant || "horizontal" }),
|
|
4920
|
-
/* @__PURE__ */ jsx39(
|
|
4921
|
+
/* @__PURE__ */ jsx39("div", { className: "mt-auto w-full", children: /* @__PURE__ */ jsx39(
|
|
4921
4922
|
InstagramPostTime,
|
|
4922
4923
|
{
|
|
4923
4924
|
publishTime,
|
|
4924
4925
|
timeFormat
|
|
4925
4926
|
}
|
|
4926
|
-
)
|
|
4927
|
+
) })
|
|
4927
4928
|
] })
|
|
4928
4929
|
] })
|
|
4929
4930
|
]
|
|
@@ -6598,12 +6599,18 @@ var EngagementRate = React22.forwardRef(
|
|
|
6598
6599
|
/* @__PURE__ */ jsx50(
|
|
6599
6600
|
"div",
|
|
6600
6601
|
{
|
|
6601
|
-
className: "absolute -top-
|
|
6602
|
+
className: "absolute -top-1 transform -translate-x-1/2 transition-all duration-500 z-10",
|
|
6602
6603
|
style: { left: `${adjustedTrianglePosition}%` },
|
|
6603
|
-
children: /* @__PURE__ */
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6604
|
+
children: /* @__PURE__ */ jsx50(
|
|
6605
|
+
"svg",
|
|
6606
|
+
{
|
|
6607
|
+
width: "20",
|
|
6608
|
+
height: "14",
|
|
6609
|
+
viewBox: "0 0 20 14",
|
|
6610
|
+
className: "fill-primary text-primary transition-transform duration-300",
|
|
6611
|
+
children: /* @__PURE__ */ jsx50("path", { d: "M10 14L0 0H20L10 14Z" })
|
|
6612
|
+
}
|
|
6613
|
+
)
|
|
6607
6614
|
}
|
|
6608
6615
|
)
|
|
6609
6616
|
] })
|
|
@@ -9035,6 +9042,7 @@ function PartoHeatMap({
|
|
|
9035
9042
|
|
|
9036
9043
|
// src/components/charts/PartoWordCloud.tsx
|
|
9037
9044
|
import * as React32 from "react";
|
|
9045
|
+
import { createPortal as createPortal3 } from "react-dom";
|
|
9038
9046
|
import { Wordcloud } from "@visx/wordcloud";
|
|
9039
9047
|
import { scaleLog } from "@visx/scale";
|
|
9040
9048
|
import { Text } from "@visx/text";
|
|
@@ -9091,28 +9099,25 @@ function PartoWordCloud({
|
|
|
9091
9099
|
return fontScale(datum.value);
|
|
9092
9100
|
};
|
|
9093
9101
|
const handleMouseMove = (event, text, value) => {
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
color: primaryColor
|
|
9104
|
-
});
|
|
9105
|
-
}
|
|
9102
|
+
const x = event.clientX;
|
|
9103
|
+
const y = event.clientY;
|
|
9104
|
+
setHovered({
|
|
9105
|
+
text,
|
|
9106
|
+
value,
|
|
9107
|
+
x,
|
|
9108
|
+
y,
|
|
9109
|
+
color: primaryColor
|
|
9110
|
+
});
|
|
9106
9111
|
};
|
|
9107
|
-
return /* @__PURE__ */
|
|
9112
|
+
return /* @__PURE__ */ jsxs39(
|
|
9108
9113
|
"div",
|
|
9109
9114
|
{
|
|
9110
9115
|
ref: containerRef,
|
|
9111
9116
|
className,
|
|
9112
9117
|
style: { position: "relative", width: "100%", height: "100%", display: "flex", alignItems: "center", justifyContent: "center" },
|
|
9113
9118
|
dir: "rtl",
|
|
9114
|
-
children:
|
|
9115
|
-
/* @__PURE__ */ jsx71(
|
|
9119
|
+
children: [
|
|
9120
|
+
/* @__PURE__ */ jsx71("div", { style: { position: "relative", width, height, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx71(
|
|
9116
9121
|
Wordcloud,
|
|
9117
9122
|
{
|
|
9118
9123
|
words: formattedWords,
|
|
@@ -9150,29 +9155,33 @@ function PartoWordCloud({
|
|
|
9150
9155
|
) }, w.text);
|
|
9151
9156
|
})
|
|
9152
9157
|
}
|
|
9153
|
-
),
|
|
9154
|
-
hovered &&
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
|
|
9165
|
-
|
|
9166
|
-
/* @__PURE__ */
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
/* @__PURE__ */
|
|
9158
|
+
) }),
|
|
9159
|
+
hovered && typeof document !== "undefined" && createPortal3(
|
|
9160
|
+
/* @__PURE__ */ jsx71(
|
|
9161
|
+
"div",
|
|
9162
|
+
{
|
|
9163
|
+
className: "pointer-events-none fixed z-[9999]",
|
|
9164
|
+
dir: "ltr",
|
|
9165
|
+
style: {
|
|
9166
|
+
left: `${hovered.x}px`,
|
|
9167
|
+
top: `${hovered.y - 10}px`,
|
|
9168
|
+
transform: "translate(-50%, -100%)"
|
|
9169
|
+
},
|
|
9170
|
+
children: /* @__PURE__ */ jsxs39("div", { className: "grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", dir: "rtl", children: [
|
|
9171
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2", children: [
|
|
9172
|
+
/* @__PURE__ */ jsx71("div", { className: "h-2.5 w-2.5 rounded-[2px]", style: { backgroundColor: hovered.color } }),
|
|
9173
|
+
/* @__PURE__ */ jsx71("span", { className: "font-medium", children: hovered.text })
|
|
9174
|
+
] }),
|
|
9175
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex items-center justify-between", children: [
|
|
9176
|
+
/* @__PURE__ */ jsx71("span", { className: "text-muted-foreground", children: "\u062A\u0639\u062F\u0627\u062F" }),
|
|
9177
|
+
/* @__PURE__ */ jsx71("span", { className: "font-mono font-medium tabular-nums", children: hovered.value.toLocaleString("fa-IR") })
|
|
9178
|
+
] })
|
|
9171
9179
|
] })
|
|
9172
|
-
|
|
9173
|
-
|
|
9180
|
+
}
|
|
9181
|
+
),
|
|
9182
|
+
document.body
|
|
9174
9183
|
)
|
|
9175
|
-
]
|
|
9184
|
+
]
|
|
9176
9185
|
}
|
|
9177
9186
|
);
|
|
9178
9187
|
}
|