@voltro/ui-shadcn 0.66.1 → 0.68.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
@@ -1,10 +1,11 @@
1
1
  import { ButtonHTMLAttributes } from 'react';
2
2
  import { ClassProp } from 'class-variance-authority/types';
3
3
  import { ClassValue } from 'clsx';
4
+ import { ComponentProps } from 'react';
4
5
  import { ComponentPropsWithoutRef } from 'react';
6
+ import { ComponentPropsWithRef } from 'react';
5
7
  import { ComponentType } from 'react';
6
8
  import { CSSProperties } from 'react';
7
- import { DialogHTMLAttributes } from 'react';
8
9
  import { FC } from 'react';
9
10
  import { FormHTMLAttributes } from 'react';
10
11
  import { ForwardRefExoticComponent } from 'react';
@@ -40,10 +41,12 @@ declare interface AnimatedNumberProps {
40
41
  * is immediate (the pre-paint `themeBootScript` handles the first load). */
41
42
  export declare const applyTheme: (theme: ThemePreference) => void;
42
43
 
43
- export declare const AppShell: ({ brand, nav, right, children, className, LinkComponent, }: AppShellProps) => ReactNode;
44
+ export declare const AppShell: ({ brand, header, nav, right, children, className, LinkComponent, }: AppShellProps) => ReactNode;
44
45
 
45
46
  declare interface AppShellProps {
46
47
  readonly brand: ReactNode;
48
+ /** Custom top navigation using the app's own shared header composition. */
49
+ readonly header?: ReactNode;
47
50
  readonly nav?: ReadonlyArray<NavLink>;
48
51
  readonly right?: ReactNode;
49
52
  readonly children: ReactNode;
@@ -189,7 +192,7 @@ declare interface CodeComparePanelProps {
189
192
  readonly code?: string;
190
193
  /** Shiki language. Triggers syntax highlighting on `code`. */
191
194
  readonly lang?: ShikiLang;
192
- /** Visual treatment — `'muted'` is dimmed (the "before"),
195
+ /** Visual treatment — `'muted'` uses a neutral border (the "before"),
193
196
  * `'highlight'` keeps the full styling + adds a primary border. */
194
197
  readonly tone?: 'muted' | 'highlight';
195
198
  /** The corner tag. Pass a translated string on a localised page. */
@@ -238,7 +241,7 @@ export declare const DatabaseIcon: (p: DocIconProps) => ReactNode;
238
241
  * writes `document.cookie` in the browser, returns the header string. */
239
242
  export declare const deleteCookie: (name: string, path?: string) => string;
240
243
 
241
- export declare const Dialog: ({ className, children, ...props }: DialogHTMLAttributes<HTMLDialogElement>) => ReactNode;
244
+ export declare const Dialog: ({ className, children, ...props }: ComponentPropsWithRef<"dialog">) => ReactNode;
242
245
 
243
246
  export declare const DialogDescription: ({ className, ...props }: HTMLAttributes<HTMLParagraphElement>) => ReactNode;
244
247
 
@@ -317,7 +320,7 @@ declare interface DocShellProps {
317
320
  readonly LinkComponent?: ComponentType<ShellLinkProps>;
318
321
  }
319
322
 
320
- export declare const DocsLayout: ({ brand, nav, children, currentPath, topNav, topRight, search, page, LinkComponent, className, labels, footer, sidebarHeader, }: DocsLayoutProps) => ReactNode;
323
+ export declare const DocsLayout: ({ brand, nav, children, currentPath, topNav, topRight, search, page, LinkComponent, className, labels, footer, sidebarHeader, header, intro, sidebar, }: DocsLayoutProps) => ReactNode;
321
324
 
322
325
  /** User-facing strings for the layout's own chrome. Defaults are English
323
326
  * so the layout works unconfigured; pass catalog values to localize. */
@@ -350,6 +353,14 @@ declare interface DocsLayoutProps {
350
353
  readonly brand: ReactNode;
351
354
  readonly nav: ReadonlyArray<DocsNavGroup>;
352
355
  readonly children: ReactNode;
356
+ /** Compose the top bar while retaining the layout's mobile navigation control. */
357
+ readonly header?: (controls: {
358
+ readonly menuButton: ReactNode;
359
+ }) => ReactNode;
360
+ /** Full-width introduction above the reading columns. */
361
+ readonly intro?: ReactNode;
362
+ /** Show the desktop section rail. Mobile navigation remains available. */
363
+ readonly sidebar?: boolean;
353
364
  /** Current pathname — used to highlight the active nav entry +
354
365
  * decide which group opens by default. */
355
366
  readonly currentPath?: string;
@@ -712,7 +723,7 @@ export declare interface PreferenceCookies {
712
723
  readonly locale?: string;
713
724
  }
714
725
 
715
- export declare const ProfileMenu: ({ identity, links, languages, currentLanguage, onLanguageChange, logoutUrl, onLogout, signInUrl, labels, }: ProfileMenuProps) => ReactNode;
726
+ export declare const ProfileMenu: ({ identity, links, languages, currentLanguage, onLanguageChange, logoutUrl, onLogout, signInUrl, labels, trigger, }: ProfileMenuProps) => ReactNode;
716
727
 
717
728
  export declare interface ProfileMenuLabels {
718
729
  /** Section label for the theme switch. Default `'Theme'`. */
@@ -747,6 +758,8 @@ export declare interface ProfileMenuLink {
747
758
  }
748
759
 
749
760
  export declare interface ProfileMenuProps {
761
+ /** Custom accessible trigger; Radix supplies menu state and focus handling. */
762
+ readonly trigger?: ReactNode;
750
763
  readonly identity?: {
751
764
  readonly name: string;
752
765
  readonly sublabel?: string;
@@ -912,6 +925,61 @@ export declare const SHIKI_LANGS: readonly ["text", "ts", "tsx", "typescript", "
912
925
 
913
926
  export declare type ShikiLang = typeof SHIKI_LANGS[number];
914
927
 
928
+ /** Decorative Voltro contour field. Import `@voltro/ui-shadcn/signal.css`.
929
+ * Static at SSR, with reduced-motion and visibility-aware animation on hydration. */
930
+ export declare function SignalField({ animated, paused, className }: SignalFieldProps): ReactNode;
931
+
932
+ export declare interface SignalFieldProps {
933
+ /** Enable the ambient wave. Supply a visible pause control when enabling it. */
934
+ readonly animated?: boolean;
935
+ readonly paused?: boolean;
936
+ readonly className?: string;
937
+ }
938
+
939
+ /** Compact brand navigation with a keyboard-accessible disclosure and moving marker. */
940
+ export declare function SignalHeader({ brand, links, navigationLabel, menuLabel, menuTitle, menuLinks, utilities, navigationAction, className, sticky }: SignalHeaderProps): ReactNode;
941
+
942
+ /** Secondary header action; the filled Signal CTA remains the page's primary action. */
943
+ export declare function SignalHeaderAction({ children, className, ...props }: ComponentProps<'a'>): ReactNode;
944
+
945
+ export declare interface SignalHeaderProps {
946
+ readonly brand: ReactNode;
947
+ readonly links: readonly SignalNavigationLink[];
948
+ readonly navigationLabel: string;
949
+ readonly menuLabel: string;
950
+ readonly menuTitle: ReactNode;
951
+ readonly menuLinks: readonly SignalNavigationLink[];
952
+ readonly utilities?: ReactNode;
953
+ /** Context navigation, such as the Docs section drawer, stays beside the rail. */
954
+ readonly navigationAction?: ReactNode;
955
+ readonly className?: string;
956
+ /** Keep navigation available while reading; the surface appears after scrolling. */
957
+ readonly sticky?: boolean;
958
+ }
959
+
960
+ export declare interface SignalNavigationLink {
961
+ readonly label: string;
962
+ readonly href: string;
963
+ readonly description?: string;
964
+ readonly current?: boolean;
965
+ }
966
+
967
+ /** One appearance/language entry point for public and operating Signal surfaces. */
968
+ export declare function SignalPreferences({ locale, ...props }: SignalPreferencesProps): ReactNode;
969
+
970
+ export declare interface SignalPreferencesProps extends Omit<ProfileMenuProps, 'trigger' | 'labels' | 'languages' | 'currentLanguage'> {
971
+ readonly locale: 'en' | 'de';
972
+ }
973
+
974
+ /** Search is a command trigger, sized to the navigation rail with a compact mobile state. */
975
+ export declare function SignalSearch({ label, onOpen, className }: SignalSearchProps): ReactNode;
976
+
977
+ export declare interface SignalSearchProps {
978
+ readonly label: string;
979
+ readonly onOpen: () => void;
980
+ readonly className?: string;
981
+ }
982
+
915
983
  export declare const SiteFooter: ({ brand, tagline, social, columns, bottomLeft, bottomRight, copyrightHolder, socialLabel, LinkComponent, className, }: SiteFooterProps) => ReactNode;
916
984
 
917
985
  export declare interface SiteFooterColumn {
@@ -1054,6 +1122,9 @@ export declare const TerminalIcon: (p: DocIconProps) => ReactNode;
1054
1122
 
1055
1123
  export declare const Textarea: ({ className, ...props }: TextareaHTMLAttributes<HTMLTextAreaElement>) => ReactNode;
1056
1124
 
1125
+ /** Fired after applyTheme so preference controls in the same document stay in sync. */
1126
+ export declare const THEME_CHANGE_EVENT = "voltro:theme-change";
1127
+
1057
1128
  export declare const THEME_COOKIE = "voltro:theme";
1058
1129
 
1059
1130
  /**
@@ -1170,7 +1241,7 @@ export declare type VoltroMarkVariant = 'gradient' | 'mono' | 'white';
1170
1241
  * type set in the surrounding font and `currentColor`, so it inherits
1171
1242
  * the app's typography and is correct in light + dark automatically.
1172
1243
  */
1173
- export declare const VoltroWordmark: ({ size, markVariant, label, className, style, }: VoltroWordmarkProps) => ReactNode;
1244
+ export declare const VoltroWordmark: ({ size, markVariant, label, product, productTone, className, style, }: VoltroWordmarkProps) => ReactNode;
1174
1245
 
1175
1246
  export declare interface VoltroWordmarkProps {
1176
1247
  /** Mark height in px; the wordmark text scales with it. Default 28. */
@@ -1178,6 +1249,10 @@ export declare interface VoltroWordmarkProps {
1178
1249
  readonly markVariant?: VoltroMarkVariant;
1179
1250
  /** Wordmark label. Default "Voltro". */
1180
1251
  readonly label?: string;
1252
+ /** Product badge beside the shared wordmark, e.g. Framework or Cloud. */
1253
+ readonly product?: ReactNode;
1254
+ /** Warning tone for an operator surface; proportions stay shared. */
1255
+ readonly productTone?: 'brand' | 'warning';
1181
1256
  readonly className?: string;
1182
1257
  readonly style?: CSSProperties;
1183
1258
  }