@nebutra/ui 0.2.3 → 3.0.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.
Files changed (51) hide show
  1. package/dist/animate-in-BlvjVh2S.d.ts +250 -0
  2. package/dist/{canonical-Drca5UMj.d.ts → canonical-DEhT4VfS.d.ts} +83 -369
  3. package/dist/card-DunB1gKE.d.ts +105 -0
  4. package/dist/chat/index.d.ts +1 -0
  5. package/dist/chat/index.js +3 -0
  6. package/dist/chat/index.js.map +1 -0
  7. package/dist/components/index.d.ts +90 -126
  8. package/dist/components/index.js +433 -182
  9. package/dist/components/index.js.map +1 -1
  10. package/dist/editorial/index.d.ts +404 -0
  11. package/dist/editorial/index.js +942 -0
  12. package/dist/editorial/index.js.map +1 -0
  13. package/dist/empty-state-bmfHCOuN.d.ts +86 -0
  14. package/dist/hooks/index.d.ts +18 -1
  15. package/dist/hooks/index.js +120 -5
  16. package/dist/hooks/index.js.map +1 -1
  17. package/dist/icons/index.d.ts +1 -0
  18. package/dist/index.d.ts +1 -1
  19. package/dist/layout/index.d.ts +17 -58
  20. package/dist/layout/index.js +368 -127
  21. package/dist/layout/index.js.map +1 -1
  22. package/dist/layouts/index.d.ts +1 -1
  23. package/dist/layouts/index.js +93 -28
  24. package/dist/layouts/index.js.map +1 -1
  25. package/dist/patterns/index.d.ts +39 -46
  26. package/dist/patterns/index.js +534 -323
  27. package/dist/patterns/index.js.map +1 -1
  28. package/dist/primitives/canonical.d.ts +5 -2
  29. package/dist/primitives/canonical.js +598 -288
  30. package/dist/primitives/canonical.js.map +1 -1
  31. package/dist/primitives/index.d.ts +165 -63
  32. package/dist/primitives/index.js +1251 -983
  33. package/dist/primitives/index.js.map +1 -1
  34. package/dist/tailwind.preset.d.ts +32 -32
  35. package/dist/tailwind.preset.js +24 -20
  36. package/dist/tailwind.preset.js.map +1 -1
  37. package/dist/theme/index.d.ts +1 -110
  38. package/dist/typography/fonts.css +8 -16
  39. package/dist/typography/index.d.ts +29 -45
  40. package/dist/typography/index.js +26 -14
  41. package/dist/typography/index.js.map +1 -1
  42. package/dist/utils/auth-surfaces.d.ts +33 -0
  43. package/dist/utils/auth-surfaces.js +9 -0
  44. package/dist/utils/auth-surfaces.js.map +1 -0
  45. package/dist/utils/index.d.ts +20 -16
  46. package/dist/utils/index.js +99 -20
  47. package/dist/utils/index.js.map +1 -1
  48. package/package.json +25 -11
  49. package/src/typography/fonts.css +8 -16
  50. package/dist/styles/brand-override.css +0 -61
  51. package/src/styles/brand-override.css +0 -61
@@ -1,7 +1,10 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import { HTMLAttributes, ReactNode, ComponentType } from 'react';
4
+ export { C as Card, b as CardBody, c as CardBodyProps, d as CardDescription, e as CardDescriptionProps, f as CardFooter, g as CardFooterProps, h as CardHeader, i as CardHeaderProps, j as CardIcon, k as CardIconProps, a as CardProps, l as CardRoot, m as CardTitle, n as CardTitleProps } from '../card-DunB1gKE.js';
4
5
  import { Icon } from '@nebutra/icons';
6
+ import 'class-variance-authority/types';
7
+ import 'class-variance-authority';
5
8
 
