lucent-ui 0.40.0 → 0.41.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 (26) hide show
  1. package/dist/LucentProvider-DluNb5H9.cjs +109 -0
  2. package/dist/{LucentProvider-Bm39MMvv.js → LucentProvider-lGSitrJV.js} +1019 -1001
  3. package/dist/devtools.cjs +1 -1
  4. package/dist/devtools.js +1 -1
  5. package/dist/index.cjs +47 -42
  6. package/dist/index.d.ts +33 -4
  7. package/dist/index.js +2252 -1998
  8. package/dist-server/server/pattern-registry.js +6 -0
  9. package/dist-server/server/recipe-registry.js +18 -0
  10. package/dist-server/src/components/molecules/PageLayout/PageLayout.manifest.js +65 -8
  11. package/dist-server/src/manifest/patterns/index.js +2 -0
  12. package/dist-server/src/manifest/patterns/multi-step-wizard.pattern.js +180 -0
  13. package/dist-server/src/manifest/patterns/search-filter-panel.pattern.js +188 -0
  14. package/dist-server/src/manifest/patterns/tab-page.pattern.js +152 -0
  15. package/dist-server/src/manifest/recipes/action-bar.recipe.js +91 -0
  16. package/dist-server/src/manifest/recipes/collapsible-card.recipe.js +100 -0
  17. package/dist-server/src/manifest/recipes/empty-state-card.recipe.js +72 -0
  18. package/dist-server/src/manifest/recipes/form-layout.recipe.js +98 -0
  19. package/dist-server/src/manifest/recipes/index.js +8 -0
  20. package/dist-server/src/manifest/recipes/profile-card.recipe.js +101 -0
  21. package/dist-server/src/manifest/recipes/search-filter-bar.recipe.js +122 -0
  22. package/dist-server/src/manifest/recipes/settings-panel.recipe.js +167 -0
  23. package/dist-server/src/manifest/recipes/stats-row.recipe.js +106 -0
  24. package/dist-server/src/manifest/validate.test.js +28 -0
  25. package/package.json +1 -1
  26. package/dist/LucentProvider-CzEDW5SL.cjs +0 -109
package/dist/index.d.ts CHANGED
@@ -1448,18 +1448,34 @@ export declare interface PageHeaderProps {
1448
1448
  style?: CSSProperties;
1449
1449
  }
1450
1450
 
1451
- export declare function PageLayout({ children, header, sidebar, sidebarWidth, headerHeight, sidebarCollapsed, rightSidebar, rightSidebarWidth, rightSidebarCollapsed, footer, footerHeight, chromeBackground, mainStyle, style, }: PageLayoutProps): JSX_2.Element;
1451
+ export declare function PageLayout({ children, header, sidebar, sidebarHeader, sidebarFooter, sidebarWidth, sidebarCollapsedWidth, headerHeight, sidebarCollapsed, onSidebarCollapsedChange, sidebarMode, sidebarDrawerBreakpoint, sidebarDrawerOpen, onSidebarDrawerOpenChange, rightSidebar, rightSidebarWidth, rightSidebarCollapsed, footer, footerHeight, chromeBackground, mainStyle, style, }: PageLayoutProps): JSX_2.Element;
1452
1452
 
