Skip to content

Commit ce9c6c9

Browse files
Artur-claude
andcommitted
refactor: move breadcrumb .d.ts files to src directory
Align breadcrumb component structure with existing components by moving TypeScript definition files to src/ directory and updating root files to re-export from src. This follows the established pattern used by button, accordion, and other components. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 42a7c10 commit ce9c6c9

File tree

4 files changed

+105
-103
lines changed

4 files changed

+105
-103
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/**
2+
* @license
3+
* Copyright (c) 2017 - 2025 Vaadin Ltd.
4+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5+
*/
6+
import { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';
7+
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
8+
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
9+
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
10+
11+
/**
12+
* `<vaadin-breadcrumb-item>` is a Web Component for displaying a single item in a breadcrumb trail.
13+
*
14+
* ```html
15+
* <vaadin-breadcrumb-item href="/products">Products</vaadin-breadcrumb-item>
16+
* ```
17+
*
18+
* ### Styling
19+
*
20+
* The following shadow DOM parts are available for styling:
21+
*
22+
* Part name | Description
23+
* -------------|----------------
24+
* `link` | The link element
25+
* `separator` | The separator element
26+
*
27+
* The following state attributes are available for styling:
28+
*
29+
* Attribute | Description
30+
* ------------|-------------
31+
* `disabled` | Set when the element is disabled
32+
* `last` | Set when this is the last item in the breadcrumb
33+
* `current` | Set when the item's href matches the current page
34+
*
35+
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
36+
*/
37+
declare class BreadcrumbItem extends DisabledMixin(DirMixin(ElementMixin(ThemableMixin(HTMLElement)))) {
38+
/**
39+
* The URL to navigate to
40+
*/
41+
href: string | null | undefined;
42+
43+
/**
44+
* The target of the link
45+
*/
46+
target: string | null | undefined;
47+
48+
/**
49+
* Whether to exclude the item from client-side routing
50+
*/
51+
routerIgnore: boolean;
52+
53+
/**
54+
* Whether the item's href matches the current page
55+
*/
56+
readonly current: boolean;
57+
}
58+
59+
declare global {
60+
interface HTMLElementTagNameMap {
61+
'vaadin-breadcrumb-item': BreadcrumbItem;
62+
}
63+
}
64+
65+
export { BreadcrumbItem };
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/**
2+
* @license
3+
* Copyright (c) 2017 - 2025 Vaadin Ltd.
4+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5+
*/
6+
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
7+
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
8+
9+
/**
10+
* `<vaadin-breadcrumb>` is a Web Component for displaying hierarchical navigation.
11+
*
12+
* ```html
13+
* <vaadin-breadcrumb>
14+
* <vaadin-breadcrumb-item href="/">Home</vaadin-breadcrumb-item>
15+
* <vaadin-breadcrumb-item href="/products">Products</vaadin-breadcrumb-item>
16+
* <vaadin-breadcrumb-item>Details</vaadin-breadcrumb-item>
17+
* </vaadin-breadcrumb>
18+
* ```
19+
*
20+
* ### Styling
21+
*
22+
* The following shadow DOM parts are available for styling:
23+
*
24+
* Part name | Description
25+
* -----------|----------------
26+
* `list` | The ordered list element
27+
*
28+
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
29+
*/
30+
declare class Breadcrumb extends ElementMixin(ThemableMixin(HTMLElement)) {}
31+
32+
declare global {
33+
interface HTMLElementTagNameMap {
34+
'vaadin-breadcrumb': Breadcrumb;
35+
}
36+
}
37+
38+
export { Breadcrumb };
Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1 @@
1-
/**
2-
* @license
3-
* Copyright (c) 2017 - 2025 Vaadin Ltd.
4-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5-
*/
6-
import { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';
7-
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
8-
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
9-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
10-
11-
/**
12-
* `<vaadin-breadcrumb-item>` is a Web Component for displaying a single item in a breadcrumb trail.
13-
*
14-
* ```html
15-
* <vaadin-breadcrumb-item href="/products">Products</vaadin-breadcrumb-item>
16-
* ```
17-
*
18-
* ### Styling
19-
*
20-
* The following shadow DOM parts are available for styling:
21-
*
22-
* Part name | Description
23-
* -------------|----------------
24-
* `link` | The link element
25-
* `separator` | The separator element
26-
*
27-
* The following state attributes are available for styling:
28-
*
29-
* Attribute | Description
30-
* ------------|-------------
31-
* `disabled` | Set when the element is disabled
32-
* `last` | Set when this is the last item in the breadcrumb
33-
* `current` | Set when the item's href matches the current page
34-
*
35-
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
36-
*/
37-
declare class BreadcrumbItem extends DisabledMixin(DirMixin(ElementMixin(ThemableMixin(HTMLElement)))) {
38-
/**
39-
* The URL to navigate to
40-
*/
41-
href: string | null | undefined;
42-
43-
/**
44-
* The target of the link
45-
*/
46-
target: string | null | undefined;
47-
48-
/**
49-
* Whether to exclude the item from client-side routing
50-
*/
51-
routerIgnore: boolean;
52-
53-
/**
54-
* Whether the item's href matches the current page
55-
*/
56-
readonly current: boolean;
57-
}
58-
59-
declare global {
60-
interface HTMLElementTagNameMap {
61-
'vaadin-breadcrumb-item': BreadcrumbItem;
62-
}
63-
}
64-
65-
export { BreadcrumbItem };
1+
export * from './src/vaadin-breadcrumb-item.js';
Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1 @@
1-
/**
2-
* @license
3-
* Copyright (c) 2017 - 2025 Vaadin Ltd.
4-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5-
*/
6-
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
7-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
8-
9-
/**
10-
* `<vaadin-breadcrumb>` is a Web Component for displaying hierarchical navigation.
11-
*
12-
* ```html
13-
* <vaadin-breadcrumb>
14-
* <vaadin-breadcrumb-item href="/">Home</vaadin-breadcrumb-item>
15-
* <vaadin-breadcrumb-item href="/products">Products</vaadin-breadcrumb-item>
16-
* <vaadin-breadcrumb-item>Details</vaadin-breadcrumb-item>
17-
* </vaadin-breadcrumb>
18-
* ```
19-
*
20-
* ### Styling
21-
*
22-
* The following shadow DOM parts are available for styling:
23-
*
24-
* Part name | Description
25-
* -----------|----------------
26-
* `list` | The ordered list element
27-
*
28-
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
29-
*/
30-
declare class Breadcrumb extends ElementMixin(ThemableMixin(HTMLElement)) {}
31-
32-
declare global {
33-
interface HTMLElementTagNameMap {
34-
'vaadin-breadcrumb': Breadcrumb;
35-
}
36-
}
37-
38-
export { Breadcrumb };
1+
export * from './src/vaadin-breadcrumb.js';

0 commit comments

Comments
 (0)