@streamoid/ui 0.2.1 → 0.2.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.js CHANGED
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ NscWorkspaceSwitch: () => NscWorkspaceSwitch,
23
24
  ScAccess: () => ScAccess,
24
25
  ScAppCard: () => ScAppCard,
25
26
  ScAppField: () => ScAppField,
@@ -621,6 +622,8 @@ var ScButton = ({
621
622
  ctx.putImageData(imageData, 0, 0);
622
623
  return canvas.toDataURL("image/png");
623
624
  }, [variant, type, state]);
625
+ const strokeWidth = size === "sm" ? 1.25 : 1.5;
626
+ const styledIcon = (0, import_react.isValidElement)(icon) ? (0, import_react.cloneElement)(icon, { color: "currentColor", strokeWidth }) : icon;
624
627
  const variantsClassName = ScButton_default["style-variant-" + styleVariant] + " " + ScButton_default["state-" + state] + " " + ScButton_default["variant-" + variant] + " " + ScButton_default["type-" + type] + " " + ScButton_default["size-" + size];
625
628
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
626
629
  "div",
@@ -636,12 +639,12 @@ var ScButton = ({
636
639
  }
637
640
  ),
638
641
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: ScButton_default.container, children: [
639
- (styleVariant === "icon-left" || styleVariant === "icon-only") && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: icon }),
642
+ (styleVariant === "icon-left" || styleVariant === "icon-only") && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: styledIcon }),
640
643
  (styleVariant === "default" || styleVariant === "icon-right" || styleVariant === "icon-left") && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: ScButton_default.label, children: [
641
644
  text,
642
645
  " "
643
646
  ] }) }),
644
- styleVariant === "icon-right" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: icon })
647
+ styleVariant === "icon-right" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: styledIcon })
645
648
  ] })
646
649
  ]
647
650
  }
@@ -861,6 +864,9 @@ var ScCalendar = ({
861
864
  ] });
862
865
  };
863
866
 
867
+ // src/SC-Credits usage card/ScCreditsUsageCard.tsx
868
+ var import_react2 = require("react");
869
+
864
870
  // src/SC-Credits usage card/ScCreditsUsageCard.module.css
865
871
  var ScCreditsUsageCard_default = {
866
872
  scCreditsUsageCard: "ScCreditsUsageCard_scCreditsUsageCard",
@@ -871,7 +877,9 @@ var ScCreditsUsageCard_default = {
871
877
  progressContainer: "ScCreditsUsageCard_progressContainer",
872
878
  scProgressBarInstance: "ScCreditsUsageCard_scProgressBarInstance",
873
879
  remainingText: "ScCreditsUsageCard_remainingText",
874
- scButtonInstance: "ScCreditsUsageCard_scButtonInstance"
880
+ scButtonInstance: "ScCreditsUsageCard_scButtonInstance",
881
+ buttonTooltipWrap: "ScCreditsUsageCard_buttonTooltipWrap",
882
+ buttonTooltip: "ScCreditsUsageCard_buttonTooltip"
875
883
  };
876
884
 
877
885
  // src/SC-Credits usage card/ScCreditsUsageCard.tsx
@@ -909,11 +917,14 @@ var ScCreditsUsageCard = ({
909
917
  remainingText = "60% Remaining",
910
918
  buyButtonText = "Buy credits",
911
919
  buyButtonState = "default",
920
+ buyButtonHoverText,
912
921
  onBuyClick,
913
922
  progress = 60,
914
923
  className,
915
924
  ...props
916
925
  }) => {
926
+ const [btnHovered, setBtnHovered] = (0, import_react2.useState)(false);
927
+ const displayText = btnHovered && buyButtonHoverText ? buyButtonHoverText : buyButtonText;
917
928
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: ScCreditsUsageCard_default.scCreditsUsageCard + " " + className, ...props, children: [
918
929
  /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: ScCreditsUsageCard_default.header, children: [
919
930
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
@@ -943,15 +954,23 @@ var ScCreditsUsageCard = ({
943
954
  " "
944
955
  ] }),
945
956
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
946
- ScButton,
957
+ "div",
947
958
  {
948
- icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons8.SiconHome, { className: ScCreditsUsageCard_default.siconHomeInstance }),
949
- text: buyButtonText,
950
- variant: "secondary",
951
- size: "md",
952
- state: buyButtonState,
953
- className: ScCreditsUsageCard_default.scButtonInstance,
954
- onClick: onBuyClick
959
+ className: ScCreditsUsageCard_default.buttonTooltipWrap,
960
+ onMouseEnter: () => setBtnHovered(true),
961
+ onMouseLeave: () => setBtnHovered(false),
962
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
963
+ ScButton,
964
+ {
965
+ icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons8.SiconHome, { className: ScCreditsUsageCard_default.siconHomeInstance }),
966
+ text: displayText,
967
+ variant: "secondary",
968
+ size: "md",
969
+ state: buyButtonState,
970
+ className: ScCreditsUsageCard_default.scButtonInstance,
971
+ onClick: onBuyClick
972
+ }
973
+ )
955
974
  }