6
9
  interface ArtifactShiftCardProps extends HTMLAttributes<HTMLDivElement> {
7
10
  children: ReactNode;
@@ -20,43 +23,6 @@ declare function ArtifactShiftCard({ className, contentClassName, children, ...p
20
23
  declare function ArtifactShiftCardPreview({ filename, language, code, label, maxLines, signals, className, ...props }: ArtifactShiftCardPreviewProps): react_jsx_runtime.JSX.Element;
21
24
  declare function ArtifactShiftCardFooter({ className, ...props }: ArtifactShiftCardFooterProps): react_jsx_runtime.JSX.Element;
22
25
 
23
- type CardVariant = "default" | "elevated" | "bordered" | "ghost" | "gradient";
24
- type CardPadding = "none" | "sm" | "md" | "lg";
25
- interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
26
- variant?: CardVariant;
27
- padding?: CardPadding;
28
- asChild?: boolean;
29
- }
30
- declare const CardRoot: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
31
- interface CardHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
32
- spacing?: "sm" | "md" | "lg";
33
- }
34
- declare const CardHeader: React.ForwardRefExoticComponent<CardHeaderProps & React.RefAttributes<HTMLDivElement>>;
35
- type CardBodyProps = React.HTMLAttributes<HTMLDivElement>;
36
- declare const CardBody: React.ForwardRefExoticComponent<CardBodyProps & React.RefAttributes<HTMLDivElement>>;
37
- type CardFooterProps = React.HTMLAttributes<HTMLDivElement>;
38
- declare const CardFooter: React.ForwardRefExoticComponent<CardFooterProps & React.RefAttributes<HTMLDivElement>>;
39
- interface CardIconProps extends React.HTMLAttributes<HTMLDivElement> {
40
- size?: "sm" | "md" | "lg";
41
- }
42
- declare const CardIcon: React.ForwardRefExoticComponent<CardIconProps & React.RefAttributes<HTMLDivElement>>;
43
- interface CardTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
44
- as?: "h2" | "h3" | "h4" | "h5" | "h6";
45
- }
46
- declare const CardTitle: React.ForwardRefExoticComponent<CardTitleProps & React.RefAttributes<HTMLHeadingElement>>;
47
- interface CardDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement | HTMLDivElement> {
48
- as?: React.ElementType;
49
- }
50
- declare const CardDescription: React.ForwardRefExoticComponent<CardDescriptionProps & React.RefAttributes<HTMLDivElement | HTMLParagraphElement>>;
51
- declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>> & {
52
- Header: React.ForwardRefExoticComponent<CardHeaderProps & React.RefAttributes<HTMLDivElement>>;
53
- Body: React.ForwardRefExoticComponent<CardBodyProps & React.RefAttributes<HTMLDivElement>>;
54
- Footer: React.ForwardRefExoticComponent<CardFooterProps & React.RefAttributes<HTMLDivElement>>;
55
- Icon: React.ForwardRefExoticComponent<CardIconProps & React.RefAttributes<HTMLDivElement>>;
56
- Title: React.ForwardRefExoticComponent<CardTitleProps & React.RefAttributes<HTMLHeadingElement>>;
57
- Description: React.ForwardRefExoticComponent<CardDescriptionProps & React.RefAttributes<HTMLDivElement | HTMLParagraphElement>>;
58
- };
59
-
60
26
  interface CommandBoxProps extends React.HTMLAttributes<HTMLDivElement> {
61
27
  command: string;
62
28
  prefix?: string;
@@ -137,6 +103,8 @@ interface GalleryCardProps {
137
103
  badge?: GalleryCardBadge;
138
104
  /** Pin/star indicator at top-right (boolean) — renders a small Pin icon */
139
105
  pinned?: boolean;
106
+ /** Label for the pin indicator (a shared component cannot pick the product's language) */
107
+ pinnedLabel?: string;
140
108
  metadata?: GalleryCardMetadata;
141
109
  /** Dropdown action menu items at top-right (••• kebab) */
142
110
  actions?: GalleryCardAction[];
@@ -160,7 +128,6 @@ type IconComponent = ComponentType<{
160
128
  type IconInput = IconComponent | ReactNode;
161
129
  interface KineticFeatureCardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
162
130
  icon?: IconInput;
163
- eyebrow?: ReactNode;
164
131
  title: ReactNode;
165
132
  description: ReactNode;
166
133
  children?: ReactNode;
@@ -196,7 +163,7 @@ interface KineticStepProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
196
163
  description: ReactNode;
197
164
  phaseLabel?: string;
198
165
  }
199
- declare function KineticFeatureCard({ icon, eyebrow, title, description, children, className, ...props }: KineticFeatureCardProps): react_jsx_runtime.JSX.Element;
166
+ declare function KineticFeatureCard({ icon, title, description, children, className, ...props }: KineticFeatureCardProps): react_jsx_runtime.JSX.Element;
200
167
  declare function KineticCodePreview({ filename, language, lines, className, ...props }: KineticCodePreviewProps): react_jsx_runtime.JSX.Element;
201
168
  declare function KineticConsoleFrame({ title, status, children, className, ...props }: KineticConsoleFrameProps): react_jsx_runtime.JSX.Element;
202
169
  declare function KineticMorphSurface({ activeKey, className, children, ...props }: KineticMorphSurfaceProps): react_jsx_runtime.JSX.Element;
@@ -205,15 +172,35 @@ declare function KineticCommandBox({ command, copyLabel, copiedLabel, className,
205
172
  declare function KineticStepRail({ className, children, ...props }: KineticStepRailProps): react_jsx_runtime.JSX.Element;
206
173
  declare function KineticStep({ icon: Icon, index, title, description, phaseLabel, className, ...props }: KineticStepProps): react_jsx_runtime.JSX.Element;
207
174
 
208
- interface MarkdownEditorProps {
209
- value: string;
175
+ type MarkdownEditorProps = MarkdownEditorBaseProps & ({
176
+ onValueChange: (next: string) => void;
177
+ onChange?: never;
178
+ } | {
179
+ /** @deprecated Use `onValueChange` — `onChange` conventionally receives an event. */
210
180
  onChange: (next: string) => void;
181
+ onValueChange?: never;
182
+ });
183
+ interface MarkdownEditorBaseProps {
184
+ value: string;
211
185
  placeholder?: string;
212
186
  /** @default 250 */
213
187
  minHeight?: number;
214
188
  className?: string;
215
- }
216
- declare function MarkdownEditor({ value, onChange, placeholder, minHeight, className, }: MarkdownEditorProps): react_jsx_runtime.JSX.Element;
189
+ /** Accessible names for the toolbar buttons. Pass translated strings. */
190
+ labels?: Partial<MarkdownEditorLabels>;
191
+ }
192
+ interface MarkdownEditorLabels {
193
+ bold: string;
194
+ italic: string;
195
+ inlineCode: string;
196
+ heading: string;
197
+ blockQuote: string;
198
+ bulletList: string;
199
+ link: string;
200
+ image: string;
201
+ fencedCodeBlock: string;
202
+ }
203
+ declare function MarkdownEditor({ value, onValueChange, onChange: legacyOnChange, placeholder, minHeight, className, labels, }: MarkdownEditorProps): react_jsx_runtime.JSX.Element;
217
204
 
218
205
  interface MarkdownRendererProps {
219
206
  /** Markdown source. */
@@ -377,8 +364,10 @@ interface SidebarNavProps {
377
364
  footer?: React.ReactNode;
378
365
  /** When provided, this is used to render link items. Default: <a>. */
379
366
  renderLink?: (props: SidebarNavRenderLinkProps) => React.ReactElement;
367
+ /** Accessible name for the sidebar navigation landmark. Pass a translated string. */
368
+ navLabel?: string;
380
369
  }
381
- declare function SidebarNav({ sections, collapsed, className, itemClassName, header, footer, renderLink, }: SidebarNavProps): React.ReactElement;
370
+ declare function SidebarNav({ sections, collapsed, className, itemClassName, header, footer, renderLink, navLabel, }: SidebarNavProps): React.ReactElement;
382
371
 
383
372
  type TerminalVariant = "default" | "minimal" | "glass";
384
373
  interface TerminalProps extends React.HTMLAttributes<HTMLDivElement> {
@@ -448,6 +437,8 @@ interface UserMenuProps {
448
437
  className?: string;
449
438
  /** Dropdown align (default "end") */
450
439
  align?: "start" | "center" | "end";
440
+ /** Accessible name for the default trigger button. Pass a translated string. */
441
+ triggerLabel?: string;
451
442
  }
452
443
  declare function UserMenu(props: UserMenuProps): React.ReactElement;
453
444
  declare namespace UserMenu {
@@ -483,7 +474,9 @@ interface WorkspaceSwitcherProps {
483
474
  showRoleBadge?: boolean;
484
475
  /** Disable trigger (e.g. only one workspace) */
485
476
  disabled?: boolean;
477
+ /** Accessible name for the trigger button. Pass a translated string. */
478
+ switchLabel?: string;
486
479
  }
487
- declare function WorkspaceSwitcher({ workspaces, activeWorkspaceId, onSwitch, variant, footerSlot, headerSlot, className, showRoleBadge, disabled, }: WorkspaceSwitcherProps): React.ReactElement;
480
+ declare function WorkspaceSwitcher({ workspaces, activeWorkspaceId, onSwitch, variant, footerSlot, headerSlot, className, showRoleBadge, disabled, switchLabel, }: WorkspaceSwitcherProps): React.ReactElement;
488
481
 
489
- export { type AnswerType, ArtifactShiftCard, ArtifactShiftCardFooter, type ArtifactShiftCardFooterProps, ArtifactShiftCardPreview, type ArtifactShiftCardPreviewProps, type ArtifactShiftCardProps, type Author, Card, CardBody, type CardBodyProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, CardIcon, type CardIconProps, type CardProps, CardRoot, CardTitle, type CardTitleProps, CommandBox, type CommandBoxProps, DashboardCommandSurface, type DashboardCommandSurfaceProps, DashboardMetricTile, type DashboardMetricTileProps, DashboardPanel, type DashboardPanelProps, GalleryCard, type GalleryCardAction, type GalleryCardBadge, type GalleryCardBadgeTone, type GalleryCardIconTone, type GalleryCardMetadata, type GalleryCardProps, type GalleryCardRenderLinkProps, KineticCodePreview, type KineticCodePreviewProps, KineticCommandBox, type KineticCommandBoxProps, KineticConsoleFrame, type KineticConsoleFrameProps, KineticFeatureCard, type KineticFeatureCardProps, KineticMorphSurface, type KineticMorphSurfaceProps, KineticSignalMarquee, type KineticSignalMarqueeProps, KineticStep, type KineticStepProps, KineticStepRail, type KineticStepRailProps, MarkdownEditor, type MarkdownEditorProps, MarkdownRenderer, type MarkdownRendererProps, QAPage, type QAPageProps, type QuestionType, SidebarNav, type SidebarNavBadge, type SidebarNavBadgeTone, type SidebarNavIcon, type SidebarNavItem, type SidebarNavProps, type SidebarNavRenderLinkProps, type SidebarNavSection, type SidebarNavSectionAction, Terminal, TerminalBody, type TerminalBodyProps, TerminalHeader, type TerminalHeaderProps, TerminalLine, type TerminalLineProps, type TerminalProps, TerminalRoot, UserInfo, type UserInfoProps, UserMenu, type UserMenuGroup, type UserMenuItem, type UserMenuProps, type UserMenuUser, VoteButtons, type VoteButtonsProps, type VoteType, type Workspace, type WorkspaceRole, WorkspaceSwitcher, type WorkspaceSwitcherProps };
482
+ export { type AnswerType, ArtifactShiftCard, ArtifactShiftCardFooter, type ArtifactShiftCardFooterProps, ArtifactShiftCardPreview, type ArtifactShiftCardPreviewProps, type ArtifactShiftCardProps, type Author, CommandBox, type CommandBoxProps, DashboardCommandSurface, type DashboardCommandSurfaceProps, DashboardMetricTile, type DashboardMetricTileProps, DashboardPanel, type DashboardPanelProps, GalleryCard, type GalleryCardAction, type GalleryCardBadge, type GalleryCardBadgeTone, type GalleryCardIconTone, type GalleryCardMetadata, type GalleryCardProps, type GalleryCardRenderLinkProps, KineticCodePreview, type KineticCodePreviewProps, KineticCommandBox, type KineticCommandBoxProps, KineticConsoleFrame, type KineticConsoleFrameProps, KineticFeatureCard, type KineticFeatureCardProps, KineticMorphSurface, type KineticMorphSurfaceProps, KineticSignalMarquee, type KineticSignalMarqueeProps, KineticStep, type KineticStepProps, KineticStepRail, type KineticStepRailProps, MarkdownEditor, type MarkdownEditorProps, MarkdownRenderer, type MarkdownRendererProps, QAPage, type QAPageProps, type QuestionType, SidebarNav, type SidebarNavBadge, type SidebarNavBadgeTone, type SidebarNavIcon, type SidebarNavItem, type SidebarNavProps, type SidebarNavRenderLinkProps, type SidebarNavSection, type SidebarNavSectionAction, Terminal, TerminalBody, type TerminalBodyProps, TerminalHeader, type TerminalHeaderProps, TerminalLine, type TerminalLineProps, type TerminalProps, TerminalRoot, UserInfo, type UserInfoProps, UserMenu, type UserMenuGroup, type UserMenuItem, type UserMenuProps, type UserMenuUser, VoteButtons, type VoteButtonsProps, type VoteType, type Workspace, type WorkspaceRole, WorkspaceSwitcher, type WorkspaceSwitcherProps };