@limetech/lime-elements 40.11.2 → 40.12.0

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/{focus-trigger-element-BfnJmxKO.js → focus-trigger-element-Sr7Yjtmk.js} +6 -17
  3. package/dist/cjs/get-focus-target-DgqZ25gx.js +105 -0
  4. package/dist/cjs/lime-elements.cjs.js +1 -1
  5. package/dist/cjs/limel-breadcrumbs_6.cjs.entry.js +2 -1
  6. package/dist/cjs/limel-file-viewer.cjs.entry.js +81 -47
  7. package/dist/cjs/limel-form.cjs.entry.js +7 -7
  8. package/dist/cjs/limel-hotkey_4.cjs.entry.js +2 -71
  9. package/dist/cjs/limel-popover_2.cjs.entry.js +2 -1
  10. package/dist/cjs/limel-side-panel.cjs.entry.js +72 -5
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/collection/components/side-panel/side-panel.css +118 -6
  13. package/dist/collection/components/side-panel/side-panel.js +120 -77
  14. package/dist/collection/util/focus-trigger-element.js +6 -17
  15. package/dist/collection/util/get-focus-target.js +47 -16
  16. package/dist/esm/{focus-trigger-element-BOFcjLq3.js → focus-trigger-element-CIEHI_yk.js} +6 -17
  17. package/dist/esm/get-focus-target-BhoYaGlg.js +102 -0
  18. package/dist/esm/lime-elements.js +1 -1
  19. package/dist/esm/limel-breadcrumbs_6.entry.js +2 -1
  20. package/dist/esm/limel-file-viewer.entry.js +81 -47
  21. package/dist/esm/limel-form.entry.js +7 -7
  22. package/dist/esm/limel-hotkey_4.entry.js +1 -70
  23. package/dist/esm/limel-popover_2.entry.js +2 -1
  24. package/dist/esm/limel-side-panel.entry.js +72 -5
  25. package/dist/esm/loader.js +1 -1
  26. package/dist/lime-elements/lime-elements.esm.js +1 -1
  27. package/dist/lime-elements/p-09390c6a.entry.js +1 -0
  28. package/dist/lime-elements/p-25d0d06b.entry.js +159 -0
  29. package/dist/lime-elements/{p-ae2e5e87.entry.js → p-49eb2f64.entry.js} +1 -1
  30. package/dist/lime-elements/p-4f58c6b3.entry.js +1 -0
  31. package/dist/lime-elements/p-5a15606a.entry.js +1 -0
  32. package/dist/lime-elements/p-9ff6a455.entry.js +1 -0
  33. package/dist/lime-elements/p-B8Rm8W5O.js +1 -0
  34. package/dist/lime-elements/p-BhoYaGlg.js +1 -0
  35. package/dist/types/components/side-panel/side-panel.d.ts +35 -73
  36. package/dist/types/components.d.ts +70 -238
  37. package/dist/types/util/focus-trigger-element.d.ts +4 -4
  38. package/dist/types/util/get-focus-target.d.ts +18 -6
  39. package/package.json +6 -6
  40. package/dist/lime-elements/p-1a5478e3.entry.js +0 -1
  41. package/dist/lime-elements/p-2cf9f2e1.entry.js +0 -159
  42. package/dist/lime-elements/p-33b58741.entry.js +0 -1
  43. package/dist/lime-elements/p-82c65f70.entry.js +0 -1
  44. package/dist/lime-elements/p-9461c6bb.entry.js +0 -1
  45. package/dist/lime-elements/p-D0F7gOYG.js +0 -1
@@ -2,87 +2,28 @@ import { EventEmitter } from '../../stencil-public-runtime';
2
2
  import { SidePanelAction, SidePanelActionSelect, SidePanelEntry } from './side-panel.types';
