@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,3 +1,4 @@
1
1
  export { SiClerk as ClerkIcon, SiNextdotjs as NextjsIcon, SiPrisma as PrismaIcon, SiStripe as StripeIcon, SiSupabase as SupabaseIcon, SiTailwindcss as TailwindIcon } from '@icons-pack/react-simple-icons';
2
2
  export { Anthropic, Bilibili, Claude, ClaudeCode, Cursor, DeepSeek, Flux, Gemini, Github, Google, Grok, HuggingFace, LangChain, LangGraph, MCP, Meta, Midjourney, Mistral, N8n, Ollama, OpenAI, OpenClaw, Qwen, Railway, SiliconCloud, Smithery, Vercel } from '@lobehub/icons';
3
3
  export { Robot as Bot, Check, LoaderCircle as Loader2, Menu, Moon, Plus, MagnifyingGlass as Search, SettingsGear as Settings, Sparkles, Sun, Cross as X } from '@nebutra/icons';
4
+ import '@lobehub/ui/chat';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { NebutraThemeProvider, NebutraThemeProviderProps, NebutraTokens, ThemeMode } from './theme/index.js';
1
+ export { NebutraThemeProvider, NebutraThemeProviderProps, ThemeMode } from './theme/index.js';
2
2
  export { Anthropic, Claude, Gemini, Google, OpenAI } from '@lobehub/icons';
3
3
  export { Robot as Bot, Check, LoaderCircle as Loader2, Menu, Moon, Plus, MagnifyingGlass as Search, SettingsGear as Settings, Sparkles, Sun, Cross as X } from '@nebutra/icons';
4
4
  import 'react/jsx-runtime';
@@ -1,7 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import React__default, { ReactNode } from 'react';
4
+ export { C as Card, a as CardProps } from '../card-DunB1gKE.js';
4
5
  import { ThemeMode } from '../theme/index.js';
6
+ export { E as EmptyState, a as EmptyStateProps } from '../empty-state-bmfHCOuN.js';
7
+ import 'class-variance-authority/types';
8
+ import 'class-variance-authority';
5
9
  import '@lobehub/icons';
6
10
  import '@nebutra/icons';
7
11
 
@@ -32,6 +36,12 @@ interface AppShellProps {
32
36
  contentClassName?: string;
33
37
  /** Extra classes for the outer wrapper. */
34
38
  className?: string;
39
+ /** Accessible name for the primary sidebar landmark. Pass a translated string. */
40
+ primaryNavLabel?: string;
41
+ /** Accessible name for the overlay-collapse button. Pass a translated string. */
42
+ collapseNavigationLabel?: string;
43
+ /** Accessible name for the mobile hamburger button. Pass a translated string. */
44
+ openNavigationMenuLabel?: string;
35
45
  }
36
46
  /**
37
47
  * AppShell — top-level dashboard chrome: sidebar + sticky header + scrollable main.
@@ -56,29 +66,7 @@ interface AppShellProps {
56
66
  * </AppShell>
57
67
  * ```
58
68
  */
59
- declare function AppShell({ sidebar, header, children, sidebarWidth, sidebarCollapsedWidth, collapsed, defaultCollapsed, onCollapsedChange, headerHeight, contentClassName, className, overlay, }: AppShellProps): react_jsx_runtime.JSX.Element;
60
-
61
- interface CardProps {
62
- children: React__default.ReactNode;
63
- className?: string;
64
- /** Whether the card has a hover/press effect */
65
- isInteractive?: boolean;
66
- }
67
- /**
68
- * Card — surface container with border, background, and shadow.
69
- *
70
- * @status stable
71
- * @planned apps/web dashboard — settings panels, billing summary, team member tiles.
72
- * See governance/registry.ts for full allocation record.
73
- *
74
- * @example
75
- * ```tsx
76
- * <Card>
77
- * <p>Card content</p>
78
- * </Card>
79
- * ```
80
- */
81
- declare function Card({ children, isInteractive, className }: CardProps): react_jsx_runtime.JSX.Element;
69
+ declare function AppShell({ sidebar, header, children, sidebarWidth, sidebarCollapsedWidth, collapsed, defaultCollapsed, onCollapsedChange, headerHeight, contentClassName, className, overlay, primaryNavLabel, collapseNavigationLabel, openNavigationMenuLabel, }: AppShellProps): react_jsx_runtime.JSX.Element;
82
70
 