956
975
  )
957
976
  ] })
@@ -959,7 +978,21 @@ var ScCreditsUsageCard = ({
959
978
  };
960
979
 
961
980
  // src/SC-Dp/ScDp.tsx
962
- var import_react2 = require("react");
981
+ var import_react3 = require("react");
982
+
983
+ // src/SC-Dp/ScDp.module.css
984
+ var ScDp_default = {
985
+ scDp: "ScDp_scDp",
986
+ variantWorkspace: "ScDp_variantWorkspace",
987
+ variantProfile: "ScDp_variantProfile",
988
+ typeInitial: "ScDp_typeInitial",
989
+ initials: "ScDp_initials",
990
+ image: "ScDp_image",
991
+ imageWorkspace: "ScDp_imageWorkspace",
992
+ imageProfile: "ScDp_imageProfile"
993
+ };
994
+
995
+ // src/SC-Dp/ScDp.tsx
963
996
  var import_jsx_runtime16 = require("react/jsx-runtime");
964
997
  function ScDp({
965
998
  type = "initial",
@@ -970,63 +1003,29 @@ function ScDp({
970
1003
  className,
971
1004
  style
972
1005
  }) {
973
- const [imageFailed, setImageFailed] = (0, import_react2.useState)(false);
1006
+ const [imageFailed, setImageFailed] = (0, import_react3.useState)(false);
974
1007
  const isProfile = variant === "profile";
975
- const borderRadius = isProfile ? "var(--radius-full)" : "var(--radius-md)";
976
1008
  const showImage = type === "image" && imageUrl && !imageFailed;
977
- const containerStyle = {
1009
+ const containerClass = [
1010
+ ScDp_default.scDp,
1011
+ isProfile ? ScDp_default.variantProfile : ScDp_default.variantWorkspace,
1012
+ !showImage ? ScDp_default.typeInitial : "",
1013
+ className || ""
1014
+ ].filter(Boolean).join(" ");
1015
+ const sizeStyle = {
978
1016
  width: size,
979
1017
  height: size,
980
- borderRadius,
981
- position: "relative",
982
- overflow: "hidden",
983
- flexShrink: 0,
984
- ...showImage ? {} : {
985
- backgroundColor: "var(--alias-fill-neutral-neutralselected)",
986
- display: "flex",
987
- alignItems: "center",
988
- justifyContent: "center"
989
- },
990
1018
  ...style
991
1019
  };
992
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className, style: containerStyle, children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1020
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: containerClass, style: sizeStyle, children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
993
1021
  "img",
994
1022
  {
995
1023
  src: imageUrl,
996
1024
  alt: "",
997
- style: {
998
- position: "absolute",
999
- inset: 0,
1000
- width: "100%",
1001
- height: "100%",
1002
- objectFit: "cover",
1003
- pointerEvents: "none"
1004
- },
1025
+ className: ScDp_default.image + " " + (isProfile ? ScDp_default.imageProfile : ScDp_default.imageWorkspace),
1005
1026
  onError: () => setImageFailed(true)
1006
1027
  }
1007
- ) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1008
- "div",
1009
- {
1010
- style: {
1011
- flex: 1,
1012
- minWidth: 0,
1013
- minHeight: 0,
1014
- display: "flex",
1015
- alignItems: "center",
1016
- justifyContent: "center",
1017
- overflow: "hidden",
1018
- textOverflow: "ellipsis",
1019
- whiteSpace: "nowrap",
1020
- color: "var(--alias-text---icons-primary)",
1021
- fontFamily: "var(--font-family-font-family-body)",
1022
- fontSize: size <= 32 ? `${size * 0.4}px` : "var(--font-size-font-size-md)",
1023
- fontWeight: 500,
1024
- lineHeight: 1,
1025
- textAlign: "center"
1026
- },
1027
- children: initial
1028
- }
1029
- ) });
1028
+ ) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: ScDp_default.initials, children: initial }) });
1030
1029
  }
