@nuralyui/breadcrumb 0.0.1

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,122 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Nuraly, Laabidi Aymen
4
+ * SPDX-License-Identifier: MIT
5
+ */
6
+ import { LitElement, nothing, TemplateResult } from 'lit';
7
+ import { BreadcrumbItem, BreadcrumbSeparator, BreadcrumbSeparatorConfig } from './breadcrumb.types.js';
8
+ import '../icon/index.js';
9
+ declare const NrBreadcrumbElement_base: (new (...args: any[]) => import("../../shared/dependency-mixin.js").DependencyAware) & (new (...args: any[]) => import("../../shared/theme-mixin.js").ThemeAware) & (new (...args: any[]) => import("../../shared/event-handler-mixin.js").EventHandlerCapable) & typeof LitElement;
10
+ /**
11
+ * # Breadcrumb Component
12
+ *
13
+ * Display the current location within a hierarchy and allow navigation back to higher levels.
14
+ * Breadcrumbs show where you are in the site structure and make it easy to navigate up the hierarchy.
15
+ *
16
+ * ## Features
17
+ * - Configurable separator styles (slash, arrow, chevron, etc.)
18
+ * - Support for icons alongside text
19
+ * - Dropdown menus for complex hierarchies
20
+ * - Clickable links with href or custom click handlers
21
+ * - RTL support
22
+ * - Fully accessible with keyboard navigation
23
+ * - Theme-aware styling
24
+ *
25
+ * ## Usage
26
+ * ```html
27
+ * <!-- Basic breadcrumb -->
28
+ * <nr-breadcrumb .items="${[
29
+ * { title: 'Home', href: '/' },
30
+ * { title: 'Category', href: '/category' },
31
+ * { title: 'Product' }
32
+ * ]}"></nr-breadcrumb>
33
+ *
34
+ * <!-- With custom separator -->
35
+ * <nr-breadcrumb
36
+ * separator=">"
37
+ * .items="${items}">
38
+ * </nr-breadcrumb>
39
+ *
40
+ * <!-- With icons -->
41
+ * <nr-breadcrumb .items="${[
42
+ * { title: 'Home', icon: 'home', href: '/' },
43
+ * { title: 'Settings', icon: 'settings', href: '/settings' },
44
+ * { title: 'Profile' }
45
+ * ]}"></nr-breadcrumb>
46
+ *
47
+ * <!-- With dropdown menu -->
48
+ * <nr-breadcrumb .items="${[
49
+ * { title: 'Home', href: '/' },
50
+ * {
51
+ * title: 'Products',
52
+ * menu: [
53
+ * { label: 'Electronics', href: '/products/electronics' },
54
+ * { label: 'Clothing', href: '/products/clothing' }
55
+ * ]
56
+ * },
57
+ * { title: 'Current Item' }
58
+ * ]}"></nr-breadcrumb>
59
+ * ```
60
+ *
61
+ * @element nr-breadcrumb
62
+ * @fires nr-breadcrumb-click - Fired when a breadcrumb item is clicked
63
+ *
64
+ * @cssproperty --nuraly-breadcrumb-font-size - Font size of breadcrumb items
65
+ * @cssproperty --nuraly-breadcrumb-line-height - Line height of breadcrumb items
66
+ * @cssproperty --nuraly-breadcrumb-item-color - Color of breadcrumb items
67
+ * @cssproperty --nuraly-breadcrumb-link-color - Color of breadcrumb links
68
+ * @cssproperty --nuraly-breadcrumb-link-hover-color - Color of breadcrumb links on hover
69
+ * @cssproperty --nuraly-breadcrumb-last-item-color - Color of the last breadcrumb item
70
+ * @cssproperty --nuraly-breadcrumb-separator-color - Color of separators
71
+ * @cssproperty --nuraly-breadcrumb-separator-margin - Margin around separators
72
+ * @cssproperty --nuraly-breadcrumb-icon-font-size - Font size of icons
73
+ */
74
+ export declare class NrBreadcrumbElement extends NrBreadcrumbElement_base {
75
+ static styles: import("lit").CSSResult;
76
+ requiredComponents: string[];
77
+ /**
78
+ * Array of breadcrumb items to display
79
+ */
80
+ items: BreadcrumbItem[];
81
+ /**
82
+ * Separator between breadcrumb items
83
+ * Can be a string or one of the predefined separator types
84
+ */
85
+ separator: BreadcrumbSeparator | string;
86
+ /**
87
+ * Custom separator configuration for more control
88
+ */
89
+ separatorConfig?: BreadcrumbSeparatorConfig;
90
+ /**
91
+ * Handle breadcrumb item click
92
+ */
93
+ private handleItemClick;
94
+ /**
95
+ * Handle menu item click
96
+ */
97
+ private handleMenuItemClick;
98
+ /**
99
+ * Render a breadcrumb item icon
100
+ */
101
+ private renderIcon;
102
+ /**
103
+ * Render the separator between breadcrumb items
104
+ */
105
+ private renderSeparator;
106
+ /**
107
+ * Render dropdown menu for an item
108
+ */
109
+ private renderMenu;
110
+ /**
111
+ * Render a single breadcrumb item
112
+ */
113
+ private renderItem;
114
+ render(): TemplateResult<1> | typeof nothing;
115
+ }
116
+ declare global {
117
+ interface HTMLElementTagNameMap {
118
+ 'nr-breadcrumb': NrBreadcrumbElement;
119
+ }
120
+ }
121
+ export {};
122
+ //# sourceMappingURL=breadcrumb.component.d.ts.map
@@ -0,0 +1,258 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Nuraly, Laabidi Aymen
4
+ * SPDX-License-Identifier: MIT
5
+ */
6
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
7
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
10
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
11
+ };
12
+ import { html, LitElement, nothing } from 'lit';
13
+ import { customElement, property } from 'lit/decorators.js';
14
+ import { map } from 'lit/directives/map.js';
15
+ import { styles } from './breadcrumb.style.js';
16
+ import { NuralyUIBaseMixin } from '../../shared/base-mixin.js';
17
+ import '../icon/index.js';
18
+ /**
19
+ * # Breadcrumb Component
20
+ *
21
+ * Display the current location within a hierarchy and allow navigation back to higher levels.
22
+ * Breadcrumbs show where you are in the site structure and make it easy to navigate up the hierarchy.
23
+ *
24
+ * ## Features
25
+ * - Configurable separator styles (slash, arrow, chevron, etc.)
26
+ * - Support for icons alongside text
27
+ * - Dropdown menus for complex hierarchies
28
+ * - Clickable links with href or custom click handlers
29
+ * - RTL support
30
+ * - Fully accessible with keyboard navigation
31
+ * - Theme-aware styling
32
+ *
33
+ * ## Usage
34
+ * ```html
35
+ * <!-- Basic breadcrumb -->
36
+ * <nr-breadcrumb .items="${[
37
+ * { title: 'Home', href: '/' },
38
+ * { title: 'Category', href: '/category' },
39
+ * { title: 'Product' }
40
+ * ]}"></nr-breadcrumb>
41
+ *
42
+ * <!-- With custom separator -->
43
+ * <nr-breadcrumb
44
+ * separator=">"
45
+ * .items="${items}">
46
+ * </nr-breadcrumb>
47
+ *
48
+ * <!-- With icons -->
49
+ * <nr-breadcrumb .items="${[
50
+ * { title: 'Home', icon: 'home', href: '/' },
51
+ * { title: 'Settings', icon: 'settings', href: '/settings' },
52
+ * { title: 'Profile' }
53
+ * ]}"></nr-breadcrumb>
54
+ *
55
+ * <!-- With dropdown menu -->
56
+ * <nr-breadcrumb .items="${[
57
+ * { title: 'Home', href: '/' },
58
+ * {
59
+ * title: 'Products',
60
+ * menu: [
61
+ * { label: 'Electronics', href: '/products/electronics' },
62
+ * { label: 'Clothing', href: '/products/clothing' }
63
+ * ]
64
+ * },
65
+ * { title: 'Current Item' }
66
+ * ]}"></nr-breadcrumb>
67
+ * ```
68
+ *
69
+ * @element nr-breadcrumb
70
+ * @fires nr-breadcrumb-click - Fired when a breadcrumb item is clicked
71
+ *
72
+ * @cssproperty --nuraly-breadcrumb-font-size - Font size of breadcrumb items
73
+ * @cssproperty --nuraly-breadcrumb-line-height - Line height of breadcrumb items
74
+ * @cssproperty --nuraly-breadcrumb-item-color - Color of breadcrumb items
75
+ * @cssproperty --nuraly-breadcrumb-link-color - Color of breadcrumb links
76
+ * @cssproperty --nuraly-breadcrumb-link-hover-color - Color of breadcrumb links on hover
77
+ * @cssproperty --nuraly-breadcrumb-last-item-color - Color of the last breadcrumb item
78
+ * @cssproperty --nuraly-breadcrumb-separator-color - Color of separators
79
+ * @cssproperty --nuraly-breadcrumb-separator-margin - Margin around separators
80
+ * @cssproperty --nuraly-breadcrumb-icon-font-size - Font size of icons
81
+ */
82
+ let NrBreadcrumbElement = class NrBreadcrumbElement extends NuralyUIBaseMixin(LitElement) {
83
+ constructor() {
84
+ super(...arguments);
85
+ this.requiredComponents = ['nr-icon'];
86
+ /**
87
+ * Array of breadcrumb items to display
88
+ */
89
+ this.items = [];
90
+ /**
91
+ * Separator between breadcrumb items
92
+ * Can be a string or one of the predefined separator types
93
+ */
94
+ this.separator = "/" /* BreadcrumbSeparator.Slash */;
95
+ }
96
+ /**
97
+ * Handle breadcrumb item click
98
+ */
99
+ handleItemClick(item, e) {
100
+ if (item.disabled) {
101
+ e.preventDefault();
102
+ return;
103
+ }
104
+ // Dispatch custom event
105
+ this.dispatchEvent(new CustomEvent('nr-breadcrumb-click', {
106
+ detail: { item, event: e },
107
+ bubbles: true,
108
+ composed: true
109
+ }));
110
+ // Call custom click handler if provided
111
+ if (item.onClick) {
112
+ item.onClick(e);
113
+ }
114
+ }
115
+ /**
116
+ * Handle menu item click
117
+ */
118
+ handleMenuItemClick(menuItem, e) {
119
+ if (menuItem.disabled) {
120
+ e.preventDefault();
121
+ return;
122
+ }
123
+ if (menuItem.onClick) {
124
+ menuItem.onClick(e);
125
+ }
126
+ }
127
+ /**
128
+ * Render a breadcrumb item icon
129
+ */
130
+ renderIcon(item) {
131
+ if (!item.icon) {
132
+ return nothing;
133
+ }
134
+ return html `
135
+ <nr-icon
136
+ class="breadcrumb-icon"
137
+ name="${item.icon}"
138
+ type="${item.iconType || 'regular'}"
139
+ ></nr-icon>
140
+ `;
141
+ }
142
+ /**
143
+ * Render the separator between breadcrumb items
144
+ */
145
+ renderSeparator() {
146
+ if (this.separatorConfig) {
147
+ if (this.separatorConfig.isIcon) {
148
+ return html `
149
+ <span class="breadcrumb-separator">
150
+ <nr-icon
151
+ name="${this.separatorConfig.separator}"
152
+ type="${this.separatorConfig.iconType || 'regular'}"
153
+ ></nr-icon>
154
+ </span>
155
+ `;
156
+ }
157
+ return html `<span class="breadcrumb-separator">${this.separatorConfig.separator}</span>`;
158
+ }
159
+ return html `<span class="breadcrumb-separator">${this.separator}</span>`;
160
+ }
161
+ /**
162
+ * Render dropdown menu for an item
163
+ */
164
+ renderMenu(menu) {
165
+ return html `
166
+ <div class="breadcrumb-dropdown">
167
+ ${map(menu, (menuItem) => html `
168
+ ${menuItem.href
169
+ ? html `
170
+ <a
171
+ class="breadcrumb-menu-item ${menuItem.disabled ? 'disabled' : ''}"
172
+ href="${menuItem.href}"
173
+ @click="${(e) => this.handleMenuItemClick(menuItem, e)}"
174
+ >
175
+ ${menuItem.icon
176
+ ? html `<nr-icon name="${menuItem.icon}"></nr-icon>`
177
+ : nothing}
178
+ <span>${menuItem.label}</span>
179
+ </a>
180
+ `
181
+ : html `
182
+ <div
183
+ class="breadcrumb-menu-item ${menuItem.disabled ? 'disabled' : ''}"
184
+ @click="${(e) => this.handleMenuItemClick(menuItem, e)}"
185
+ >
186
+ ${menuItem.icon
187
+ ? html `<nr-icon name="${menuItem.icon}"></nr-icon>`
188
+ : nothing}
189
+ <span>${menuItem.label}</span>
190
+ </div>
191
+ `}
192
+ `)}
193
+ </div>
194
+ `;
195
+ }
196
+ /**
197
+ * Render a single breadcrumb item
198
+ */
199
+ renderItem(item, index) {
200
+ const isLast = index === this.items.length - 1;
201
+ const hasMenu = item.menu && item.menu.length > 0;
202
+ const content = html `
203
+ ${this.renderIcon(item)}
204
+ <span>${item.title}</span>
205
+ `;
206
+ return html `
207
+ <li class="breadcrumb-item ${hasMenu ? 'breadcrumb-item-with-menu' : ''} ${item.className || ''}">
208
+ ${isLast
209
+ ? html `<span class="breadcrumb-text">${content}</span>`
210
+ : item.href
211
+ ? html `
212
+ <a
213
+ class="breadcrumb-link ${item.disabled ? 'disabled' : ''}"
214
+ href="${item.href}"
215
+ @click="${(e) => this.handleItemClick(item, e)}"
216
+ >
217
+ ${content}
218
+ </a>
219
+ `
220
+ : html `
221
+ <span
222
+ class="breadcrumb-link ${item.disabled ? 'disabled' : ''}"
223
+ @click="${(e) => this.handleItemClick(item, e)}"
224
+ >
225
+ ${content}
226
+ </span>
227
+ `}
228
+ ${hasMenu ? this.renderMenu(item.menu) : nothing}
229
+ </li>
230
+ ${!isLast ? this.renderSeparator() : nothing}
231
+ `;
232
+ }
233
+ render() {
234
+ if (!this.items || this.items.length === 0) {
235
+ return nothing;
236
+ }
237
+ return html `
238
+ <nav aria-label="Breadcrumb" class="breadcrumb">
239
+ ${map(this.items, (item, index) => this.renderItem(item, index))}
240
+ </nav>
241
+ `;
242
+ }
243
+ };
244
+ NrBreadcrumbElement.styles = styles;
245
+ __decorate([
246
+ property({ type: Array })
247
+ ], NrBreadcrumbElement.prototype, "items", void 0);
248
+ __decorate([
249
+ property({ type: String })
250
+ ], NrBreadcrumbElement.prototype, "separator", void 0);
251
+ __decorate([
252
+ property({ type: Object, attribute: 'separator-config' })
253
+ ], NrBreadcrumbElement.prototype, "separatorConfig", void 0);
254
+ NrBreadcrumbElement = __decorate([
255
+ customElement('nr-breadcrumb')
256
+ ], NrBreadcrumbElement);
257
+ export { NrBreadcrumbElement };
258
+ //# sourceMappingURL=breadcrumb.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumb.component.js","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;AAEH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAO/D,OAAO,kBAAkB,CAAC;AAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAEH,IAAa,mBAAmB,GAAhC,MAAa,mBAAoB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AAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YAC1C,OAAO,OAAO,CAAC;SAChB;QAED,OAAO,IAAI,CAAA;;UAEL,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;;KAEnE,CAAC;IACJ,CAAC;CACF,CAAA;AA7LiB,0BAAM,GAAG,MAAO,CAAA;AAQhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;kDACG;AAO7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDACyC;AAMpE;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;4DACd;AAtBjC,mBAAmB;IAD/B,aAAa,CAAC,eAAe,CAAC;GAClB,mBAAmB,CA8L/B;SA9LY,mBAAmB","sourcesContent":["/**\n * @license\n * Copyright 2023 Nuraly, Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\nimport { html, LitElement, nothing, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { map } from 'lit/directives/map.js';\nimport { styles } from './breadcrumb.style.js';\nimport { NuralyUIBaseMixin } from '../../shared/base-mixin.js';\nimport {\n BreadcrumbItem,\n BreadcrumbMenuItem,\n BreadcrumbSeparator,\n BreadcrumbSeparatorConfig\n} from './breadcrumb.types.js';\nimport '../icon/index.js';\n\n/**\n * # Breadcrumb Component\n * \n * Display the current location within a hierarchy and allow navigation back to higher levels.\n * Breadcrumbs show where you are in the site structure and make it easy to navigate up the hierarchy.\n * \n * ## Features\n * - Configurable separator styles (slash, arrow, chevron, etc.)\n * - Support for icons alongside text\n * - Dropdown menus for complex hierarchies\n * - Clickable links with href or custom click handlers\n * - RTL support\n * - Fully accessible with keyboard navigation\n * - Theme-aware styling\n * \n * ## Usage\n * ```html\n * <!-- Basic breadcrumb -->\n * <nr-breadcrumb .items=\"${[\n * { title: 'Home', href: '/' },\n * { title: 'Category', href: '/category' },\n * { title: 'Product' }\n * ]}\"></nr-breadcrumb>\n * \n * <!-- With custom separator -->\n * <nr-breadcrumb \n * separator=\">\"\n * .items=\"${items}\">\n * </nr-breadcrumb>\n * \n * <!-- With icons -->\n * <nr-breadcrumb .items=\"${[\n * { title: 'Home', icon: 'home', href: '/' },\n * { title: 'Settings', icon: 'settings', href: '/settings' },\n * { title: 'Profile' }\n * ]}\"></nr-breadcrumb>\n * \n * <!-- With dropdown menu -->\n * <nr-breadcrumb .items=\"${[\n * { title: 'Home', href: '/' },\n * { \n * title: 'Products',\n * menu: [\n * { label: 'Electronics', href: '/products/electronics' },\n * { label: 'Clothing', href: '/products/clothing' }\n * ]\n * },\n * { title: 'Current Item' }\n * ]}\"></nr-breadcrumb>\n * ```\n * \n * @element nr-breadcrumb\n * @fires nr-breadcrumb-click - Fired when a breadcrumb item is clicked\n * \n * @cssproperty --nuraly-breadcrumb-font-size - Font size of breadcrumb items\n * @cssproperty --nuraly-breadcrumb-line-height - Line height of breadcrumb items\n * @cssproperty --nuraly-breadcrumb-item-color - Color of breadcrumb items\n * @cssproperty --nuraly-breadcrumb-link-color - Color of breadcrumb links\n * @cssproperty --nuraly-breadcrumb-link-hover-color - Color of breadcrumb links on hover\n * @cssproperty --nuraly-breadcrumb-last-item-color - Color of the last breadcrumb item\n * @cssproperty --nuraly-breadcrumb-separator-color - Color of separators\n * @cssproperty --nuraly-breadcrumb-separator-margin - Margin around separators\n * @cssproperty --nuraly-breadcrumb-icon-font-size - Font size of icons\n */\n@customElement('nr-breadcrumb')\nexport class NrBreadcrumbElement extends NuralyUIBaseMixin(LitElement) {\n static override styles = styles;\n\n override requiredComponents = ['nr-icon'];\n\n /**\n * Array of breadcrumb items to display\n */\n @property({ type: Array })\n items: BreadcrumbItem[] = [];\n\n /**\n * Separator between breadcrumb items\n * Can be a string or one of the predefined separator types\n */\n @property({ type: String })\n separator: BreadcrumbSeparator | string = BreadcrumbSeparator.Slash;\n\n /**\n * Custom separator configuration for more control\n */\n @property({ type: Object, attribute: 'separator-config' })\n separatorConfig?: BreadcrumbSeparatorConfig;\n\n /**\n * Handle breadcrumb item click\n */\n private handleItemClick(item: BreadcrumbItem, e: MouseEvent): void {\n if (item.disabled) {\n e.preventDefault();\n return;\n }\n\n // Dispatch custom event\n this.dispatchEvent(\n new CustomEvent('nr-breadcrumb-click', {\n detail: { item, event: e },\n bubbles: true,\n composed: true\n })\n );\n\n // Call custom click handler if provided\n if (item.onClick) {\n item.onClick(e);\n }\n }\n\n /**\n * Handle menu item click\n */\n private handleMenuItemClick(menuItem: BreadcrumbMenuItem, e: MouseEvent): void {\n if (menuItem.disabled) {\n e.preventDefault();\n return;\n }\n\n if (menuItem.onClick) {\n menuItem.onClick(e);\n }\n }\n\n /**\n * Render a breadcrumb item icon\n */\n private renderIcon(item: BreadcrumbItem): TemplateResult | typeof nothing {\n if (!item.icon) {\n return nothing;\n }\n\n return html`\n <nr-icon\n class=\"breadcrumb-icon\"\n name=\"${item.icon}\"\n type=\"${item.iconType || 'regular'}\"\n ></nr-icon>\n `;\n }\n\n /**\n * Render the separator between breadcrumb items\n */\n private renderSeparator(): TemplateResult {\n if (this.separatorConfig) {\n if (this.separatorConfig.isIcon) {\n return html`\n <span class=\"breadcrumb-separator\">\n <nr-icon\n name=\"${this.separatorConfig.separator}\"\n type=\"${this.separatorConfig.iconType || 'regular'}\"\n ></nr-icon>\n </span>\n `;\n }\n return html`<span class=\"breadcrumb-separator\">${this.separatorConfig.separator}</span>`;\n }\n\n return html`<span class=\"breadcrumb-separator\">${this.separator}</span>`;\n }\n\n /**\n * Render dropdown menu for an item\n */\n private renderMenu(menu: BreadcrumbMenuItem[]): TemplateResult {\n return html`\n <div class=\"breadcrumb-dropdown\">\n ${map(\n menu,\n (menuItem) => html`\n ${menuItem.href\n ? html`\n <a\n class=\"breadcrumb-menu-item ${menuItem.disabled ? 'disabled' : ''}\"\n href=\"${menuItem.href}\"\n @click=\"${(e: MouseEvent) => this.handleMenuItemClick(menuItem, e)}\"\n >\n ${menuItem.icon\n ? html`<nr-icon name=\"${menuItem.icon}\"></nr-icon>`\n : nothing}\n <span>${menuItem.label}</span>\n </a>\n `\n : html`\n <div\n class=\"breadcrumb-menu-item ${menuItem.disabled ? 'disabled' : ''}\"\n @click=\"${(e: MouseEvent) => this.handleMenuItemClick(menuItem, e)}\"\n >\n ${menuItem.icon\n ? html`<nr-icon name=\"${menuItem.icon}\"></nr-icon>`\n : nothing}\n <span>${menuItem.label}</span>\n </div>\n `}\n `\n )}\n </div>\n `;\n }\n\n /**\n * Render a single breadcrumb item\n */\n private renderItem(item: BreadcrumbItem, index: number): TemplateResult {\n const isLast = index === this.items.length - 1;\n const hasMenu = item.menu && item.menu.length > 0;\n\n const content = html`\n ${this.renderIcon(item)}\n <span>${item.title}</span>\n `;\n\n return html`\n <li class=\"breadcrumb-item ${hasMenu ? 'breadcrumb-item-with-menu' : ''} ${item.className || ''}\">\n ${isLast\n ? html`<span class=\"breadcrumb-text\">${content}</span>`\n : item.href\n ? html`\n <a\n class=\"breadcrumb-link ${item.disabled ? 'disabled' : ''}\"\n href=\"${item.href}\"\n @click=\"${(e: MouseEvent) => this.handleItemClick(item, e)}\"\n >\n ${content}\n </a>\n `\n : html`\n <span\n class=\"breadcrumb-link ${item.disabled ? 'disabled' : ''}\"\n @click=\"${(e: MouseEvent) => this.handleItemClick(item, e)}\"\n >\n ${content}\n </span>\n `}\n ${hasMenu ? this.renderMenu(item.menu!) : nothing}\n </li>\n ${!isLast ? this.renderSeparator() : nothing}\n `;\n }\n\n override render() {\n if (!this.items || this.items.length === 0) {\n return nothing;\n }\n\n return html`\n <nav aria-label=\"Breadcrumb\" class=\"breadcrumb\">\n ${map(this.items, (item, index) => this.renderItem(item, index))}\n </nav>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nr-breadcrumb': NrBreadcrumbElement;\n }\n}\n"]}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Nuraly, Laabidi Aymen
4
+ * SPDX-License-Identifier: MIT
5
+ */
6
+ /**
7
+ * Breadcrumb component styles for the Hybrid UI Library
8
+ * Using shared CSS variables from /src/shared/themes/
9
+ *
10
+ * This file contains all the styling for the nr-breadcrumb component with
11
+ * clean CSS variable usage without local fallbacks and proper theme switching support.
12
+ */
13
+ export declare const styles: import("lit").CSSResult;
14
+ //# sourceMappingURL=breadcrumb.style.d.ts.map
@@ -0,0 +1,153 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Nuraly, Laabidi Aymen
4
+ * SPDX-License-Identifier: MIT
5
+ */
6
+ import { css } from 'lit';
7
+ /**
8
+ * Breadcrumb component styles for the Hybrid UI Library
9
+ * Using shared CSS variables from /src/shared/themes/
10
+ *
11
+ * This file contains all the styling for the nr-breadcrumb component with
12
+ * clean CSS variable usage without local fallbacks and proper theme switching support.
13
+ */
14
+ export const styles = css `
15
+ :host {
16
+ display: block;
17
+ font-family: var(--nuraly-font-family);
18
+ font-size: var(--nuraly-breadcrumb-font-size, 0.875rem);
19
+ line-height: var(--nuraly-breadcrumb-line-height, 1.5);
20
+ color: var(--nuraly-breadcrumb-item-color);
21
+ }
22
+
23
+ .breadcrumb {
24
+ display: flex;
25
+ align-items: center;
26
+ flex-wrap: wrap;
27
+ gap: 0;
28
+ list-style: none;
29
+ margin: 0;
30
+ padding: 0;
31
+ }
32
+
33
+ .breadcrumb-item {
34
+ display: inline-flex;
35
+ align-items: center;
36
+ gap: var(--nuraly-spacing-1, 0.25rem);
37
+ position: relative;
38
+ }
39
+
40
+ .breadcrumb-item:not(:last-child) {
41
+ margin-right: var(--nuraly-breadcrumb-separator-margin, 8px);
42
+ }
43
+
44
+ .breadcrumb-link {
45
+ display: inline-flex;
46
+ align-items: center;
47
+ gap: var(--nuraly-spacing-1, 0.25rem);
48
+ color: var(--nuraly-breadcrumb-link-color);
49
+ text-decoration: none;
50
+ transition: color var(--nuraly-transition-fast, 0.15s) ease;
51
+ cursor: pointer;
52
+ padding: var(--nuraly-spacing-1, 0.25rem) 0;
53
+ border-radius: var(--nuraly-border-radius-small, 2px);
54
+ }
55
+
56
+ .breadcrumb-link:hover {
57
+ color: var(--nuraly-breadcrumb-link-hover-color);
58
+ }
59
+
60
+ .breadcrumb-link:focus {
61
+ outline: var(--nuraly-focus-outline);
62
+ outline-offset: var(--nuraly-focus-outline-offset);
63
+ }
64
+
65
+ .breadcrumb-link.disabled {
66
+ color: var(--nuraly-color-text-disabled);
67
+ cursor: not-allowed;
68
+ pointer-events: none;
69
+ }
70
+
71
+ .breadcrumb-text {
72
+ display: inline-flex;
73
+ align-items: center;
74
+ gap: var(--nuraly-spacing-1, 0.25rem);
75
+ color: var(--nuraly-breadcrumb-last-item-color);
76
+ padding: var(--nuraly-spacing-1, 0.25rem) 0;
77
+ }
78
+
79
+ .breadcrumb-separator {
80
+ display: inline-flex;
81
+ align-items: center;
82
+ color: var(--nuraly-breadcrumb-separator-color);
83
+ margin: 0 var(--nuraly-breadcrumb-separator-margin, 8px);
84
+ user-select: none;
85
+ font-size: var(--nuraly-breadcrumb-icon-font-size, 14px);
86
+ }
87
+
88
+ .breadcrumb-icon {
89
+ display: inline-flex;
90
+ align-items: center;
91
+ font-size: var(--nuraly-breadcrumb-icon-font-size, 14px);
92
+ }
93
+
94
+ /* Dropdown menu styles */
95
+ .breadcrumb-item-with-menu {
96
+ position: relative;
97
+ }
98
+
99
+ .breadcrumb-item-with-menu:hover .breadcrumb-dropdown {
100
+ display: block;
101
+ }
102
+
103
+ .breadcrumb-dropdown {
104
+ display: none;
105
+ position: absolute;
106
+ top: 100%;
107
+ left: 0;
108
+ z-index: var(--nuraly-z-index-dropdown, 1000);
109
+ background-color: var(--nuraly-color-background-elevated);
110
+ border: 1px solid var(--nuraly-color-border);
111
+ border-radius: var(--nuraly-border-radius-medium, 4px);
112
+ box-shadow: var(--nuraly-shadow-dropdown);
113
+ min-width: 160px;
114
+ margin-top: var(--nuraly-spacing-1, 0.25rem);
115
+ padding: var(--nuraly-spacing-1, 0.25rem) 0;
116
+ }
117
+
118
+ .breadcrumb-menu-item {
119
+ display: flex;
120
+ align-items: center;
121
+ gap: var(--nuraly-spacing-2, 0.5rem);
122
+ padding: var(--nuraly-spacing-2, 0.5rem) var(--nuraly-spacing-3, 0.75rem);
123
+ color: var(--nuraly-color-text);
124
+ text-decoration: none;
125
+ cursor: pointer;
126
+ transition: background-color var(--nuraly-transition-fast, 0.15s) ease;
127
+ }
128
+
129
+ .breadcrumb-menu-item:hover {
130
+ background-color: var(--nuraly-color-background-hover);
131
+ }
132
+
133
+ .breadcrumb-menu-item.disabled {
134
+ color: var(--nuraly-color-text-disabled);
135
+ cursor: not-allowed;
136
+ pointer-events: none;
137
+ }
138
+
139
+ /* RTL Support */
140
+ :host([dir="rtl"]) .breadcrumb {
141
+ direction: rtl;
142
+ }
143
+
144
+ :host([dir="rtl"]) .breadcrumb-item:not(:last-child) {
145
+ margin-right: 0;
146
+ margin-left: var(--nuraly-breadcrumb-separator-margin, 8px);
147
+ }
148
+
149
+ :host([dir="rtl"]) .breadcrumb-separator {
150
+ transform: scaleX(-1);
151
+ }
152
+ `;
153
+ //# sourceMappingURL=breadcrumb.style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumb.style.js","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb.style.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0IxB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2023 Nuraly, Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\nimport { css } from 'lit';\n\n/**\n * Breadcrumb component styles for the Hybrid UI Library\n * Using shared CSS variables from /src/shared/themes/\n * \n * This file contains all the styling for the nr-breadcrumb component with\n * clean CSS variable usage without local fallbacks and proper theme switching support.\n */\nexport const styles = css`\n :host {\n display: block;\n font-family: var(--nuraly-font-family);\n font-size: var(--nuraly-breadcrumb-font-size, 0.875rem);\n line-height: var(--nuraly-breadcrumb-line-height, 1.5);\n color: var(--nuraly-breadcrumb-item-color);\n }\n\n .breadcrumb {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 0;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n .breadcrumb-item {\n display: inline-flex;\n align-items: center;\n gap: var(--nuraly-spacing-1, 0.25rem);\n position: relative;\n }\n\n .breadcrumb-item:not(:last-child) {\n margin-right: var(--nuraly-breadcrumb-separator-margin, 8px);\n }\n\n .breadcrumb-link {\n display: inline-flex;\n align-items: center;\n gap: var(--nuraly-spacing-1, 0.25rem);\n color: var(--nuraly-breadcrumb-link-color);\n text-decoration: none;\n transition: color var(--nuraly-transition-fast, 0.15s) ease;\n cursor: pointer;\n padding: var(--nuraly-spacing-1, 0.25rem) 0;\n border-radius: var(--nuraly-border-radius-small, 2px);\n }\n\n .breadcrumb-link:hover {\n color: var(--nuraly-breadcrumb-link-hover-color);\n }\n\n .breadcrumb-link:focus {\n outline: var(--nuraly-focus-outline);\n outline-offset: var(--nuraly-focus-outline-offset);\n }\n\n .breadcrumb-link.disabled {\n color: var(--nuraly-color-text-disabled);\n cursor: not-allowed;\n pointer-events: none;\n }\n\n .breadcrumb-text {\n display: inline-flex;\n align-items: center;\n gap: var(--nuraly-spacing-1, 0.25rem);\n color: var(--nuraly-breadcrumb-last-item-color);\n padding: var(--nuraly-spacing-1, 0.25rem) 0;\n }\n\n .breadcrumb-separator {\n display: inline-flex;\n align-items: center;\n color: var(--nuraly-breadcrumb-separator-color);\n margin: 0 var(--nuraly-breadcrumb-separator-margin, 8px);\n user-select: none;\n font-size: var(--nuraly-breadcrumb-icon-font-size, 14px);\n }\n\n .breadcrumb-icon {\n display: inline-flex;\n align-items: center;\n font-size: var(--nuraly-breadcrumb-icon-font-size, 14px);\n }\n\n /* Dropdown menu styles */\n .breadcrumb-item-with-menu {\n position: relative;\n }\n\n .breadcrumb-item-with-menu:hover .breadcrumb-dropdown {\n display: block;\n }\n\n .breadcrumb-dropdown {\n display: none;\n position: absolute;\n top: 100%;\n left: 0;\n z-index: var(--nuraly-z-index-dropdown, 1000);\n background-color: var(--nuraly-color-background-elevated);\n border: 1px solid var(--nuraly-color-border);\n border-radius: var(--nuraly-border-radius-medium, 4px);\n box-shadow: var(--nuraly-shadow-dropdown);\n min-width: 160px;\n margin-top: var(--nuraly-spacing-1, 0.25rem);\n padding: var(--nuraly-spacing-1, 0.25rem) 0;\n }\n\n .breadcrumb-menu-item {\n display: flex;\n align-items: center;\n gap: var(--nuraly-spacing-2, 0.5rem);\n padding: var(--nuraly-spacing-2, 0.5rem) var(--nuraly-spacing-3, 0.75rem);\n color: var(--nuraly-color-text);\n text-decoration: none;\n cursor: pointer;\n transition: background-color var(--nuraly-transition-fast, 0.15s) ease;\n }\n\n .breadcrumb-menu-item:hover {\n background-color: var(--nuraly-color-background-hover);\n }\n\n .breadcrumb-menu-item.disabled {\n color: var(--nuraly-color-text-disabled);\n cursor: not-allowed;\n pointer-events: none;\n }\n\n /* RTL Support */\n :host([dir=\"rtl\"]) .breadcrumb {\n direction: rtl;\n }\n\n :host([dir=\"rtl\"]) .breadcrumb-item:not(:last-child) {\n margin-right: 0;\n margin-left: var(--nuraly-breadcrumb-separator-margin, 8px);\n }\n\n :host([dir=\"rtl\"]) .breadcrumb-separator {\n transform: scaleX(-1);\n }\n`;\n"]}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Nuraly, Laabidi Aymen
4
+ * SPDX-License-Identifier: MIT
5
+ */
6
+ /**
7
+ * Breadcrumb separator types
8
+ */
9
+ export declare const enum BreadcrumbSeparator {
10
+ Slash = "/",
11
+ Arrow = ">",
12
+ Chevron = "\u203A",
13
+ Dash = "-",
14
+ Dot = "\u2022"
15
+ }
16
+ /**
17
+ * Breadcrumb item interface
18
+ */
19
+ export interface BreadcrumbItem {
20
+ /** Item title/label */
21
+ title: string;
22
+ /** Target URL or path */
23
+ href?: string;
24
+ /** Click handler for item */
25
+ onClick?: (e: MouseEvent) => void;
26
+ /** Icon name to display before title */
27
+ icon?: string;
28
+ /** Icon type (solid or regular) */
29
+ iconType?: 'solid' | 'regular';
30
+ /** Custom class name for the item */
31
+ className?: string;
32
+ /** Whether this item is disabled */
33
+ disabled?: boolean;
34
+ /** Dropdown menu items for this breadcrumb item */
35
+ menu?: BreadcrumbMenuItem[];
36
+ }
37
+ /**
38
+ * Breadcrumb menu item interface for dropdown menus
39
+ */
40
+ export interface BreadcrumbMenuItem {
41
+ /** Menu item label */
42
+ label: string;
43
+ /** Menu item URL */
44
+ href?: string;
45
+ /** Click handler */
46
+ onClick?: (e: MouseEvent) => void;
47
+ /** Icon for menu item */
48
+ icon?: string;
49
+ /** Whether menu item is disabled */
50
+ disabled?: boolean;
51
+ }
52
+ /**
53
+ * Custom separator configuration
54
+ */
55
+ export interface BreadcrumbSeparatorConfig {
56
+ /** Custom separator text or icon name */
57
+ separator: string;
58
+ /** Whether the separator is an icon */
59
+ isIcon?: boolean;
60
+ /** Icon type if separator is an icon */
61
+ iconType?: 'solid' | 'regular';
62
+ }
63
+ //# sourceMappingURL=breadcrumb.types.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Nuraly, Laabidi Aymen
4
+ * SPDX-License-Identifier: MIT
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=breadcrumb.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumb.types.js","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb.types.ts"],"names":[],"mappings":"AAAA;;;;GAIG","sourcesContent":["/**\n * @license\n * Copyright 2023 Nuraly, Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\n/**\n * Breadcrumb separator types\n */\nexport const enum BreadcrumbSeparator {\n Slash = '/',\n Arrow = '>',\n Chevron = '›',\n Dash = '-',\n Dot = '•',\n}\n\n/**\n * Breadcrumb item interface\n */\nexport interface BreadcrumbItem {\n /** Item title/label */\n title: string;\n /** Target URL or path */\n href?: string;\n /** Click handler for item */\n onClick?: (e: MouseEvent) => void;\n /** Icon name to display before title */\n icon?: string;\n /** Icon type (solid or regular) */\n iconType?: 'solid' | 'regular';\n /** Custom class name for the item */\n className?: string;\n /** Whether this item is disabled */\n disabled?: boolean;\n /** Dropdown menu items for this breadcrumb item */\n menu?: BreadcrumbMenuItem[];\n}\n\n/**\n * Breadcrumb menu item interface for dropdown menus\n */\nexport interface BreadcrumbMenuItem {\n /** Menu item label */\n label: string;\n /** Menu item URL */\n href?: string;\n /** Click handler */\n onClick?: (e: MouseEvent) => void;\n /** Icon for menu item */\n icon?: string;\n /** Whether menu item is disabled */\n disabled?: boolean;\n}\n\n/**\n * Custom separator configuration\n */\nexport interface BreadcrumbSeparatorConfig {\n /** Custom separator text or icon name */\n separator: string;\n /** Whether the separator is an icon */\n isIcon?: boolean;\n /** Icon type if separator is an icon */\n iconType?: 'solid' | 'regular';\n}\n"]}