1453
1453
  export declare interface PageLayoutProps {
1454
1454
  children: ReactNode;
1455
1455
  header?: ReactNode;
1456
1456
  sidebar?: ReactNode;
1457
+ /** Pinned content at the top of the sidebar — logo, app name, branding. */
1458
+ sidebarHeader?: ReactNode;
1459
+ /** Pinned content at the bottom of the sidebar — account, help, secondary actions. */
1460
+ sidebarFooter?: ReactNode;
1457
1461
  /** Sidebar width in px or any CSS value. Default: 240 */
1458
1462
  sidebarWidth?: number | string;
1463
+ /** Width the sidebar collapses to (e.g. 56 for icon-only). Default: 0 */
1464
+ sidebarCollapsedWidth?: number | string;
1459
1465
  /** Header height in px or any CSS value. Default: 48 */
1460
1466
  headerHeight?: number | string;
1461
- /** Collapse the sidebar to zero width */
1467
+ /** Collapse the sidebar to sidebarCollapsedWidth */
1462
1468
  sidebarCollapsed?: boolean;
1469
+ /** Called when the sidebar collapse handle is clicked. When provided, renders a handle on the sidebar edge. */
1470
+ onSidebarCollapsedChange?: (collapsed: boolean) => void;
1471
+ /** Sidebar display mode. 'inline' = always inline, 'drawer' = always drawer overlay, 'auto' = switches at breakpoint. Default: 'auto' */
1472
+ sidebarMode?: 'inline' | 'drawer' | 'auto';
1473
+ /** Viewport width (px) below which sidebar switches to drawer mode. Only used when sidebarMode='auto'. Default: 768 */
1474
+ sidebarDrawerBreakpoint?: number;
1475
+ /** Controlled open state when sidebar is in drawer mode. */
1476
+ sidebarDrawerOpen?: boolean;
1477
+ /** Called when the drawer open state changes (backdrop click, escape key). */
1478
+ onSidebarDrawerOpenChange?: (open: boolean) => void;
1463
1479
  /** Right panel content rendered as a flex sibling of <main> */
1464
1480
  rightSidebar?: ReactNode;
1465
1481
  /** Right panel width in px or any CSS value. Default: 240 */
@@ -1997,7 +2013,7 @@ export declare interface TableProps extends HTMLAttributes<HTMLTableElement> {
1997
2013
  striped?: boolean;
1998
2014
  }
1999
2015
 
2000
- export declare function Tabs({ tabs, defaultValue, value, onChange, variant, style }: TabsProps): JSX_2.Element;
2016
+ export declare function Tabs({ tabs, defaultValue, value, onChange, variant, size, style }: TabsProps): JSX_2.Element;
2001
2017
 
2002
2018
  export declare interface TabsProps {
2003
2019
  tabs: TabItem[];
@@ -2005,9 +2021,12 @@ export declare interface TabsProps {
2005
2021
  value?: string;
2006
2022
  onChange?: (value: string) => void;
2007
2023
  variant?: TabsVariant;
2024
+ size?: TabsSize;
2008
2025
  style?: CSSProperties;
2009
2026
  }
2010
2027
 
2028
+ export declare type TabsSize = 'sm' | 'md';
2029
+
2011
2030
  export declare type TabsVariant = 'underline' | 'pills';
2012
2031
 
2013
2032
  export declare function Tag({ children, variant, size, onDismiss, disabled }: TagProps): JSX_2.Element;
@@ -2219,7 +2238,7 @@ export declare interface ToggleProps extends Omit<InputHTMLAttributes<HTMLInputE
2219
2238
 
2220
2239
  export declare type ToggleSize = 'sm' | 'md' | 'lg';
2221
2240
 
2222
- export declare function Tooltip({ content, children, placement, delay, open }: TooltipProps): JSX_2.Element;
2241
+ export declare function Tooltip({ content, children, placement, delay, open, interactive }: TooltipProps): JSX_2.Element;
2223
2242
 
2224
2243
  export declare const TooltipManifest: ComponentManifest;
2225
2244
 
@@ -2233,6 +2252,8 @@ export declare interface TooltipProps {
2233
2252
  delay?: number;
2234
2253
  /** Controlled visibility. When provided, overrides hover behavior. */
2235
2254
  open?: boolean;
2255
+ /** When true, the popup stays visible while hovered and allows pointer events inside. */
2256
+ interactive?: boolean;
2236
2257
  }
2237
2258
 
2238
2259
  declare interface TypographyTokens {
@@ -2281,6 +2302,14 @@ export declare interface UsageExample {
2281
2302
  */
2282
2303
  export declare function useLucent(): LucentContextValue;
2283
2304
 
2305
+ /**
2306
+ * SSR-safe hook that subscribes to a CSS media query and returns whether it matches.
2307
+ *
2308
+ * @param query - A valid CSS media query string, e.g. `"(max-width: 767px)"`
2309
+ * @returns `true` when the query matches, `false` otherwise (and on SSR).
2310
+ */
2311
+ export declare function useMediaQuery(query: string): boolean;
2312
+
2284
2313
  export declare function useToast(): ToastContextValue;
2285
2314
 
2286
2315
  /**