1031
1030
 
1032
1031
  // src/SC-Google sign in/ScGoogleSignIn.module.css
@@ -1329,7 +1328,7 @@ var ScOnlyIcon = ({
1329
1328
  };
1330
1329
 
1331
1330
  // src/SC-Plan card/ScPlanCard.tsx
1332
- var import_react3 = require("react");
1331
+ var import_react4 = require("react");
1333
1332
 
1334
1333
  // src/SC-Plan card/ScPlanCard.module.css
1335
1334
  var ScPlanCard_default = {
@@ -1399,7 +1398,7 @@ var ScPlanCard = ({
1399
1398
  import_icons11.SiconCredits,
1400
1399
  {
1401
1400
  className: ScPlanCard_default.siconCreditsInstance,
1402
- color: "#f5f5f5",
1401
+ color: "var(--alias-text-and-icons-primary, #f5f5f5)",
1403
1402
  size: 24,
1404
1403
  strokeWidth: 1.5
1405
1404
  }
@@ -1426,7 +1425,7 @@ var ScPlanCard = ({
1426
1425
  "path",
1427
1426
  {
1428
1427
  d: "M3 4.5L6 7.5L9 4.5",
1429
- stroke: "#f5f5f5",
1428
+ stroke: "var(--alias-text-and-icons-primary, #f5f5f5)",
1430
1429
  strokeWidth: "1.5",
1431
1430
  strokeLinecap: "round",
1432
1431
  strokeLinejoin: "round"
@@ -1454,12 +1453,12 @@ var ScPlanCard = ({
1454
1453
  ),
1455
1454
  isCustom && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ScHDivider, { className: ScPlanCard_default.scHDividerInstance }),
1456
1455
  isCustom && description && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: ScPlanCard_default.description, children: description }),
1457
- isFreeOrPopular && features.map((section, sIdx) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react3.Fragment, { children: [
1456
+ isFreeOrPopular && features.map((section, sIdx) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react4.Fragment, { children: [
1458
1457
  sIdx > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ScHDivider, { className: ScPlanCard_default.scHDividerInstance }),
1459
1458
  /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: ScPlanCard_default.featuresSection, children: [
1460
1459
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: ScPlanCard_default.sectionTitle, children: section.section }),
1461
1460
  section.features.map((feature, fIdx) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: ScPlanCard_default.featureRow, children: [
1462
- section.icon || /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons11.SiconHome, { color: "#9e9e9e", size: 24, strokeWidth: 1.5 }),
1461
+ section.icon || /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons11.SiconHome, { color: "var(--alias-text-and-icons-tertiary, #9e9e9e)", size: 24, strokeWidth: 1.5 }),
1463
1462
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: ScPlanCard_default.featureText, children: feature })
1464
1463
  ] }, fIdx))
1465
1464
  ] })