3
3
  /**
4
4
  * A resizable panel that is displayed on top of the right side of the page.
5
- * The content is placed in the default slot, below a toolbar and a header.
5
+ * It does not block the rest of the page. Place it in an element with
6
+ * `position: relative`.
6
7
  *
7
- * The panel is positioned relative to its nearest positioned ancestor. Set
8
- * `position: relative` on that element. Use `--side-panel-top-inset`,
9
- * `--side-panel-right-inset` and `--side-panel-bottom-inset` to keep parts of
10
- * that element visible, for example a header.
8
+ * The panel has:
9
+ * - a toolbar with a close button, and buttons from `actions`
10
+ * - a header that shows the last entry of `stack`, with a slot for controls
11
+ * - backs behind its left edge, for the other entries of `stack`
12
+ * - a handle on its left edge, to resize the panel
13
+ * - a full screen mode, for small screens
11
14
  *
12
- * The CSS custom properties can be set on the panel or on any ancestor.
15
+ * The panel emits `close`, but does not remove itself. The consumer must
16
+ * remove it from the DOM.
13
17
  *
14
- * The panel is a dialog that does not block the rest of the page. Set `label`
15
- * to give it an accessible name, which screen readers announce. When the panel
16
- * opens, focus moves into it. When the panel is removed, focus returns to the
17
- * element that had it before, unless focus is somewhere else by then.
18
- *
19
- * The panel emits `close` when the user clicks the close button, or presses
20
- * Escape. It does not remove itself. The consumer must remove it from the DOM.
21
- * The user can resize the panel by dragging its left edge, or with the arrow
22
- * keys. The panel emits `changeWidth` when a resize is finished.
23
- *
24
- * See the examples for how closing and resizing work in detail.
25
- *
26
- * ## Header
27
- *
28
- * The header shows the heading, subheading and icon of the last entry in
29
- * `stack`. When the entry has a `color`, the header gets that background color,
30
- * and the headings are white with a text shadow. When `stack` is empty, the
31
- * panel has no header.
32
- *
33
- * Put controls for the header, for example a follow button or a menu, in the
34
- * `header-actions` slot. They are shown at the right end of the header. When
35
- * `stack` is empty, there is no header, and the slot content is not shown.
36
- *
37
- * The slot is for small controls. It is at most half as wide as the header,
38
- * and at most as tall as the heading and subheading together. Larger content
39
- * is cut off, so that the header keeps its size.
40
- *
41
- * The slot content is not tied to an entry in `stack`. When the last entry
42
- * changes, the consumer must also change the slot content.
43
- *
44
- * The slot content keeps its own colors. Use `--side-panel-header-text-color`
45
- * to match the text color of the header. It is white when the header has a
46
- * `color`. It can also be used as the `color` of an `Icon`.
47
- *
48
- * ## Actions
49
- *
50
- * The toolbar has a close button on the left. Other buttons are set with
51
- * `actions`, and are shown on the right. The `type` of an action decides its
52
- * icon. When the user clicks an action, the panel emits `selectAction` with the
53
- * `id` of the action and the click event. The consumer decides what the action
54
- * does.
55
- *
56
- * An action with an `href` is a link, so the user can open it in a new tab.
57
- * To handle the navigation in another way, for example with the router of the
58
- * application, call `preventDefault` on the click event in `selectAction`. Do
59
- * this only for a plain click with the primary button. Let the browser handle
60
- * all other clicks, so that Ctrl-click and Cmd-click still open the link in a
61
- * new tab:
62
- *
63
- * ```ts
64
- * function handleSelectAction(event: CustomEvent<SidePanelActionSelect>) {
65
- * const click = event.detail.event;
66
- * const isPlainClick =
67
- * click.button === 0 &&
68
- * !click.metaKey &&
69
- * !click.ctrlKey &&
70
- * !click.shiftKey &&
71
- * !click.altKey;
72
- * if (!isPlainClick) {
73
- * return;
74
- * }
75
- *
76
- * click.preventDefault();
77
- * router.navigate(event.detail.id);
78
- * }
79
- * ```
18
+ * Each example shows one feature in detail, and when to use it.
80
19
  *
81
20
  * @exampleComponent limel-example-side-panel-basic
82
21
  * @exampleComponent limel-example-side-panel-insets
83
22
  * @exampleComponent limel-example-side-panel-escape
84
23
  * @exampleComponent limel-example-side-panel-actions
85
24
  * @exampleComponent limel-example-side-panel-header-actions
25
+ * @exampleComponent limel-example-side-panel-stacking
26
+ * @exampleComponent limel-example-side-panel-full-screen
86
27
  * @slot - Content of the panel
87
28
  * @slot header-actions - Small controls at the right end of the header. Content that is larger than half the header width or the height of the headings is cut off.
88
29
  * @private
@@ -101,7 +42,7 @@ export declare class SidePanel {
101
42
  /**
102
43
  * The panels in the stack, outermost first. The last entry is the panel
103
44
  * that is displayed. Its heading, subheading and icon are shown in the
104
- * header.
45
+ * header. The other entries are shown as backs behind the panel.
105
46
  */
106
47
  stack: SidePanelEntry[];
107
48
  /**
@@ -118,6 +59,13 @@ export declare class SidePanel {
118
59
  * event either.
119
60
  */
120
61
  closeOnEscape: boolean;
