@streamoid/ui 0.5.1 → 0.6.0

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.d.ts CHANGED
@@ -205,12 +205,14 @@ interface IScPlanDetailsCardProps extends React.HTMLAttributes<HTMLDivElement> {
205
205
  planCredits?: string;
206
206
  planPrice?: string;
207
207
  badgeText?: string;
208
+ badgeSubText?: string;
208
209
  currentPlanLabel?: string;
209
210
  upgradeButtonText?: string;
211
+ isLoading?: boolean;
210
212
  onUpgrade?: () => void;
211
213
  className?: string;
212
214
  }
213
- declare const ScPlanDetailsCard: ({ planName, planCredits, planPrice, badgeText, currentPlanLabel, upgradeButtonText, onUpgrade, className, ...props }: IScPlanDetailsCardProps) => JSX.Element;
215
+ declare const ScPlanDetailsCard: ({ planName, planCredits, planPrice, badgeText, badgeSubText, currentPlanLabel, upgradeButtonText, isLoading, onUpgrade, className, ...props }: IScPlanDetailsCardProps) => JSX.Element;
214
216
 
215
217
  interface IScProfileProps extends React.HTMLAttributes<HTMLDivElement> {
216
218
  name?: string;
@@ -310,6 +312,10 @@ interface StreamoidSidebarProps {
310
312
  profile?: SidebarProfileConfig;
311
313
  versionText?: string;
312
314
  toggleIcon?: ReactNode | ((expanded: boolean) => ReactNode);
315
+ /** Footer = profile (flex-1) + a SEPARATE collapse-toggle button beside it,
316
+ * with no version footer. Each is its own interactive unit. Expanded layout
317
+ * only; collapsed is unaffected. */
318
+ toggleInProfile?: boolean;
313
319
  hideFooter?: boolean;
314
320
  preFooterContent?: ReactNode;
315
321
  bodyContent?: ReactNode;
@@ -322,7 +328,7 @@ interface StreamoidSidebarProps {
322
328
  /** Explicit state override per top item id — takes priority over activeItemId/highlightedItemIds for top items */
323
329
  topItemStates?: Record<string, "default" | "active" | "hover" | "default-highlight" | "default-active">;
324
330
  }
325
- declare function StreamoidSidebar({ expanded, onToggle, config, iconMap, activeItemId, highlightedItemIds, onItemSelect, moreIcon, onMoreClick, expandedLogo, collapsedLogo, profile, versionText, toggleIcon, hideFooter, preFooterContent, bodyContent, showBody, isMobile, className, style, topItems, topItemStates, }: StreamoidSidebarProps): react_jsx_runtime.JSX.Element;
331
+ declare function StreamoidSidebar({ expanded, onToggle, config, iconMap, activeItemId, highlightedItemIds, onItemSelect, moreIcon, onMoreClick, expandedLogo, collapsedLogo, profile, versionText, toggleIcon, toggleInProfile, hideFooter, preFooterContent, bodyContent, showBody, isMobile, className, style, topItems, topItemStates, }: StreamoidSidebarProps): react_jsx_runtime.JSX.Element;
326
332
 
327
333
  interface ArtifaxMenuItem {
328
334
  id: string;
@@ -392,6 +398,64 @@ interface IScArtifaxSidebarProps {
392
398
  }
393
399
  declare const ScArtifaxSidebar: ({ expanded, onToggle, sections, iconMap, activeItemId, onItemSelect, expandedLogo, collapsedLogo, creditWarning, assistantCta, profile, toggleIcon, openSections, onSectionToggle, className, style, }: IScArtifaxSidebarProps) => JSX.Element;
394
400
 
401
+ interface CatalogixNavItem {
402
+ id: string;
403
+ label: string;
404
+ iconKey: string;
405
+ }
406
+ interface CatalogixSidebarIconContext {
407
+ active: boolean;
408
+ expanded: boolean;
409
+ }
410
+ type CatalogixSidebarIconRenderer = (context: CatalogixSidebarIconContext) => ReactNode;
411
+ type CatalogixSidebarIconMap = Record<string, ReactNode | CatalogixSidebarIconRenderer>;
412
+ interface CatalogixSidebarProfile {
413
+ name: string;
414
+ subtitle?: string;
415
+ avatar?: ReactNode;
416
+ onClick?: () => void;
417
+ }
418
+ interface CatalogixSidebarCreditWarning {
419
+ availableCredits: number;
420
+ remainingPct: number;
421
+ level?: "warning" | "danger";
422
+ onBuyCredits: () => void;
423
+ onCollapsedClick?: () => void;
424
+ }
425
+ interface CatalogixSwitchApp {
426
+ id: string;
427
+ name: string;
428
+ description?: string;
429
+ icon?: ReactNode;
430
+ onClick?: () => void;
431
+ }
432
+ interface IScCatalogixSidebarProps {
433
+ expanded: boolean;
434
+ onToggle: () => void;
435
+ /** Nav items below the logo. Defaults to Stores / AI Training / Insights. */
436
+ items?: CatalogixNavItem[];
437
+ /** Maps each item's iconKey to an icon (node or render fn). Defaults supply
438
+ * Stores/AI Training/Insights icons; override per the product's set. */
439
+ iconMap?: CatalogixSidebarIconMap;
440
+ activeItemId?: string;
441
+ onItemSelect?: (item: CatalogixNavItem) => void;
442
+ /** Other products shown inline below the logo when the switch chip is
443
+ * clicked (the same "switch apps" list used across the sidebars). */
444
+ switchApps?: CatalogixSwitchApp[];
445
+ /** Fires (in addition to toggling the inline list) when the switch chip is
446
+ * clicked — e.g. to lazy-load the product list. */
447
+ onLogoClick?: () => void;
448
+ /** Logo nodes. Default to the built-in Catalogix wordmark logo unit. */
449
+ expandedLogo?: ReactNode;
450
+ collapsedLogo?: ReactNode;
451
+ profile?: CatalogixSidebarProfile;
452
+ creditWarning?: CatalogixSidebarCreditWarning | null;
453
+ toggleIcon?: ReactNode | ((expanded: boolean) => ReactNode);
454
+ className?: string;
455
+ style?: CSSProperties;
456
+ }
457
+ declare const ScCatalogixSidebar: ({ expanded, onToggle, items, iconMap, activeItemId, onItemSelect, switchApps, onLogoClick, expandedLogo, collapsedLogo, profile, creditWarning, toggleIcon, className, style, }: IScCatalogixSidebarProps) => JSX.Element;
458
+
395
459
  interface IScGuideProps {
396
460
  /** Heading text. */
397
461
  title?: ReactNode;
@@ -422,13 +486,42 @@ interface IScGuideProps {
422
486
  }
423
487
  declare const ScGuide: ({ title, description, skipLabel, nextLabel, nextIcon, stepLabel, onSkip, onNext, hideSkip, hideNext, disabled, className, style, }: IScGuideProps) => JSX.Element;
424
488
 
489
+ interface MarkPath {
490
+ d: string;
491
+ fillRule?: "evenodd" | "nonzero";
492
+ clipRule?: "evenodd" | "nonzero";
493
+ }
494
+ interface Wordmark {
495
+ viewBox: string;
496
+ width: number;
497
+ paths: MarkPath[];
498
+ }
499
+ declare const WORDMARKS: Record<string, Wordmark>;
500
+ type SidebarProduct = keyof typeof WORDMARKS;
501
+ /** Full product wordmark (expanded sidebar). */
502
+ declare function ProductWordmark({ product, style, }: {
503
+ product: SidebarProduct;
504
+ style?: CSSProperties;
505
+ }): JSX.Element | null;
506
+ /** Square product icon (collapsed sidebar). Returns null if the product has no
507
+ * collapsed mark defined yet. */
508
+ declare function ProductCollapsedMark({ product, style, }: {
509
+ product: SidebarProduct;
510
+ style?: CSSProperties;
511
+ }): JSX.Element | null;
512
+ /** True when the product has a dedicated collapsed icon. */
513
+ declare function hasCollapsedMark(product: SidebarProduct): boolean;
514
+
425
515
  interface IScSideBarLogoUnitProps {
426
516
  /** "expanded" renders the merged wordmark + switcher row.
427
517
  * "collapsed" renders a bare clickable product icon. */
428
518
  state?: "expanded" | "collapsed";
429
519
  /** In expanded state: the stacked "Product / Streamoid" wordmark `<img>`.
430
- * In collapsed state: the square product icon `<img>`. */
520
+ * In collapsed state: the square product icon `<img>`. Overrides `product`. */
431
521
  wordmark?: ReactNode;
522
+ /** Built-in branded wordmark to render when `wordmark` is not supplied
523
+ * (e.g. "CXO", "Catalogix"). The mark follows the surrounding text color. */
524
+ product?: SidebarProduct;
432
525
  /** Click handler for the whole row (wordmark + switcher are one click
433
526
  * target now — matches the design intent). */
434
527
  onClick?: () => void;
@@ -452,7 +545,7 @@ interface IScSideBarLogoUnitProps {
452
545
  className?: string;
453
546
  style?: CSSProperties;
454
547
  }
455
- declare const ScSideBarLogoUnit: ({ state, wordmark, onClick, onSwitchClick, switchAriaLabel, hideSwitch, hover, disabled, className, style, }: IScSideBarLogoUnitProps) => JSX.Element;
548
+ declare const ScSideBarLogoUnit: ({ state, wordmark, product, onClick, onSwitchClick, switchAriaLabel, hideSwitch, hover, disabled, className, style, }: IScSideBarLogoUnitProps) => JSX.Element;
456
549
 
457
550
  interface IScSidebarMenuProps extends React.HTMLAttributes<HTMLDivElement> {
458
551
  icon?: JSX.Element;
@@ -465,6 +558,18 @@ interface IScSidebarMenuProps extends React.HTMLAttributes<HTMLDivElement> {
465
558
  }
466
559
  declare const ScSidebarMenu: ({ icon, state, variant, className, text, moreIcon, onMoreClick, ...props }: IScSidebarMenuProps) => JSX.Element;
467
560
 
561
+ interface IScSidebarSwitchMenuProps extends React.HTMLAttributes<HTMLDivElement> {
562
+ icon?: ReactNode;
563
+ state?: "default" | "active" | "hover" | "default-highlight" | "default-active";
564
+ variant?: "expanded" | "collapsed";
565
+ className?: string;
566
+ text?: string;
567
+ description?: string;
568
+ moreIcon?: ReactNode;
569
+ onMoreClick?: (e: React.MouseEvent) => void;
570
+ }
571
+ declare const ScSidebarSwitchMenu: ({ icon, state, variant, className, text, description, moreIcon, onMoreClick, ...props }: IScSidebarSwitchMenuProps) => JSX.Element;
572
+
468
573
  interface IScSidebarProfileProps extends React.HTMLAttributes<HTMLDivElement> {
469
574
  state?: "default" | "hover";
470
575
  variant?: "expanded" | "collapsed";
@@ -1069,11 +1174,13 @@ interface IScPlanDetailsCardMobileProps extends React.HTMLAttributes<HTMLDivElem
1069
1174
  planCredits?: string;
1070
1175
  planPrice?: string;
1071
1176
  badgeText?: string;
1177
+ badgeSubText?: string;
1072
1178
  currentPlanLabel?: string;
1073
1179
  upgradeButtonText?: string;
1180
+ isLoading?: boolean;
1074
1181
  onUpgrade?: () => void;
1075
1182
  className?: string;
1076
1183
  }
1077
- declare const ScPlanDetailsCardMobile: ({ planName, planCredits, planPrice, badgeText, currentPlanLabel, upgradeButtonText, onUpgrade, className, ...props }: IScPlanDetailsCardMobileProps) => JSX.Element;
1184
+ declare const ScPlanDetailsCardMobile: ({ planName, planCredits, planPrice, badgeText, badgeSubText, currentPlanLabel, upgradeButtonText, isLoading, onUpgrade, className, ...props }: IScPlanDetailsCardMobileProps) => JSX.Element;
1078
1185
 
1079
- export { type ArtifaxMenuItem, type ArtifaxSection, type ArtifaxSidebarAssistantCta, type ArtifaxSidebarCreditWarning, type ArtifaxSidebarIconContext, type ArtifaxSidebarIconMap, type ArtifaxSidebarIconRenderer, type ArtifaxSidebarProfile, CreditWarningBanner, type CreditWarningBannerProps, type IInvoiceHistoryMobileProps, type IScAccessProps, type IScAppCardProps, type IScAppCardV3Props, type IScAppFieldProps, type IScAppListingCardProps, type IScArtifaxInviteProps, type IScArtifaxSidebarProps, type IScBadgesProps, type IScBillingHistoryHeaderProps, type IScBillingHistoryTableListProps, type IScBillingLogsTableHeaderProps, type IScBillingLogsTableListProps, type IScBriefCardProps, type IScButtonProps, type IScCalendarDateCompsProps, type IScCalendarProps, type IScCatalogixInviteProps, type IScCheckFieldProps, type IScCheckboxProps, type IScCreditsUsageCardMobileProps, type IScCreditsUsageCardProps, type IScFieldButtonProps, type IScGoogleSignInProps, type IScGuideProps, type IScHDividerProps, type IScHeaderProps, type IScImageFieldProps, type IScIntialProfileCoverProps, type IScLogoUnitProps, type IScMenuOptionsProps, type IScMobileBottomActionProps, type IScMobileTopNavProps, type IScOnlyFieldProps, type IScOnlyIconProps, type IScPairtextProps, type IScPendingActionProps, type IScPhtogenixInviteProps, type IScPlanCardProps, type IScPlanDetailsCardMobileProps, type IScPlanDetailsCardProps, type IScPopUpMenuProps, type IScProfileImageUpdateProps, type IScProfileOptionsProps, type IScProfileProps, type IScProfileSettingsCompProps, type IScProfileV2MobileProps, type IScProgressBarProps, type IScQuickPromptProps, type IScRadioProps, type IScReferralCardMobileProps, type IScReferralTableHeaderProps, type IScReferralTableListProps, type IScRoleMobileProps, type IScRoleProps, type IScSettingsNavProps, type IScSettingsTabCompProps, type IScSideBarLogoUnitProps, type IScSidebarIconsProps, type IScSidebarMenuProps, type IScSidebarProfileProps, type IScSidebarProps, type IScSliderProps, type IScStrLogoProps, type IScTabCompProps, type IScTabFieldProps, type IScTabSwitcherProps, type IScTableHeaderProps, type IScTableListMobileProps, type IScTableListProps, type IScTextFieldProps, type IScToggleSwitchProps, type IScVDividerProps, type IScVersionProps, type IScWorkspaceCardProps, type IScWorkspaceSettingsMobileProps, type IScWorkspaceSwitchMobileProps, type IScWorkspaceSwitchMobileV2Props, type IUsageHistoryMobileProps, InvoiceHistoryMobile, NscWorkspaceSwitch, type PlanFeatureSection, ScAccess, ScAppCard, ScAppCardV3, ScAppField, ScAppListingCard, ScArtifaxInvite, ScArtifaxSidebar, ScBadges, ScBillingHistoryHeader, ScBillingHistoryTableList, ScBillingLogsTableHeader, ScBillingLogsTableList, ScBriefCard, ScButton, ScCalendar, ScCalendarDateComps, ScCatalogixInvite, ScCheckField, ScCheckbox, ScCreditsUsageCard, ScCreditsUsageCardMobile, ScDp, type ScDpProps, ScFieldButton, ScGoogleSignIn, ScGuide, ScHDivider, ScHeader, ScImageField, ScIntialProfileCover, ScLogoUnit, ScMenuOptions, ScMobileBottomAction, ScMobileTopNav, ScOnlyField, ScOnlyIcon, ScPairtext, ScPendingAction, ScPhtogenixInvite, ScPlanCard, ScPlanDetailsCard, ScPlanDetailsCardMobile, ScPopUpMenu, ScProfile, ScProfileImageUpdate, ScProfileOptions, ScProfileSettingsComp, ScProfileV2Mobile, ScProgressBar, ScQuickPrompt, ScRadio, ScReferralCardMobile, ScReferralTableHeader, ScReferralTableList, ScRole, ScRoleMobile, ScSettingsNav, ScSettingsTabComp, ScSideBarLogoUnit, ScSidebar, ScSidebarIcons, ScSidebarMenu, ScSidebarProfile, ScSlider, ScStrLogo, ScTabComp, ScTabField, ScTabSwitcher, ScTableHeader, ScTableList, ScTableListMobile, ScTextField, ScToggleSwitch, ScVDivider, ScVersion, ScWorkspaceCard, ScWorkspaceSettingsMobile, ScWorkspaceSwitchCard, type ScWorkspaceSwitchCardProps, ScWorkspaceSwitchMobile, ScWorkspaceSwitchMobileV2, type SidebarConfig, type SidebarIconContext, type SidebarIconMap, type SidebarIconRenderer, type SidebarMenuItemConfig, type SidebarProfileConfig, type SidebarSectionConfig, StreamoidSidebar, type StreamoidSidebarProps, StreamoidWorkspaceSwitcher, type StreamoidWorkspaceSwitcherProps, UsageHistoryMobile, type WorkspaceSwitcherConfig, type WorkspaceSwitcherItem };
1186
+ export { type ArtifaxMenuItem, type ArtifaxSection, type ArtifaxSidebarAssistantCta, type ArtifaxSidebarCreditWarning, type ArtifaxSidebarIconContext, type ArtifaxSidebarIconMap, type ArtifaxSidebarIconRenderer, type ArtifaxSidebarProfile, type CatalogixNavItem, type CatalogixSidebarCreditWarning, type CatalogixSidebarIconContext, type CatalogixSidebarIconMap, type CatalogixSidebarIconRenderer, type CatalogixSidebarProfile, type CatalogixSwitchApp, CreditWarningBanner, type CreditWarningBannerProps, type IInvoiceHistoryMobileProps, type IScAccessProps, type IScAppCardProps, type IScAppCardV3Props, type IScAppFieldProps, type IScAppListingCardProps, type IScArtifaxInviteProps, type IScArtifaxSidebarProps, type IScBadgesProps, type IScBillingHistoryHeaderProps, type IScBillingHistoryTableListProps, type IScBillingLogsTableHeaderProps, type IScBillingLogsTableListProps, type IScBriefCardProps, type IScButtonProps, type IScCalendarDateCompsProps, type IScCalendarProps, type IScCatalogixInviteProps, type IScCatalogixSidebarProps, type IScCheckFieldProps, type IScCheckboxProps, type IScCreditsUsageCardMobileProps, type IScCreditsUsageCardProps, type IScFieldButtonProps, type IScGoogleSignInProps, type IScGuideProps, type IScHDividerProps, type IScHeaderProps, type IScImageFieldProps, type IScIntialProfileCoverProps, type IScLogoUnitProps, type IScMenuOptionsProps, type IScMobileBottomActionProps, type IScMobileTopNavProps, type IScOnlyFieldProps, type IScOnlyIconProps, type IScPairtextProps, type IScPendingActionProps, type IScPhtogenixInviteProps, type IScPlanCardProps, type IScPlanDetailsCardMobileProps, type IScPlanDetailsCardProps, type IScPopUpMenuProps, type IScProfileImageUpdateProps, type IScProfileOptionsProps, type IScProfileProps, type IScProfileSettingsCompProps, type IScProfileV2MobileProps, type IScProgressBarProps, type IScQuickPromptProps, type IScRadioProps, type IScReferralCardMobileProps, type IScReferralTableHeaderProps, type IScReferralTableListProps, type IScRoleMobileProps, type IScRoleProps, type IScSettingsNavProps, type IScSettingsTabCompProps, type IScSideBarLogoUnitProps, type IScSidebarIconsProps, type IScSidebarMenuProps, type IScSidebarProfileProps, type IScSidebarProps, type IScSidebarSwitchMenuProps, type IScSliderProps, type IScStrLogoProps, type IScTabCompProps, type IScTabFieldProps, type IScTabSwitcherProps, type IScTableHeaderProps, type IScTableListMobileProps, type IScTableListProps, type IScTextFieldProps, type IScToggleSwitchProps, type IScVDividerProps, type IScVersionProps, type IScWorkspaceCardProps, type IScWorkspaceSettingsMobileProps, type IScWorkspaceSwitchMobileProps, type IScWorkspaceSwitchMobileV2Props, type IUsageHistoryMobileProps, InvoiceHistoryMobile, NscWorkspaceSwitch, type PlanFeatureSection, ProductCollapsedMark, ProductWordmark, ScAccess, ScAppCard, ScAppCardV3, ScAppField, ScAppListingCard, ScArtifaxInvite, ScArtifaxSidebar, ScBadges, ScBillingHistoryHeader, ScBillingHistoryTableList, ScBillingLogsTableHeader, ScBillingLogsTableList, ScBriefCard, ScButton, ScCalendar, ScCalendarDateComps, ScCatalogixInvite, ScCatalogixSidebar, ScCheckField, ScCheckbox, ScCreditsUsageCard, ScCreditsUsageCardMobile, ScDp, type ScDpProps, ScFieldButton, ScGoogleSignIn, ScGuide, ScHDivider, ScHeader, ScImageField, ScIntialProfileCover, ScLogoUnit, ScMenuOptions, ScMobileBottomAction, ScMobileTopNav, ScOnlyField, ScOnlyIcon, ScPairtext, ScPendingAction, ScPhtogenixInvite, ScPlanCard, ScPlanDetailsCard, ScPlanDetailsCardMobile, ScPopUpMenu, ScProfile, ScProfileImageUpdate, ScProfileOptions, ScProfileSettingsComp, ScProfileV2Mobile, ScProgressBar, ScQuickPrompt, ScRadio, ScReferralCardMobile, ScReferralTableHeader, ScReferralTableList, ScRole, ScRoleMobile, ScSettingsNav, ScSettingsTabComp, ScSideBarLogoUnit, ScSidebar, ScSidebarIcons, ScSidebarMenu, ScSidebarProfile, ScSidebarSwitchMenu, ScSlider, ScStrLogo, ScTabComp, ScTabField, ScTabSwitcher, ScTableHeader, ScTableList, ScTableListMobile, ScTextField, ScToggleSwitch, ScVDivider, ScVersion, ScWorkspaceCard, ScWorkspaceSettingsMobile, ScWorkspaceSwitchCard, type ScWorkspaceSwitchCardProps, ScWorkspaceSwitchMobile, ScWorkspaceSwitchMobileV2, type SidebarConfig, type SidebarIconContext, type SidebarIconMap, type SidebarIconRenderer, type SidebarMenuItemConfig, type SidebarProduct, type SidebarProfileConfig, type SidebarSectionConfig, StreamoidSidebar, type StreamoidSidebarProps, StreamoidWorkspaceSwitcher, type StreamoidWorkspaceSwitcherProps, UsageHistoryMobile, type WorkspaceSwitcherConfig, type WorkspaceSwitcherItem, hasCollapsedMark };