@@ -3044,7 +3043,7 @@ var ScSlider = ({
3044
3043
  };
3045
3044
 
3046
3045
  // src/SC-WorkspaceSwitcher/streamoid-workspace-switcher.tsx
3047
- var import_react4 = require("react");
3046
+ var import_react5 = require("react");
3048
3047
  var import_icons34 = require("@streamoid/icons");
3049
3048
  var import_jsx_runtime42 = require("react/jsx-runtime");
3050
3049
  var PRIMARY_ICON = "var(--alias-text---icons-primary)";
@@ -3235,12 +3234,12 @@ function StreamoidWorkspaceSwitcher({
3235
3234
  onSwitchWorkspace,
3236
3235
  config
3237
3236
  }) {
3238
- const modalRef = (0, import_react4.useRef)(null);
3237
+ const modalRef = (0, import_react5.useRef)(null);
3239
3238
  const title = config?.title || "Switch workspace";
3240
3239
  const loadingText = config?.loadingText || "Loading workspaces\u2026";
3241
3240
  const currentWorkspaceText = config?.currentWorkspaceText || "Current workspace";
3242
3241
  const switchWorkspaceText = config?.switchWorkspaceText || "Switch workspace";
3243
- (0, import_react4.useEffect)(() => {
3242
+ (0, import_react5.useEffect)(() => {
3244
3243
  if (!open) return;
3245
3244
  function handleKeyDown(e) {
3246
3245
  if (e.key === "Escape") onClose();
@@ -4443,25 +4442,25 @@ var ScWorkspaceCard = ({
4443
4442
  };
4444
4443
 
4445
4444
  // src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.tsx
4446
- var import_react5 = require("react");
4445
+ var import_react6 = require("react");
4447
4446
  var import_icons53 = require("@streamoid/icons");
4448
4447
 
4449
4448
  // src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.module.css
4450
4449
  var ScWorkspaceSwitchCard_default = {
4451
4450
  card: "ScWorkspaceSwitchCard_card",
4452
4451
  cardCurrent: "ScWorkspaceSwitchCard_cardCurrent",
4453
- cardHover: "ScWorkspaceSwitchCard_cardHover",
4454
- workspaceInfo: "ScWorkspaceSwitchCard_workspaceInfo",
4455
- avatarWrap: "ScWorkspaceSwitchCard_avatarWrap",
4456
- avatarCover: "ScWorkspaceSwitchCard_avatarCover",
4457
- avatarImg: "ScWorkspaceSwitchCard_avatarImg",
4452
+ cardOther: "ScWorkspaceSwitchCard_cardOther",
4453
+ cardOtherHover: "ScWorkspaceSwitchCard_cardOtherHover",
4454
+ wsInfo: "ScWorkspaceSwitchCard_wsInfo",
4455
+ dp: "ScWorkspaceSwitchCard_dp",
4458
4456
  infoCol: "ScWorkspaceSwitchCard_infoCol",
4459
4457
  wsName: "ScWorkspaceSwitchCard_wsName",
4460
4458
  detailsRow: "ScWorkspaceSwitchCard_detailsRow",
4461
4459
  detailItem: "ScWorkspaceSwitchCard_detailItem",
4462
4460
  detailItemFlex: "ScWorkspaceSwitchCard_detailItemFlex",
4463
4461
  detailLabel: "ScWorkspaceSwitchCard_detailLabel",
4464
- detailValueWarning: "ScWorkspaceSwitchCard_detailValueWarning",
4462
+ detailValueRole: "ScWorkspaceSwitchCard_detailValueRole",
4463
+ detailValueInfo: "ScWorkspaceSwitchCard_detailValueInfo",
4465
4464
  detailValueSecondary: "ScWorkspaceSwitchCard_detailValueSecondary",
4466
4465
  vDivider: "ScWorkspaceSwitchCard_vDivider",
4467
4466
  btnIcon: "ScWorkspaceSwitchCard_btnIcon"
@@ -4469,97 +4468,115 @@ var ScWorkspaceSwitchCard_default = {
4469
4468
 
4470
4469
  // src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.tsx
4471
4470
  var import_jsx_runtime63 = require("react/jsx-runtime");
4472
- function deriveInitials2(name) {
4473
- return name.split(/\s+/).slice(0, 2).map((w) => w[0]?.toUpperCase() ?? "").join("") || "WS";
4474
- }
4475
- function ScWorkspaceSwitchCard({
4476
- name,
4471
+ function NscWorkspaceSwitch({
4472
+ wsName = "Workspace name is kepler",
4473
+ role = "Admin",
4474
+ plan = "Free",
4475
+ ownerId = "rohan@streamoid.com",
4477
4476
  initials,
4478
4477
  imageUrl,
4479
- role,
4480
- plan,
4481
- ownerEmail,
4482
- isCurrent = false,
4483
- variant = "switch",
4478
+ type = "currentWS",
4479
+ hover,
4480
+ className,
4484
4481
  onSwitch,
4485
4482
  onSettings
4486
4483
  }) {
4487
- const [hovered, setHovered] = (0, import_react5.useState)(false);
4488
- const showButtons = !isCurrent && hovered;
4489
- const displayInitials = initials || deriveInitials2(name);
4484
+ const [internalHover, setInternalHover] = (0, import_react6.useState)(false);
4485
+ const isHover = hover !== void 0 ? hover : internalHover;
4486
+ const isCurrent = type === "currentWS";
4487
+ const isOther = type === "otherWS";
4490
4488
  const isAdmin = role?.toLowerCase() === "admin";
4491
- const roleText = isAdmin ? "Admin" : "Member";
4489
+ const displayRole = role ? role.charAt(0).toUpperCase() + role.slice(1).toLowerCase() : role;
4490
+ const displayInitials = initials || wsName.split(/\s+/).slice(0, 2).map((w) => w[0]?.toUpperCase() ?? "").join("") || "WS";
4492
4491
  const cardClass = [
4493
4492
  ScWorkspaceSwitchCard_default.card,
4494
- isCurrent ? ScWorkspaceSwitchCard_default.cardCurrent : "",
4495
- hovered && !isCurrent ? ScWorkspaceSwitchCard_default.cardHover : ""
4493
+ isCurrent ? ScWorkspaceSwitchCard_default.cardCurrent : ScWorkspaceSwitchCard_default.cardOther,
4494
+ isHover && isOther ? ScWorkspaceSwitchCard_default.cardOtherHover : "",
4495
+ className || ""
4496
4496
  ].filter(Boolean).join(" ");
4497
+ const dpBg = isCurrent ? "var(--alias-fill-neutral-neutralactive, #313131)" : "var(--alias-fill-neutral-neutralselected, #242424)";
4498
+ const roleColorClass = isAdmin ? ScWorkspaceSwitchCard_default.detailValueRole : ScWorkspaceSwitchCard_default.detailValueInfo;
4497
4499
  return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4498
4500
  "div",
4499
4501
  {
4500
4502
  className: cardClass,
4501
- onMouseEnter: () => !isCurrent && setHovered(true),
4502
- onMouseLeave: () => setHovered(false),
4503
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: ScWorkspaceSwitchCard_default.workspaceInfo, children: [
4504
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: ScWorkspaceSwitchCard_default.avatarWrap, children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("img", { src: imageUrl, alt: name, className: ScWorkspaceSwitchCard_default.avatarImg }) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4505
- ScIntialProfileCover,
4503
+ onMouseEnter: () => setInternalHover(true),
4504
+ onMouseLeave: () => setInternalHover(false),
4505
+ children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: ScWorkspaceSwitchCard_default.wsInfo, children: [
4506
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4507
+ ScDp,
4506
4508
  {
4507
- intial: displayInitials,
4508
- className: ScWorkspaceSwitchCard_default.avatarCover
4509
+ type: imageUrl ? "image" : "initial",
4510
+ variant: "workspace",
4511
+ initial: displayInitials,
4512
+ imageUrl,
4513
+ className: ScWorkspaceSwitchCard_default.dp,
4514
+ style: {
4515
+ backgroundColor: dpBg,
4516
+ borderRadius: "var(--radius-xl, 12px)"
4517
+ }
4509
4518
  }
4510
- ) }),
4519
+ ),
4511
4520
  /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: ScWorkspaceSwitchCard_default.infoCol, children: [
4512
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { className: ScWorkspaceSwitchCard_default.wsName, children: name }),
4521
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { className: ScWorkspaceSwitchCard_default.wsName, children: wsName }),
4513
4522
  /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: ScWorkspaceSwitchCard_default.detailsRow, children: [
4514
4523
  /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: ScWorkspaceSwitchCard_default.detailItem, children: [
4515
4524
  /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: ScWorkspaceSwitchCard_default.detailLabel, children: "Role" }),
4516
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4517
- "span",
4518
- {
4519
- className: isAdmin ? ScWorkspaceSwitchCard_default.detailValueWarning : ScWorkspaceSwitchCard_default.detailValueSecondary,
4520
- children: roleText
4521
- }
4522
- )
4525
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: roleColorClass, children: displayRole })
4523
4526
  ] }),
4524
4527
  /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(ScVDivider, { className: ScWorkspaceSwitchCard_default.vDivider }),
4525
4528
  /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: ScWorkspaceSwitchCard_default.detailItem, children: [
4526
4529
  /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: ScWorkspaceSwitchCard_default.detailLabel, children: "Plan" }),
4527
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: ScWorkspaceSwitchCard_default.detailValueSecondary, children: plan || "\u2013" })
4530
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: ScWorkspaceSwitchCard_default.detailValueSecondary, children: plan })
4528
4531
  ] }),
