@opensite/ui 1.8.6 → 1.8.8

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.
@@ -13,54 +13,6 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
13
13
  function cn(...inputs) {
14
14
  return twMerge(clsx(inputs));
15
15
  }
16
- function getTextColor(parentBg, variant = "default", options) {
17
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
18
- if (isDark) {
19
- switch (variant) {
20
- case "default":
21
- return "text-foreground";
22
- case "muted":
23
- return "text-foreground/80";
24
- case "subtle":
25
- return "text-foreground/60";
26
- case "accent":
27
- return "text-accent-foreground";
28
- }
29
- } else {
30
- switch (variant) {
31
- case "default":
32
- return "text-foreground";
33
- case "muted":
34
- return "text-muted-foreground";
35
- case "subtle":
36
- return "text-muted-foreground/70";
37
- case "accent":
38
- return "text-primary";
39
- }
40
- }
41
- }
42
- function getBorderColor(parentBg, variant = "default", options) {
43
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
44
- if (isDark) {
45
- switch (variant) {
46
- case "default":
47
- return "border-foreground/20";
48
- case "muted":
49
- return "border-foreground/10";
50
- case "accent":
51
- return "border-accent-foreground";
52
- }
53
- } else {
54
- switch (variant) {
55
- case "default":
56
- return "border-border";
57
- case "muted":
58
- return "border-muted";
59
- case "accent":
60
- return "border-primary";
61
- }
62
- }
63
- }
64
16
  function normalizePhoneNumber(input) {
65
17
  const trimmed = input.trim();
66
18
  if (trimmed.toLowerCase().startsWith("tel:")) {
@@ -1096,7 +1048,15 @@ function HeroSoftwareGrowthVideoDialog({
1096
1048
  if (actionsSlot) return actionsSlot;
1097
1049
  const actionsToRender = actions || defaultActions;
1098
1050
  return /* @__PURE__ */ jsx("div", { className: "flex flex-col items-center justify-center gap-3 md:flex-row", children: actionsToRender.map((action, index) => {
1099
- const { label, icon, iconAfter, children, className: actionClassName, onClick, ...pressableProps } = action;
1051
+ const {
1052
+ label,
1053
+ icon,
1054
+ iconAfter,
1055
+ children,
1056
+ className: actionClassName,
1057
+ onClick,
1058
+ ...pressableProps
1059
+ } = action;
1100
1060
  const isVideoButton = index === 0 && !actions;
1101
1061
  return /* @__PURE__ */ jsx(
1102
1062
  Pressable,
@@ -1126,17 +1086,36 @@ function HeroSoftwareGrowthVideoDialog({
1126
1086
  if (showcaseImagesSlot) return showcaseImagesSlot;
1127
1087
  if (!showcaseImages || showcaseImages.length < 4) return null;
1128
1088
  const imageConfigs = [
1129
- { index: 0, className: "absolute -top-[28%] left-[18%] w-[28.47%] max-w-102.5", ratio: 1.11372549 / 1 },
1130
- { index: 1, className: "absolute -top-[28%] left-[51%] w-[18.75%] max-w-67.5", ratio: 0.845559846 / 1 },
1131
- { index: 2, className: "absolute -bottom-[14%] left-[51%] w-[38.19%] max-w-137.5", ratio: 1.686153846 / 1 },
1132
- { index: 3, className: "absolute -bottom-[30%] left-[10.7%] w-[38.19%] max-w-137.5", ratio: 1.415041783 / 1 }
1089
+ {
1090
+ index: 0,
1091
+ className: "absolute -top-[28%] left-[18%] w-[28.47%] max-w-102.5",
1092
+ ratio: 1.11372549 / 1
1093
+ },
1094
+ {
1095
+ index: 1,
1096
+ className: "absolute -top-[28%] left-[51%] w-[18.75%] max-w-67.5",
1097
+ ratio: 0.845559846 / 1
1098
+ },
1099
+ {
1100
+ index: 2,
1101
+ className: "absolute -bottom-[14%] left-[51%] w-[38.19%] max-w-137.5",
1102
+ ratio: 1.686153846 / 1
1103
+ },
1104
+ {
1105
+ index: 3,
1106
+ className: "absolute -bottom-[30%] left-[10.7%] w-[38.19%] max-w-137.5",
1107
+ ratio: 1.415041783 / 1
1108
+ }
1133
1109
  ];
1134
- return /* @__PURE__ */ jsx("div", { className: cn("w-full py-[16%]", showcaseClassName), children: /* @__PURE__ */ jsx("div", { className: cn("relative aspect-[2.716981132/1] w-full border", getBorderColor(background, "muted")), children: imageConfigs.map(({ index, className: posClassName, ratio }) => /* @__PURE__ */ jsx("div", { className: posClassName, children: /* @__PURE__ */ jsx(AspectRatio, { ratio, children: /* @__PURE__ */ jsx(
1110
+ return /* @__PURE__ */ jsx("div", { className: cn("w-full py-[16%]", showcaseClassName), children: /* @__PURE__ */ jsx("div", { className: cn("relative aspect-[2.716981132/1] w-full border"), children: imageConfigs.map(({ index, className: posClassName, ratio }) => /* @__PURE__ */ jsx("div", { className: posClassName, children: /* @__PURE__ */ jsx(AspectRatio, { ratio, children: /* @__PURE__ */ jsx(
1135
1111
  Img,
1136
1112
  {
1137
1113
  src: showcaseImages[index].src,
1138
1114
  alt: showcaseImages[index].alt,
1139
- className: cn("size-full object-cover object-center", showcaseImages[index].className),
1115
+ className: cn(
1116
+ "size-full object-cover object-center",
1117
+ showcaseImages[index].className
1118
+ ),
1140
1119
  optixFlowConfig
1141
1120
  }
1142
1121
  ) }) }, index)) }) });
@@ -1148,8 +1127,35 @@ function HeroSoftwareGrowthVideoDialog({
1148
1127
  className: cn("font-dm_sans bg-background py-12 md:py-24", className),
1149
1128
  children: /* @__PURE__ */ jsx("div", { className: cn("container max-w-[1440px]", containerClassName), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
1150
1129
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center gap-8", children: [
1151
- heading && (typeof heading === "string" ? /* @__PURE__ */ jsx("h1", { className: cn("max-w-[1000px] text-center text-[3.125rem] leading-none md:text-[4.25rem] lg:text-[5.5rem]", headingClassName), children: heading }) : /* @__PURE__ */ jsx("h1", { className: cn("max-w-[1000px] text-center text-[3.125rem] leading-none md:text-[4.25rem] lg:text-[5.5rem]", headingClassName), children: heading })),
1152
- description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("max-w-212.5 text-center text-lg leading-snug md:text-xl", getTextColor(background, "muted"), descriptionClassName), children: description }) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: description })),
1130
+ heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
1131
+ "h1",
1132
+ {
1133
+ className: cn(
1134
+ "max-w-[1000px] text-center text-[3.125rem] leading-none md:text-[4.25rem] lg:text-[5.5rem]",
1135
+ headingClassName
1136
+ ),
1137
+ children: heading
1138
+ }
1139
+ ) : /* @__PURE__ */ jsx(
1140
+ "h1",
1141
+ {
1142
+ className: cn(
1143
+ "max-w-[1000px] text-center text-[3.125rem] leading-none md:text-[4.25rem] lg:text-[5.5rem]",
1144
+ headingClassName
1145
+ ),
1146
+ children: heading
1147
+ }
1148
+ )),
1149
+ description && (typeof description === "string" ? /* @__PURE__ */ jsx(
1150
+ "p",
1151
+ {
1152
+ className: cn(
1153
+ "max-w-212.5 text-center text-lg leading-snug md:text-xl",
1154
+ descriptionClassName
1155
+ ),
1156
+ children: description
1157
+ }
1158
+ ) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: description })),
1153
1159
  renderActions
1154
1160
  ] }),
1155
1161
  renderShowcaseImages