@vaadin/master-detail-layout 25.1.0-beta4 → 25.2.0-alpha1

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.
@@ -4,7 +4,6 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
7
- import { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js';
8
7
  import { SlotStylesMixin } from '@vaadin/component-base/src/slot-styles-mixin.js';
9
8
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
10
9
 
@@ -27,19 +26,19 @@ export interface MasterDetailLayoutEventMap extends HTMLElementEventMap, MasterD
27
26
  *
28
27
  * Part name | Description
29
28
  * ---------------|----------------------
30
- * `backdrop` | Backdrop covering the master area in the drawer mode
29
+ * `backdrop` | Backdrop covering the master area in the overlay mode
31
30
  * `master` | The master area
32
31
  * `detail` | The detail area
33
32
  *
34
33
  * The following state attributes are available for styling:
35
34
  *
36
- * Attribute | Description
37
- * ---------------| -----------
38
- * `containment` | Set to `layout` or `viewport` depending on the containment.
39
- * `orientation` | Set to `horizontal` or `vertical` depending on the orientation.
40
- * `has-detail` | Set when the detail content is provided.
41
- * `drawer` | Set when the layout is using the drawer mode.
42
- * `stack` | Set when the layout is using the stack mode.
35
+ * Attribute | Description
36
+ * ----------------------|----------------------
37
+ * `expand` | Set to `master`, `detail`, or `both`.
38
+ * `orientation` | Set to `horizontal` or `vertical` depending on the orientation.
39
+ * `has-detail` | Set when the detail content is provided and visible.
40
+ * `overflow` | Set when columns don't fit and the detail is shown as an overlay.
41
+ * `overlay-containment` | Set to `layout` or `viewport`.
43
42
  *
44
43
  * The following custom CSS properties are available for styling:
45
44
  *
@@ -53,53 +52,38 @@ export interface MasterDetailLayoutEventMap extends HTMLElementEventMap, MasterD
53
52
  *
54
53
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
55
54
  *
56
- * @fires {CustomEvent} backdrop-click - Fired when the user clicks the backdrop in the drawer mode.
55
+ * @fires {CustomEvent} backdrop-click - Fired when the user clicks the backdrop in the overlay mode.
57
56
  * @fires {CustomEvent} detail-escape-press - Fired when the user presses Escape in the detail area.
58
57
  */
59
- declare class MasterDetailLayout extends SlotStylesMixin(ResizeMixin(ThemableMixin(ElementMixin(HTMLElement)))) {
58
+ declare class MasterDetailLayout extends SlotStylesMixin(ThemableMixin(ElementMixin(HTMLElement))) {
60
59
  /**
61
- * Fixed size (in CSS length units) to be set on the detail area.
62
- * When specified, it prevents the detail area from growing or
63
- * shrinking. If there is not enough space to show master and detail
64
- * areas next to each other, the details are shown as an overlay:
65
- * either as drawer or stack, depending on the `stackOverlay` property.
60
+ * Size (in CSS length units) to be set on the detail area in
61
+ * the CSS grid layout. If there is not enough space to show
62
+ * master and detail areas next to each other, the detail area
63
+ * is shown as an overlay. Defaults to 15em.
66
64
  *
67
65
  * @attr {string} detail-size
68
66
  */
69
67
  detailSize: string | null | undefined;
70
68
 
71
69
  /**
72
- * Minimum size (in CSS length units) to be set on the detail area.
73
- * When specified, it prevents the detail area from shrinking below
74
- * this size. If there is not enough space to show master and detail
75
- * areas next to each other, the details are shown as an overlay:
76
- * either as drawer or stack, depending on the `stackOverlay` property.
77
- *
78
- * @attr {string} detail-min-size
79
- */
80
- detailMinSize: string | null | undefined;
81
-
82
- /**
83
- * Fixed size (in CSS length units) to be set on the master area.
84
- * When specified, it prevents the master area from growing or
85
- * shrinking. If there is not enough space to show master and detail
86
- * areas next to each other, the details are shown as an overlay:
87
- * either as drawer or stack, depending on the `stackOverlay` property.
70
+ * Size (in CSS length units) to be set on the master area in
71
+ * the CSS grid layout. If there is not enough space to show
72
+ * master and detail areas next to each other, the detail area
73
+ * is shown as an overlay. Defaults to 30em.
88
74
  *
89
75
  * @attr {string} master-size
90
76
  */
91
77
  masterSize: string | null | undefined;
92
78
 
93
79
  /**
94
- * Minimum size (in CSS length units) to be set on the master area.
95
- * When specified, it prevents the master area from shrinking below
96
- * this size. If there is not enough space to show master and detail
97
- * areas next to each other, the details are shown as an overlay:
98
- * either as drawer or stack, depending on the `stackOverlay` property.
80
+ * Size (in CSS length units) for the detail area when shown as an
81
+ * overlay. When not set, falls back to `detailSize`. Set to `100%`
82
+ * to make the detail cover the full layout.
99
83
  *
100
- * @attr {string} master-min-size
84
+ * @attr {string} overlay-size
101
85
  */
102
- masterMinSize: string | null | undefined;
86
+ overlaySize: string | null | undefined;
103
87
 
104
88
  /**
105
89
  * Define how master and detail areas are shown next to each other,
@@ -109,38 +93,22 @@ declare class MasterDetailLayout extends SlotStylesMixin(ResizeMixin(ThemableMix
109
93
  */
110
94
  orientation: 'horizontal' | 'vertical';
111
95
 
112
- /**
113
- * When specified, forces the details to be shown as an overlay
114
- * (either as drawer or stack), even if there is enough space for
115
- * master and detail to be shown next to each other using the default
116
- * (split) mode.
117
- *
118
- * In order to enforce the stack mode, use this property together with
119
- * `stackOverlay` property and set both to `true`.
120
- *
121
- * @attr {boolean} force-overlay
122
- */
123
- forceOverlay: boolean;
124
-
125
96
  /**
126
97
  * Defines the containment of the detail area when the layout is in
127
98
  * overlay mode. When set to `layout`, the overlay is confined to the
128
99
  * layout. When set to `viewport`, the overlay is confined to the
129
100
  * browser's viewport. Defaults to `layout`.
101
+ *
102
+ * @attr {string} overlay-containment
130
103
  */
131
- containment: 'layout' | 'viewport';
104
+ overlayContainment: 'layout' | 'viewport';
132
105
 
133
106
  /**
134
- * When true, the layout in the overlay mode is rendered as a stack,
135
- * making detail area fully cover the master area. Otherwise, it is
136
- * rendered as a drawer and has a visual backdrop.
137
- *
138
- * In order to enforce the stack mode, use this property together with
139
- * `forceOverlay` property and set both to `true`.
140
- *
141
- * @attr {string} stack-threshold
107
+ * Controls which column(s) expand to fill available space.
108
+ * Possible values: `'master'`, `'detail'`, `'both'`.
109
+ * Defaults to `'both'`.
142
110
  */
143
- stackOverlay: boolean;
111
+ expand: 'master' | 'detail' | 'both';
144
112
 
145
113
  /**
146
114
  * When true, the layout does not use animated transitions for the detail area.