@streamoid/ui 0.2.0 → 0.2.2
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.css +198 -6
- package/dist/index.d.mts +13 -10
- package/dist/index.d.ts +13 -10
- package/dist/index.js +138 -250
- package/dist/index.mjs +140 -252
- package/package.json +2 -2
package/dist/index.css
CHANGED
|
@@ -1279,7 +1279,8 @@
|
|
|
1279
1279
|
.ScButton_scButton.ScButton_state-disabled.ScButton_type-primary.ScButton_variant-error {
|
|
1280
1280
|
background: var(--alias-fill-error-solidactive, #b01717);
|
|
1281
1281
|
}
|
|
1282
|
-
.ScButton_scButton.ScButton_type-primary.ScButton_variant-error .ScButton_label
|
|
1282
|
+
.ScButton_scButton.ScButton_type-primary.ScButton_variant-error .ScButton_label,
|
|
1283
|
+
.ScButton_scButton.ScButton_type-primary.ScButton_variant-error .ScButton_container {
|
|
1283
1284
|
color: var(--alias-text-and-icons-fullwhite, #ffffff);
|
|
1284
1285
|
}
|
|
1285
1286
|
.ScButton_scButton.ScButton_type-secondary {
|
|
@@ -1291,7 +1292,8 @@
|
|
|
1291
1292
|
.ScButton_scButton.ScButton_state-disabled.ScButton_type-secondary {
|
|
1292
1293
|
background: var(--alias-fill-error-secondary, #1c0404);
|
|
1293
1294
|
}
|
|
1294
|
-
.ScButton_scButton.ScButton_type-secondary .ScButton_label
|
|
1295
|
+
.ScButton_scButton.ScButton_type-secondary .ScButton_label,
|
|
1296
|
+
.ScButton_scButton.ScButton_type-secondary .ScButton_container {
|
|
1295
1297
|
color: var(--alias-text-and-icons-errorcont, #eb6b6b);
|
|
1296
1298
|
}
|
|
1297
1299
|
.ScButton_scButton.ScButton_type-secondary:hover,
|
|
@@ -1313,7 +1315,9 @@
|
|
|
1313
1315
|
color: var(--alias-text-and-icons-inverse, #101010);
|
|
1314
1316
|
}
|
|
1315
1317
|
.ScButton_scButton.ScButton_variant-tertiary .ScButton_label,
|
|
1316
|
-
.ScButton_scButton.ScButton_variant-outline .ScButton_label
|
|
1318
|
+
.ScButton_scButton.ScButton_variant-outline .ScButton_label,
|
|
1319
|
+
.ScButton_scButton.ScButton_variant-tertiary .ScButton_container,
|
|
1320
|
+
.ScButton_scButton.ScButton_variant-outline .ScButton_container {
|
|
1317
1321
|
color: var(--alias-text-and-icons-primary, #f5f5f5);
|
|
1318
1322
|
}
|
|
1319
1323
|
.ScButton_scButton.ScButton_state-default.ScButton_variant-tertiary,
|
|
@@ -1324,7 +1328,8 @@
|
|
|
1324
1328
|
.ScButton_scButton.ScButton_state-disabled.ScButton_variant-outline {
|
|
1325
1329
|
background: unset;
|
|
1326
1330
|
}
|
|
1327
|
-
.ScButton_scButton.ScButton_type-tertiary .ScButton_label
|
|
1331
|
+
.ScButton_scButton.ScButton_type-tertiary .ScButton_label,
|
|
1332
|
+
.ScButton_scButton.ScButton_type-tertiary .ScButton_container {
|
|
1328
1333
|
color: var(--alias-text-and-icons-error, #d11a1a);
|
|
1329
1334
|
}
|
|
1330
1335
|
.ScButton_scButton.ScButton_type-tertiary:hover,
|
|
@@ -1576,11 +1581,15 @@
|
|
|
1576
1581
|
background-repeat: repeat;
|
|
1577
1582
|
}
|
|
1578
1583
|
.ScButton_scButton.ScButton_state-default.ScButton_variant-primary.ScButton_type-primary .ScButton_label,
|
|
1579
|
-
.ScButton_scButton.ScButton_state-disabled.ScButton_variant-primary.ScButton_type-primary .ScButton_label
|
|
1584
|
+
.ScButton_scButton.ScButton_state-disabled.ScButton_variant-primary.ScButton_type-primary .ScButton_label,
|
|
1585
|
+
.ScButton_scButton.ScButton_state-default.ScButton_variant-primary.ScButton_type-primary .ScButton_container,
|
|
1586
|
+
.ScButton_scButton.ScButton_state-disabled.ScButton_variant-primary.ScButton_type-primary .ScButton_container {
|
|
1580
1587
|
color: #fffafa;
|
|
1581
1588
|
}
|
|
1582
1589
|
.ScButton_scButton.ScButton_variant-primary.ScButton_type-primary:hover .ScButton_label,
|
|
1583
|
-
.ScButton_scButton.ScButton_state-hover.ScButton_variant-primary.ScButton_type-primary .ScButton_label
|
|
1590
|
+
.ScButton_scButton.ScButton_state-hover.ScButton_variant-primary.ScButton_type-primary .ScButton_label,
|
|
1591
|
+
.ScButton_scButton.ScButton_variant-primary.ScButton_type-primary:hover .ScButton_container,
|
|
1592
|
+
.ScButton_scButton.ScButton_state-hover.ScButton_variant-primary.ScButton_type-primary .ScButton_container {
|
|
1584
1593
|
color: #fffafa;
|
|
1585
1594
|
}
|
|
1586
1595
|
.ScButton_scButton.ScButton_variant-primary.ScButton_type-primary:hover,
|
|
@@ -1991,6 +2000,64 @@
|
|
|
1991
2000
|
position: relative;
|
|
1992
2001
|
}
|
|
1993
2002
|
|
|
2003
|
+
/* src/SC-Dp/ScDp.module.css */
|
|
2004
|
+
.ScDp_scDp,
|
|
2005
|
+
.ScDp_scDp * {
|
|
2006
|
+
box-sizing: border-box;
|
|
2007
|
+
}
|
|
2008
|
+
.ScDp_scDp {
|
|
2009
|
+
position: relative;
|
|
2010
|
+
overflow: hidden;
|
|
2011
|
+
flex-shrink: 0;
|
|
2012
|
+
aspect-ratio: 1;
|
|
2013
|
+
}
|
|
2014
|
+
.ScDp_variantWorkspace {
|
|
2015
|
+
border-radius: var(--radius-md, 8px);
|
|
2016
|
+
}
|
|
2017
|
+
.ScDp_variantProfile {
|
|
2018
|
+
border-radius: var(--radius-full, 999px);
|
|
2019
|
+
}
|
|
2020
|
+
.ScDp_typeInitial {
|
|
2021
|
+
background: var(--alias-fill-neutral-neutralselected, #242424);
|
|
2022
|
+
display: flex;
|
|
2023
|
+
align-items: center;
|
|
2024
|
+
justify-content: center;
|
|
2025
|
+
padding: var(--spacing-none, 0px);
|
|
2026
|
+
}
|
|
2027
|
+
.ScDp_initials {
|
|
2028
|
+
flex: 1;
|
|
2029
|
+
min-width: 0;
|
|
2030
|
+
min-height: 1px;
|
|
2031
|
+
height: 100%;
|
|
2032
|
+
display: flex;
|
|
2033
|
+
flex-direction: column;
|
|
2034
|
+
align-items: center;
|
|
2035
|
+
justify-content: center;
|
|
2036
|
+
overflow: hidden;
|
|
2037
|
+
text-overflow: ellipsis;
|
|
2038
|
+
white-space: nowrap;
|
|
2039
|
+
text-align: center;
|
|
2040
|
+
color: var(--alias-text-and-icons-primary, #f5f5f5);
|
|
2041
|
+
font-family: var(--font-family-font-family-body, "Inter", sans-serif);
|
|
2042
|
+
font-size: var(--font-size-font-size-md, 1rem);
|
|
2043
|
+
font-weight: 500;
|
|
2044
|
+
line-height: var(--line-height-line-height-md, 1.5rem);
|
|
2045
|
+
}
|
|
2046
|
+
.ScDp_image {
|
|
2047
|
+
position: absolute;
|
|
2048
|
+
inset: 0;
|
|
2049
|
+
width: 100%;
|
|
2050
|
+
height: 100%;
|
|
2051
|
+
object-fit: cover;
|
|
2052
|
+
pointer-events: none;
|
|
2053
|
+
}
|
|
2054
|
+
.ScDp_imageWorkspace {
|
|
2055
|
+
border-radius: var(--radius-md, 8px);
|
|
2056
|
+
}
|
|
2057
|
+
.ScDp_imageProfile {
|
|
2058
|
+
border-radius: var(--radius-full, 999px);
|
|
2059
|
+
}
|
|
2060
|
+
|
|
1994
2061
|
/* src/SC-Google sign in/ScGoogleSignIn.module.css */
|
|
1995
2062
|
.ScGoogleSignIn_scGoogleSignIn,
|
|
1996
2063
|
.ScGoogleSignIn_scGoogleSignIn * {
|
|
@@ -4639,3 +4706,128 @@
|
|
|
4639
4706
|
.ScWorkspaceCard_scWorkspaceCard.ScWorkspaceCard_current-workspace-false .ScWorkspaceCard_scButtonInstance2 {
|
|
4640
4707
|
width: unset !important;
|
|
4641
4708
|
}
|
|
4709
|
+
|
|
4710
|
+
/* src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.module.css */
|
|
4711
|
+
.ScWorkspaceSwitchCard_card,
|
|
4712
|
+
.ScWorkspaceSwitchCard_card * {
|
|
4713
|
+
box-sizing: border-box;
|
|
4714
|
+
}
|
|
4715
|
+
.ScWorkspaceSwitchCard_card {
|
|
4716
|
+
width: 100%;
|
|
4717
|
+
display: flex;
|
|
4718
|
+
align-items: center;
|
|
4719
|
+
border-radius: var(--radius-3xl, 1rem);
|
|
4720
|
+
border-style: solid;
|
|
4721
|
+
border-width: 0.5px;
|
|
4722
|
+
padding: var(--spacing-xs, 4px) var(--spacing-3xl, 16px) var(--spacing-xs, 4px) var(--spacing-xs, 4px);
|
|
4723
|
+
gap: var(--spacing-3xl, 16px);
|
|
4724
|
+
transition: background-color 0.15s ease;
|
|
4725
|
+
}
|
|
4726
|
+
.ScWorkspaceSwitchCard_cardCurrent {
|
|
4727
|
+
background: var(--alias-surface-raised, #242424);
|
|
4728
|
+
border-color: var(--alias-border-default, #3e3e3e);
|
|
4729
|
+
cursor: default;
|
|
4730
|
+
}
|
|
4731
|
+
.ScWorkspaceSwitchCard_cardOther {
|
|
4732
|
+
background: var(--alias-surface-base, #101010);
|
|
4733
|
+
border-color: var(--alias-border-subtle, #242424);
|
|
4734
|
+
cursor: pointer;
|
|
4735
|
+
}
|
|
4736
|
+
.ScWorkspaceSwitchCard_cardOtherHover {
|
|
4737
|
+
background: var(--alias-surface-basesubtle, #151515);
|
|
4738
|
+
}
|
|
4739
|
+
.ScWorkspaceSwitchCard_wsInfo {
|
|
4740
|
+
display: flex;
|
|
4741
|
+
flex: 1 0 0;
|
|
4742
|
+
align-items: center;
|
|
4743
|
+
gap: var(--spacing-3xl, 16px);
|
|
4744
|
+
min-width: 0;
|
|
4745
|
+
min-height: 1px;
|
|
4746
|
+
}
|
|
4747
|
+
.ScWorkspaceSwitchCard_dp {
|
|
4748
|
+
width: 90px !important;
|
|
4749
|
+
height: 90px !important;
|
|
4750
|
+
}
|
|
4751
|
+
.ScWorkspaceSwitchCard_infoCol {
|
|
4752
|
+
display: flex;
|
|
4753
|
+
flex-direction: column;
|
|
4754
|
+
flex: 1 0 0;
|
|
4755
|
+
min-width: 0;
|
|
4756
|
+
min-height: 1px;
|
|
4757
|
+
align-items: flex-start;
|
|
4758
|
+
padding: var(--spacing-md, 8px) 0;
|
|
4759
|
+
gap: var(--spacing-xl, 12px);
|
|
4760
|
+
}
|
|
4761
|
+
.ScWorkspaceSwitchCard_wsName {
|
|
4762
|
+
margin: 0;
|
|
4763
|
+
width: 100%;
|
|
4764
|
+
flex-shrink: 0;
|
|
4765
|
+
overflow: hidden;
|
|
4766
|
+
text-overflow: ellipsis;
|
|
4767
|
+
white-space: nowrap;
|
|
4768
|
+
color: var(--alias-text-and-icons-primary, #f5f5f5);
|
|
4769
|
+
font-family: var(--font-family-font-family-body, "Inter", sans-serif);
|
|
4770
|
+
font-size: var(--font-size-font-size-md, 1rem);
|
|
4771
|
+
font-weight: 500;
|
|
4772
|
+
line-height: var(--line-height-line-height-md, 1.5rem);
|
|
4773
|
+
}
|
|
4774
|
+
.ScWorkspaceSwitchCard_detailsRow {
|
|
4775
|
+
display: flex;
|
|
4776
|
+
align-items: center;
|
|
4777
|
+
width: 100%;
|
|
4778
|
+
flex-shrink: 0;
|
|
4779
|
+
gap: var(--spacing-5xl, 20px);
|
|
4780
|
+
}
|
|
4781
|
+
.ScWorkspaceSwitchCard_detailItem {
|
|
4782
|
+
display: flex;
|
|
4783
|
+
flex-direction: column;
|
|
4784
|
+
align-items: flex-start;
|
|
4785
|
+
justify-content: center;
|
|
4786
|
+
flex-shrink: 0;
|
|
4787
|
+
white-space: nowrap;
|
|
4788
|
+
}
|
|
4789
|
+
.ScWorkspaceSwitchCard_detailItemFlex {
|
|
4790
|
+
display: flex;
|
|
4791
|
+
flex-direction: column;
|
|
4792
|
+
align-items: flex-start;
|
|
4793
|
+
justify-content: center;
|
|
4794
|
+
flex: 1 0 0;
|
|
4795
|
+
min-width: 0;
|
|
4796
|
+
min-height: 1px;
|
|
4797
|
+
white-space: nowrap;
|
|
4798
|
+
}
|
|
4799
|
+
.ScWorkspaceSwitchCard_detailLabel {
|
|
4800
|
+
color: var(--alias-text-and-icons-disabled, #5c5c5c);
|
|
4801
|
+
font-family: var(--font-family-font-family-body, "Inter", sans-serif);
|
|
4802
|
+
font-size: var(--font-size-font-size-xs, 0.75rem);
|
|
4803
|
+
font-weight: 400;
|
|
4804
|
+
line-height: var(--line-height-line-height-xs, 1.125rem);
|
|
4805
|
+
overflow: hidden;
|
|
4806
|
+
text-overflow: ellipsis;
|
|
4807
|
+
}
|
|
4808
|
+
.ScWorkspaceSwitchCard_detailValueRole {
|
|
4809
|
+
color: var(--alias-text-and-icons-warning, #db8b00);
|
|
4810
|
+
font-family: var(--font-family-font-family-body, "Inter", sans-serif);
|
|
4811
|
+
font-size: var(--font-size-font-size-sm, 0.875rem);
|
|
4812
|
+
font-weight: 500;
|
|
4813
|
+
line-height: var(--line-height-line-height-sm, 1.25rem);
|
|
4814
|
+
}
|
|
4815
|
+
.ScWorkspaceSwitchCard_detailValueSecondary {
|
|
4816
|
+
color: var(--alias-text-and-icons-secondary, #dadada);
|
|
4817
|
+
font-family: var(--font-family-font-family-body, "Inter", sans-serif);
|
|
4818
|
+
font-size: var(--font-size-font-size-sm, 0.875rem);
|
|
4819
|
+
font-weight: 400;
|
|
4820
|
+
line-height: var(--line-height-line-height-sm, 1.25rem);
|
|
4821
|
+
overflow: hidden;
|
|
4822
|
+
text-overflow: ellipsis;
|
|
4823
|
+
width: 100%;
|
|
4824
|
+
}
|
|
4825
|
+
.ScWorkspaceSwitchCard_vDivider {
|
|
4826
|
+
width: 1px !important;
|
|
4827
|
+
height: 24px !important;
|
|
4828
|
+
flex-shrink: 0 !important;
|
|
4829
|
+
}
|
|
4830
|
+
.ScWorkspaceSwitchCard_btnIcon {
|
|
4831
|
+
width: 1rem !important;
|
|
4832
|
+
height: 1rem !important;
|
|
4833
|
+
}
|
package/dist/index.d.mts
CHANGED
|
@@ -91,9 +91,9 @@ interface IScCreditsUsageCardProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
91
91
|
declare const ScCreditsUsageCard: ({ usageLabel, usageText, remainingText, buyButtonText, buyButtonState, onBuyClick, progress, className, ...props }: IScCreditsUsageCardProps) => JSX.Element;
|
|
92
92
|
|
|
93
93
|
interface ScDpProps {
|
|
94
|
-
/**
|
|
94
|
+
/** "initial" shows initials text, "image" shows an image. */
|
|
95
95
|
type?: "initial" | "image";
|
|
96
|
-
/**
|
|
96
|
+
/** "workspace" = rounded rect, "profile" = circle. */
|
|
97
97
|
variant?: "workspace" | "profile";
|
|
98
98
|
/** Initials text (used when type="initial", or as fallback when image fails). */
|
|
99
99
|
initial?: string;
|
|
@@ -566,18 +566,21 @@ interface IScWorkspaceCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
566
566
|
}
|
|
567
567
|
declare const ScWorkspaceCard: ({ workspaceName, role, userCount, ownerEmail, buttonText, className, ...props }: IScWorkspaceCardProps) => JSX.Element;
|
|
568
568
|
|
|
569
|
-
interface
|
|
570
|
-
|
|
571
|
-
initials?: string;
|
|
572
|
-
imageUrl?: string;
|
|
569
|
+
interface NscWorkspaceSwitchProps {
|
|
570
|
+
wsName?: string;
|
|
573
571
|
role?: string;
|
|
574
572
|
plan?: string;
|
|
575
|
-
|
|
576
|
-
|
|
573
|
+
ownerId?: string;
|
|
574
|
+
initials?: string;
|
|
575
|
+
imageUrl?: string;
|
|
576
|
+
type?: "currentWS" | "otherWS";
|
|
577
577
|
variant?: "switch" | "settings";
|
|
578
|
+
hover?: boolean;
|
|
579
|
+
className?: string;
|
|
578
580
|
onSwitch?: () => void;
|
|
579
581
|
onSettings?: () => void;
|
|
580
582
|
}
|
|
581
|
-
declare function
|
|
583
|
+
declare function NscWorkspaceSwitch({ wsName, role, plan, ownerId, initials, imageUrl, type, variant, hover, className, onSwitch, onSettings, }: NscWorkspaceSwitchProps): react_jsx_runtime.JSX.Element;
|
|
584
|
+
declare const ScWorkspaceSwitchCard: typeof NscWorkspaceSwitch;
|
|
582
585
|
|
|
583
|
-
export { type IScAccessProps, type IScAppCardProps, type IScAppFieldProps, type IScAppListingCardProps, type IScArtifaxInviteProps, type IScBadgesProps, type IScBillingHistoryHeaderProps, type IScBillingHistoryTableListProps, type IScBillingLogsTableHeaderProps, type IScBillingLogsTableListProps, type IScButtonProps, type IScCalendarDateCompsProps, type IScCalendarProps, type IScCatalogixInviteProps, type IScCheckFieldProps, type IScCheckboxProps, type IScCreditsUsageCardProps, type IScFieldButtonProps, type IScGoogleSignInProps, type IScHDividerProps, type IScHeaderProps, type IScIntialProfileCoverProps, type IScLogoUnitProps, type IScMenuOptionsProps, type IScOnlyFieldProps, type IScOnlyIconProps, type IScPairtextProps, type IScPendingActionProps, type IScPhtogenixInviteProps, type IScPlanCardProps, type IScPlanDetailsCardProps, type IScProfileImageUpdateProps, type IScProfileOptionsProps, type IScProfileProps, type IScProfileSettingsCompProps, type IScProgressBarProps, type IScQuickPromptProps, type IScRadioProps, type IScReferralTableHeaderProps, type IScReferralTableListProps, type IScRoleProps, type IScSettingsNavProps, type IScSidebarIconsProps, type IScSidebarMenuProps, type IScSidebarProfileProps, type IScSidebarProps, type IScSliderProps, type IScStrLogoProps, type IScTabCompProps, type IScTabFieldProps, type IScTabSwitcherProps, type IScTableHeaderProps, type IScTableListProps, type IScTextFieldProps, type IScToggleSwitchProps, type IScVDividerProps, type IScVersionProps, type IScWorkspaceCardProps, type PlanFeatureSection, ScAccess, ScAppCard, ScAppField, ScAppListingCard, ScArtifaxInvite, ScBadges, ScBillingHistoryHeader, ScBillingHistoryTableList, ScBillingLogsTableHeader, ScBillingLogsTableList, ScButton, ScCalendar, ScCalendarDateComps, ScCatalogixInvite, ScCheckField, ScCheckbox, ScCreditsUsageCard, ScDp, type ScDpProps, ScFieldButton, ScGoogleSignIn, ScHDivider, ScHeader, ScIntialProfileCover, ScLogoUnit, ScMenuOptions, ScOnlyField, ScOnlyIcon, ScPairtext, ScPendingAction, ScPhtogenixInvite, ScPlanCard, ScPlanDetailsCard, ScProfile, ScProfileImageUpdate, ScProfileOptions, ScProfileSettingsComp, ScProgressBar, ScQuickPrompt, ScRadio, ScReferralTableHeader, ScReferralTableList, ScRole, ScSettingsNav, ScSidebar, ScSidebarIcons, ScSidebarMenu, ScSidebarProfile, ScSlider, ScStrLogo, ScTabComp, ScTabField, ScTabSwitcher, ScTableHeader, ScTableList, ScTextField, ScToggleSwitch, ScVDivider, ScVersion, ScWorkspaceCard, ScWorkspaceSwitchCard, type
|
|
586
|
+
export { type IScAccessProps, type IScAppCardProps, type IScAppFieldProps, type IScAppListingCardProps, type IScArtifaxInviteProps, type IScBadgesProps, type IScBillingHistoryHeaderProps, type IScBillingHistoryTableListProps, type IScBillingLogsTableHeaderProps, type IScBillingLogsTableListProps, type IScButtonProps, type IScCalendarDateCompsProps, type IScCalendarProps, type IScCatalogixInviteProps, type IScCheckFieldProps, type IScCheckboxProps, type IScCreditsUsageCardProps, type IScFieldButtonProps, type IScGoogleSignInProps, type IScHDividerProps, type IScHeaderProps, type IScIntialProfileCoverProps, type IScLogoUnitProps, type IScMenuOptionsProps, type IScOnlyFieldProps, type IScOnlyIconProps, type IScPairtextProps, type IScPendingActionProps, type IScPhtogenixInviteProps, type IScPlanCardProps, type IScPlanDetailsCardProps, type IScProfileImageUpdateProps, type IScProfileOptionsProps, type IScProfileProps, type IScProfileSettingsCompProps, type IScProgressBarProps, type IScQuickPromptProps, type IScRadioProps, type IScReferralTableHeaderProps, type IScReferralTableListProps, type IScRoleProps, type IScSettingsNavProps, type IScSidebarIconsProps, type IScSidebarMenuProps, type IScSidebarProfileProps, type IScSidebarProps, type IScSliderProps, type IScStrLogoProps, type IScTabCompProps, type IScTabFieldProps, type IScTabSwitcherProps, type IScTableHeaderProps, type IScTableListProps, type IScTextFieldProps, type IScToggleSwitchProps, type IScVDividerProps, type IScVersionProps, type IScWorkspaceCardProps, NscWorkspaceSwitch, type NscWorkspaceSwitchProps, type PlanFeatureSection, ScAccess, ScAppCard, ScAppField, ScAppListingCard, ScArtifaxInvite, ScBadges, ScBillingHistoryHeader, ScBillingHistoryTableList, ScBillingLogsTableHeader, ScBillingLogsTableList, ScButton, ScCalendar, ScCalendarDateComps, ScCatalogixInvite, ScCheckField, ScCheckbox, ScCreditsUsageCard, ScDp, type ScDpProps, ScFieldButton, ScGoogleSignIn, ScHDivider, ScHeader, ScIntialProfileCover, ScLogoUnit, ScMenuOptions, ScOnlyField, ScOnlyIcon, ScPairtext, ScPendingAction, ScPhtogenixInvite, ScPlanCard, ScPlanDetailsCard, ScProfile, ScProfileImageUpdate, ScProfileOptions, ScProfileSettingsComp, ScProgressBar, ScQuickPrompt, ScRadio, ScReferralTableHeader, ScReferralTableList, ScRole, ScSettingsNav, ScSidebar, ScSidebarIcons, ScSidebarMenu, ScSidebarProfile, ScSlider, ScStrLogo, ScTabComp, ScTabField, ScTabSwitcher, ScTableHeader, ScTableList, ScTextField, ScToggleSwitch, ScVDivider, ScVersion, ScWorkspaceCard, ScWorkspaceSwitchCard, type SidebarConfig, type SidebarIconContext, type SidebarIconMap, type SidebarIconRenderer, type SidebarMenuItemConfig, type SidebarProfileConfig, type SidebarSectionConfig, StreamoidSidebar, type StreamoidSidebarProps, StreamoidWorkspaceSwitcher, type StreamoidWorkspaceSwitcherProps, type WorkspaceSwitcherConfig, type WorkspaceSwitcherItem };
|
package/dist/index.d.ts
CHANGED
|
@@ -91,9 +91,9 @@ interface IScCreditsUsageCardProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
91
91
|
declare const ScCreditsUsageCard: ({ usageLabel, usageText, remainingText, buyButtonText, buyButtonState, onBuyClick, progress, className, ...props }: IScCreditsUsageCardProps) => JSX.Element;
|
|
92
92
|
|
|
93
93
|
interface ScDpProps {
|
|
94
|
-
/**
|
|
94
|
+
/** "initial" shows initials text, "image" shows an image. */
|
|
95
95
|
type?: "initial" | "image";
|
|
96
|
-
/**
|
|
96
|
+
/** "workspace" = rounded rect, "profile" = circle. */
|
|
97
97
|
variant?: "workspace" | "profile";
|
|
98
98
|
/** Initials text (used when type="initial", or as fallback when image fails). */
|
|
99
99
|
initial?: string;
|
|
@@ -566,18 +566,21 @@ interface IScWorkspaceCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
566
566
|
}
|
|
567
567
|
declare const ScWorkspaceCard: ({ workspaceName, role, userCount, ownerEmail, buttonText, className, ...props }: IScWorkspaceCardProps) => JSX.Element;
|
|
568
568
|
|
|
569
|
-
interface
|
|
570
|
-
|
|
571
|
-
initials?: string;
|
|
572
|
-
imageUrl?: string;
|
|
569
|
+
interface NscWorkspaceSwitchProps {
|
|
570
|
+
wsName?: string;
|
|
573
571
|
role?: string;
|
|
574
572
|
plan?: string;
|
|
575
|
-
|
|
576
|
-
|
|
573
|
+
ownerId?: string;
|
|
574
|
+
initials?: string;
|
|
575
|
+
imageUrl?: string;
|
|
576
|
+
type?: "currentWS" | "otherWS";
|
|
577
577
|
variant?: "switch" | "settings";
|
|
578
|
+
hover?: boolean;
|
|
579
|
+
className?: string;
|
|
578
580
|
onSwitch?: () => void;
|
|
579
581
|
onSettings?: () => void;
|
|
580
582
|
}
|
|
581
|
-
declare function
|
|
583
|
+
declare function NscWorkspaceSwitch({ wsName, role, plan, ownerId, initials, imageUrl, type, variant, hover, className, onSwitch, onSettings, }: NscWorkspaceSwitchProps): react_jsx_runtime.JSX.Element;
|
|
584
|
+
declare const ScWorkspaceSwitchCard: typeof NscWorkspaceSwitch;
|
|
582
585
|
|
|
583
|
-
export { type IScAccessProps, type IScAppCardProps, type IScAppFieldProps, type IScAppListingCardProps, type IScArtifaxInviteProps, type IScBadgesProps, type IScBillingHistoryHeaderProps, type IScBillingHistoryTableListProps, type IScBillingLogsTableHeaderProps, type IScBillingLogsTableListProps, type IScButtonProps, type IScCalendarDateCompsProps, type IScCalendarProps, type IScCatalogixInviteProps, type IScCheckFieldProps, type IScCheckboxProps, type IScCreditsUsageCardProps, type IScFieldButtonProps, type IScGoogleSignInProps, type IScHDividerProps, type IScHeaderProps, type IScIntialProfileCoverProps, type IScLogoUnitProps, type IScMenuOptionsProps, type IScOnlyFieldProps, type IScOnlyIconProps, type IScPairtextProps, type IScPendingActionProps, type IScPhtogenixInviteProps, type IScPlanCardProps, type IScPlanDetailsCardProps, type IScProfileImageUpdateProps, type IScProfileOptionsProps, type IScProfileProps, type IScProfileSettingsCompProps, type IScProgressBarProps, type IScQuickPromptProps, type IScRadioProps, type IScReferralTableHeaderProps, type IScReferralTableListProps, type IScRoleProps, type IScSettingsNavProps, type IScSidebarIconsProps, type IScSidebarMenuProps, type IScSidebarProfileProps, type IScSidebarProps, type IScSliderProps, type IScStrLogoProps, type IScTabCompProps, type IScTabFieldProps, type IScTabSwitcherProps, type IScTableHeaderProps, type IScTableListProps, type IScTextFieldProps, type IScToggleSwitchProps, type IScVDividerProps, type IScVersionProps, type IScWorkspaceCardProps, type PlanFeatureSection, ScAccess, ScAppCard, ScAppField, ScAppListingCard, ScArtifaxInvite, ScBadges, ScBillingHistoryHeader, ScBillingHistoryTableList, ScBillingLogsTableHeader, ScBillingLogsTableList, ScButton, ScCalendar, ScCalendarDateComps, ScCatalogixInvite, ScCheckField, ScCheckbox, ScCreditsUsageCard, ScDp, type ScDpProps, ScFieldButton, ScGoogleSignIn, ScHDivider, ScHeader, ScIntialProfileCover, ScLogoUnit, ScMenuOptions, ScOnlyField, ScOnlyIcon, ScPairtext, ScPendingAction, ScPhtogenixInvite, ScPlanCard, ScPlanDetailsCard, ScProfile, ScProfileImageUpdate, ScProfileOptions, ScProfileSettingsComp, ScProgressBar, ScQuickPrompt, ScRadio, ScReferralTableHeader, ScReferralTableList, ScRole, ScSettingsNav, ScSidebar, ScSidebarIcons, ScSidebarMenu, ScSidebarProfile, ScSlider, ScStrLogo, ScTabComp, ScTabField, ScTabSwitcher, ScTableHeader, ScTableList, ScTextField, ScToggleSwitch, ScVDivider, ScVersion, ScWorkspaceCard, ScWorkspaceSwitchCard, type
|
|
586
|
+
export { type IScAccessProps, type IScAppCardProps, type IScAppFieldProps, type IScAppListingCardProps, type IScArtifaxInviteProps, type IScBadgesProps, type IScBillingHistoryHeaderProps, type IScBillingHistoryTableListProps, type IScBillingLogsTableHeaderProps, type IScBillingLogsTableListProps, type IScButtonProps, type IScCalendarDateCompsProps, type IScCalendarProps, type IScCatalogixInviteProps, type IScCheckFieldProps, type IScCheckboxProps, type IScCreditsUsageCardProps, type IScFieldButtonProps, type IScGoogleSignInProps, type IScHDividerProps, type IScHeaderProps, type IScIntialProfileCoverProps, type IScLogoUnitProps, type IScMenuOptionsProps, type IScOnlyFieldProps, type IScOnlyIconProps, type IScPairtextProps, type IScPendingActionProps, type IScPhtogenixInviteProps, type IScPlanCardProps, type IScPlanDetailsCardProps, type IScProfileImageUpdateProps, type IScProfileOptionsProps, type IScProfileProps, type IScProfileSettingsCompProps, type IScProgressBarProps, type IScQuickPromptProps, type IScRadioProps, type IScReferralTableHeaderProps, type IScReferralTableListProps, type IScRoleProps, type IScSettingsNavProps, type IScSidebarIconsProps, type IScSidebarMenuProps, type IScSidebarProfileProps, type IScSidebarProps, type IScSliderProps, type IScStrLogoProps, type IScTabCompProps, type IScTabFieldProps, type IScTabSwitcherProps, type IScTableHeaderProps, type IScTableListProps, type IScTextFieldProps, type IScToggleSwitchProps, type IScVDividerProps, type IScVersionProps, type IScWorkspaceCardProps, NscWorkspaceSwitch, type NscWorkspaceSwitchProps, type PlanFeatureSection, ScAccess, ScAppCard, ScAppField, ScAppListingCard, ScArtifaxInvite, ScBadges, ScBillingHistoryHeader, ScBillingHistoryTableList, ScBillingLogsTableHeader, ScBillingLogsTableList, ScButton, ScCalendar, ScCalendarDateComps, ScCatalogixInvite, ScCheckField, ScCheckbox, ScCreditsUsageCard, ScDp, type ScDpProps, ScFieldButton, ScGoogleSignIn, ScHDivider, ScHeader, ScIntialProfileCover, ScLogoUnit, ScMenuOptions, ScOnlyField, ScOnlyIcon, ScPairtext, ScPendingAction, ScPhtogenixInvite, ScPlanCard, ScPlanDetailsCard, ScProfile, ScProfileImageUpdate, ScProfileOptions, ScProfileSettingsComp, ScProgressBar, ScQuickPrompt, ScRadio, ScReferralTableHeader, ScReferralTableList, ScRole, ScSettingsNav, ScSidebar, ScSidebarIcons, ScSidebarMenu, ScSidebarProfile, ScSlider, ScStrLogo, ScTabComp, ScTabField, ScTabSwitcher, ScTableHeader, ScTableList, ScTextField, ScToggleSwitch, ScVDivider, ScVersion, ScWorkspaceCard, ScWorkspaceSwitchCard, type SidebarConfig, type SidebarIconContext, type SidebarIconMap, type SidebarIconRenderer, type SidebarMenuItemConfig, type SidebarProfileConfig, type SidebarSectionConfig, StreamoidSidebar, type StreamoidSidebarProps, StreamoidWorkspaceSwitcher, type StreamoidWorkspaceSwitcherProps, type WorkspaceSwitcherConfig, type WorkspaceSwitcherItem };
|
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:
|
|
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:
|
|
647
|
+
styleVariant === "icon-right" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: styledIcon })
|
|
645
648
|
] })
|
|
646
649
|
]
|
|
647
650
|
}
|
|
@@ -960,6 +963,20 @@ var ScCreditsUsageCard = ({
|
|
|
960
963
|
|
|
961
964
|
// src/SC-Dp/ScDp.tsx
|
|
962
965
|
var import_react2 = require("react");
|
|
966
|
+
|
|
967
|
+
// src/SC-Dp/ScDp.module.css
|
|
968
|
+
var ScDp_default = {
|
|
969
|
+
scDp: "ScDp_scDp",
|
|
970
|
+
variantWorkspace: "ScDp_variantWorkspace",
|
|
971
|
+
variantProfile: "ScDp_variantProfile",
|
|
972
|
+
typeInitial: "ScDp_typeInitial",
|
|
973
|
+
initials: "ScDp_initials",
|
|
974
|
+
image: "ScDp_image",
|
|
975
|
+
imageWorkspace: "ScDp_imageWorkspace",
|
|
976
|
+
imageProfile: "ScDp_imageProfile"
|
|
977
|
+
};
|
|
978
|
+
|
|
979
|
+
// src/SC-Dp/ScDp.tsx
|
|
963
980
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
964
981
|
function ScDp({
|
|
965
982
|
type = "initial",
|
|
@@ -972,61 +989,27 @@ function ScDp({
|
|
|
972
989
|
}) {
|
|
973
990
|
const [imageFailed, setImageFailed] = (0, import_react2.useState)(false);
|
|
974
991
|
const isProfile = variant === "profile";
|
|
975
|
-
const borderRadius = isProfile ? "var(--radius-full)" : "var(--radius-md)";
|
|
976
992
|
const showImage = type === "image" && imageUrl && !imageFailed;
|
|
977
|
-
const
|
|
993
|
+
const containerClass = [
|
|
994
|
+
ScDp_default.scDp,
|
|
995
|
+
isProfile ? ScDp_default.variantProfile : ScDp_default.variantWorkspace,
|
|
996
|
+
!showImage ? ScDp_default.typeInitial : "",
|
|
997
|
+
className || ""
|
|
998
|
+
].filter(Boolean).join(" ");
|
|
999
|
+
const sizeStyle = {
|
|
978
1000
|
width: size,
|
|
979
1001
|
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
1002
|
...style
|
|
991
1003
|
};
|
|
992
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className, style:
|
|
1004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: containerClass, style: sizeStyle, children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
993
1005
|
"img",
|
|
994
1006
|
{
|
|
995
1007
|
src: imageUrl,
|
|
996
1008
|
alt: "",
|
|
997
|
-
|
|
998
|
-
position: "absolute",
|
|
999
|
-
inset: 0,
|
|
1000
|
-
width: "100%",
|
|
1001
|
-
height: "100%",
|
|
1002
|
-
objectFit: "cover",
|
|
1003
|
-
pointerEvents: "none"
|
|
1004
|
-
},
|
|
1009
|
+
className: ScDp_default.image + " " + (isProfile ? ScDp_default.imageProfile : ScDp_default.imageWorkspace),
|
|
1005
1010
|
onError: () => setImageFailed(true)
|
|
1006
1011
|
}
|
|
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
|
-
) });
|
|
1012
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: ScDp_default.initials, children: initial }) });
|
|
1030
1013
|
}
|
|
1031
1014
|
|
|
1032
1015
|
// src/SC-Google sign in/ScGoogleSignIn.module.css
|
|
@@ -4445,220 +4428,125 @@ var ScWorkspaceCard = ({
|
|
|
4445
4428
|
// src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.tsx
|
|
4446
4429
|
var import_react5 = require("react");
|
|
4447
4430
|
var import_icons53 = require("@streamoid/icons");
|
|
4431
|
+
|
|
4432
|
+
// src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.module.css
|
|
4433
|
+
var ScWorkspaceSwitchCard_default = {
|
|
4434
|
+
card: "ScWorkspaceSwitchCard_card",
|
|
4435
|
+
cardCurrent: "ScWorkspaceSwitchCard_cardCurrent",
|
|
4436
|
+
cardOther: "ScWorkspaceSwitchCard_cardOther",
|
|
4437
|
+
cardOtherHover: "ScWorkspaceSwitchCard_cardOtherHover",
|
|
4438
|
+
wsInfo: "ScWorkspaceSwitchCard_wsInfo",
|
|
4439
|
+
dp: "ScWorkspaceSwitchCard_dp",
|
|
4440
|
+
infoCol: "ScWorkspaceSwitchCard_infoCol",
|
|
4441
|
+
wsName: "ScWorkspaceSwitchCard_wsName",
|
|
4442
|
+
detailsRow: "ScWorkspaceSwitchCard_detailsRow",
|
|
4443
|
+
detailItem: "ScWorkspaceSwitchCard_detailItem",
|
|
4444
|
+
detailItemFlex: "ScWorkspaceSwitchCard_detailItemFlex",
|
|
4445
|
+
detailLabel: "ScWorkspaceSwitchCard_detailLabel",
|
|
4446
|
+
detailValueRole: "ScWorkspaceSwitchCard_detailValueRole",
|
|
4447
|
+
detailValueSecondary: "ScWorkspaceSwitchCard_detailValueSecondary",
|
|
4448
|
+
vDivider: "ScWorkspaceSwitchCard_vDivider",
|
|
4449
|
+
btnIcon: "ScWorkspaceSwitchCard_btnIcon"
|
|
4450
|
+
};
|
|
4451
|
+
|
|
4452
|
+
// src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.tsx
|
|
4448
4453
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4449
|
-
function
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
"div",
|
|
4455
|
-
{
|
|
4456
|
-
style: { width: 24, height: 24, display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
|
|
4457
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4458
|
-
"div",
|
|
4459
|
-
{
|
|
4460
|
-
style: {
|
|
4461
|
-
width: 4,
|
|
4462
|
-
height: 4,
|
|
4463
|
-
borderRadius: "50%",
|
|
4464
|
-
backgroundColor: "var(--alias-text---icons-disabled)"
|
|
4465
|
-
}
|
|
4466
|
-
}
|
|
4467
|
-
)
|
|
4468
|
-
}
|
|
4469
|
-
);
|
|
4470
|
-
}
|
|
4471
|
-
function ScWorkspaceSwitchCard({
|
|
4472
|
-
name,
|
|
4454
|
+
function NscWorkspaceSwitch({
|
|
4455
|
+
wsName = "Workspace name is kepler",
|
|
4456
|
+
role = "Admin",
|
|
4457
|
+
plan = "Free",
|
|
4458
|
+
ownerId = "rohan@streamoid.com",
|
|
4473
4459
|
initials,
|
|
4474
4460
|
imageUrl,
|
|
4475
|
-
|
|
4476
|
-
plan,
|
|
4477
|
-
ownerEmail,
|
|
4478
|
-
isCurrent = false,
|
|
4461
|
+
type = "currentWS",
|
|
4479
4462
|
variant = "switch",
|
|
4463
|
+
hover,
|
|
4464
|
+
className,
|
|
4480
4465
|
onSwitch,
|
|
4481
4466
|
onSettings
|
|
4482
4467
|
}) {
|
|
4483
|
-
const [
|
|
4484
|
-
const
|
|
4485
|
-
const
|
|
4486
|
-
const
|
|
4487
|
-
const
|
|
4488
|
-
const
|
|
4489
|
-
const
|
|
4468
|
+
const [internalHover, setInternalHover] = (0, import_react5.useState)(false);
|
|
4469
|
+
const isHover = hover !== void 0 ? hover : internalHover;
|
|
4470
|
+
const isCurrent = type === "currentWS";
|
|
4471
|
+
const isOther = type === "otherWS";
|
|
4472
|
+
const showButtons = isHover && isOther;
|
|
4473
|
+
const displayInitials = initials || wsName.split(/\s+/).slice(0, 2).map((w) => w[0]?.toUpperCase() ?? "").join("") || "WS";
|
|
4474
|
+
const cardClass = [
|
|
4475
|
+
ScWorkspaceSwitchCard_default.card,
|
|
4476
|
+
isCurrent ? ScWorkspaceSwitchCard_default.cardCurrent : ScWorkspaceSwitchCard_default.cardOther,
|
|
4477
|
+
showButtons ? ScWorkspaceSwitchCard_default.cardOtherHover : "",
|
|
4478
|
+
className || ""
|
|
4479
|
+
].filter(Boolean).join(" ");
|
|
4480
|
+
const dpBg = isCurrent ? "var(--alias-fill-neutral-neutralactive, #313131)" : "var(--alias-fill-neutral-neutralselected, #242424)";
|
|
4490
4481
|
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4491
4482
|
"div",
|
|
4492
4483
|
{
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
"div",
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
children: name
|
|
4559
|
-
}
|
|
4560
|
-
),
|
|
4561
|
-
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { style: { display: "flex", alignItems: "center", width: "100%", flexShrink: 0, gap: "var(--spacing-xs)" }, children: [
|
|
4562
|
-
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4563
|
-
"span",
|
|
4564
|
-
{
|
|
4565
|
-
style: {
|
|
4566
|
-
flexShrink: 0,
|
|
4567
|
-
whiteSpace: "nowrap",
|
|
4568
|
-
color: roleColor,
|
|
4569
|
-
fontFamily: "var(--font-family-font-family-body)",
|
|
4570
|
-
fontSize: "var(--font-size-font-size-sm)",
|
|
4571
|
-
fontWeight: 500,
|
|
4572
|
-
lineHeight: "var(--line-height-line-height-sm)"
|
|
4573
|
-
},
|
|
4574
|
-
children: roleText
|
|
4575
|
-
}
|
|
4576
|
-
),
|
|
4577
|
-
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(DotSeparator, {}),
|
|
4578
|
-
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { style: { display: "flex", alignItems: "center", flexShrink: 0, gap: "var(--spacing-xs)" }, children: [
|
|
4579
|
-
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_icons53.SiconBolt, { style: { flexShrink: 0, width: 18, height: 18 }, color: "var(--alias-text---icons-tertiary)" }),
|
|
4580
|
-
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4581
|
-
"span",
|
|
4582
|
-
{
|
|
4583
|
-
style: {
|
|
4584
|
-
flexShrink: 0,
|
|
4585
|
-
whiteSpace: "nowrap",
|
|
4586
|
-
color: "var(--alias-text---icons-tertiary)",
|
|
4587
|
-
fontFamily: "var(--font-family-font-family-body)",
|
|
4588
|
-
fontSize: "var(--font-size-font-size-sm)",
|
|
4589
|
-
fontWeight: 400,
|
|
4590
|
-
lineHeight: "var(--line-height-line-height-sm)"
|
|
4591
|
-
},
|
|
4592
|
-
children: plan || "\u2013"
|
|
4593
|
-
}
|
|
4594
|
-
)
|
|
4595
|
-
] }),
|
|
4596
|
-
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(DotSeparator, {}),
|
|
4597
|
-
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { style: { display: "flex", alignItems: "center", minWidth: 0, flex: 1, gap: "var(--spacing-xs)" }, children: [
|
|
4598
|
-
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_icons53.SiconReferral, { style: { flexShrink: 0, width: 18, height: 18 }, color: "var(--alias-text---icons-tertiary)" }),
|
|
4599
|
-
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4600
|
-
"span",
|
|
4601
|
-
{
|
|
4602
|
-
style: {
|
|
4603
|
-
overflow: "hidden",
|
|
4604
|
-
textOverflow: "ellipsis",
|
|
4605
|
-
whiteSpace: "nowrap",
|
|
4606
|
-
flex: 1,
|
|
4607
|
-
minWidth: 0,
|
|
4608
|
-
color: "var(--alias-text---icons-tertiary)",
|
|
4609
|
-
fontFamily: "var(--font-family-font-family-body)",
|
|
4610
|
-
fontSize: "var(--font-size-font-size-sm)",
|
|
4611
|
-
fontWeight: 400,
|
|
4612
|
-
lineHeight: "var(--line-height-line-height-sm)"
|
|
4613
|
-
},
|
|
4614
|
-
children: ownerEmail || "\u2013"
|
|
4615
|
-
}
|
|
4616
|
-
)
|
|
4617
|
-
] })
|
|
4618
|
-
] })
|
|
4619
|
-
]
|
|
4620
|
-
}
|
|
4621
|
-
),
|
|
4622
|
-
showButtons && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4623
|
-
ScButton,
|
|
4624
|
-
{
|
|
4625
|
-
text: "Switch Workspace",
|
|
4626
|
-
variant: "secondary",
|
|
4627
|
-
size: "sm",
|
|
4628
|
-
styleVariant: "icon-left",
|
|
4629
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_icons53.SiconSwitch, { style: { width: 16, height: 16 }, color: "var(--alias-text---icons-primary)" }),
|
|
4630
|
-
onClick: (e) => {
|
|
4631
|
-
e.stopPropagation();
|
|
4632
|
-
onSwitch?.();
|
|
4633
|
-
}
|
|
4634
|
-
}
|
|
4635
|
-
),
|
|
4636
|
-
showButtons && variant === "settings" && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4637
|
-
"button",
|
|
4638
|
-
{
|
|
4639
|
-
style: {
|
|
4640
|
-
flexShrink: 0,
|
|
4641
|
-
display: "flex",
|
|
4642
|
-
alignItems: "center",
|
|
4643
|
-
justifyContent: "center",
|
|
4644
|
-
width: 32,
|
|
4645
|
-
height: 32,
|
|
4646
|
-
padding: "var(--spacing-xs)",
|
|
4647
|
-
borderRadius: 12,
|
|
4648
|
-
border: "1.25px solid var(--alias-border-default)",
|
|
4649
|
-
backgroundColor: "transparent",
|
|
4650
|
-
cursor: "pointer"
|
|
4651
|
-
},
|
|
4652
|
-
onClick: (e) => {
|
|
4653
|
-
e.stopPropagation();
|
|
4654
|
-
onSettings?.();
|
|
4655
|
-
},
|
|
4656
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_icons53.SiconSettings, { style: { width: 16, height: 16 }, color: "var(--alias-text---icons-primary)" })
|
|
4657
|
-
}
|
|
4658
|
-
)
|
|
4659
|
-
]
|
|
4660
|
-
}
|
|
4661
|
-
)
|
|
4484
|
+
className: cardClass,
|
|
4485
|
+
onMouseEnter: () => isOther && setInternalHover(true),
|
|
4486
|
+
onMouseLeave: () => setInternalHover(false),
|
|
4487
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: ScWorkspaceSwitchCard_default.wsInfo, children: [
|
|
4488
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4489
|
+
ScDp,
|
|
4490
|
+
{
|
|
4491
|
+
type: imageUrl ? "image" : "initial",
|
|
4492
|
+
variant: "workspace",
|
|
4493
|
+
initial: displayInitials,
|
|
4494
|
+
imageUrl,
|
|
4495
|
+
className: ScWorkspaceSwitchCard_default.dp,
|
|
4496
|
+
style: {
|
|
4497
|
+
backgroundColor: dpBg,
|
|
4498
|
+
borderRadius: "var(--radius-xl, 12px)"
|
|
4499
|
+
}
|
|
4500
|
+
}
|
|
4501
|
+
),
|
|
4502
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: ScWorkspaceSwitchCard_default.infoCol, children: [
|
|
4503
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { className: ScWorkspaceSwitchCard_default.wsName, children: wsName }),
|
|
4504
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: ScWorkspaceSwitchCard_default.detailsRow, children: [
|
|
4505
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: ScWorkspaceSwitchCard_default.detailItem, children: [
|
|
4506
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: ScWorkspaceSwitchCard_default.detailLabel, children: "Role" }),
|
|
4507
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: ScWorkspaceSwitchCard_default.detailValueRole, children: role })
|
|
4508
|
+
] }),
|
|
4509
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(ScVDivider, { className: ScWorkspaceSwitchCard_default.vDivider }),
|
|
4510
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: ScWorkspaceSwitchCard_default.detailItem, children: [
|
|
4511
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: ScWorkspaceSwitchCard_default.detailLabel, children: "Plan" }),
|
|
4512
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: ScWorkspaceSwitchCard_default.detailValueSecondary, children: plan })
|
|
4513
|
+
] }),
|
|
4514
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(ScVDivider, { className: ScWorkspaceSwitchCard_default.vDivider }),
|
|
4515
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: ScWorkspaceSwitchCard_default.detailItemFlex, children: [
|
|
4516
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: ScWorkspaceSwitchCard_default.detailLabel, children: "Workspace Owner" }),
|
|
4517
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: ScWorkspaceSwitchCard_default.detailValueSecondary, children: ownerId })
|
|
4518
|
+
] })
|
|
4519
|
+
] })
|
|
4520
|
+
] }),
|
|
4521
|
+
showButtons && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4522
|
+
ScButton,
|
|
4523
|
+
{
|
|
4524
|
+
text: "Switch Workspace",
|
|
4525
|
+
variant: "secondary",
|
|
4526
|
+
size: "sm",
|
|
4527
|
+
styleVariant: "icon-left",
|
|
4528
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_icons53.SiconSwitch, { className: ScWorkspaceSwitchCard_default.btnIcon }),
|
|
4529
|
+
onClick: (e) => {
|
|
4530
|
+
e.stopPropagation();
|
|
4531
|
+
onSwitch?.();
|
|
4532
|
+
}
|
|
4533
|
+
}
|
|
4534
|
+
),
|
|
4535
|
+
showButtons && variant === "settings" && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4536
|
+
ScButton,
|
|
4537
|
+
{
|
|
4538
|
+
styleVariant: "icon-only",
|
|
4539
|
+
variant: "outline",
|
|
4540
|
+
size: "sm",
|
|
4541
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_icons53.SiconSettings, { className: ScWorkspaceSwitchCard_default.btnIcon }),
|
|
4542
|
+
onClick: (e) => {
|
|
4543
|
+
e.stopPropagation();
|
|
4544
|
+
onSettings?.();
|
|
4545
|
+
}
|
|
4546
|
+
}
|
|
4547
|
+
)
|
|
4548
|
+
] })
|
|
4662
4549
|
}
|
|
4663
4550
|
);
|
|
4664
4551
|
}
|
|
4552
|
+
var ScWorkspaceSwitchCard = NscWorkspaceSwitch;
|
package/dist/index.mjs
CHANGED
|
@@ -455,7 +455,7 @@ var ScButton_default = {
|
|
|
455
455
|
|
|
456
456
|
// src/SC-Button/ScButton.tsx
|
|
457
457
|
import { SiconHome as SiconHome2 } from "@streamoid/icons";
|
|
458
|
-
import { useMemo } from "react";
|
|
458
|
+
import { useMemo, isValidElement, cloneElement } from "react";
|
|
459
459
|
import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
460
460
|
if (typeof window !== "undefined" && CSS.registerProperty) {
|
|
461
461
|
const props = [
|
|
@@ -534,6 +534,8 @@ var ScButton = ({
|
|
|
534
534
|
ctx.putImageData(imageData, 0, 0);
|
|
535
535
|
return canvas.toDataURL("image/png");
|
|
536
536
|
}, [variant, type, state]);
|
|
537
|
+
const strokeWidth = size === "sm" ? 1.25 : 1.5;
|
|
538
|
+
const styledIcon = isValidElement(icon) ? cloneElement(icon, { color: "currentColor", strokeWidth }) : icon;
|
|
537
539
|
const variantsClassName = ScButton_default["style-variant-" + styleVariant] + " " + ScButton_default["state-" + state] + " " + ScButton_default["variant-" + variant] + " " + ScButton_default["type-" + type] + " " + ScButton_default["size-" + size];
|
|
538
540
|
return /* @__PURE__ */ jsxs8(
|
|
539
541
|
"div",
|
|
@@ -549,12 +551,12 @@ var ScButton = ({
|
|
|
549
551
|
}
|
|
550
552
|
),
|
|
551
553
|
/* @__PURE__ */ jsxs8("div", { className: ScButton_default.container, children: [
|
|
552
|
-
(styleVariant === "icon-left" || styleVariant === "icon-only") && /* @__PURE__ */ jsx9(Fragment3, { children:
|
|
554
|
+
(styleVariant === "icon-left" || styleVariant === "icon-only") && /* @__PURE__ */ jsx9(Fragment3, { children: styledIcon }),
|
|
553
555
|
(styleVariant === "default" || styleVariant === "icon-right" || styleVariant === "icon-left") && /* @__PURE__ */ jsx9(Fragment3, { children: /* @__PURE__ */ jsxs8("div", { className: ScButton_default.label, children: [
|
|
554
556
|
text,
|
|
555
557
|
" "
|
|
556
558
|
] }) }),
|
|
557
|
-
styleVariant === "icon-right" && /* @__PURE__ */ jsx9(Fragment3, { children:
|
|
559
|
+
styleVariant === "icon-right" && /* @__PURE__ */ jsx9(Fragment3, { children: styledIcon })
|
|
558
560
|
] })
|
|
559
561
|
]
|
|
560
562
|
}
|
|
@@ -873,6 +875,20 @@ var ScCreditsUsageCard = ({
|
|
|
873
875
|
|
|
874
876
|
// src/SC-Dp/ScDp.tsx
|
|
875
877
|
import { useState } from "react";
|
|
878
|
+
|
|
879
|
+
// src/SC-Dp/ScDp.module.css
|
|
880
|
+
var ScDp_default = {
|
|
881
|
+
scDp: "ScDp_scDp",
|
|
882
|
+
variantWorkspace: "ScDp_variantWorkspace",
|
|
883
|
+
variantProfile: "ScDp_variantProfile",
|
|
884
|
+
typeInitial: "ScDp_typeInitial",
|
|
885
|
+
initials: "ScDp_initials",
|
|
886
|
+
image: "ScDp_image",
|
|
887
|
+
imageWorkspace: "ScDp_imageWorkspace",
|
|
888
|
+
imageProfile: "ScDp_imageProfile"
|
|
889
|
+
};
|
|
890
|
+
|
|
891
|
+
// src/SC-Dp/ScDp.tsx
|
|
876
892
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
877
893
|
function ScDp({
|
|
878
894
|
type = "initial",
|
|
@@ -885,61 +901,27 @@ function ScDp({
|
|
|
885
901
|
}) {
|
|
886
902
|
const [imageFailed, setImageFailed] = useState(false);
|
|
887
903
|
const isProfile = variant === "profile";
|
|
888
|
-
const borderRadius = isProfile ? "var(--radius-full)" : "var(--radius-md)";
|
|
889
904
|
const showImage = type === "image" && imageUrl && !imageFailed;
|
|
890
|
-
const
|
|
905
|
+
const containerClass = [
|
|
906
|
+
ScDp_default.scDp,
|
|
907
|
+
isProfile ? ScDp_default.variantProfile : ScDp_default.variantWorkspace,
|
|
908
|
+
!showImage ? ScDp_default.typeInitial : "",
|
|
909
|
+
className || ""
|
|
910
|
+
].filter(Boolean).join(" ");
|
|
911
|
+
const sizeStyle = {
|
|
891
912
|
width: size,
|
|
892
913
|
height: size,
|
|
893
|
-
borderRadius,
|
|
894
|
-
position: "relative",
|
|
895
|
-
overflow: "hidden",
|
|
896
|
-
flexShrink: 0,
|
|
897
|
-
...showImage ? {} : {
|
|
898
|
-
backgroundColor: "var(--alias-fill-neutral-neutralselected)",
|
|
899
|
-
display: "flex",
|
|
900
|
-
alignItems: "center",
|
|
901
|
-
justifyContent: "center"
|
|
902
|
-
},
|
|
903
914
|
...style
|
|
904
915
|
};
|
|
905
|
-
return /* @__PURE__ */ jsx15("div", { className, style:
|
|
916
|
+
return /* @__PURE__ */ jsx15("div", { className: containerClass, style: sizeStyle, children: showImage ? /* @__PURE__ */ jsx15(
|
|
906
917
|
"img",
|
|
907
918
|
{
|
|
908
919
|
src: imageUrl,
|
|
909
920
|
alt: "",
|
|
910
|
-
|
|
911
|
-
position: "absolute",
|
|
912
|
-
inset: 0,
|
|
913
|
-
width: "100%",
|
|
914
|
-
height: "100%",
|
|
915
|
-
objectFit: "cover",
|
|
916
|
-
pointerEvents: "none"
|
|
917
|
-
},
|
|
921
|
+
className: ScDp_default.image + " " + (isProfile ? ScDp_default.imageProfile : ScDp_default.imageWorkspace),
|
|
918
922
|
onError: () => setImageFailed(true)
|
|
919
923
|
}
|
|
920
|
-
) : /* @__PURE__ */ jsx15(
|
|
921
|
-
"div",
|
|
922
|
-
{
|
|
923
|
-
style: {
|
|
924
|
-
flex: 1,
|
|
925
|
-
minWidth: 0,
|
|
926
|
-
minHeight: 0,
|
|
927
|
-
display: "flex",
|
|
928
|
-
alignItems: "center",
|
|
929
|
-
justifyContent: "center",
|
|
930
|
-
overflow: "hidden",
|
|
931
|
-
textOverflow: "ellipsis",
|
|
932
|
-
whiteSpace: "nowrap",
|
|
933
|
-
color: "var(--alias-text---icons-primary)",
|
|
934
|
-
fontFamily: "var(--font-family-font-family-body)",
|
|
935
|
-
fontSize: size <= 32 ? `${size * 0.4}px` : "var(--font-size-font-size-md)",
|
|
936
|
-
fontWeight: 500,
|
|
937
|
-
lineHeight: 1,
|
|
938
|
-
textAlign: "center"
|
|
939
|
-
},
|
|
940
|
-
children: initial
|
|
941
|
-
}
|
|
942
|
-
) });
|
|
924
|
+
) : /* @__PURE__ */ jsx15("div", { className: ScDp_default.initials, children: initial }) });
|
|
943
925
|
}
|
|
944
926
|
|
|
945
927
|
// src/SC-Google sign in/ScGoogleSignIn.module.css
|
|
@@ -4367,225 +4349,131 @@ var ScWorkspaceCard = ({
|
|
|
4367
4349
|
|
|
4368
4350
|
// src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.tsx
|
|
4369
4351
|
import { useState as useState2 } from "react";
|
|
4370
|
-
import {
|
|
4352
|
+
import { SiconSwitch as SiconSwitch3, SiconSettings as SiconSettings3 } from "@streamoid/icons";
|
|
4353
|
+
|
|
4354
|
+
// src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.module.css
|
|
4355
|
+
var ScWorkspaceSwitchCard_default = {
|
|
4356
|
+
card: "ScWorkspaceSwitchCard_card",
|
|
4357
|
+
cardCurrent: "ScWorkspaceSwitchCard_cardCurrent",
|
|
4358
|
+
cardOther: "ScWorkspaceSwitchCard_cardOther",
|
|
4359
|
+
cardOtherHover: "ScWorkspaceSwitchCard_cardOtherHover",
|
|
4360
|
+
wsInfo: "ScWorkspaceSwitchCard_wsInfo",
|
|
4361
|
+
dp: "ScWorkspaceSwitchCard_dp",
|
|
4362
|
+
infoCol: "ScWorkspaceSwitchCard_infoCol",
|
|
4363
|
+
wsName: "ScWorkspaceSwitchCard_wsName",
|
|
4364
|
+
detailsRow: "ScWorkspaceSwitchCard_detailsRow",
|
|
4365
|
+
detailItem: "ScWorkspaceSwitchCard_detailItem",
|
|
4366
|
+
detailItemFlex: "ScWorkspaceSwitchCard_detailItemFlex",
|
|
4367
|
+
detailLabel: "ScWorkspaceSwitchCard_detailLabel",
|
|
4368
|
+
detailValueRole: "ScWorkspaceSwitchCard_detailValueRole",
|
|
4369
|
+
detailValueSecondary: "ScWorkspaceSwitchCard_detailValueSecondary",
|
|
4370
|
+
vDivider: "ScWorkspaceSwitchCard_vDivider",
|
|
4371
|
+
btnIcon: "ScWorkspaceSwitchCard_btnIcon"
|
|
4372
|
+
};
|
|
4373
|
+
|
|
4374
|
+
// src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.tsx
|
|
4371
4375
|
import { jsx as jsx62, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
4372
|
-
function
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
"div",
|
|
4378
|
-
{
|
|
4379
|
-
style: { width: 24, height: 24, display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
|
|
4380
|
-
children: /* @__PURE__ */ jsx62(
|
|
4381
|
-
"div",
|
|
4382
|
-
{
|
|
4383
|
-
style: {
|
|
4384
|
-
width: 4,
|
|
4385
|
-
height: 4,
|
|
4386
|
-
borderRadius: "50%",
|
|
4387
|
-
backgroundColor: "var(--alias-text---icons-disabled)"
|
|
4388
|
-
}
|
|
4389
|
-
}
|
|
4390
|
-
)
|
|
4391
|
-
}
|
|
4392
|
-
);
|
|
4393
|
-
}
|
|
4394
|
-
function ScWorkspaceSwitchCard({
|
|
4395
|
-
name,
|
|
4376
|
+
function NscWorkspaceSwitch({
|
|
4377
|
+
wsName = "Workspace name is kepler",
|
|
4378
|
+
role = "Admin",
|
|
4379
|
+
plan = "Free",
|
|
4380
|
+
ownerId = "rohan@streamoid.com",
|
|
4396
4381
|
initials,
|
|
4397
4382
|
imageUrl,
|
|
4398
|
-
|
|
4399
|
-
plan,
|
|
4400
|
-
ownerEmail,
|
|
4401
|
-
isCurrent = false,
|
|
4383
|
+
type = "currentWS",
|
|
4402
4384
|
variant = "switch",
|
|
4385
|
+
hover,
|
|
4386
|
+
className,
|
|
4403
4387
|
onSwitch,
|
|
4404
4388
|
onSettings
|
|
4405
4389
|
}) {
|
|
4406
|
-
const [
|
|
4407
|
-
const
|
|
4408
|
-
const
|
|
4409
|
-
const
|
|
4410
|
-
const
|
|
4411
|
-
const
|
|
4412
|
-
const
|
|
4390
|
+
const [internalHover, setInternalHover] = useState2(false);
|
|
4391
|
+
const isHover = hover !== void 0 ? hover : internalHover;
|
|
4392
|
+
const isCurrent = type === "currentWS";
|
|
4393
|
+
const isOther = type === "otherWS";
|
|
4394
|
+
const showButtons = isHover && isOther;
|
|
4395
|
+
const displayInitials = initials || wsName.split(/\s+/).slice(0, 2).map((w) => w[0]?.toUpperCase() ?? "").join("") || "WS";
|
|
4396
|
+
const cardClass = [
|
|
4397
|
+
ScWorkspaceSwitchCard_default.card,
|
|
4398
|
+
isCurrent ? ScWorkspaceSwitchCard_default.cardCurrent : ScWorkspaceSwitchCard_default.cardOther,
|
|
4399
|
+
showButtons ? ScWorkspaceSwitchCard_default.cardOtherHover : "",
|
|
4400
|
+
className || ""
|
|
4401
|
+
].filter(Boolean).join(" ");
|
|
4402
|
+
const dpBg = isCurrent ? "var(--alias-fill-neutral-neutralactive, #313131)" : "var(--alias-fill-neutral-neutralselected, #242424)";
|
|
4413
4403
|
return /* @__PURE__ */ jsx62(
|
|
4414
4404
|
"div",
|
|
4415
4405
|
{
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
"div",
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
children: name
|
|
4482
|
-
}
|
|
4483
|
-
),
|
|
4484
|
-
/* @__PURE__ */ jsxs53("div", { style: { display: "flex", alignItems: "center", width: "100%", flexShrink: 0, gap: "var(--spacing-xs)" }, children: [
|
|
4485
|
-
/* @__PURE__ */ jsx62(
|
|
4486
|
-
"span",
|
|
4487
|
-
{
|
|
4488
|
-
style: {
|
|
4489
|
-
flexShrink: 0,
|
|
4490
|
-
whiteSpace: "nowrap",
|
|
4491
|
-
color: roleColor,
|
|
4492
|
-
fontFamily: "var(--font-family-font-family-body)",
|
|
4493
|
-
fontSize: "var(--font-size-font-size-sm)",
|
|
4494
|
-
fontWeight: 500,
|
|
4495
|
-
lineHeight: "var(--line-height-line-height-sm)"
|
|
4496
|
-
},
|
|
4497
|
-
children: roleText
|
|
4498
|
-
}
|
|
4499
|
-
),
|
|
4500
|
-
/* @__PURE__ */ jsx62(DotSeparator, {}),
|
|
4501
|
-
/* @__PURE__ */ jsxs53("div", { style: { display: "flex", alignItems: "center", flexShrink: 0, gap: "var(--spacing-xs)" }, children: [
|
|
4502
|
-
/* @__PURE__ */ jsx62(SiconBolt6, { style: { flexShrink: 0, width: 18, height: 18 }, color: "var(--alias-text---icons-tertiary)" }),
|
|
4503
|
-
/* @__PURE__ */ jsx62(
|
|
4504
|
-
"span",
|
|
4505
|
-
{
|
|
4506
|
-
style: {
|
|
4507
|
-
flexShrink: 0,
|
|
4508
|
-
whiteSpace: "nowrap",
|
|
4509
|
-
color: "var(--alias-text---icons-tertiary)",
|
|
4510
|
-
fontFamily: "var(--font-family-font-family-body)",
|
|
4511
|
-
fontSize: "var(--font-size-font-size-sm)",
|
|
4512
|
-
fontWeight: 400,
|
|
4513
|
-
lineHeight: "var(--line-height-line-height-sm)"
|
|
4514
|
-
},
|
|
4515
|
-
children: plan || "\u2013"
|
|
4516
|
-
}
|
|
4517
|
-
)
|
|
4518
|
-
] }),
|
|
4519
|
-
/* @__PURE__ */ jsx62(DotSeparator, {}),
|
|
4520
|
-
/* @__PURE__ */ jsxs53("div", { style: { display: "flex", alignItems: "center", minWidth: 0, flex: 1, gap: "var(--spacing-xs)" }, children: [
|
|
4521
|
-
/* @__PURE__ */ jsx62(SiconReferral2, { style: { flexShrink: 0, width: 18, height: 18 }, color: "var(--alias-text---icons-tertiary)" }),
|
|
4522
|
-
/* @__PURE__ */ jsx62(
|
|
4523
|
-
"span",
|
|
4524
|
-
{
|
|
4525
|
-
style: {
|
|
4526
|
-
overflow: "hidden",
|
|
4527
|
-
textOverflow: "ellipsis",
|
|
4528
|
-
whiteSpace: "nowrap",
|
|
4529
|
-
flex: 1,
|
|
4530
|
-
minWidth: 0,
|
|
4531
|
-
color: "var(--alias-text---icons-tertiary)",
|
|
4532
|
-
fontFamily: "var(--font-family-font-family-body)",
|
|
4533
|
-
fontSize: "var(--font-size-font-size-sm)",
|
|
4534
|
-
fontWeight: 400,
|
|
4535
|
-
lineHeight: "var(--line-height-line-height-sm)"
|
|
4536
|
-
},
|
|
4537
|
-
children: ownerEmail || "\u2013"
|
|
4538
|
-
}
|
|
4539
|
-
)
|
|
4540
|
-
] })
|
|
4541
|
-
] })
|
|
4542
|
-
]
|
|
4543
|
-
}
|
|
4544
|
-
),
|
|
4545
|
-
showButtons && /* @__PURE__ */ jsx62(
|
|
4546
|
-
ScButton,
|
|
4547
|
-
{
|
|
4548
|
-
text: "Switch Workspace",
|
|
4549
|
-
variant: "secondary",
|
|
4550
|
-
size: "sm",
|
|
4551
|
-
styleVariant: "icon-left",
|
|
4552
|
-
icon: /* @__PURE__ */ jsx62(SiconSwitch3, { style: { width: 16, height: 16 }, color: "var(--alias-text---icons-primary)" }),
|
|
4553
|
-
onClick: (e) => {
|
|
4554
|
-
e.stopPropagation();
|
|
4555
|
-
onSwitch?.();
|
|
4556
|
-
}
|
|
4557
|
-
}
|
|
4558
|
-
),
|
|
4559
|
-
showButtons && variant === "settings" && /* @__PURE__ */ jsx62(
|
|
4560
|
-
"button",
|
|
4561
|
-
{
|
|
4562
|
-
style: {
|
|
4563
|
-
flexShrink: 0,
|
|
4564
|
-
display: "flex",
|
|
4565
|
-
alignItems: "center",
|
|
4566
|
-
justifyContent: "center",
|
|
4567
|
-
width: 32,
|
|
4568
|
-
height: 32,
|
|
4569
|
-
padding: "var(--spacing-xs)",
|
|
4570
|
-
borderRadius: 12,
|
|
4571
|
-
border: "1.25px solid var(--alias-border-default)",
|
|
4572
|
-
backgroundColor: "transparent",
|
|
4573
|
-
cursor: "pointer"
|
|
4574
|
-
},
|
|
4575
|
-
onClick: (e) => {
|
|
4576
|
-
e.stopPropagation();
|
|
4577
|
-
onSettings?.();
|
|
4578
|
-
},
|
|
4579
|
-
children: /* @__PURE__ */ jsx62(SiconSettings3, { style: { width: 16, height: 16 }, color: "var(--alias-text---icons-primary)" })
|
|
4580
|
-
}
|
|
4581
|
-
)
|
|
4582
|
-
]
|
|
4583
|
-
}
|
|
4584
|
-
)
|
|
4406
|
+
className: cardClass,
|
|
4407
|
+
onMouseEnter: () => isOther && setInternalHover(true),
|
|
4408
|
+
onMouseLeave: () => setInternalHover(false),
|
|
4409
|
+
children: /* @__PURE__ */ jsxs53("div", { className: ScWorkspaceSwitchCard_default.wsInfo, children: [
|
|
4410
|
+
/* @__PURE__ */ jsx62(
|
|
4411
|
+
ScDp,
|
|
4412
|
+
{
|
|
4413
|
+
type: imageUrl ? "image" : "initial",
|
|
4414
|
+
variant: "workspace",
|
|
4415
|
+
initial: displayInitials,
|
|
4416
|
+
imageUrl,
|
|
4417
|
+
className: ScWorkspaceSwitchCard_default.dp,
|
|
4418
|
+
style: {
|
|
4419
|
+
backgroundColor: dpBg,
|
|
4420
|
+
borderRadius: "var(--radius-xl, 12px)"
|
|
4421
|
+
}
|
|
4422
|
+
}
|
|
4423
|
+
),
|
|
4424
|
+
/* @__PURE__ */ jsxs53("div", { className: ScWorkspaceSwitchCard_default.infoCol, children: [
|
|
4425
|
+
/* @__PURE__ */ jsx62("p", { className: ScWorkspaceSwitchCard_default.wsName, children: wsName }),
|
|
4426
|
+
/* @__PURE__ */ jsxs53("div", { className: ScWorkspaceSwitchCard_default.detailsRow, children: [
|
|
4427
|
+
/* @__PURE__ */ jsxs53("div", { className: ScWorkspaceSwitchCard_default.detailItem, children: [
|
|
4428
|
+
/* @__PURE__ */ jsx62("span", { className: ScWorkspaceSwitchCard_default.detailLabel, children: "Role" }),
|
|
4429
|
+
/* @__PURE__ */ jsx62("span", { className: ScWorkspaceSwitchCard_default.detailValueRole, children: role })
|
|
4430
|
+
] }),
|
|
4431
|
+
/* @__PURE__ */ jsx62(ScVDivider, { className: ScWorkspaceSwitchCard_default.vDivider }),
|
|
4432
|
+
/* @__PURE__ */ jsxs53("div", { className: ScWorkspaceSwitchCard_default.detailItem, children: [
|
|
4433
|
+
/* @__PURE__ */ jsx62("span", { className: ScWorkspaceSwitchCard_default.detailLabel, children: "Plan" }),
|
|
4434
|
+
/* @__PURE__ */ jsx62("span", { className: ScWorkspaceSwitchCard_default.detailValueSecondary, children: plan })
|
|
4435
|
+
] }),
|
|
4436
|
+
/* @__PURE__ */ jsx62(ScVDivider, { className: ScWorkspaceSwitchCard_default.vDivider }),
|
|
4437
|
+
/* @__PURE__ */ jsxs53("div", { className: ScWorkspaceSwitchCard_default.detailItemFlex, children: [
|
|
4438
|
+
/* @__PURE__ */ jsx62("span", { className: ScWorkspaceSwitchCard_default.detailLabel, children: "Workspace Owner" }),
|
|
4439
|
+
/* @__PURE__ */ jsx62("span", { className: ScWorkspaceSwitchCard_default.detailValueSecondary, children: ownerId })
|
|
4440
|
+
] })
|
|
4441
|
+
] })
|
|
4442
|
+
] }),
|
|
4443
|
+
showButtons && /* @__PURE__ */ jsx62(
|
|
4444
|
+
ScButton,
|
|
4445
|
+
{
|
|
4446
|
+
text: "Switch Workspace",
|
|
4447
|
+
variant: "secondary",
|
|
4448
|
+
size: "sm",
|
|
4449
|
+
styleVariant: "icon-left",
|
|
4450
|
+
icon: /* @__PURE__ */ jsx62(SiconSwitch3, { className: ScWorkspaceSwitchCard_default.btnIcon }),
|
|
4451
|
+
onClick: (e) => {
|
|
4452
|
+
e.stopPropagation();
|
|
4453
|
+
onSwitch?.();
|
|
4454
|
+
}
|
|
4455
|
+
}
|
|
4456
|
+
),
|
|
4457
|
+
showButtons && variant === "settings" && /* @__PURE__ */ jsx62(
|
|
4458
|
+
ScButton,
|
|
4459
|
+
{
|
|
4460
|
+
styleVariant: "icon-only",
|
|
4461
|
+
variant: "outline",
|
|
4462
|
+
size: "sm",
|
|
4463
|
+
icon: /* @__PURE__ */ jsx62(SiconSettings3, { className: ScWorkspaceSwitchCard_default.btnIcon }),
|
|
4464
|
+
onClick: (e) => {
|
|
4465
|
+
e.stopPropagation();
|
|
4466
|
+
onSettings?.();
|
|
4467
|
+
}
|
|
4468
|
+
}
|
|
4469
|
+
)
|
|
4470
|
+
] })
|
|
4585
4471
|
}
|
|
4586
4472
|
);
|
|
4587
4473
|
}
|
|
4474
|
+
var ScWorkspaceSwitchCard = NscWorkspaceSwitch;
|
|
4588
4475
|
export {
|
|
4476
|
+
NscWorkspaceSwitch,
|
|
4589
4477
|
ScAccess,
|
|
4590
4478
|
ScAppCard,
|
|
4591
4479
|
ScAppField,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamoid/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"react-dom": "^18.0.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@streamoid/icons": "^0.1
|
|
26
|
+
"@streamoid/icons": "^0.2.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/react": "^18.0.0",
|