@4sh/ui-kit 0.15.0 → 0.17.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.
- package/README.fr.md +18 -10
- package/README.md +18 -10
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -953
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2039
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
- package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -130
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -246
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -291
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -194
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -131
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms.mjs +723 -596
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
- package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
- package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
- package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
- package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-types.mjs +0 -12
- package/fesm2022/4sh-ui-kit.mjs +3 -15
- package/fesm2022/4sh-ui-kit.mjs.map +1 -1
- package/mcp/data/component-api.json +313 -2
- package/mcp/data/text-search-docs.json +177 -17
- package/mcp/data/ui-config.json +378 -1
- package/mcp/index.js +8190 -2876
- package/mcp/package.json +1 -1
- package/package.json +5 -1
- package/styles/component-vars.scss +22 -1
- package/styles/utils/_mixins.scss +11 -0
- package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
- package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
- package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
- package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
- package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
- package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
- package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +577 -367
- package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
- package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
- package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
- package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
- package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
- package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
- package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
- package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
- package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -57
- package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -93
- package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -100
- package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
- package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -116
- package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
- package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
- package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
- package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
- package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
- package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
- package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
- package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
- package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
- package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -54
- package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
- package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
- package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
- package/types/4sh-ui-kit-forms.d.ts +291 -186
- package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
- package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
- package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
- package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
- package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
- package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
- package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
- package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
- package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
- package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
- package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
- package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
- package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
- package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
- package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
- package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
- package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
- package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
- package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
- package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
- package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
- package/types/4sh-ui-kit-motion.d.ts +117 -67
- package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
- package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
- package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
- package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
- package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
- package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
- package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
- package/types/4sh-ui-kit-overlay.d.ts +6 -6
- package/types/4sh-ui-kit-ripple.d.ts +99 -74
- package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
- package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
- package/types/4sh-ui-kit-theming.d.ts +27 -29
- package/types/4sh-ui-kit-types.d.ts +6 -5
- package/types/4sh-ui-kit.d.ts +4 -3
- package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
|
@@ -1,276 +1,711 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { DOCUMENT,
|
|
4
|
-
import * as i1 from
|
|
5
|
-
import { A11yModule } from
|
|
6
|
-
import { UiMotion } from
|
|
7
|
-
import { UiIcon } from
|
|
8
|
-
import { lockBodyScroll, unlockBodyScroll } from
|
|
9
|
-
|
|
10
|
-
/** Base stacking level — mirrors `$drawer-z-index` in the SCSS. */
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, DestroyRef, PLATFORM_ID, booleanAttribute, computed, contentChild, effect, inject, input, isDevMode, model, numberAttribute, output, untracked, viewChild } from "@angular/core";
|
|
3
|
+
import { DOCUMENT, NgTemplateOutlet, isPlatformBrowser } from "@angular/common";
|
|
4
|
+
import * as i1 from "@angular/cdk/a11y";
|
|
5
|
+
import { A11yModule } from "@angular/cdk/a11y";
|
|
6
|
+
import { UiMotion } from "@4sh/ui-kit/motion";
|
|
7
|
+
import { UiIcon } from "@4sh/ui-kit/base/ui-icon";
|
|
8
|
+
import { lockBodyScroll, unlockBodyScroll } from "@4sh/ui-kit/overlay";
|
|
11
9
|
const DRAWER_BASE_Z_INDEX = 1100;
|
|
12
|
-
/** Process-wide sequence so `autoZIndex` layers a later drawer above earlier ones. */
|
|
13
10
|
let zIndexSeq = 0;
|
|
14
|
-
/** Process-wide unique id source (aria wiring). */
|
|
15
11
|
let nextUid = 0;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: UiDrawer, isStandalone: true, selector: "ui-drawer", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, fullScreen: { classPropertyName: "fullScreen", publicName: "fullScreen", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, dismissableMask: { classPropertyName: "dismissableMask", publicName: "dismissableMask", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, blockScroll: { classPropertyName: "blockScroll", publicName: "blockScroll", isSignal: true, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: true, isRequired: false, transformFunction: null }, focusOnShow: { classPropertyName: "focusOnShow", publicName: "focusOnShow", isSignal: true, isRequired: false, transformFunction: null }, focusTrap: { classPropertyName: "focusTrap", publicName: "focusTrap", isSignal: true, isRequired: false, transformFunction: null }, closeIcon: { classPropertyName: "closeIcon", publicName: "closeIcon", isSignal: true, isRequired: false, transformFunction: null }, closeAriaLabel: { classPropertyName: "closeAriaLabel", publicName: "closeAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, maskStyleClass: { classPropertyName: "maskStyleClass", publicName: "maskStyleClass", isSignal: true, isRequired: false, transformFunction: null }, drawerStyle: { classPropertyName: "drawerStyle", publicName: "drawerStyle", isSignal: true, isRequired: false, transformFunction: null }, contained: { classPropertyName: "contained", publicName: "contained", isSignal: true, isRequired: false, transformFunction: null }, autoZIndex: { classPropertyName: "autoZIndex", publicName: "autoZIndex", isSignal: true, isRequired: false, transformFunction: null }, baseZIndex: { classPropertyName: "baseZIndex", publicName: "baseZIndex", isSignal: true, isRequired: false, transformFunction: null }, motionDisabled: { classPropertyName: "motionDisabled", publicName: "motionDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", shown: "shown", hidden: "hidden" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "closeIconTemplate", first: true, predicate: ["closeicon"], descendants: true, isSignal: true }, { propertyName: "headlessTemplate", first: true, predicate: ["headless"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "scrimRef", first: true, predicate: ["scrim"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (visible()) {\n <!-- Scrim + positioner are SIBLINGS (both direct @if children) so each animates its own\n leave independently \u2014 a nested animated element would deadlock the removal.\n The positioner carries the directional slide; the panel inside owns sizing/surface. -->\n @if (modal()) {\n <div\n #scrim\n class=\"ui-drawer-scrim\"\n [class._contained]=\"contained()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"'fade'\"\n [motionDisabled]=\"motionDisabled()\"\n #scrimMotion=\"uiMotion\"\n [animate.enter]=\"scrimMotion.enter()\"\n [animate.leave]=\"scrimMotion.leave()\"\n (pointerdown)=\"onMaskPointerdown($event)\"\n ></div>\n }\n\n <!-- Dialog: Escape/Tab handled on the container, focus lives in the\n content (CDK focus-trap). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"ui-drawer-positioner\"\n [class._left]=\"position() === 'left'\"\n [class._right]=\"position() === 'right'\"\n [class._top]=\"position() === 'top'\"\n [class._bottom]=\"position() === 'bottom'\"\n [class._full-screen]=\"fullScreen()\"\n [class._contained]=\"contained()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"motionPreset()\"\n [motionDistance]=\"motionDistance()\"\n [motionDisabled]=\"motionDisabled()\"\n #posMotion=\"uiMotion\"\n [animate.enter]=\"posMotion.enter()\"\n [animate.leave]=\"posMotion.leave()\"\n (keydown)=\"onKeydown($event)\"\n >\n <div\n #panel\n [class]=\"'ui-drawer' + (styleClass() ? ' ' + styleClass() : '')\"\n [attr.role]=\"role()\"\n [attr.aria-modal]=\"modal() ? 'true' : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n tabindex=\"-1\"\n [style]=\"drawerStyle()\"\n [cdkTrapFocus]=\"focusTrap()\"\n [cdkTrapFocusAutoCapture]=\"focusOnShow()\"\n >\n @if (headlessTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n @if (showHeader()) {\n <div class=\"ui-drawer-header\">\n <div [attr.id]=\"titleId\" class=\"ui-drawer-title\">\n @if (headerTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ header() }}\n }\n </div>\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-drawer-action\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"close()\"\n >\n @if (closeIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon [name]=\"closeIcon()\" size=\"sm\" />\n }\n </button>\n }\n </div>\n }\n\n <!-- Body: long content scrolls inside this region. -->\n <div class=\"ui-drawer-content\">\n <ng-content />\n </div>\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-drawer-footer\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n }\n </div>\n </div>\n}\n", styles: [".ui-drawer-scrim{position:fixed;inset:0;z-index:var(--ui-drawer-z-index, 1100);background-color:var(--ui-drawer-mask-background, var(--primitives-black-50))}.ui-drawer-scrim._contained{position:absolute}.ui-drawer-positioner{position:fixed;z-index:var(--ui-drawer-z-index, 1100);display:flex}.ui-drawer-positioner._left{inset-block:0;inset-inline-start:0}.ui-drawer-positioner._right{inset-block:0;inset-inline-end:0}.ui-drawer-positioner._top{inset-inline:0;inset-block-start:0}.ui-drawer-positioner._bottom{inset-inline:0;inset-block-end:0}.ui-drawer-positioner._full-screen{inset:0}.ui-drawer-positioner._contained{position:absolute}.ui-drawer{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--ui-drawer-surface, var(--global-background-default));color:var(--ui-drawer-color, var(--global-text-default));box-shadow:var(--shadow-default-lg);font-family:var(--ui-drawer-font-family, var(--fontfamily-base));outline:none}.ui-drawer-positioner._left .ui-drawer,.ui-drawer-positioner._right .ui-drawer{width:var(--ui-drawer-size-side, 20rem);max-width:100%;height:100%}.ui-drawer-positioner._top .ui-drawer,.ui-drawer-positioner._bottom .ui-drawer{width:100%;height:var(--ui-drawer-size-edge, 10rem);max-height:100%}.ui-drawer-positioner._full-screen .ui-drawer{width:100%;height:100%}.ui-drawer-positioner._left .ui-drawer{border-inline-end:var(--ui-drawer-stroke-width, var(--stroke-sm)) solid var(--ui-drawer-stroke, var(--global-border-subtle))}.ui-drawer-positioner._right .ui-drawer{border-inline-start:var(--ui-drawer-stroke-width, var(--stroke-sm)) solid var(--ui-drawer-stroke, var(--global-border-subtle))}.ui-drawer-positioner._top .ui-drawer{border-block-end:var(--ui-drawer-stroke-width, var(--stroke-sm)) solid var(--ui-drawer-stroke, var(--global-border-subtle))}.ui-drawer-positioner._bottom .ui-drawer{border-block-start:var(--ui-drawer-stroke-width, var(--stroke-sm)) solid var(--ui-drawer-stroke, var(--global-border-subtle))}.ui-drawer-positioner._full-screen .ui-drawer{border:none}.ui-drawer-header{flex:0 0 auto;display:flex;align-items:var(--ui-drawer-header-align, flex-start);gap:var(--ui-drawer-header-gap, var(--units-sm));padding:var(--ui-drawer-panel-padding, var(--units-lg)) var(--ui-drawer-panel-padding, var(--units-lg)) var(--units-sm)}.ui-drawer-title{flex:1 1 auto;min-width:0;font-family:var(--ui-drawer-title-font-family, var(--fontfamily-title));font-size:var(--size-typography-title-default);font-weight:var(--ui-drawer-weight, var(--weight-bold));line-height:1.3;overflow-wrap:break-word}.ui-drawer-action{flex:0 0 auto;display:inline-flex;align-items:center;align-self:var(--ui-drawer-action-align, auto);justify-content:center;width:var(--ui-drawer-action-size, 2rem);height:var(--ui-drawer-action-size, 2rem);padding:0;border:none;border-radius:var(--radius-xs);background:transparent;color:inherit;line-height:0;cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-drawer-action:hover{background-color:var(--ui-drawer-close-surface-hover, var(--global-background-muted-hover));color:var(--ui-drawer-close-color-hover, var(--global-text-muted-hover))}.ui-drawer-action:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-drawer-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-drawer-close-focus-ring-color, var(--global-border-focus))}@media(prefers-reduced-motion:reduce){.ui-drawer-action{transition-duration:.01ms}}:root[data-motion=off] .ui-drawer-action{transition-duration:.01ms}.ui-drawer-content{flex:1 1 auto;min-height:0;overflow-y:auto;padding:var(--ui-drawer-panel-padding, var(--units-lg));font-size:var(--size-typography-text-md);line-height:1.5}.ui-drawer-header+.ui-drawer-content{padding-top:0}.ui-drawer-footer{flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--units-sm);padding:var(--units-md) var(--ui-drawer-panel-padding, var(--units-lg)) var(--ui-drawer-panel-padding, var(--units-lg));border-top:var(--ui-drawer-stroke-width, var(--stroke-sm)) solid var(--ui-drawer-footer-stroke, var(--global-border-subtle))}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: UiMotion, selector: "[uiMotion]", inputs: ["uiMotion", "motionDuration", "motionDelay", "motionEasing", "motionEnterEasing", "motionLeaveEasing", "motionDistance", "motionScale", "motionDisabled", "motionOnInsert"], exportAs: ["uiMotion"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }] }); }
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
12
|
+
var UiDrawer = class UiDrawer {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.visible = model(false, ...ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []);
|
|
15
|
+
this.position = input("left", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
|
|
16
|
+
this.fullScreen = input(false, {
|
|
17
|
+
...ngDevMode ? { debugName: "fullScreen" } : /* istanbul ignore next */ {},
|
|
18
|
+
transform: booleanAttribute
|
|
19
|
+
});
|
|
20
|
+
this.header = input(...ngDevMode ? [void 0, { debugName: "header" }] : /* istanbul ignore next */ []);
|
|
21
|
+
this.role = input("dialog", ...ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []);
|
|
22
|
+
this.ariaLabel = input(...ngDevMode ? [void 0, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
23
|
+
this.ariaLabelledBy = input(...ngDevMode ? [void 0, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
|
|
24
|
+
this.modal = input(true, {
|
|
25
|
+
...ngDevMode ? { debugName: "modal" } : /* istanbul ignore next */ {},
|
|
26
|
+
transform: booleanAttribute
|
|
27
|
+
});
|
|
28
|
+
this.dismissableMask = input(true, {
|
|
29
|
+
...ngDevMode ? { debugName: "dismissableMask" } : /* istanbul ignore next */ {},
|
|
30
|
+
transform: booleanAttribute
|
|
31
|
+
});
|
|
32
|
+
this.closable = input(true, {
|
|
33
|
+
...ngDevMode ? { debugName: "closable" } : /* istanbul ignore next */ {},
|
|
34
|
+
transform: booleanAttribute
|
|
35
|
+
});
|
|
36
|
+
this.closeOnEscape = input(true, {
|
|
37
|
+
...ngDevMode ? { debugName: "closeOnEscape" } : /* istanbul ignore next */ {},
|
|
38
|
+
transform: booleanAttribute
|
|
39
|
+
});
|
|
40
|
+
this.blockScroll = input(false, {
|
|
41
|
+
...ngDevMode ? { debugName: "blockScroll" } : /* istanbul ignore next */ {},
|
|
42
|
+
transform: booleanAttribute
|
|
43
|
+
});
|
|
44
|
+
this.showHeader = input(true, {
|
|
45
|
+
...ngDevMode ? { debugName: "showHeader" } : /* istanbul ignore next */ {},
|
|
46
|
+
transform: booleanAttribute
|
|
47
|
+
});
|
|
48
|
+
this.focusOnShow = input(true, {
|
|
49
|
+
...ngDevMode ? { debugName: "focusOnShow" } : /* istanbul ignore next */ {},
|
|
50
|
+
transform: booleanAttribute
|
|
51
|
+
});
|
|
52
|
+
this.focusTrap = input(true, {
|
|
53
|
+
...ngDevMode ? { debugName: "focusTrap" } : /* istanbul ignore next */ {},
|
|
54
|
+
transform: booleanAttribute
|
|
55
|
+
});
|
|
56
|
+
this.closeIcon = input("xmark", ...ngDevMode ? [{ debugName: "closeIcon" }] : /* istanbul ignore next */ []);
|
|
57
|
+
this.closeAriaLabel = input("Fermer", ...ngDevMode ? [{ debugName: "closeAriaLabel" }] : /* istanbul ignore next */ []);
|
|
58
|
+
this.styleClass = input(...ngDevMode ? [void 0, { debugName: "styleClass" }] : /* istanbul ignore next */ []);
|
|
59
|
+
this.maskStyleClass = input(...ngDevMode ? [void 0, { debugName: "maskStyleClass" }] : /* istanbul ignore next */ []);
|
|
60
|
+
this.drawerStyle = input(...ngDevMode ? [void 0, { debugName: "drawerStyle" }] : /* istanbul ignore next */ []);
|
|
61
|
+
this.contained = input(false, {
|
|
62
|
+
...ngDevMode ? { debugName: "contained" } : /* istanbul ignore next */ {},
|
|
63
|
+
transform: booleanAttribute
|
|
64
|
+
});
|
|
65
|
+
this.autoZIndex = input(true, {
|
|
66
|
+
...ngDevMode ? { debugName: "autoZIndex" } : /* istanbul ignore next */ {},
|
|
67
|
+
transform: booleanAttribute
|
|
68
|
+
});
|
|
69
|
+
this.baseZIndex = input(0, {
|
|
70
|
+
...ngDevMode ? { debugName: "baseZIndex" } : /* istanbul ignore next */ {},
|
|
71
|
+
transform: numberAttribute
|
|
72
|
+
});
|
|
73
|
+
this.motionDisabled = input(false, {
|
|
74
|
+
...ngDevMode ? { debugName: "motionDisabled" } : /* istanbul ignore next */ {},
|
|
75
|
+
transform: booleanAttribute
|
|
76
|
+
});
|
|
77
|
+
this.headerTemplate = contentChild("header", ...ngDevMode ? [{ debugName: "headerTemplate" }] : /* istanbul ignore next */ []);
|
|
78
|
+
this.footerTemplate = contentChild("footer", ...ngDevMode ? [{ debugName: "footerTemplate" }] : /* istanbul ignore next */ []);
|
|
79
|
+
this.closeIconTemplate = contentChild("closeicon", ...ngDevMode ? [{ debugName: "closeIconTemplate" }] : /* istanbul ignore next */ []);
|
|
80
|
+
this.headlessTemplate = contentChild("headless", ...ngDevMode ? [{ debugName: "headlessTemplate" }] : /* istanbul ignore next */ []);
|
|
81
|
+
this.shown = output();
|
|
82
|
+
this.hidden = output();
|
|
83
|
+
this.panelRef = viewChild("panel", ...ngDevMode ? [{ debugName: "panelRef" }] : /* istanbul ignore next */ []);
|
|
84
|
+
this.scrimRef = viewChild("scrim", ...ngDevMode ? [{ debugName: "scrimRef" }] : /* istanbul ignore next */ []);
|
|
85
|
+
this.appliedMaskClasses = [];
|
|
86
|
+
this.document = inject(DOCUMENT);
|
|
87
|
+
this.isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
88
|
+
this.zSeq = ++zIndexSeq;
|
|
89
|
+
this.uid = `ui-drawer-${nextUid++}`;
|
|
90
|
+
this.titleId = `${this.uid}-title`;
|
|
91
|
+
this.locked = false;
|
|
92
|
+
this.zIndex = computed(() => {
|
|
93
|
+
const base = this.baseZIndex();
|
|
94
|
+
if (this.autoZIndex()) return DRAWER_BASE_Z_INDEX + base + this.zSeq;
|
|
95
|
+
return base > 0 ? base : DRAWER_BASE_Z_INDEX;
|
|
96
|
+
}, ...ngDevMode ? [{ debugName: "zIndex" }] : /* istanbul ignore next */ []);
|
|
97
|
+
this.motionPreset = computed(() => {
|
|
98
|
+
if (this.fullScreen()) return "fade";
|
|
99
|
+
switch (this.position()) {
|
|
100
|
+
case "right": return "slide-left";
|
|
101
|
+
case "top": return "slide-down";
|
|
102
|
+
case "bottom": return "slide-up";
|
|
103
|
+
default: return "slide-right";
|
|
104
|
+
}
|
|
105
|
+
}, ...ngDevMode ? [{ debugName: "motionPreset" }] : /* istanbul ignore next */ []);
|
|
106
|
+
this.motionDistance = computed(() => this.fullScreen() ? void 0 : "100%", ...ngDevMode ? [{ debugName: "motionDistance" }] : /* istanbul ignore next */ []);
|
|
107
|
+
this.labelledBy = computed(() => this.ariaLabelledBy() ?? (this.showHeader() && this.header() ? this.titleId : null), ...ngDevMode ? [{ debugName: "labelledBy" }] : /* istanbul ignore next */ []);
|
|
108
|
+
this.resolvedAriaLabel = computed(() => this.labelledBy() ? null : this.ariaLabel(), ...ngDevMode ? [{ debugName: "resolvedAriaLabel" }] : /* istanbul ignore next */ []);
|
|
109
|
+
const destroyRef = inject(DestroyRef);
|
|
110
|
+
let wasVisible = false;
|
|
111
|
+
effect(() => {
|
|
112
|
+
const v = this.visible();
|
|
113
|
+
untracked(() => {
|
|
114
|
+
if (v && !wasVisible) {
|
|
115
|
+
wasVisible = true;
|
|
116
|
+
if (this.isBrowser && !this.contained() && (this.modal() || this.blockScroll())) {
|
|
117
|
+
lockBodyScroll(this.document);
|
|
118
|
+
this.locked = true;
|
|
119
|
+
}
|
|
120
|
+
this.shown.emit();
|
|
121
|
+
} else if (!v && wasVisible) {
|
|
122
|
+
wasVisible = false;
|
|
123
|
+
this.releaseLock();
|
|
124
|
+
this.hidden.emit();
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
effect(() => {
|
|
129
|
+
const el = this.scrimRef()?.nativeElement;
|
|
130
|
+
const raw = this.maskStyleClass();
|
|
131
|
+
untracked(() => {
|
|
132
|
+
for (const c of this.appliedMaskClasses) el?.classList.remove(c);
|
|
133
|
+
this.appliedMaskClasses = el && raw ? raw.split(/\s+/).filter(Boolean) : [];
|
|
134
|
+
for (const c of this.appliedMaskClasses) el.classList.add(c);
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
if (isDevMode()) effect(() => {
|
|
138
|
+
if (this.visible() && !this.labelledBy() && !this.resolvedAriaLabel()) console.warn("[ui-drawer] Panel has no accessible name: provide `header`, `ariaLabel` or `ariaLabelledBy`.");
|
|
139
|
+
});
|
|
140
|
+
destroyRef.onDestroy(() => this.releaseLock());
|
|
141
|
+
}
|
|
142
|
+
close() {
|
|
143
|
+
this.visible.set(false);
|
|
144
|
+
}
|
|
145
|
+
focus() {
|
|
146
|
+
this.panelRef()?.nativeElement.focus();
|
|
147
|
+
}
|
|
148
|
+
onKeydown(event) {
|
|
149
|
+
if (event.key === "Escape" && this.closeOnEscape() && this.closable()) {
|
|
150
|
+
event.stopPropagation();
|
|
151
|
+
this.close();
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
onMaskPointerdown(event) {
|
|
155
|
+
if (!this.modal() || !this.dismissableMask() || !this.closable()) return;
|
|
156
|
+
if (event.target === event.currentTarget) this.close();
|
|
157
|
+
}
|
|
158
|
+
releaseLock() {
|
|
159
|
+
if (this.locked) {
|
|
160
|
+
unlockBodyScroll(this.document);
|
|
161
|
+
this.locked = false;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
static {
|
|
165
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
166
|
+
minVersion: "12.0.0",
|
|
167
|
+
version: "22.3.0",
|
|
168
|
+
ngImport: i0,
|
|
169
|
+
type: UiDrawer,
|
|
170
|
+
deps: [],
|
|
171
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
static {
|
|
175
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
176
|
+
minVersion: "17.0.0",
|
|
177
|
+
version: "22.3.0",
|
|
178
|
+
type: UiDrawer,
|
|
179
|
+
isStandalone: true,
|
|
180
|
+
selector: "ui-drawer",
|
|
181
|
+
inputs: {
|
|
182
|
+
visible: {
|
|
183
|
+
classPropertyName: "visible",
|
|
184
|
+
publicName: "visible",
|
|
185
|
+
isSignal: true,
|
|
186
|
+
isRequired: false,
|
|
187
|
+
transformFunction: null
|
|
188
|
+
},
|
|
189
|
+
position: {
|
|
190
|
+
classPropertyName: "position",
|
|
191
|
+
publicName: "position",
|
|
192
|
+
isSignal: true,
|
|
193
|
+
isRequired: false,
|
|
194
|
+
transformFunction: null
|
|
195
|
+
},
|
|
196
|
+
fullScreen: {
|
|
197
|
+
classPropertyName: "fullScreen",
|
|
198
|
+
publicName: "fullScreen",
|
|
199
|
+
isSignal: true,
|
|
200
|
+
isRequired: false,
|
|
201
|
+
transformFunction: null
|
|
202
|
+
},
|
|
203
|
+
header: {
|
|
204
|
+
classPropertyName: "header",
|
|
205
|
+
publicName: "header",
|
|
206
|
+
isSignal: true,
|
|
207
|
+
isRequired: false,
|
|
208
|
+
transformFunction: null
|
|
209
|
+
},
|
|
210
|
+
role: {
|
|
211
|
+
classPropertyName: "role",
|
|
212
|
+
publicName: "role",
|
|
213
|
+
isSignal: true,
|
|
214
|
+
isRequired: false,
|
|
215
|
+
transformFunction: null
|
|
216
|
+
},
|
|
217
|
+
ariaLabel: {
|
|
218
|
+
classPropertyName: "ariaLabel",
|
|
219
|
+
publicName: "ariaLabel",
|
|
220
|
+
isSignal: true,
|
|
221
|
+
isRequired: false,
|
|
222
|
+
transformFunction: null
|
|
223
|
+
},
|
|
224
|
+
ariaLabelledBy: {
|
|
225
|
+
classPropertyName: "ariaLabelledBy",
|
|
226
|
+
publicName: "ariaLabelledBy",
|
|
227
|
+
isSignal: true,
|
|
228
|
+
isRequired: false,
|
|
229
|
+
transformFunction: null
|
|
230
|
+
},
|
|
231
|
+
modal: {
|
|
232
|
+
classPropertyName: "modal",
|
|
233
|
+
publicName: "modal",
|
|
234
|
+
isSignal: true,
|
|
235
|
+
isRequired: false,
|
|
236
|
+
transformFunction: null
|
|
237
|
+
},
|
|
238
|
+
dismissableMask: {
|
|
239
|
+
classPropertyName: "dismissableMask",
|
|
240
|
+
publicName: "dismissableMask",
|
|
241
|
+
isSignal: true,
|
|
242
|
+
isRequired: false,
|
|
243
|
+
transformFunction: null
|
|
244
|
+
},
|
|
245
|
+
closable: {
|
|
246
|
+
classPropertyName: "closable",
|
|
247
|
+
publicName: "closable",
|
|
248
|
+
isSignal: true,
|
|
249
|
+
isRequired: false,
|
|
250
|
+
transformFunction: null
|
|
251
|
+
},
|
|
252
|
+
closeOnEscape: {
|
|
253
|
+
classPropertyName: "closeOnEscape",
|
|
254
|
+
publicName: "closeOnEscape",
|
|
255
|
+
isSignal: true,
|
|
256
|
+
isRequired: false,
|
|
257
|
+
transformFunction: null
|
|
258
|
+
},
|
|
259
|
+
blockScroll: {
|
|
260
|
+
classPropertyName: "blockScroll",
|
|
261
|
+
publicName: "blockScroll",
|
|
262
|
+
isSignal: true,
|
|
263
|
+
isRequired: false,
|
|
264
|
+
transformFunction: null
|
|
265
|
+
},
|
|
266
|
+
showHeader: {
|
|
267
|
+
classPropertyName: "showHeader",
|
|
268
|
+
publicName: "showHeader",
|
|
269
|
+
isSignal: true,
|
|
270
|
+
isRequired: false,
|
|
271
|
+
transformFunction: null
|
|
272
|
+
},
|
|
273
|
+
focusOnShow: {
|
|
274
|
+
classPropertyName: "focusOnShow",
|
|
275
|
+
publicName: "focusOnShow",
|
|
276
|
+
isSignal: true,
|
|
277
|
+
isRequired: false,
|
|
278
|
+
transformFunction: null
|
|
279
|
+
},
|
|
280
|
+
focusTrap: {
|
|
281
|
+
classPropertyName: "focusTrap",
|
|
282
|
+
publicName: "focusTrap",
|
|
283
|
+
isSignal: true,
|
|
284
|
+
isRequired: false,
|
|
285
|
+
transformFunction: null
|
|
286
|
+
},
|
|
287
|
+
closeIcon: {
|
|
288
|
+
classPropertyName: "closeIcon",
|
|
289
|
+
publicName: "closeIcon",
|
|
290
|
+
isSignal: true,
|
|
291
|
+
isRequired: false,
|
|
292
|
+
transformFunction: null
|
|
293
|
+
},
|
|
294
|
+
closeAriaLabel: {
|
|
295
|
+
classPropertyName: "closeAriaLabel",
|
|
296
|
+
publicName: "closeAriaLabel",
|
|
297
|
+
isSignal: true,
|
|
298
|
+
isRequired: false,
|
|
299
|
+
transformFunction: null
|
|
300
|
+
},
|
|
301
|
+
styleClass: {
|
|
302
|
+
classPropertyName: "styleClass",
|
|
303
|
+
publicName: "styleClass",
|
|
304
|
+
isSignal: true,
|
|
305
|
+
isRequired: false,
|
|
306
|
+
transformFunction: null
|
|
307
|
+
},
|
|
308
|
+
maskStyleClass: {
|
|
309
|
+
classPropertyName: "maskStyleClass",
|
|
310
|
+
publicName: "maskStyleClass",
|
|
311
|
+
isSignal: true,
|
|
312
|
+
isRequired: false,
|
|
313
|
+
transformFunction: null
|
|
314
|
+
},
|
|
315
|
+
drawerStyle: {
|
|
316
|
+
classPropertyName: "drawerStyle",
|
|
317
|
+
publicName: "drawerStyle",
|
|
318
|
+
isSignal: true,
|
|
319
|
+
isRequired: false,
|
|
320
|
+
transformFunction: null
|
|
321
|
+
},
|
|
322
|
+
contained: {
|
|
323
|
+
classPropertyName: "contained",
|
|
324
|
+
publicName: "contained",
|
|
325
|
+
isSignal: true,
|
|
326
|
+
isRequired: false,
|
|
327
|
+
transformFunction: null
|
|
328
|
+
},
|
|
329
|
+
autoZIndex: {
|
|
330
|
+
classPropertyName: "autoZIndex",
|
|
331
|
+
publicName: "autoZIndex",
|
|
332
|
+
isSignal: true,
|
|
333
|
+
isRequired: false,
|
|
334
|
+
transformFunction: null
|
|
335
|
+
},
|
|
336
|
+
baseZIndex: {
|
|
337
|
+
classPropertyName: "baseZIndex",
|
|
338
|
+
publicName: "baseZIndex",
|
|
339
|
+
isSignal: true,
|
|
340
|
+
isRequired: false,
|
|
341
|
+
transformFunction: null
|
|
342
|
+
},
|
|
343
|
+
motionDisabled: {
|
|
344
|
+
classPropertyName: "motionDisabled",
|
|
345
|
+
publicName: "motionDisabled",
|
|
346
|
+
isSignal: true,
|
|
347
|
+
isRequired: false,
|
|
348
|
+
transformFunction: null
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
outputs: {
|
|
352
|
+
visible: "visibleChange",
|
|
353
|
+
shown: "shown",
|
|
354
|
+
hidden: "hidden"
|
|
355
|
+
},
|
|
356
|
+
queries: [
|
|
357
|
+
{
|
|
358
|
+
propertyName: "headerTemplate",
|
|
359
|
+
first: true,
|
|
360
|
+
predicate: ["header"],
|
|
361
|
+
descendants: true,
|
|
362
|
+
isSignal: true
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
propertyName: "footerTemplate",
|
|
366
|
+
first: true,
|
|
367
|
+
predicate: ["footer"],
|
|
368
|
+
descendants: true,
|
|
369
|
+
isSignal: true
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
propertyName: "closeIconTemplate",
|
|
373
|
+
first: true,
|
|
374
|
+
predicate: ["closeicon"],
|
|
375
|
+
descendants: true,
|
|
376
|
+
isSignal: true
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
propertyName: "headlessTemplate",
|
|
380
|
+
first: true,
|
|
381
|
+
predicate: ["headless"],
|
|
382
|
+
descendants: true,
|
|
383
|
+
isSignal: true
|
|
384
|
+
}
|
|
385
|
+
],
|
|
386
|
+
viewQueries: [{
|
|
387
|
+
propertyName: "panelRef",
|
|
388
|
+
first: true,
|
|
389
|
+
predicate: ["panel"],
|
|
390
|
+
descendants: true,
|
|
391
|
+
isSignal: true
|
|
392
|
+
}, {
|
|
393
|
+
propertyName: "scrimRef",
|
|
394
|
+
first: true,
|
|
395
|
+
predicate: ["scrim"],
|
|
396
|
+
descendants: true,
|
|
397
|
+
isSignal: true
|
|
398
|
+
}],
|
|
399
|
+
ngImport: i0,
|
|
400
|
+
template: "@if (visible()) {\n <!-- Scrim + positioner are SIBLINGS (both direct @if children) so each animates its own\n leave independently — a nested animated element would deadlock the removal.\n The positioner carries the directional slide; the panel inside owns sizing/surface. -->\n @if (modal()) {\n <div\n #scrim\n class=\"ui-drawer-scrim\"\n [class._contained]=\"contained()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"'fade'\"\n [motionDisabled]=\"motionDisabled()\"\n #scrimMotion=\"uiMotion\"\n [animate.enter]=\"scrimMotion.enter()\"\n [animate.leave]=\"scrimMotion.leave()\"\n (pointerdown)=\"onMaskPointerdown($event)\"\n ></div>\n }\n\n <!-- Dialog: Escape/Tab handled on the container, focus lives in the\n content (CDK focus-trap). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"ui-drawer-positioner\"\n [class._left]=\"position() === 'left'\"\n [class._right]=\"position() === 'right'\"\n [class._top]=\"position() === 'top'\"\n [class._bottom]=\"position() === 'bottom'\"\n [class._full-screen]=\"fullScreen()\"\n [class._contained]=\"contained()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"motionPreset()\"\n [motionDistance]=\"motionDistance()\"\n [motionDisabled]=\"motionDisabled()\"\n #posMotion=\"uiMotion\"\n [animate.enter]=\"posMotion.enter()\"\n [animate.leave]=\"posMotion.leave()\"\n (keydown)=\"onKeydown($event)\"\n >\n <div\n #panel\n [class]=\"'ui-drawer' + (styleClass() ? ' ' + styleClass() : '')\"\n [attr.role]=\"role()\"\n [attr.aria-modal]=\"modal() ? 'true' : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n tabindex=\"-1\"\n [style]=\"drawerStyle()\"\n [cdkTrapFocus]=\"focusTrap()\"\n [cdkTrapFocusAutoCapture]=\"focusOnShow()\"\n >\n @if (headlessTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n @if (showHeader()) {\n <div class=\"ui-drawer-header\">\n <div [attr.id]=\"titleId\" class=\"ui-drawer-title\">\n @if (headerTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ header() }}\n }\n </div>\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-drawer-action\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"close()\"\n >\n @if (closeIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon [name]=\"closeIcon()\" size=\"sm\" />\n }\n </button>\n }\n </div>\n }\n\n <!-- Body: long content scrolls inside this region. -->\n <div class=\"ui-drawer-content\">\n <ng-content />\n </div>\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-drawer-footer\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n }\n </div>\n </div>\n}\n",
|
|
401
|
+
styles: [".ui-drawer-scrim{position:fixed;inset:0;z-index:var(--ui-drawer-z-index, 1100);background-color:var(--ui-drawer-mask-background, var(--primitives-black-50))}.ui-drawer-scrim._contained{position:absolute}.ui-drawer-positioner{position:fixed;z-index:var(--ui-drawer-z-index, 1100);display:flex}.ui-drawer-positioner._left{inset-block:0;inset-inline-start:0}.ui-drawer-positioner._right{inset-block:0;inset-inline-end:0}.ui-drawer-positioner._top{inset-inline:0;inset-block-start:0}.ui-drawer-positioner._bottom{inset-inline:0;inset-block-end:0}.ui-drawer-positioner._full-screen{inset:0}.ui-drawer-positioner._contained{position:absolute}.ui-drawer{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--ui-drawer-surface, var(--global-background-default));color:var(--ui-drawer-color, var(--global-text-default));box-shadow:var(--shadow-default-lg);font-family:var(--ui-drawer-font-family, var(--fontfamily-base));outline:none}.ui-drawer-positioner._left .ui-drawer,.ui-drawer-positioner._right .ui-drawer{width:var(--ui-drawer-size-side, 20rem);max-width:100%;height:100%}.ui-drawer-positioner._top .ui-drawer,.ui-drawer-positioner._bottom .ui-drawer{width:100%;height:var(--ui-drawer-size-edge, 10rem);max-height:100%}.ui-drawer-positioner._full-screen .ui-drawer{width:100%;height:100%}.ui-drawer-positioner._left .ui-drawer{border-inline-end:var(--ui-drawer-stroke-width, var(--stroke-sm)) solid var(--ui-drawer-stroke, var(--global-border-subtle))}.ui-drawer-positioner._right .ui-drawer{border-inline-start:var(--ui-drawer-stroke-width, var(--stroke-sm)) solid var(--ui-drawer-stroke, var(--global-border-subtle))}.ui-drawer-positioner._top .ui-drawer{border-block-end:var(--ui-drawer-stroke-width, var(--stroke-sm)) solid var(--ui-drawer-stroke, var(--global-border-subtle))}.ui-drawer-positioner._bottom .ui-drawer{border-block-start:var(--ui-drawer-stroke-width, var(--stroke-sm)) solid var(--ui-drawer-stroke, var(--global-border-subtle))}.ui-drawer-positioner._full-screen .ui-drawer{border:none}.ui-drawer-header{flex:0 0 auto;display:flex;align-items:var(--ui-drawer-header-align, flex-start);gap:var(--ui-drawer-header-gap, var(--units-sm));padding:var(--ui-drawer-panel-padding, var(--units-lg)) var(--ui-drawer-panel-padding, var(--units-lg)) var(--units-sm)}.ui-drawer-title{flex:1 1 auto;min-width:0;font-family:var(--ui-drawer-title-font-family, var(--fontfamily-title));font-size:var(--size-typography-title-default);font-weight:var(--ui-drawer-weight, var(--weight-bold));line-height:1.3;overflow-wrap:break-word}.ui-drawer-action{flex:0 0 auto;display:inline-flex;align-items:center;align-self:var(--ui-drawer-action-align, auto);justify-content:center;width:var(--ui-drawer-action-size, 2rem);height:var(--ui-drawer-action-size, 2rem);padding:0;border:none;border-radius:var(--radius-xs);background:transparent;color:inherit;line-height:0;cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-drawer-action:hover{background-color:var(--ui-drawer-close-surface-hover, var(--global-background-muted-hover));color:var(--ui-drawer-close-color-hover, var(--global-text-muted-hover))}.ui-drawer-action:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-drawer-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-drawer-close-focus-ring-color, var(--global-border-focus))}@media(prefers-reduced-motion:reduce){.ui-drawer-action{transition-duration:.01ms}}:root[data-motion=off] .ui-drawer-action{transition-duration:.01ms}.ui-drawer-content{flex:1 1 auto;min-height:0;overflow-y:auto;padding:var(--ui-drawer-panel-padding, var(--units-lg));font-size:var(--size-typography-text-md);line-height:1.5}.ui-drawer-header+.ui-drawer-content{padding-top:0}.ui-drawer-footer{flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--units-sm);padding:var(--units-md) var(--ui-drawer-panel-padding, var(--units-lg)) var(--ui-drawer-panel-padding, var(--units-lg));border-top:var(--ui-drawer-stroke-width, var(--stroke-sm)) solid var(--ui-drawer-footer-stroke, var(--global-border-subtle))}\n"],
|
|
402
|
+
dependencies: [
|
|
403
|
+
{
|
|
404
|
+
kind: "directive",
|
|
405
|
+
type: NgTemplateOutlet,
|
|
406
|
+
selector: "[ngTemplateOutlet]",
|
|
407
|
+
inputs: [
|
|
408
|
+
"ngTemplateOutletContext",
|
|
409
|
+
"ngTemplateOutlet",
|
|
410
|
+
"ngTemplateOutletInjector"
|
|
411
|
+
]
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
kind: "ngmodule",
|
|
415
|
+
type: A11yModule
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
kind: "directive",
|
|
419
|
+
type: i1.CdkTrapFocus,
|
|
420
|
+
selector: "[cdkTrapFocus]",
|
|
421
|
+
inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"],
|
|
422
|
+
exportAs: ["cdkTrapFocus"]
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
kind: "directive",
|
|
426
|
+
type: UiMotion,
|
|
427
|
+
selector: "[uiMotion]",
|
|
428
|
+
inputs: [
|
|
429
|
+
"uiMotion",
|
|
430
|
+
"motionDuration",
|
|
431
|
+
"motionDelay",
|
|
432
|
+
"motionEasing",
|
|
433
|
+
"motionEnterEasing",
|
|
434
|
+
"motionLeaveEasing",
|
|
435
|
+
"motionDistance",
|
|
436
|
+
"motionScale",
|
|
437
|
+
"motionDisabled",
|
|
438
|
+
"motionOnInsert"
|
|
439
|
+
],
|
|
440
|
+
exportAs: ["uiMotion"]
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
kind: "component",
|
|
444
|
+
type: UiIcon,
|
|
445
|
+
selector: "ui-icon",
|
|
446
|
+
inputs: [
|
|
447
|
+
"name",
|
|
448
|
+
"size",
|
|
449
|
+
"type",
|
|
450
|
+
"family",
|
|
451
|
+
"decorative",
|
|
452
|
+
"ariaLabel"
|
|
453
|
+
]
|
|
454
|
+
}
|
|
455
|
+
]
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
460
|
+
minVersion: "12.0.0",
|
|
461
|
+
version: "22.3.0",
|
|
462
|
+
ngImport: i0,
|
|
463
|
+
type: UiDrawer,
|
|
464
|
+
decorators: [{
|
|
465
|
+
type: Component,
|
|
466
|
+
args: [{
|
|
467
|
+
selector: "ui-drawer",
|
|
468
|
+
imports: [
|
|
469
|
+
NgTemplateOutlet,
|
|
470
|
+
A11yModule,
|
|
471
|
+
UiMotion,
|
|
472
|
+
UiIcon
|
|
473
|
+
],
|
|
474
|
+
template: "@if (visible()) {\n <!-- Scrim + positioner are SIBLINGS (both direct @if children) so each animates its own\n leave independently — a nested animated element would deadlock the removal.\n The positioner carries the directional slide; the panel inside owns sizing/surface. -->\n @if (modal()) {\n <div\n #scrim\n class=\"ui-drawer-scrim\"\n [class._contained]=\"contained()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"'fade'\"\n [motionDisabled]=\"motionDisabled()\"\n #scrimMotion=\"uiMotion\"\n [animate.enter]=\"scrimMotion.enter()\"\n [animate.leave]=\"scrimMotion.leave()\"\n (pointerdown)=\"onMaskPointerdown($event)\"\n ></div>\n }\n\n <!-- Dialog: Escape/Tab handled on the container, focus lives in the\n content (CDK focus-trap). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"ui-drawer-positioner\"\n [class._left]=\"position() === 'left'\"\n [class._right]=\"position() === 'right'\"\n [class._top]=\"position() === 'top'\"\n [class._bottom]=\"position() === 'bottom'\"\n [class._full-screen]=\"fullScreen()\"\n [class._contained]=\"contained()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"motionPreset()\"\n [motionDistance]=\"motionDistance()\"\n [motionDisabled]=\"motionDisabled()\"\n #posMotion=\"uiMotion\"\n [animate.enter]=\"posMotion.enter()\"\n [animate.leave]=\"posMotion.leave()\"\n (keydown)=\"onKeydown($event)\"\n >\n <div\n #panel\n [class]=\"'ui-drawer' + (styleClass() ? ' ' + styleClass() : '')\"\n [attr.role]=\"role()\"\n [attr.aria-modal]=\"modal() ? 'true' : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n tabindex=\"-1\"\n [style]=\"drawerStyle()\"\n [cdkTrapFocus]=\"focusTrap()\"\n [cdkTrapFocusAutoCapture]=\"focusOnShow()\"\n >\n @if (headlessTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n @if (showHeader()) {\n <div class=\"ui-drawer-header\">\n <div [attr.id]=\"titleId\" class=\"ui-drawer-title\">\n @if (headerTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ header() }}\n }\n </div>\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-drawer-action\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"close()\"\n >\n @if (closeIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon [name]=\"closeIcon()\" size=\"sm\" />\n }\n </button>\n }\n </div>\n }\n\n <!-- Body: long content scrolls inside this region. -->\n <div class=\"ui-drawer-content\">\n <ng-content />\n </div>\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-drawer-footer\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n }\n </div>\n </div>\n}\n",
|
|
475
|
+
styles: [".ui-drawer-scrim{position:fixed;inset:0;z-index:var(--ui-drawer-z-index, 1100);background-color:var(--ui-drawer-mask-background, var(--primitives-black-50))}.ui-drawer-scrim._contained{position:absolute}.ui-drawer-positioner{position:fixed;z-index:var(--ui-drawer-z-index, 1100);display:flex}.ui-drawer-positioner._left{inset-block:0;inset-inline-start:0}.ui-drawer-positioner._right{inset-block:0;inset-inline-end:0}.ui-drawer-positioner._top{inset-inline:0;inset-block-start:0}.ui-drawer-positioner._bottom{inset-inline:0;inset-block-end:0}.ui-drawer-positioner._full-screen{inset:0}.ui-drawer-positioner._contained{position:absolute}.ui-drawer{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--ui-drawer-surface, var(--global-background-default));color:var(--ui-drawer-color, var(--global-text-default));box-shadow:var(--shadow-default-lg);font-family:var(--ui-drawer-font-family, var(--fontfamily-base));outline:none}.ui-drawer-positioner._left .ui-drawer,.ui-drawer-positioner._right .ui-drawer{width:var(--ui-drawer-size-side, 20rem);max-width:100%;height:100%}.ui-drawer-positioner._top .ui-drawer,.ui-drawer-positioner._bottom .ui-drawer{width:100%;height:var(--ui-drawer-size-edge, 10rem);max-height:100%}.ui-drawer-positioner._full-screen .ui-drawer{width:100%;height:100%}.ui-drawer-positioner._left .ui-drawer{border-inline-end:var(--ui-drawer-stroke-width, var(--stroke-sm)) solid var(--ui-drawer-stroke, var(--global-border-subtle))}.ui-drawer-positioner._right .ui-drawer{border-inline-start:var(--ui-drawer-stroke-width, var(--stroke-sm)) solid var(--ui-drawer-stroke, var(--global-border-subtle))}.ui-drawer-positioner._top .ui-drawer{border-block-end:var(--ui-drawer-stroke-width, var(--stroke-sm)) solid var(--ui-drawer-stroke, var(--global-border-subtle))}.ui-drawer-positioner._bottom .ui-drawer{border-block-start:var(--ui-drawer-stroke-width, var(--stroke-sm)) solid var(--ui-drawer-stroke, var(--global-border-subtle))}.ui-drawer-positioner._full-screen .ui-drawer{border:none}.ui-drawer-header{flex:0 0 auto;display:flex;align-items:var(--ui-drawer-header-align, flex-start);gap:var(--ui-drawer-header-gap, var(--units-sm));padding:var(--ui-drawer-panel-padding, var(--units-lg)) var(--ui-drawer-panel-padding, var(--units-lg)) var(--units-sm)}.ui-drawer-title{flex:1 1 auto;min-width:0;font-family:var(--ui-drawer-title-font-family, var(--fontfamily-title));font-size:var(--size-typography-title-default);font-weight:var(--ui-drawer-weight, var(--weight-bold));line-height:1.3;overflow-wrap:break-word}.ui-drawer-action{flex:0 0 auto;display:inline-flex;align-items:center;align-self:var(--ui-drawer-action-align, auto);justify-content:center;width:var(--ui-drawer-action-size, 2rem);height:var(--ui-drawer-action-size, 2rem);padding:0;border:none;border-radius:var(--radius-xs);background:transparent;color:inherit;line-height:0;cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-drawer-action:hover{background-color:var(--ui-drawer-close-surface-hover, var(--global-background-muted-hover));color:var(--ui-drawer-close-color-hover, var(--global-text-muted-hover))}.ui-drawer-action:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-drawer-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-drawer-close-focus-ring-color, var(--global-border-focus))}@media(prefers-reduced-motion:reduce){.ui-drawer-action{transition-duration:.01ms}}:root[data-motion=off] .ui-drawer-action{transition-duration:.01ms}.ui-drawer-content{flex:1 1 auto;min-height:0;overflow-y:auto;padding:var(--ui-drawer-panel-padding, var(--units-lg));font-size:var(--size-typography-text-md);line-height:1.5}.ui-drawer-header+.ui-drawer-content{padding-top:0}.ui-drawer-footer{flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--units-sm);padding:var(--units-md) var(--ui-drawer-panel-padding, var(--units-lg)) var(--ui-drawer-panel-padding, var(--units-lg));border-top:var(--ui-drawer-stroke-width, var(--stroke-sm)) solid var(--ui-drawer-footer-stroke, var(--global-border-subtle))}\n"]
|
|
476
|
+
}]
|
|
477
|
+
}],
|
|
478
|
+
ctorParameters: () => [],
|
|
479
|
+
propDecorators: {
|
|
480
|
+
visible: [{
|
|
481
|
+
type: i0.Input,
|
|
482
|
+
args: [{
|
|
483
|
+
isSignal: true,
|
|
484
|
+
alias: "visible",
|
|
485
|
+
required: false
|
|
486
|
+
}]
|
|
487
|
+
}, {
|
|
488
|
+
type: i0.Output,
|
|
489
|
+
args: ["visibleChange"]
|
|
490
|
+
}],
|
|
491
|
+
position: [{
|
|
492
|
+
type: i0.Input,
|
|
493
|
+
args: [{
|
|
494
|
+
isSignal: true,
|
|
495
|
+
alias: "position",
|
|
496
|
+
required: false
|
|
497
|
+
}]
|
|
498
|
+
}],
|
|
499
|
+
fullScreen: [{
|
|
500
|
+
type: i0.Input,
|
|
501
|
+
args: [{
|
|
502
|
+
isSignal: true,
|
|
503
|
+
alias: "fullScreen",
|
|
504
|
+
required: false
|
|
505
|
+
}]
|
|
506
|
+
}],
|
|
507
|
+
header: [{
|
|
508
|
+
type: i0.Input,
|
|
509
|
+
args: [{
|
|
510
|
+
isSignal: true,
|
|
511
|
+
alias: "header",
|
|
512
|
+
required: false
|
|
513
|
+
}]
|
|
514
|
+
}],
|
|
515
|
+
role: [{
|
|
516
|
+
type: i0.Input,
|
|
517
|
+
args: [{
|
|
518
|
+
isSignal: true,
|
|
519
|
+
alias: "role",
|
|
520
|
+
required: false
|
|
521
|
+
}]
|
|
522
|
+
}],
|
|
523
|
+
ariaLabel: [{
|
|
524
|
+
type: i0.Input,
|
|
525
|
+
args: [{
|
|
526
|
+
isSignal: true,
|
|
527
|
+
alias: "ariaLabel",
|
|
528
|
+
required: false
|
|
529
|
+
}]
|
|
530
|
+
}],
|
|
531
|
+
ariaLabelledBy: [{
|
|
532
|
+
type: i0.Input,
|
|
533
|
+
args: [{
|
|
534
|
+
isSignal: true,
|
|
535
|
+
alias: "ariaLabelledBy",
|
|
536
|
+
required: false
|
|
537
|
+
}]
|
|
538
|
+
}],
|
|
539
|
+
modal: [{
|
|
540
|
+
type: i0.Input,
|
|
541
|
+
args: [{
|
|
542
|
+
isSignal: true,
|
|
543
|
+
alias: "modal",
|
|
544
|
+
required: false
|
|
545
|
+
}]
|
|
546
|
+
}],
|
|
547
|
+
dismissableMask: [{
|
|
548
|
+
type: i0.Input,
|
|
549
|
+
args: [{
|
|
550
|
+
isSignal: true,
|
|
551
|
+
alias: "dismissableMask",
|
|
552
|
+
required: false
|
|
553
|
+
}]
|
|
554
|
+
}],
|
|
555
|
+
closable: [{
|
|
556
|
+
type: i0.Input,
|
|
557
|
+
args: [{
|
|
558
|
+
isSignal: true,
|
|
559
|
+
alias: "closable",
|
|
560
|
+
required: false
|
|
561
|
+
}]
|
|
562
|
+
}],
|
|
563
|
+
closeOnEscape: [{
|
|
564
|
+
type: i0.Input,
|
|
565
|
+
args: [{
|
|
566
|
+
isSignal: true,
|
|
567
|
+
alias: "closeOnEscape",
|
|
568
|
+
required: false
|
|
569
|
+
}]
|
|
570
|
+
}],
|
|
571
|
+
blockScroll: [{
|
|
572
|
+
type: i0.Input,
|
|
573
|
+
args: [{
|
|
574
|
+
isSignal: true,
|
|
575
|
+
alias: "blockScroll",
|
|
576
|
+
required: false
|
|
577
|
+
}]
|
|
578
|
+
}],
|
|
579
|
+
showHeader: [{
|
|
580
|
+
type: i0.Input,
|
|
581
|
+
args: [{
|
|
582
|
+
isSignal: true,
|
|
583
|
+
alias: "showHeader",
|
|
584
|
+
required: false
|
|
585
|
+
}]
|
|
586
|
+
}],
|
|
587
|
+
focusOnShow: [{
|
|
588
|
+
type: i0.Input,
|
|
589
|
+
args: [{
|
|
590
|
+
isSignal: true,
|
|
591
|
+
alias: "focusOnShow",
|
|
592
|
+
required: false
|
|
593
|
+
}]
|
|
594
|
+
}],
|
|
595
|
+
focusTrap: [{
|
|
596
|
+
type: i0.Input,
|
|
597
|
+
args: [{
|
|
598
|
+
isSignal: true,
|
|
599
|
+
alias: "focusTrap",
|
|
600
|
+
required: false
|
|
601
|
+
}]
|
|
602
|
+
}],
|
|
603
|
+
closeIcon: [{
|
|
604
|
+
type: i0.Input,
|
|
605
|
+
args: [{
|
|
606
|
+
isSignal: true,
|
|
607
|
+
alias: "closeIcon",
|
|
608
|
+
required: false
|
|
609
|
+
}]
|
|
610
|
+
}],
|
|
611
|
+
closeAriaLabel: [{
|
|
612
|
+
type: i0.Input,
|
|
613
|
+
args: [{
|
|
614
|
+
isSignal: true,
|
|
615
|
+
alias: "closeAriaLabel",
|
|
616
|
+
required: false
|
|
617
|
+
}]
|
|
618
|
+
}],
|
|
619
|
+
styleClass: [{
|
|
620
|
+
type: i0.Input,
|
|
621
|
+
args: [{
|
|
622
|
+
isSignal: true,
|
|
623
|
+
alias: "styleClass",
|
|
624
|
+
required: false
|
|
625
|
+
}]
|
|
626
|
+
}],
|
|
627
|
+
maskStyleClass: [{
|
|
628
|
+
type: i0.Input,
|
|
629
|
+
args: [{
|
|
630
|
+
isSignal: true,
|
|
631
|
+
alias: "maskStyleClass",
|
|
632
|
+
required: false
|
|
633
|
+
}]
|
|
634
|
+
}],
|
|
635
|
+
drawerStyle: [{
|
|
636
|
+
type: i0.Input,
|
|
637
|
+
args: [{
|
|
638
|
+
isSignal: true,
|
|
639
|
+
alias: "drawerStyle",
|
|
640
|
+
required: false
|
|
641
|
+
}]
|
|
642
|
+
}],
|
|
643
|
+
contained: [{
|
|
644
|
+
type: i0.Input,
|
|
645
|
+
args: [{
|
|
646
|
+
isSignal: true,
|
|
647
|
+
alias: "contained",
|
|
648
|
+
required: false
|
|
649
|
+
}]
|
|
650
|
+
}],
|
|
651
|
+
autoZIndex: [{
|
|
652
|
+
type: i0.Input,
|
|
653
|
+
args: [{
|
|
654
|
+
isSignal: true,
|
|
655
|
+
alias: "autoZIndex",
|
|
656
|
+
required: false
|
|
657
|
+
}]
|
|
658
|
+
}],
|
|
659
|
+
baseZIndex: [{
|
|
660
|
+
type: i0.Input,
|
|
661
|
+
args: [{
|
|
662
|
+
isSignal: true,
|
|
663
|
+
alias: "baseZIndex",
|
|
664
|
+
required: false
|
|
665
|
+
}]
|
|
666
|
+
}],
|
|
667
|
+
motionDisabled: [{
|
|
668
|
+
type: i0.Input,
|
|
669
|
+
args: [{
|
|
670
|
+
isSignal: true,
|
|
671
|
+
alias: "motionDisabled",
|
|
672
|
+
required: false
|
|
673
|
+
}]
|
|
674
|
+
}],
|
|
675
|
+
headerTemplate: [{
|
|
676
|
+
type: i0.ContentChild,
|
|
677
|
+
args: ["header", { isSignal: true }]
|
|
678
|
+
}],
|
|
679
|
+
footerTemplate: [{
|
|
680
|
+
type: i0.ContentChild,
|
|
681
|
+
args: ["footer", { isSignal: true }]
|
|
682
|
+
}],
|
|
683
|
+
closeIconTemplate: [{
|
|
684
|
+
type: i0.ContentChild,
|
|
685
|
+
args: ["closeicon", { isSignal: true }]
|
|
686
|
+
}],
|
|
687
|
+
headlessTemplate: [{
|
|
688
|
+
type: i0.ContentChild,
|
|
689
|
+
args: ["headless", { isSignal: true }]
|
|
690
|
+
}],
|
|
691
|
+
shown: [{
|
|
692
|
+
type: i0.Output,
|
|
693
|
+
args: ["shown"]
|
|
694
|
+
}],
|
|
695
|
+
hidden: [{
|
|
696
|
+
type: i0.Output,
|
|
697
|
+
args: ["hidden"]
|
|
698
|
+
}],
|
|
699
|
+
panelRef: [{
|
|
700
|
+
type: i0.ViewChild,
|
|
701
|
+
args: ["panel", { isSignal: true }]
|
|
702
|
+
}],
|
|
703
|
+
scrimRef: [{
|
|
704
|
+
type: i0.ViewChild,
|
|
705
|
+
args: ["scrim", { isSignal: true }]
|
|
706
|
+
}]
|
|
707
|
+
}
|
|
708
|
+
});
|
|
275
709
|
export { UiDrawer };
|
|
276
|
-
|
|
710
|
+
|
|
711
|
+
//# sourceMappingURL=4sh-ui-kit-layout-ui-drawer.mjs.map
|