62
+ /**
63
+ * Set to `true` when the screen is too narrow for the panel to be displayed
64
+ * on top of the page. The panel then covers the full width of the
65
+ * positioned ancestor. It cannot be resized, and the backs of the stack are
66
+ * not shown.
67
+ */
68
+ fullScreen: boolean;
121
69
  /**
122
70
  * Emitted when the close button is clicked, or when Escape is pressed and
123
71
  * `closeOnEscape` is `true`.
@@ -134,6 +82,11 @@ export declare class SidePanel {
134
82
  * restore the width with `--side-panel-width` the next time the panel opens.
135
83
  */
136
84
  changeWidth: EventEmitter<number>;
85
+ /**
86
+ * Emitted when a back of the stack is clicked. The detail is the index of
87
+ * its entry in `stack`.
88
+ */
89
+ selectStackEntry: EventEmitter<number>;
137
90
  private host;
138
91
  private widthRange?;
139
92
  private panel;
@@ -141,7 +94,9 @@ export declare class SidePanel {
141
94
  private maxLimit?;
142
95
  private closeButtonId;
143
96
  private actionIdPrefix;
97
+ private backIdPrefix;
144
98
  private widthObserver?;
99
+ private focusCloseButtonAfterRender;
145
100
  /**
146
101
  * The width before the resize that is in progress, in pixels. `undefined`
147
102
  * when the user is not resizing the panel.
@@ -154,10 +109,15 @@ export declare class SidePanel {
154
109
  connectedCallback(): void;
155
110
  componentDidLoad(): void;
156
111
  disconnectedCallback(): void;
112
+ protected handleBacksChange(): void;
113
+ componentDidRender(): void;
157
114
  render(): any;
158
115
  private renderCloseButton;
159
116
  private renderActions;
160
117
  private renderAction;
118
+ private renderStack;
119
+ private isFocusedBackRemoved;
120
+ private renderBack;
161
121
  private renderHeader;
162
122
  private renderHandle;
163
123
  private renderBody;
@@ -196,6 +156,7 @@ export declare class SidePanel {
196
156
  private removeFromOpenPanels;
197
157
  private isLastOpened;
198
158
  private setWidth;
159
+ private getPanelBoxes;
199
160
  private handleChangeSize;
200
161
  private handleEndResize;
201
162
  private rememberWidthBeforeResize;
@@ -210,6 +171,7 @@ export declare class SidePanel {
210
171
  private measureWidthRange;
211
172
  private currentWidth;
212
173
  private handleClickAction;
174
+ private handleClickBack;
213
175
  private handleClickClose;
214
176
  }
215
177
  //# sourceMappingURL=side-panel.d.ts.map
@@ -3616,70 +3616,24 @@ export namespace Components {
3616
3616
  }
3617
3617
  /**
3618
3618
  * A resizable panel that is displayed on top of the right side of the page.
3619
- * The content is placed in the default slot, below a toolbar and a header.
3620
- * The panel is positioned relative to its nearest positioned ancestor. Set
3621
- * `position: relative` on that element. Use `--side-panel-top-inset`,
3622
- * `--side-panel-right-inset` and `--side-panel-bottom-inset` to keep parts of
3623
- * that element visible, for example a header.
3624
- * The CSS custom properties can be set on the panel or on any ancestor.
3625
- * The panel is a dialog that does not block the rest of the page. Set `label`
3626
- * to give it an accessible name, which screen readers announce. When the panel
3627
- * opens, focus moves into it. When the panel is removed, focus returns to the
3628
- * element that had it before, unless focus is somewhere else by then.
3629
- * The panel emits `close` when the user clicks the close button, or presses
3630
- * Escape. It does not remove itself. The consumer must remove it from the DOM.
3631
- * The user can resize the panel by dragging its left edge, or with the arrow
3632
- * keys. The panel emits `changeWidth` when a resize is finished.
3633
- * See the examples for how closing and resizing work in detail.
3634
- * ## Header
3635
- * The header shows the heading, subheading and icon of the last entry in
3636
- * `stack`. When the entry has a `color`, the header gets that background color,
3637
- * and the headings are white with a text shadow. When `stack` is empty, the
3638
- * panel has no header.
3639
- * Put controls for the header, for example a follow button or a menu, in the
3640
- * `header-actions` slot. They are shown at the right end of the header. When
3641
- * `stack` is empty, there is no header, and the slot content is not shown.
3642
- * The slot is for small controls. It is at most half as wide as the header,
3643
- * and at most as tall as the heading and subheading together. Larger content
3644
- * is cut off, so that the header keeps its size.
3645
- * The slot content is not tied to an entry in `stack`. When the last entry
3646
- * changes, the consumer must also change the slot content.
3647
- * The slot content keeps its own colors. Use `--side-panel-header-text-color`
3648
- * to match the text color of the header. It is white when the header has a
3649
- * `color`. It can also be used as the `color` of an `Icon`.
3650
- * ## Actions
3651
- * The toolbar has a close button on the left. Other buttons are set with
3652
- * `actions`, and are shown on the right. The `type` of an action decides its
3653
- * icon. When the user clicks an action, the panel emits `selectAction` with the
3654
- * `id` of the action and the click event. The consumer decides what the action
3655
- * does.
3656
- * An action with an `href` is a link, so the user can open it in a new tab.
3657
- * To handle the navigation in another way, for example with the router of the
3658
- * application, call `preventDefault` on the click event in `selectAction`. Do
3659
- * this only for a plain click with the primary button. Let the browser handle
3660
- * all other clicks, so that Ctrl-click and Cmd-click still open the link in a
3661
- * new tab:
3662
- * ```ts
3663
- * function handleSelectAction(event: CustomEvent<SidePanelActionSelect>) {
3664
- * const click = event.detail.event;
3665
- * const isPlainClick =
3666
- * click.button === 0 &&
3667
- * !click.metaKey &&
3668
- * !click.ctrlKey &&
3669
- * !click.shiftKey &&
3670
- * !click.altKey;
3671
- * if (!isPlainClick) {
3672
- * return;
3673
- * }
3674
- * click.preventDefault();
3675
- * router.navigate(event.detail.id);
3676
- * }
3677
- * ```
3619
+ * It does not block the rest of the page. Place it in an element with
3620
+ * `position: relative`.
3621
+ * The panel has:
3622
+ * - a toolbar with a close button, and buttons from `actions`
3623
+ * - a header that shows the last entry of `stack`, with a slot for controls
3624
+ * - backs behind its left edge, for the other entries of `stack`
3625
+ * - a handle on its left edge, to resize the panel
3626
+ * - a full screen mode, for small screens
3627
+ * The panel emits `close`, but does not remove itself. The consumer must
3628
+ * remove it from the DOM.
3629
+ * Each example shows one feature in detail, and when to use it.
3678
3630
  * @exampleComponent limel-example-side-panel-basic
3679
3631
  * @exampleComponent limel-example-side-panel-insets
3680
3632
  * @exampleComponent limel-example-side-panel-escape
3681
3633
  * @exampleComponent limel-example-side-panel-actions
3682
3634
  * @exampleComponent limel-example-side-panel-header-actions
3635
+ * @exampleComponent limel-example-side-panel-stacking
3636
+ * @exampleComponent limel-example-side-panel-full-screen
3683
3637
  * @private
3684
3638
  */
3685
3639
  interface LimelSidePanel {
@@ -3698,6 +3652,11 @@ export namespace Components {
3698
3652
  * @default true
3699
3653
  */
3700
3654
  "closeOnEscape": boolean;
3655
+ /**
3656
+ * Set to `true` when the screen is too narrow for the panel to be displayed on top of the page. The panel then covers the full width of the positioned ancestor. It cannot be resized, and the backs of the stack are not shown.
3657
+ * @default false
3658
+ */
3659
+ "fullScreen": boolean;
3701
3660
  /**
3702
3661
  * Accessible name of the panel. Screen readers announce it. Set it to something that tells the user what the panel is for.
3703
3662
  */
@@ -3708,7 +3667,7 @@ export namespace Components {
3708
3667
  */
3709
3668
  "resizeLabel": string;
3710
3669
  /**
3711
- * The panels in the stack, outermost first. The last entry is the panel that is displayed. Its heading, subheading and icon are shown in the header.
3670
+ * The panels in the stack, outermost first. The last entry is the panel that is displayed. Its heading, subheading and icon are shown in the header. The other entries are shown as backs behind the panel.
3712
3671
  * @default []
3713
3672
  */
3714
3673
  "stack": SidePanelEntry[];
@@ -6664,73 +6623,28 @@ declare global {
6664
6623
  "close": void;
6665
6624
  "selectAction": SidePanelActionSelect;
6666
6625
  "changeWidth": number;
6626
+ "selectStackEntry": number;
6667
6627
  }
6668
6628
  /**
6669
6629
  * A resizable panel that is displayed on top of the right side of the page.
6670
- * The content is placed in the default slot, below a toolbar and a header.
6671
- * The panel is positioned relative to its nearest positioned ancestor. Set
6672
- * `position: relative` on that element. Use `--side-panel-top-inset`,
6673
- * `--side-panel-right-inset` and `--side-panel-bottom-inset` to keep parts of
6674
- * that element visible, for example a header.
6675
- * The CSS custom properties can be set on the panel or on any ancestor.
6676
- * The panel is a dialog that does not block the rest of the page. Set `label`
6677
- * to give it an accessible name, which screen readers announce. When the panel
6678
- * opens, focus moves into it. When the panel is removed, focus returns to the
6679
- * element that had it before, unless focus is somewhere else by then.
6680
- * The panel emits `close` when the user clicks the close button, or presses
6681
- * Escape. It does not remove itself. The consumer must remove it from the DOM.
6682
- * The user can resize the panel by dragging its left edge, or with the arrow
6683
- * keys. The panel emits `changeWidth` when a resize is finished.
6684
- * See the examples for how closing and resizing work in detail.
6685
- * ## Header
6686
- * The header shows the heading, subheading and icon of the last entry in
6687
- * `stack`. When the entry has a `color`, the header gets that background color,
6688
- * and the headings are white with a text shadow. When `stack` is empty, the
6689
- * panel has no header.
6690
- * Put controls for the header, for example a follow button or a menu, in the
6691
- * `header-actions` slot. They are shown at the right end of the header. When
6692
- * `stack` is empty, there is no header, and the slot content is not shown.
6693
- * The slot is for small controls. It is at most half as wide as the header,
6694
- * and at most as tall as the heading and subheading together. Larger content
6695
- * is cut off, so that the header keeps its size.
6696
- * The slot content is not tied to an entry in `stack`. When the last entry
6697
- * changes, the consumer must also change the slot content.
6698
- * The slot content keeps its own colors. Use `--side-panel-header-text-color`
6699
- * to match the text color of the header. It is white when the header has a
6700
- * `color`. It can also be used as the `color` of an `Icon`.
6701
- * ## Actions
6702
- * The toolbar has a close button on the left. Other buttons are set with
6703
- * `actions`, and are shown on the right. The `type` of an action decides its
6704
- * icon. When the user clicks an action, the panel emits `selectAction` with the
6705
- * `id` of the action and the click event. The consumer decides what the action
6706
- * does.
6707
- * An action with an `href` is a link, so the user can open it in a new tab.
6708
- * To handle the navigation in another way, for example with the router of the
6709
- * application, call `preventDefault` on the click event in `selectAction`. Do
6710
- * this only for a plain click with the primary button. Let the browser handle
6711
- * all other clicks, so that Ctrl-click and Cmd-click still open the link in a
6712
- * new tab:
6713
- * ```ts
6714
- * function handleSelectAction(event: CustomEvent<SidePanelActionSelect>) {
6715
- * const click = event.detail.event;
6716
- * const isPlainClick =
6717
- * click.button === 0 &&
6718
- * !click.metaKey &&
6719
- * !click.ctrlKey &&
6720
- * !click.shiftKey &&
6721
- * !click.altKey;
6722
- * if (!isPlainClick) {
6723
- * return;
6724
- * }
6725
- * click.preventDefault();
6726
- * router.navigate(event.detail.id);
6727
- * }
6728
- * ```
6630
+ * It does not block the rest of the page. Place it in an element with
6631
+ * `position: relative`.
6632
+ * The panel has:
6633
+ * - a toolbar with a close button, and buttons from `actions`
6634
+ * - a header that shows the last entry of `stack`, with a slot for controls
6635
+ * - backs behind its left edge, for the other entries of `stack`
6636
+ * - a handle on its left edge, to resize the panel
6637
+ * - a full screen mode, for small screens
6638
+ * The panel emits `close`, but does not remove itself. The consumer must
6639
+ * remove it from the DOM.
6640
+ * Each example shows one feature in detail, and when to use it.
6729
6641
  * @exampleComponent limel-example-side-panel-basic
6730
6642
  * @exampleComponent limel-example-side-panel-insets
6731
6643
  * @exampleComponent limel-example-side-panel-escape
6732
6644
  * @exampleComponent limel-example-side-panel-actions
6733
6645
  * @exampleComponent limel-example-side-panel-header-actions
6646
+ * @exampleComponent limel-example-side-panel-stacking
6647
+ * @exampleComponent limel-example-side-panel-full-screen
6734
6648
  * @private
6735
6649
  */
6736
6650
  interface HTMLLimelSidePanelElement extends Components.LimelSidePanel, HTMLStencilElement {
@@ -10946,70 +10860,24 @@ declare namespace LocalJSX {
10946
10860
  }
10947
10861
  /**
10948
10862
  * A resizable panel that is displayed on top of the right side of the page.
10949
- * The content is placed in the default slot, below a toolbar and a header.
10950
- * The panel is positioned relative to its nearest positioned ancestor. Set
10951
- * `position: relative` on that element. Use `--side-panel-top-inset`,
10952
- * `--side-panel-right-inset` and `--side-panel-bottom-inset` to keep parts of
10953
- * that element visible, for example a header.
10954
- * The CSS custom properties can be set on the panel or on any ancestor.
10955
- * The panel is a dialog that does not block the rest of the page. Set `label`
10956
- * to give it an accessible name, which screen readers announce. When the panel
10957
- * opens, focus moves into it. When the panel is removed, focus returns to the
10958
- * element that had it before, unless focus is somewhere else by then.
10959
- * The panel emits `close` when the user clicks the close button, or presses
10960
- * Escape. It does not remove itself. The consumer must remove it from the DOM.
10961
- * The user can resize the panel by dragging its left edge, or with the arrow
10962
- * keys. The panel emits `changeWidth` when a resize is finished.
10963
- * See the examples for how closing and resizing work in detail.
10964
- * ## Header
10965
- * The header shows the heading, subheading and icon of the last entry in
10966
- * `stack`. When the entry has a `color`, the header gets that background color,
10967
- * and the headings are white with a text shadow. When `stack` is empty, the
10968
- * panel has no header.
10969
- * Put controls for the header, for example a follow button or a menu, in the
10970
- * `header-actions` slot. They are shown at the right end of the header. When
10971
- * `stack` is empty, there is no header, and the slot content is not shown.
10972
- * The slot is for small controls. It is at most half as wide as the header,
10973
- * and at most as tall as the heading and subheading together. Larger content
10974
- * is cut off, so that the header keeps its size.
10975
- * The slot content is not tied to an entry in `stack`. When the last entry
10976
- * changes, the consumer must also change the slot content.
10977
- * The slot content keeps its own colors. Use `--side-panel-header-text-color`
10978
- * to match the text color of the header. It is white when the header has a
10979
- * `color`. It can also be used as the `color` of an `Icon`.
10980
- * ## Actions
10981
- * The toolbar has a close button on the left. Other buttons are set with
10982
- * `actions`, and are shown on the right. The `type` of an action decides its
10983
- * icon. When the user clicks an action, the panel emits `selectAction` with the
10984
- * `id` of the action and the click event. The consumer decides what the action
10985
- * does.
10986
- * An action with an `href` is a link, so the user can open it in a new tab.
10987
- * To handle the navigation in another way, for example with the router of the
10988
- * application, call `preventDefault` on the click event in `selectAction`. Do
10989
- * this only for a plain click with the primary button. Let the browser handle
10990
- * all other clicks, so that Ctrl-click and Cmd-click still open the link in a
10991
- * new tab:
10992
- * ```ts
10993
- * function handleSelectAction(event: CustomEvent<SidePanelActionSelect>) {
10994
- * const click = event.detail.event;
10995
- * const isPlainClick =
10996
- * click.button === 0 &&
10997
- * !click.metaKey &&
10998
- * !click.ctrlKey &&
10999
- * !click.shiftKey &&
11000
- * !click.altKey;
11001
- * if (!isPlainClick) {
11002
- * return;
11003
- * }
11004
- * click.preventDefault();
11005
- * router.navigate(event.detail.id);
11006
- * }
11007
- * ```
10863
+ * It does not block the rest of the page. Place it in an element with
10864
+ * `position: relative`.
10865
+ * The panel has:
10866
+ * - a toolbar with a close button, and buttons from `actions`
10867
+ * - a header that shows the last entry of `stack`, with a slot for controls
10868
+ * - backs behind its left edge, for the other entries of `stack`
10869
+ * - a handle on its left edge, to resize the panel
10870
+ * - a full screen mode, for small screens
10871
+ * The panel emits `close`, but does not remove itself. The consumer must
10872
+ * remove it from the DOM.
10873
+ * Each example shows one feature in detail, and when to use it.
11008
10874
  * @exampleComponent limel-example-side-panel-basic
11009
10875
  * @exampleComponent limel-example-side-panel-insets
11010
10876
  * @exampleComponent limel-example-side-panel-escape
11011
10877
  * @exampleComponent limel-example-side-panel-actions
11012
10878
  * @exampleComponent limel-example-side-panel-header-actions
10879
+ * @exampleComponent limel-example-side-panel-stacking
10880
+ * @exampleComponent limel-example-side-panel-full-screen
11013
10881
  * @private
11014
10882
  */
11015
10883
  interface LimelSidePanel {
@@ -11028,6 +10896,11 @@ declare namespace LocalJSX {
11028
10896
  * @default true
11029
10897
  */
11030
10898
  "closeOnEscape"?: boolean;
10899
+ /**
10900
+ * Set to `true` when the screen is too narrow for the panel to be displayed on top of the page. The panel then covers the full width of the positioned ancestor. It cannot be resized, and the backs of the stack are not shown.
10901
+ * @default false
10902
+ */
10903
+ "fullScreen"?: boolean;
11031
10904
  /**
11032
10905
  * Accessible name of the panel. Screen readers announce it. Set it to something that tells the user what the panel is for.
11033
10906
  */
@@ -11044,13 +10917,17 @@ declare namespace LocalJSX {
11044
10917
  * Emitted when an action in the toolbar is clicked. The detail has the `id` of the action, or its `type` if it has no `id`, and the click event.
11045
10918
  */
11046
10919
  "onSelectAction"?: (event: LimelSidePanelCustomEvent<SidePanelActionSelect>) => void;
10920
+ /**
10921
+ * Emitted when a back of the stack is clicked. The detail is the index of its entry in `stack`.
10922
+ */
10923
+ "onSelectStackEntry"?: (event: LimelSidePanelCustomEvent<number>) => void;
11047
10924
  /**
11048
10925
  * Label of the resize handle. Used as the accessible name.
11049
10926
  * @default 'Resize'
11050
10927
  */
11051
10928
  "resizeLabel"?: string;
11052
10929
  /**
11053
- * The panels in the stack, outermost first. The last entry is the panel that is displayed. Its heading, subheading and icon are shown in the header.
10930
+ * The panels in the stack, outermost first. The last entry is the panel that is displayed. Its heading, subheading and icon are shown in the header. The other entries are shown as backs behind the panel.
11054
10931
  * @default []
11055
10932
  */
11056
10933
  "stack"?: SidePanelEntry[];
@@ -12335,6 +12212,7 @@ declare namespace LocalJSX {
12335
12212
  "closeLabel": string;
12336
12213
  "resizeLabel": string;
12337
12214
  "closeOnEscape": boolean;
12215
+ "fullScreen": boolean;
12338
12216
  }
12339
12217
  interface LimelSliderAttributes {
12340
12218
  "disabled": boolean;
@@ -13789,70 +13667,24 @@ declare module "@stencil/core" {
13789
13667
  "limel-shortcut": LocalJSX.IntrinsicElements["limel-shortcut"] & JSXBase.HTMLAttributes<HTMLLimelShortcutElement>;
13790
13668
  /**
13791
13669
  * A resizable panel that is displayed on top of the right side of the page.
13792
- * The content is placed in the default slot, below a toolbar and a header.
13793
- * The panel is positioned relative to its nearest positioned ancestor. Set
13794
- * `position: relative` on that element. Use `--side-panel-top-inset`,
13795
- * `--side-panel-right-inset` and `--side-panel-bottom-inset` to keep parts of
13796
- * that element visible, for example a header.
13797
- * The CSS custom properties can be set on the panel or on any ancestor.
13798
- * The panel is a dialog that does not block the rest of the page. Set `label`
13799
- * to give it an accessible name, which screen readers announce. When the panel
13800
- * opens, focus moves into it. When the panel is removed, focus returns to the
13801
- * element that had it before, unless focus is somewhere else by then.
13802
- * The panel emits `close` when the user clicks the close button, or presses
13803
- * Escape. It does not remove itself. The consumer must remove it from the DOM.
13804
- * The user can resize the panel by dragging its left edge, or with the arrow
13805
- * keys. The panel emits `changeWidth` when a resize is finished.
13806
- * See the examples for how closing and resizing work in detail.
13807
- * ## Header
13808
- * The header shows the heading, subheading and icon of the last entry in
13809
- * `stack`. When the entry has a `color`, the header gets that background color,
13810
- * and the headings are white with a text shadow. When `stack` is empty, the
13811
- * panel has no header.
13812
- * Put controls for the header, for example a follow button or a menu, in the
13813
- * `header-actions` slot. They are shown at the right end of the header. When
13814
- * `stack` is empty, there is no header, and the slot content is not shown.
13815
- * The slot is for small controls. It is at most half as wide as the header,
13816
- * and at most as tall as the heading and subheading together. Larger content
13817
- * is cut off, so that the header keeps its size.
13818
- * The slot content is not tied to an entry in `stack`. When the last entry
13819
- * changes, the consumer must also change the slot content.
13820
- * The slot content keeps its own colors. Use `--side-panel-header-text-color`
13821
- * to match the text color of the header. It is white when the header has a
13822
- * `color`. It can also be used as the `color` of an `Icon`.
13823
- * ## Actions
13824
- * The toolbar has a close button on the left. Other buttons are set with
13825
- * `actions`, and are shown on the right. The `type` of an action decides its
13826
- * icon. When the user clicks an action, the panel emits `selectAction` with the
13827
- * `id` of the action and the click event. The consumer decides what the action
13828
- * does.
13829
- * An action with an `href` is a link, so the user can open it in a new tab.
13830
- * To handle the navigation in another way, for example with the router of the
13831
- * application, call `preventDefault` on the click event in `selectAction`. Do
13832
- * this only for a plain click with the primary button. Let the browser handle
13833
- * all other clicks, so that Ctrl-click and Cmd-click still open the link in a
13834
- * new tab:
13835
- * ```ts
13836
- * function handleSelectAction(event: CustomEvent<SidePanelActionSelect>) {
13837
- * const click = event.detail.event;
13838
- * const isPlainClick =
13839
- * click.button === 0 &&
13840
- * !click.metaKey &&
13841
- * !click.ctrlKey &&
13842
- * !click.shiftKey &&
13843
- * !click.altKey;
13844
- * if (!isPlainClick) {
13845
- * return;
13846
- * }
13847
- * click.preventDefault();
13848
- * router.navigate(event.detail.id);
13849
- * }
13850
- * ```
13670
+ * It does not block the rest of the page. Place it in an element with
13671
+ * `position: relative`.
13672
+ * The panel has:
13673
+ * - a toolbar with a close button, and buttons from `actions`
13674
+ * - a header that shows the last entry of `stack`, with a slot for controls
13675
+ * - backs behind its left edge, for the other entries of `stack`
13676
+ * - a handle on its left edge, to resize the panel
13677
+ * - a full screen mode, for small screens
13678
+ * The panel emits `close`, but does not remove itself. The consumer must
13679
+ * remove it from the DOM.
13680
+ * Each example shows one feature in detail, and when to use it.
13851
13681
  * @exampleComponent limel-example-side-panel-basic
13852
13682
  * @exampleComponent limel-example-side-panel-insets
13853
13683
  * @exampleComponent limel-example-side-panel-escape
13854
13684
  * @exampleComponent limel-example-side-panel-actions
13855
13685
  * @exampleComponent limel-example-side-panel-header-actions
13686
+ * @exampleComponent limel-example-side-panel-stacking
13687
+ * @exampleComponent limel-example-side-panel-full-screen
13856
13688
  * @private
13857
13689
  */
13858
13690
  "limel-side-panel": LocalJSX.IntrinsicElements["limel-side-panel"] & JSXBase.HTMLAttributes<HTMLLimelSidePanelElement>;
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Focuses the first focusable element inside a trigger element.
3
- * Supports custom elements by searching both the element's shadow root
4
- * and its light DOM.
2
+ * Focuses a trigger element, or the first focusable element inside it if the
3
+ * trigger can not take focus itself. Supports custom elements by searching
4
+ * both the element's shadow root and its light DOM.
5
5
  *
6
6
  * @param trigger - The trigger element to focus.
7
- * @returns `true` if focus was moved, otherwise `false`.
7
+ * @returns `false` if there is no trigger, or it is disabled. Otherwise `true`.
8
8
  */
9
9
  export declare const focusTriggerElement: (trigger?: HTMLElement | null) => boolean;
10
10
  //# sourceMappingURL=focus-trigger-element.d.ts.map
@@ -1,14 +1,26 @@
1
1
  /**
2
- * Get the element that a screen reader describes for the owner element of a
3
- * tooltip. That is the owner itself if it can be focused, otherwise the first
4
- * element that can be focused inside it, also inside shadow roots. A disabled
5
- * control is only used when there is nothing that can be focused, and if
6
- * there is no control at all, the owner itself is used.
2
+ * Get the element that gets the focus when a user moves to `owner`. That is
3
+ * the owner itself if it can be focused, otherwise the first element that can
4
+ * be focused inside it, also inside shadow roots. A disabled control is only
5
+ * used when there is nothing that can be focused, and if there is no control
6
+ * at all, the owner itself is used.
7
7
  *
8
8
  * An element that passes the focus on to an element in its shadow root is
9
- * never used itself, since the screen reader lands on the element inside.
9
+ * never used itself, since the focus lands on the element inside.
10
10
  *
11
+ * Waits for the components in the way to render, so use this for an owner
12
+ * that may not have rendered yet.
13
+ *
14
+ * @see findFocusTarget for an owner that has already rendered
11
15
  * @param owner
12
16
  */
13
17
  export declare function getFocusTarget(owner: HTMLElement): Promise<HTMLElement>;
18
+ /**
19
+ * Same as `getFocusTarget`, for an owner that has already rendered, without
20
+ * waiting for any component.
21
+ *
22
+ * @see getFocusTarget for an owner that may not have rendered yet
23
+ * @param owner
24
+ */
25
+ export declare function findFocusTarget(owner: HTMLElement): HTMLElement;
14
26
  //# sourceMappingURL=get-focus-target.d.ts.map