83
71
  type ContainerSize = "sm" | "md" | "lg" | "xl" | "full";
84
72
  interface ContainerProps {
@@ -110,40 +98,6 @@ interface DesignSystemProviderProps {
110
98
  }
111
99
  declare function DesignSystemProvider({ children, defaultMode, storageKey, enableSystemPreference, }: DesignSystemProviderProps): react_jsx_runtime.JSX.Element;
112
100
 
113
- type Tone = "default" | "branded" | "subtle";
114
- type Size = "sm" | "md" | "lg";
115
- interface EmptyStateProps {
116
- /** Primary message. */
117
- title: string;
118
- /** Supporting description. */
119
- description?: string;
120
- /** Visual anchor. When omitted and `tone="branded"`, a default `<BrandMark>` is rendered. */
121
- mascot?: ReactNode;
122
- /** Inline icon shown above the title. Ignored when `mascot` is provided. */
123
- icon?: ReactNode;
124
- /** Primary call-to-action node. */
125
- action?: ReactNode;
126
- /** Secondary call-to-action node. */
127
- secondaryAction?: ReactNode;
128
- /**
129
- * Visual tone.
130
- * - `default`: neutral bordered state
131
- * - `branded`: BrandMark anchor for first-touch panels
132
- * - `subtle`: quieter inline state
133
- */
134
- tone?: Tone;
135
- /** Size variant. */
136
- size?: Size;
137
- /** Extra classes for the root element. */
138
- className?: string;
139
- }
140
- /**
141
- * EmptyState — layout-compatible wrapper around the canonical compound
142
- * primitive. New composition work should prefer `EmptyState.Root` from
143
- * `@nebutra/ui/primitives`; product layout code can keep this simpler API.
144
- */
145
- declare function EmptyState({ title, description, mascot, icon, action, secondaryAction, tone, size, className, }: EmptyStateProps): react_jsx_runtime.JSX.Element;
146
-
147
101
  interface ErrorStateProps {
148
102
  /** Error title */
149
103
  title?: string;
@@ -240,6 +194,11 @@ interface LoadingStateProps {
240
194
  /**
241
195
  * LoadingState — centred spinner for async content loading.
242
196
  *
197
+ * Mounted means pending, so the spinner itself waits
198
+ * interaction.pending.showDelayMs before appearing: a fast load never flashes
199
+ * one. The block keeps its height while it waits, so nothing shifts when it
200
+ * does appear.
201
+ *
243
202
  * @status stable
244
203
  * @planned apps/web dashboard — React Suspense fallback boundaries for async data routes.
245
204
  *
@@ -297,4 +256,4 @@ interface SectionProps {
297
256
  */
298
257
  declare function Section({ children, label, className }: SectionProps): react_jsx_runtime.JSX.Element;
299
258
 
300
- export { AppShell, type AppShellProps, Card, type CardProps, Container, type ContainerProps, type ContainerSize, DesignSystemProvider, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, FullPageStatus, type FullPageStatusAction, type FullPageStatusMeta, type FullPageStatusProps, LoadingState, type LoadingStateProps, PageHeader, type PageHeaderProps, Section, type SectionProps };
259
+ export { AppShell, type AppShellProps, Container, type ContainerProps, type ContainerSize, DesignSystemProvider, ErrorState, type ErrorStateProps, FullPageStatus, type FullPageStatusAction, type FullPageStatusMeta, type FullPageStatusProps, LoadingState, type LoadingStateProps, PageHeader, type PageHeaderProps, Section, type SectionProps };