4529
4532
  /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(ScVDivider, { className: ScWorkspaceSwitchCard_default.vDivider }),
4530
4533
  /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: ScWorkspaceSwitchCard_default.detailItemFlex, children: [
4531
4534
  /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: ScWorkspaceSwitchCard_default.detailLabel, children: "Workspace Owner" }),
4532
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: ScWorkspaceSwitchCard_default.detailValueSecondary, children: ownerEmail || "\u2013" })
4535
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: ScWorkspaceSwitchCard_default.detailValueSecondary, children: ownerId })
4533
4536
  ] })
4534
4537
  ] })
4535
4538
  ] }),
4536
- showButtons && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4537
- ScButton,
4539
+ isHover && isOther && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4540
+ "div",
4538
4541
  {
4539
- text: "Switch Workspace",
4540
- size: "sm",
4541
- styleVariant: "icon-left",
4542
- icon: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_icons53.SiconSwitch, { className: ScWorkspaceSwitchCard_default.btnIcon }),
4543
4542
  onClick: (e) => {
4544
4543
  e.stopPropagation();
4545
4544
  onSwitch?.();
4546
- }
4545
+ },
4546
+ style: { cursor: "pointer" },
4547
+ children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4548
+ ScButton,
4549
+ {
4550
+ text: "Switch Workspace",
4551
+ variant: "secondary",
4552
+ size: "sm",
4553
+ styleVariant: "icon-left",
4554
+ icon: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_icons53.SiconSwitch, { className: ScWorkspaceSwitchCard_default.btnIcon })
4555
+ }
4556
+ )
4547
4557
  }
4548
4558
  ),
4549
- showButtons && variant === "settings" && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4550
- ScButton,
4559
+ isHover && isAdmin && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4560
+ "div",
4551
4561
  {
4552
- styleVariant: "icon-only",
4553
- variant: "outline",
4554
- size: "sm",
4555
- icon: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_icons53.SiconSettings, { className: ScWorkspaceSwitchCard_default.btnIcon }),
4556
4562
  onClick: (e) => {
4557
4563
  e.stopPropagation();
4558
4564
  onSettings?.();
4559
- }
4565
+ },
4566
+ style: { cursor: "pointer" },
4567
+ children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4568
+ ScButton,
4569
+ {
4570
+ styleVariant: "icon-only",
4571
+ variant: "outline",
4572
+ size: "sm",
4573
+ icon: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_icons53.SiconSettings, { className: ScWorkspaceSwitchCard_default.btnIcon })
4574
+ }
4575
+ )
4560
4576
  }
4561
4577
  )
4562
4578
  ] })
4563
4579
  }
4564
4580
  );
4565
4581
  }
4582
+ var ScWorkspaceSwitchCard = NscWorkspaceSwitch;