mithril-materialized 2.0.0-beta.5 → 2.0.0-beta.6

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.
@@ -0,0 +1,53 @@
1
+ import { FactoryComponent, Attributes } from 'mithril';
2
+ export interface BreadcrumbItemAttrs {
3
+ /** Text content of the breadcrumb item */
4
+ text?: string;
5
+ /** URL for the breadcrumb item */
6
+ href?: string;
7
+ /** Whether this item is the current/active item */
8
+ active?: boolean;
9
+ /** Click handler for the breadcrumb item */
10
+ onclick?: (e: Event) => void;
11
+ /** Icon name (material icons) */
12
+ icon?: string;
13
+ /** Custom class for the item */
14
+ className?: string;
15
+ /** Whether this item is disabled */
16
+ disabled?: boolean;
17
+ }
18
+ export interface BreadcrumbAttrs extends Attributes {
19
+ /** Array of breadcrumb items */
20
+ items: BreadcrumbItemAttrs[];
21
+ /** Custom separator between items */
22
+ separator?: string;
23
+ /** Custom class for the breadcrumb container */
24
+ className?: string;
25
+ /** Whether to show icons */
26
+ showIcons?: boolean;
27
+ /** Maximum number of items to show before collapsing */
28
+ maxItems?: number;
29
+ /** Whether to show home icon for first item */
30
+ showHome?: boolean;
31
+ }
32
+ /**
33
+ * Breadcrumb Component
34
+ * Displays a navigation path showing the user's location within a site hierarchy
35
+ */
36
+ export declare const Breadcrumb: FactoryComponent<BreadcrumbAttrs>;
37
+ /**
38
+ * Simple Breadcrumb utility for common use cases
39
+ */
40
+ export declare const createBreadcrumb: (path: string, basePath?: string) => BreadcrumbItemAttrs[];
41
+ /**
42
+ * Breadcrumb utilities
43
+ */
44
+ export declare class BreadcrumbManager {
45
+ /**
46
+ * Create breadcrumb items from a route path
47
+ */
48
+ static fromRoute(route: string, routeConfig?: Record<string, string>): BreadcrumbItemAttrs[];
49
+ /**
50
+ * Create breadcrumb items from a hierarchical object
51
+ */
52
+ static fromHierarchy(hierarchy: any[], textKey?: string, pathKey?: string): BreadcrumbItemAttrs[];
53
+ }