@vaadin/master-detail-layout 24.8.0-alpha10
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.
- package/LICENSE +190 -0
- package/README.md +60 -0
- package/package.json +54 -0
- package/src/vaadin-master-detail-layout-transition-styles.js +289 -0
- package/src/vaadin-master-detail-layout.d.ts +133 -0
- package/src/vaadin-master-detail-layout.js +682 -0
- package/theme/lumo/vaadin-master-detail-layout-styles.d.ts +1 -0
- package/theme/lumo/vaadin-master-detail-layout-styles.js +28 -0
- package/theme/lumo/vaadin-master-detail-layout.d.ts +2 -0
- package/theme/lumo/vaadin-master-detail-layout.js +2 -0
- package/theme/material/vaadin-master-detail-layout-styles.d.ts +2 -0
- package/theme/material/vaadin-master-detail-layout-styles.js +30 -0
- package/theme/material/vaadin-master-detail-layout.d.ts +2 -0
- package/theme/material/vaadin-master-detail-layout.js +2 -0
- package/vaadin-master-detail-layout.d.ts +1 -0
- package/vaadin-master-detail-layout.js +3 -0
- package/web-types.json +232 -0
- package/web-types.lit.json +90 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2025 - 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 { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js';
|
|
8
|
+
import { SlotStylesMixin } from '@vaadin/component-base/src/slot-styles-mixin.js';
|
|
9
|
+
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* `<vaadin-master-detail-layout>` is a web component for building UIs with a master
|
|
13
|
+
* (or primary) area and a detail (or secondary) area that is displayed next to, or
|
|
14
|
+
* overlaid on top of, the master area, depending on configuration and viewport size.
|
|
15
|
+
*
|
|
16
|
+
* ### Styling
|
|
17
|
+
*
|
|
18
|
+
* The following custom CSS property are available for styling (needed to be set
|
|
19
|
+
* on the `<html>` element since they are used by the global view transitions):
|
|
20
|
+
*
|
|
21
|
+
* Custom CSS property | Description | Default
|
|
22
|
+
* -----------------------------------------------------|---------------------|--------
|
|
23
|
+
* `--vaadin-master-detail-layout-transition-duration` | Transition duration | 300ms
|
|
24
|
+
*
|
|
25
|
+
* The following shadow DOM parts are available for styling:
|
|
26
|
+
*
|
|
27
|
+
* Part name | Description
|
|
28
|
+
* ---------------|----------------------
|
|
29
|
+
* `backdrop` | Backdrop covering the master area in the overlay mode
|
|
30
|
+
* `master` | The master area
|
|
31
|
+
* `detail` | The detail area
|
|
32
|
+
*
|
|
33
|
+
* The following state attributes are available for styling:
|
|
34
|
+
*
|
|
35
|
+
* Attribute | Description
|
|
36
|
+
* ---------------| -----------
|
|
37
|
+
* `containment` | Set to `layout` or `viewport` depending on the containment.
|
|
38
|
+
* `orientation` | Set to `horizontal` or `vertical` depending on the orientation.
|
|
39
|
+
* `has-detail` | Set when the detail content is provided.
|
|
40
|
+
* `overlay` | Set when the layout is using the overlay mode.
|
|
41
|
+
* `stack` | Set when the layout is using the stack mode.
|
|
42
|
+
*
|
|
43
|
+
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
44
|
+
*/
|
|
45
|
+
declare class MasterDetailLayout extends SlotStylesMixin(ResizeMixin(ThemableMixin(ElementMixin(HTMLElement)))) {
|
|
46
|
+
/**
|
|
47
|
+
* Fixed size (in CSS length units) to be set on the detail area.
|
|
48
|
+
* When specified, it prevents the detail area from growing or
|
|
49
|
+
* shrinking. If there is not enough space to show master and detail
|
|
50
|
+
* areas next to each other, the layout switches to the overlay mode.
|
|
51
|
+
*
|
|
52
|
+
* @attr {string} detail-size
|
|
53
|
+
*/
|
|
54
|
+
detailSize: string | null | undefined;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Minimum size (in CSS length units) to be set on the detail area.
|
|
58
|
+
* When specified, it prevents the detail area from shrinking below
|
|
59
|
+
* this size. If there is not enough space to show master and detail
|
|
60
|
+
* areas next to each other, the layout switches to the overlay mode.
|
|
61
|
+
*
|
|
62
|
+
* @attr {string} detail-min-size
|
|
63
|
+
*/
|
|
64
|
+
detailMinSize: string | null | undefined;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Fixed size (in CSS length units) to be set on the master area.
|
|
68
|
+
* When specified, it prevents the master area from growing or
|
|
69
|
+
* shrinking. If there is not enough space to show master and detail
|
|
70
|
+
* areas next to each other, the layout switches to the overlay mode.
|
|
71
|
+
*
|
|
72
|
+
* @attr {string} master-size
|
|
73
|
+
*/
|
|
74
|
+
masterSize: string | null | undefined;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Minimum size (in CSS length units) to be set on the master area.
|
|
78
|
+
* When specified, it prevents the master area from shrinking below
|
|
79
|
+
* this size. If there is not enough space to show master and detail
|
|
80
|
+
* areas next to each other, the layout switches to the overlay mode.
|
|
81
|
+
*
|
|
82
|
+
* @attr {string} master-min-size
|
|
83
|
+
*/
|
|
84
|
+
masterMinSize: string | null | undefined;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Define how master and detail areas are shown next to each other,
|
|
88
|
+
* and the way how size and min-size properties are applied to them.
|
|
89
|
+
* Possible values are: `horizontal` or `vertical`.
|
|
90
|
+
* Defaults to horizontal.
|
|
91
|
+
*/
|
|
92
|
+
orientation: 'horizontal' | 'vertical';
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* When specified, forces the layout to use overlay mode, even if
|
|
96
|
+
* there is enough space for master and detail to be shown next to
|
|
97
|
+
* each other using the default (split) mode.
|
|
98
|
+
*
|
|
99
|
+
* @attr {boolean} force-overlay
|
|
100
|
+
*/
|
|
101
|
+
forceOverlay: boolean;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Defines the containment of the detail area when the layout is in
|
|
105
|
+
* overlay mode. When set to `layout`, the overlay is confined to the
|
|
106
|
+
* layout. When set to `viewport`, the overlay is confined to the
|
|
107
|
+
* browser's viewport. Defaults to `layout`.
|
|
108
|
+
*/
|
|
109
|
+
containment: 'layout' | 'viewport';
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The threshold (in CSS length units) at which the layout switches to
|
|
113
|
+
* the "stack" mode, making detail area fully cover the master area.
|
|
114
|
+
*
|
|
115
|
+
* @attr {string} stack-threshold
|
|
116
|
+
*/
|
|
117
|
+
stackThreshold: string | null | undefined;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* When true, the layout does not use animated transitions for the detail area.
|
|
121
|
+
*
|
|
122
|
+
* @attr {boolean} no-animation
|
|
123
|
+
*/
|
|
124
|
+
noAnimation: boolean;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
declare global {
|
|
128
|
+
interface HTMLElementTagNameMap {
|
|
129
|
+
'vaadin-master-detail-layout': MasterDetailLayout;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export { MasterDetailLayout };
|