@streamoid/ui 0.6.15 → 0.6.16
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 +287 -70
- package/dist/index.d.mts +149 -17
- package/dist/index.d.ts +149 -17
- package/dist/index.js +1118 -875
- package/dist/index.mjs +1129 -875
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -416,6 +416,45 @@ interface IScSidebarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "on
|
|
|
416
416
|
}
|
|
417
417
|
declare const ScSidebar: ({ state, className, onToggle, ...props }: IScSidebarProps) => JSX.Element;
|
|
418
418
|
|
|
419
|
+
/**
|
|
420
|
+
* Gradient assistant call-to-action shown just above a sidebar's profile row
|
|
421
|
+
* (e.g. "Ask CXO", which opens an embedded copilot panel).
|
|
422
|
+
*
|
|
423
|
+
* Shared by ScArtifaxSidebar and StreamoidSidebar so the gradient, the
|
|
424
|
+
* collapsed square and the a11y contract exist in exactly one place.
|
|
425
|
+
*/
|
|
426
|
+
interface AssistantCta {
|
|
427
|
+
/** CTA label, e.g. "Ask CXO". Shown in the expanded rail; hidden when
|
|
428
|
+
* collapsed (the icon becomes the only visible content). */
|
|
429
|
+
label: string;
|
|
430
|
+
/** Leading icon. Rendered in both states; it is the sole content of the
|
|
431
|
+
* collapsed square, so always supply one for collapsed use. */
|
|
432
|
+
icon?: ReactNode;
|
|
433
|
+
/** Pressed/active styling — e.g. while the panel this opens is visible.
|
|
434
|
+
* Surfaced as `aria-pressed`. */
|
|
435
|
+
active?: boolean;
|
|
436
|
+
/** Accessible name; falls back to `label`. */
|
|
437
|
+
ariaLabel?: string;
|
|
438
|
+
onClick: () => void;
|
|
439
|
+
}
|
|
440
|
+
interface IScAskAgentButtonProps {
|
|
441
|
+
cta: AssistantCta;
|
|
442
|
+
/** Collapsed rail: renders the 40x40 icon-only square and drops the label. */
|
|
443
|
+
collapsed?: boolean;
|
|
444
|
+
}
|
|
445
|
+
declare const ScAskAgentButton: {
|
|
446
|
+
({ cta, collapsed, }: IScAskAgentButtonProps): JSX.Element;
|
|
447
|
+
displayName: string;
|
|
448
|
+
};
|
|
449
|
+
/**
|
|
450
|
+
* Rail wrapper for the CTA — owns the inset/spacing before the divider so a
|
|
451
|
+
* host sidebar only has to decide *whether* to show it.
|
|
452
|
+
*/
|
|
453
|
+
declare const ScAskAgentSlot: {
|
|
454
|
+
({ cta, collapsed, }: IScAskAgentButtonProps): JSX.Element;
|
|
455
|
+
displayName: string;
|
|
456
|
+
};
|
|
457
|
+
|
|
419
458
|
interface SidebarMenuItemConfig {
|
|
420
459
|
id: string;
|
|
421
460
|
label?: string;
|
|
@@ -464,6 +503,12 @@ interface StreamoidSidebarProps {
|
|
|
464
503
|
* only; collapsed is unaffected. */
|
|
465
504
|
toggleInProfile?: boolean;
|
|
466
505
|
hideFooter?: boolean;
|
|
506
|
+
/** Gradient call-to-action above the profile row (e.g. "Ask CXO"). Omit to
|
|
507
|
+
* hide it. Rendered in both expanded (icon + label pill) and collapsed
|
|
508
|
+
* (icon-only square) rails, in the same slot as `preFooterContent` and
|
|
509
|
+
* immediately before it. Shares SC-AskAgentButton with ScArtifaxSidebar,
|
|
510
|
+
* so the gradient and a11y contract are identical across products. */
|
|
511
|
+
assistantCta?: AssistantCta | null;
|
|
467
512
|
preFooterContent?: ReactNode;
|
|
468
513
|
bodyContent?: ReactNode;
|
|
469
514
|
showBody?: boolean;
|
|
@@ -483,7 +528,7 @@ interface StreamoidSidebarProps {
|
|
|
483
528
|
/** Explicit state override per top item id — takes priority over activeItemId/highlightedItemIds for top items */
|
|
484
529
|
topItemStates?: Record<string, "default" | "active" | "hover" | "default-highlight" | "default-active">;
|
|
485
530
|
}
|
|
486
|
-
declare function StreamoidSidebar({ expanded, onToggle, config, iconMap, activeItemId, highlightedItemIds, onItemSelect, moreIcon, onMoreClick, expandedLogo, collapsedLogo, profile, versionText, toggleIcon, toggleInProfile, hideFooter, preFooterContent, bodyContent, showBody, switchPanel, switchPanelOpen, onSwitchPanelClose, isMobile, className, style, topItems, topItemStates, }: StreamoidSidebarProps): react_jsx_runtime.JSX.Element;
|
|
531
|
+
declare function StreamoidSidebar({ expanded, onToggle, config, iconMap, activeItemId, highlightedItemIds, onItemSelect, moreIcon, onMoreClick, expandedLogo, collapsedLogo, profile, versionText, toggleIcon, toggleInProfile, hideFooter, assistantCta, preFooterContent, bodyContent, showBody, switchPanel, switchPanelOpen, onSwitchPanelClose, isMobile, className, style, topItems, topItemStates, }: StreamoidSidebarProps): react_jsx_runtime.JSX.Element;
|
|
487
532
|
|
|
488
533
|
interface ArtifaxMenuItem {
|
|
489
534
|
id: string;
|
|
@@ -516,20 +561,12 @@ interface ArtifaxSidebarCreditWarning {
|
|
|
516
561
|
level?: "warning" | "danger";
|
|
517
562
|
onBuyCredits: () => void;
|
|
518
563
|
}
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
icon?: ReactNode;
|
|
526
|
-
/** Pressed/active styling — e.g. while the panel this opens is visible.
|
|
527
|
-
* Surfaced as `aria-pressed`. */
|
|
528
|
-
active?: boolean;
|
|
529
|
-
/** Accessible name; falls back to `label`. */
|
|
530
|
-
ariaLabel?: string;
|
|
531
|
-
onClick: () => void;
|
|
532
|
-
}
|
|
564
|
+
/**
|
|
565
|
+
* The CTA contract now lives with the shared button (SC-AskAgentButton) so the
|
|
566
|
+
* Artifax and Streamoid sidebars cannot drift. Kept as a named alias because
|
|
567
|
+
* this type is public API — consumers import it by this name.
|
|
568
|
+
*/
|
|
569
|
+
type ArtifaxSidebarAssistantCta = AssistantCta;
|
|
533
570
|
interface IScArtifaxSidebarProps {
|
|
534
571
|
expanded: boolean;
|
|
535
572
|
onToggle: () => void;
|
|
@@ -878,8 +915,12 @@ interface IScCheckboxProps {
|
|
|
878
915
|
className?: string;
|
|
879
916
|
style?: React.CSSProperties;
|
|
880
917
|
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
918
|
+
/** Box size in px (or any CSS length). Defaults to 24. The inner artwork
|
|
919
|
+
* scales with the box, so a smaller value gives a proportionally smaller
|
|
920
|
+
* checkbox — used for dense contexts like a data-grid header. */
|
|
921
|
+
size?: number | string;
|
|
881
922
|
}
|
|
882
|
-
declare const ScCheckbox: ({ state, checked, disabled, onChange, className, style, onClick, ...props }: IScCheckboxProps & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange">) => JSX.Element;
|
|
923
|
+
declare const ScCheckbox: ({ state, checked, disabled, onChange, className, style, onClick, size, ...props }: IScCheckboxProps & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange">) => JSX.Element;
|
|
883
924
|
|
|
884
925
|
interface IScFieldButtonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
885
926
|
icon?: JSX.Element;
|
|
@@ -1724,4 +1765,95 @@ interface IScPlanDetailsCardMobileProps extends React.HTMLAttributes<HTMLDivElem
|
|
|
1724
1765
|
}
|
|
1725
1766
|
declare const ScPlanDetailsCardMobile: ({ planName, planCredits, planPrice, badgeText, badgeSubText, currentPlanLabel, upgradeButtonText, isLoading, onUpgrade, className, ...props }: IScPlanDetailsCardMobileProps) => JSX.Element;
|
|
1726
1767
|
|
|
1727
|
-
|
|
1768
|
+
type ScProfilePopupThemeMode = "system" | "light" | "dark";
|
|
1769
|
+
interface IScProfilePopupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1770
|
+
/** Display name shown on the first line of the header. */
|
|
1771
|
+
name?: string;
|
|
1772
|
+
/** Second header line — the design shows the signed-in email. */
|
|
1773
|
+
email?: string;
|
|
1774
|
+
/** Avatar image src. */
|
|
1775
|
+
avatar?: string;
|
|
1776
|
+
/** Makes the header identity block activatable (e.g. open account settings). */
|
|
1777
|
+
onProfileClick?: () => void;
|
|
1778
|
+
/** Wires the error-coloured logout icon in the header's top-right. */
|
|
1779
|
+
onLogout?: () => void;
|
|
1780
|
+
/** Accessible label for the icon-only logout button. */
|
|
1781
|
+
logoutLabel?: string;
|
|
1782
|
+
showLogout?: boolean;
|
|
1783
|
+
workspaceName?: string;
|
|
1784
|
+
/** Role line under the workspace name, e.g. "Admin". */
|
|
1785
|
+
userRole?: string;
|
|
1786
|
+
workspaceImage?: string;
|
|
1787
|
+
/** Credits pill value. Omit to hide the pill entirely. */
|
|
1788
|
+
credits?: ReactNode;
|
|
1789
|
+
onSwitchWorkspace?: () => void;
|
|
1790
|
+
switchWorkspaceLabel?: string;
|
|
1791
|
+
showWorkspace?: boolean;
|
|
1792
|
+
showSwitchWorkspace?: boolean;
|
|
1793
|
+
onTeams?: () => void;
|
|
1794
|
+
onBilling?: () => void;
|
|
1795
|
+
onSettings?: () => void;
|
|
1796
|
+
onWhatsNew?: () => void;
|
|
1797
|
+
teamsLabel?: string;
|
|
1798
|
+
billingLabel?: string;
|
|
1799
|
+
settingsLabel?: string;
|
|
1800
|
+
whatsNewLabel?: string;
|
|
1801
|
+
/** Version tag shown at the trailing edge of the "What's new" row. */
|
|
1802
|
+
version?: string;
|
|
1803
|
+
showTeams?: boolean;
|
|
1804
|
+
showBilling?: boolean;
|
|
1805
|
+
showSettings?: boolean;
|
|
1806
|
+
showWhatsNew?: boolean;
|
|
1807
|
+
/** Controlled: which theme tab reads as active. */
|
|
1808
|
+
themeMode?: ScProfilePopupThemeMode;
|
|
1809
|
+
onThemeModeChange?: (mode: ScProfilePopupThemeMode) => void;
|
|
1810
|
+
showThemeSwitcher?: boolean;
|
|
1811
|
+
/** Extra trailing header controls; sits in a row beside the logout button. */
|
|
1812
|
+
headerActions?: ReactNode;
|
|
1813
|
+
/** Appended inside the workspace block, below "Switch workspace". */
|
|
1814
|
+
workspaceContent?: ReactNode;
|
|
1815
|
+
/** Appended to the menu group, below the built-in rows. */
|
|
1816
|
+
menuContent?: ReactNode;
|
|
1817
|
+
/** Sits between the menu group and the theme switcher. */
|
|
1818
|
+
preFooterContent?: ReactNode;
|
|
1819
|
+
/** Appended at the end of the panel, below the theme switcher. */
|
|
1820
|
+
children?: ReactNode;
|
|
1821
|
+
className?: string;
|
|
1822
|
+
}
|
|
1823
|
+
/**
|
|
1824
|
+
* Profile popup panel — Figma `SC-Profile options` (node 6666:25516).
|
|
1825
|
+
*
|
|
1826
|
+
* This is the panel **body only**: it renders no overlay and owns no open
|
|
1827
|
+
* state. The host positions it and handles dismissal, matching the
|
|
1828
|
+
* `switchPanel`/`switchPanelOpen` split already used by `StreamoidSidebar`.
|
|
1829
|
+
* The forwarded ref is the panel root, for placement and outside-click checks.
|
|
1830
|
+
*
|
|
1831
|
+
* Composed from existing DS parts (`ScProfile`, `ScWorkspace`, `ScHDivider`,
|
|
1832
|
+
* `ScMenuOptions`, `ScButton`, `ScTabSwitcher`/`ScTabComp`). To nest further
|
|
1833
|
+
* components, use the slots — each stack stretches whatever is placed in it:
|
|
1834
|
+
*
|
|
1835
|
+
* ```tsx
|
|
1836
|
+
* <ScProfilePopup
|
|
1837
|
+
* ref={panelRef}
|
|
1838
|
+
* name={user.name}
|
|
1839
|
+
* email={user.email}
|
|
1840
|
+
* avatar={user.avatarUrl}
|
|
1841
|
+
* workspaceName={ws.name}
|
|
1842
|
+
* userRole={ws.role}
|
|
1843
|
+
* credits={credits}
|
|
1844
|
+
* version={APP_VERSION}
|
|
1845
|
+
* themeMode={theme}
|
|
1846
|
+
* onThemeModeChange={setTheme}
|
|
1847
|
+
* onLogout={logout}
|
|
1848
|
+
* onSwitchWorkspace={() => setSwitcherOpen(true)}
|
|
1849
|
+
* onBilling={() => navigate("/billing")}
|
|
1850
|
+
* menuContent={
|
|
1851
|
+
* <ScMenuOptions icon={<SiconCatalog size={24} />} text="Catalogs" />
|
|
1852
|
+
* }
|
|
1853
|
+
* preFooterContent={<ScCreditWarningBanner … />}
|
|
1854
|
+
* />
|
|
1855
|
+
* ```
|
|
1856
|
+
*/
|
|
1857
|
+
declare const ScProfilePopup: React$1.ForwardRefExoticComponent<IScProfilePopupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1858
|
+
|
|
1859
|
+
export { type AppcardProduct, type ArtifaxMenuItem, type ArtifaxSection, type ArtifaxSidebarAssistantCta, type ArtifaxSidebarCreditWarning, type ArtifaxSidebarIconContext, type ArtifaxSidebarIconMap, type ArtifaxSidebarIconRenderer, type ArtifaxSidebarProfile, type AssistantCta, type CatalogixNavItem, type CatalogixSidebarCreditWarning, type CatalogixSidebarIconContext, type CatalogixSidebarIconMap, type CatalogixSidebarIconRenderer, type CatalogixSidebarProfile, type CatalogixSwitchApp, CreditWarningBanner, type CreditWarningBannerProps, type DescriptionVisibility, type IInvoiceHistoryMobileProps, type IScAccessProps, type IScAppCardForCopilotProps, type IScAppCardProps, type IScAppCardV3Props, type IScAppFieldProps, type IScAppListingCardProps, type IScAppSwitchPanelProps, type IScAppcardLogosProps, type IScArtifaxInviteProps, type IScArtifaxSidebarProps, type IScAskAgentButtonProps, type IScBadgesProps, type IScBeaconProps, type IScBillingHistoryHeaderProps, type IScBillingHistoryTableListProps, type IScBillingLogsTableHeaderProps, type IScBillingLogsTableListProps, type IScBriefCardProps, type IScButtonProps, type IScCalendarDateCompsProps, type IScCalendarProps, type IScCatalogixInviteProps, type IScCatalogixSidebarProps, type IScCatalogixStoreHeaderProps, type IScCatalogixStoreTableListProps, type IScCheckFieldProps, type IScCheckboxProps, type IScCounterProps, type IScCreditsUsageCardMobileProps, type IScCreditsUsageCardProps, type IScCxoCopilotLogoProps, type IScDefaultCardProps, type IScDrawerProps, type IScFieldButtonProps, type IScFileFieldProps, type IScGoogleSignInProps, type IScGuideProps, type IScHDividerProps, type IScHeaderProps, type IScImageFieldProps, type IScInChatListProps, type IScInChatMessageProps, type IScInfoPopupProps, type IScIntialProfileCoverProps, type IScLogoUnitProps, type IScMappingCardProps, type IScMediaApprovalProps, type IScMediaSelectProps, type IScMenuOptionsProps, type IScMobileBottomActionProps, type IScMobileTopNavProps, type IScModalProps, type IScOnlyFieldProps, type IScOnlyIconProps, type IScPaginationProps, type IScPairtextProps, type IScPendingActionProps, type IScPhtogenixInviteProps, type IScPlanCardProps, type IScPlanComparisonProps, type IScPlanDetailsCardMobileProps, type IScPlanDetailsCardProps, type IScPopUpMenuProps, type IScProfileImageUpdateProps, type IScProfileOptionsProps, type IScProfilePopupProps, type IScProfileProps, type IScProfileSettingsCompProps, type IScProfileV2MobileProps, type IScProgressBarProps, type IScQuickPromptProps, type IScRadioProps, type IScReferralCardMobileProps, type IScReferralTableHeaderProps, type IScReferralTableListProps, type IScRoleMobileProps, type IScRoleProps, type IScSelectOption, type IScSelectProps, type IScSelectionListProps, type IScSelectionPillGroupProps, type IScSelectionPillOption, type IScSelectionPillProps, type IScSelectionProps, type IScSettingsNavProps, type IScSettingsTabCompProps, type IScSideBarLogoUnitProps, type IScSidebarIconsProps, type IScSidebarMenuProps, type IScSidebarProfileProps, type IScSidebarProps, type IScSidebarSwitchMenuProps, type IScSliderProps, type IScStoreCardProps, type IScStrLogoProps, type IScStreamoidMascotProps, type IScStreamoidWordmarkProps, type IScSubAgentProps, type IScTabCompProps, type IScTabFieldProps, type IScTabSwitcherProps, type IScTableHeaderProps, type IScTableListMobileProps, type IScTableListProps, type IScTabsProps, type IScTaxonomyPillProps, type IScTextAreaProps, type IScTextFieldProps, type IScThinkingStepIconProps, type IScTodoItem, type IScTodoListProps, type IScToggleSwitchProps, type IScVDividerProps, type IScValueMappingL1Props, type IScVersionProps, type IScWorkspaceCardProps, type IScWorkspaceSettingsMobileProps, type IScWorkspaceSwitchMobileProps, type IScWorkspaceSwitchMobileV2Props, type IUsageHistoryMobileProps, type IcListIconState, InvoiceHistoryMobile, NscWorkspaceSwitch, type PlanComparisonRow, type PlanComparisonSection, type PlanFeatureSection, ProductCollapsedMark, ProductWordmark, ScAccess, ScAppCard, ScAppCardForCopilot, ScAppCardV3, ScAppField, ScAppListingCard, type ScAppSwitchItem, ScAppSwitchPanel, ScAppSwitchRow, ScAppcardLogos, ScArtifaxInvite, ScArtifaxSidebar, ScAskAgentButton, ScAskAgentSlot, ScBadges, ScBeacon, type ScBeaconTone, ScBillingHistoryHeader, ScBillingHistoryTableList, ScBillingLogsTableHeader, ScBillingLogsTableList, ScBriefCard, ScButton, ScCalendar, ScCalendarDateComps, ScCatalogixInvite, ScCatalogixSidebar, ScCatalogixStoreHeader, ScCatalogixStoreTableList, ScCheckField, ScCheckbox, ScCounter, ScCreditsUsageCard, ScCreditsUsageCardMobile, ScCxoCopilotLogo, ScDefaultCard, ScDp, type ScDpProps, ScDrawer, ScFieldButton, ScFileField, ScGoogleSignIn, ScGuide, ScHDivider, ScHeader, ScImageField, ScInChatList, ScInChatMessage, ScInfoPopup, ScIntialProfileCover, ScLogoUnit, ScMappingCard, ScMediaApproval, ScMediaSelect, ScMenuOptions, ScMobileBottomAction, ScMobileTopNav, ScModal, ScOnlyField, ScOnlyIcon, ScPagination, ScPairtext, ScPendingAction, ScPhtogenixInvite, ScPlanCard, ScPlanComparison, ScPlanDetailsCard, ScPlanDetailsCardMobile, ScPopUpMenu, ScProfile, ScProfileImageUpdate, ScProfileOptions, ScProfilePopup, type ScProfilePopupThemeMode, ScProfileSettingsComp, ScProfileV2Mobile, ScProgressBar, ScQuickPrompt, ScRadio, ScReferralCardMobile, ScReferralTableHeader, ScReferralTableList, ScRole, ScRoleMobile, ScSelect, ScSelection, ScSelectionList, ScSelectionPill, ScSelectionPillGroup, ScSettingsNav, ScSettingsTabComp, ScSideBarLogoUnit, ScSidebar, ScSidebarIcons, ScSidebarMenu, ScSidebarProfile, ScSidebarSwitchMenu, ScSlider, ScStoreCard, ScStrLogo, ScStreamoidMascot, ScStreamoidWordmark, ScSubAgent, type ScTab, ScTabComp, ScTabField, ScTabSwitcher, ScTableHeader, ScTableList, ScTableListMobile, ScTabs, ScTaxonomyPill, ScTextArea, ScTextField, ScThinkingStepIcon, ScTodoList, ScToggleSwitch, ScVDivider, ScValueMappingL1, ScVersion, ScWorkspaceCard, ScWorkspaceSettingsMobile, ScWorkspaceSwitchCard, type ScWorkspaceSwitchCardProps, ScWorkspaceSwitchMobile, ScWorkspaceSwitchMobileV2, type SelectionListState, 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, formatSubAgentLabel, hasCollapsedMark };
|