@4sh/ui-kit 0.7.0 → 0.9.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 (158) hide show
  1. package/README.fr.md +12 -11
  2. package/README.md +12 -11
  3. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +3 -3
  4. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
  5. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +7 -5
  6. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
  7. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +4 -4
  8. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
  9. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +3 -3
  10. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
  11. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +6 -6
  12. package/fesm2022/4sh-ui-kit-base-ui-image.mjs +4 -4
  13. package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
  14. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +8 -6
  15. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
  16. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +5 -5
  17. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
  18. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +211 -27
  19. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
  20. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +4 -4
  21. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
  22. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +18 -5
  23. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
  24. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +11 -9
  25. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
  26. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +7 -7
  27. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
  28. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +5 -5
  29. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
  30. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +5 -5
  31. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
  32. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +5 -5
  33. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
  34. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +5 -5
  35. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
  36. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +4 -4
  37. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
  38. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +282 -0
  39. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -0
  40. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +4 -4
  41. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
  42. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +4 -4
  43. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
  44. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +4 -4
  45. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
  46. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +4 -4
  47. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
  48. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +8 -6
  49. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
  50. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +7 -5
  51. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
  52. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +4 -4
  53. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
  54. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +4 -4
  55. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
  56. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +5 -5
  57. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
  58. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +215 -0
  59. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -0
  60. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +8 -6
  61. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
  62. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +4 -4
  63. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
  64. package/fesm2022/4sh-ui-kit-forms.mjs +12 -7
  65. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
  66. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +13 -13
  67. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
  68. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +4 -4
  69. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
  70. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +3 -3
  71. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +4 -4
  72. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
  73. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +4 -4
  74. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
  75. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +4 -4
  76. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
  77. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +10 -10
  78. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
  79. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +4 -4
  80. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
  81. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +4 -4
  82. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
  83. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +4 -4
  84. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
  85. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +4 -4
  86. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
  87. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +3 -3
  88. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +4 -4
  89. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
  90. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +4 -4
  91. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
  92. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +10 -10
  93. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
  94. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +45 -26
  95. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
  96. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +629 -0
  97. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -0
  98. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +16 -16
  99. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
  100. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +4 -4
  101. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
  102. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +4 -4
  103. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
  104. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +4 -4
  105. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
  106. package/fesm2022/4sh-ui-kit-motion.mjs +3 -3
  107. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +370 -0
  108. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -0
  109. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +4 -4
  110. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
  111. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +7 -5
  112. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
  113. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +7 -5
  114. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
  115. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +14 -12
  116. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
  117. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +22 -22
  118. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
  119. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +25 -21
  120. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
  121. package/fesm2022/4sh-ui-kit-ripple.mjs +298 -0
  122. package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -0
  123. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +7 -5
  124. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
  125. package/fesm2022/4sh-ui-kit-table-ui-table.mjs +34 -34
  126. package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
  127. package/fesm2022/4sh-ui-kit-theming.mjs +6 -6
  128. package/mcp/data/text-search-docs.json +741 -71
  129. package/mcp/data/ui-config.json +25927 -11496
  130. package/mcp/package.json +1 -1
  131. package/package.json +21 -1
  132. package/styles/base/_ripple.scss +53 -0
  133. package/styles/component-vars.scss +1426 -687
  134. package/styles/index.scss +1 -0
  135. package/styles/settings/_ui-config.scss +54 -2
  136. package/styles/utils/_mixins.scss +32 -30
  137. package/styles/utils/_overlay.scss +1 -1
  138. package/styles.css +1 -1
  139. package/types/4sh-ui-kit-actions-ui-button.d.ts +3 -1
  140. package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +3 -1
  141. package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +59 -2
  142. package/types/4sh-ui-kit-forms-ui-field.d.ts +13 -1
  143. package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +3 -1
  144. package/types/4sh-ui-kit-forms-ui-knob.d.ts +93 -0
  145. package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +3 -1
  146. package/types/4sh-ui-kit-forms-ui-select.d.ts +3 -1
  147. package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +114 -0
  148. package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +3 -1
  149. package/types/4sh-ui-kit-forms.d.ts +5 -1
  150. package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +4 -4
  151. package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +256 -0
  152. package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +201 -0
  153. package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +3 -1
  154. package/types/4sh-ui-kit-navigation-ui-menu.d.ts +3 -1
  155. package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +3 -1
  156. package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +3 -1
  157. package/types/4sh-ui-kit-ripple.d.ts +156 -0
  158. package/types/4sh-ui-kit-table-ui-paginator.d.ts +3 -1
@@ -0,0 +1,629 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, model, input, booleanAttribute, numberAttribute, output, contentChild, viewChild, inject, Injector, PLATFORM_ID, signal, computed, effect, untracked, isDevMode, DestroyRef, afterNextRender, Component } from '@angular/core';
3
+ import { DOCUMENT, isPlatformBrowser } from '@angular/common';
4
+ import * as i1 from '@angular/cdk/a11y';
5
+ import { A11yModule } from '@angular/cdk/a11y';
6
+ import { UiIcon } from '@4sh/ui-kit/base/ui-icon';
7
+
8
+ /** The preset detents, for the runtime discrimination `height` needs. */
9
+ const HEIGHT_PRESETS = ['auto', 'half', 'full'];
10
+ /** Base stacking level, mirroring `$sheet-z-index` in the SCSS. */
11
+ const SHEET_BASE_Z_INDEX = 1100;
12
+ /** Fallback settle delay when the transition duration cannot be read (ms). */
13
+ const SETTLE_FALLBACK_MS = 320;
14
+ /** Margin added to the measured duration before the settle fallback fires (ms). */
15
+ const SETTLE_MARGIN_MS = 60;
16
+ /** Interactive descendants that must keep their own gesture instead of starting a drag. */
17
+ const INTERACTIVE = 'button, a[href], input, select, textarea, [role="button"], [contenteditable]';
18
+ /** The handle itself is interactive in snapping mode, yet it IS the grab affordance. */
19
+ const HANDLE_CLASS = 'ui-bottom-sheet-handle';
20
+ /** Process-wide sequence so `autoZIndex` layers a later sheet above earlier ones. */
21
+ let zIndexSeq = 0;
22
+ /** Process-wide unique id source (aria wiring). */
23
+ let nextUid = 0;
24
+ // --- Body scroll lock (ref-counted, shared across nested sheets) --------
25
+ let scrollLockCount = 0;
26
+ let savedOverflow = '';
27
+ let savedPaddingRight = '';
28
+ /** Freeze background scroll, compensating the scrollbar gutter to avoid a shift. */
29
+ function lockBodyScroll(doc) {
30
+ if (scrollLockCount === 0) {
31
+ const body = doc.body;
32
+ const gap = (doc.defaultView?.innerWidth ?? 0) - doc.documentElement.clientWidth;
33
+ savedOverflow = body.style.overflow;
34
+ savedPaddingRight = body.style.paddingRight;
35
+ body.style.overflow = 'hidden';
36
+ if (gap > 0)
37
+ body.style.paddingRight = `${gap}px`;
38
+ }
39
+ scrollLockCount++;
40
+ }
41
+ /** Release one scroll lock; restore the body when the last sheet closes. */
42
+ function unlockBodyScroll(doc) {
43
+ scrollLockCount = Math.max(0, scrollLockCount - 1);
44
+ if (scrollLockCount === 0) {
45
+ doc.body.style.overflow = savedOverflow;
46
+ doc.body.style.paddingRight = savedPaddingRight;
47
+ }
48
+ }
49
+ /**
50
+ * Slot markers routing projected content to a region. No behaviour: the sheet
51
+ * only queries their presence. Each accepts the kebab attribute and the kit's
52
+ * camelCase alias (`uiBottomSheetHeader`).
53
+ */
54
+ /** Header region: title and/or close button. Stays pinned above the scrolling body. */
55
+ class UiBottomSheetHeader {
56
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiBottomSheetHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
57
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.5", type: UiBottomSheetHeader, isStandalone: true, selector: "[uiBottomSheetHeader], [ui-bottom-sheet-header]", ngImport: i0 }); }
58
+ }
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiBottomSheetHeader, decorators: [{
60
+ type: Directive,
61
+ args: [{ selector: '[uiBottomSheetHeader], [ui-bottom-sheet-header]' }]
62
+ }] });
63
+ /** Main region. Scrolls natively when the content overflows the sheet. */
64
+ class UiBottomSheetContent {
65
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiBottomSheetContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
66
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.5", type: UiBottomSheetContent, isStandalone: true, selector: "[uiBottomSheetContent], [ui-bottom-sheet-content]", ngImport: i0 }); }
67
+ }
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiBottomSheetContent, decorators: [{
69
+ type: Directive,
70
+ args: [{ selector: '[uiBottomSheetContent], [ui-bottom-sheet-content]' }]
71
+ }] });
72
+ /** Footer region: actions. Stays pinned below the scrolling body. */
73
+ class UiBottomSheetFooter {
74
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiBottomSheetFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
75
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.5", type: UiBottomSheetFooter, isStandalone: true, selector: "[uiBottomSheetFooter], [ui-bottom-sheet-footer]", ngImport: i0 }); }
76
+ }
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiBottomSheetFooter, decorators: [{
78
+ type: Directive,
79
+ args: [{ selector: '[uiBottomSheetFooter], [ui-bottom-sheet-footer]' }]
80
+ }] });
81
+ /**
82
+ * ui-bottom-sheet: headless, mobile-first panel that slides up from the bottom
83
+ * edge, driven by the two-way `visible` model.
84
+ *
85
+ * Enter/leave are CSS transitions on `transform`, which is what lets the
86
+ * drag-to-close gesture flow straight into the closing animation. Content goes
87
+ * into three projected regions laid out as a flex column, so header and footer
88
+ * stay put while the body scrolls. See the MDX page for the full contract.
89
+ *
90
+ * @example
91
+ * ```html
92
+ * <ui-button label="Rechercher" (buttonClick)="open.set(true)" />
93
+ * <ui-bottom-sheet [(visible)]="open" height="half" autoFocusElement="#q">
94
+ * <h2 ui-bottom-sheet-header>Recherche</h2>
95
+ * <div ui-bottom-sheet-content><ui-input id="q" /></div>
96
+ * </ui-bottom-sheet>
97
+ * ```
98
+ */
99
+ class UiBottomSheet {
100
+ constructor() {
101
+ /** Open state (two-way). Toggling it drives the enter/leave animation. */
102
+ this.visible = model(false, /* @ts-ignore */
103
+ ...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
104
+ /**
105
+ * Opening height: `'auto'` (hugs the content, capped), `'half'` (half the
106
+ * screen), `'full'` (the whole screen) or any CSS length (`'70vh'`, `'400px'`).
107
+ */
108
+ this.height = input('auto', /* @ts-ignore */
109
+ ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
110
+ /** Show the backdrop (dim + capture), which is also what makes the sheet modal. */
111
+ this.hasBackdrop = input(true, { ...(ngDevMode ? { debugName: "hasBackdrop" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
112
+ /** Close when the backdrop is clicked. */
113
+ this.closeOnOverlayClick = input(true, { ...(ngDevMode ? { debugName: "closeOnOverlayClick" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
114
+ /** Close the sheet when `Escape` is pressed. */
115
+ this.closeOnEscape = input(true, { ...(ngDevMode ? { debugName: "closeOnEscape" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
116
+ /** Block background scroll while the sheet is open. */
117
+ this.blockScroll = input(true, { ...(ngDevMode ? { debugName: "blockScroll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
118
+ /** Close the sheet by dragging it down (touch, mouse, pen). */
119
+ this.enableDragToClose = input(true, { ...(ngDevMode ? { debugName: "enableDragToClose" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
120
+ /** Distance to drag before the release closes the sheet (px). */
121
+ this.dragThreshold = input(96, { ...(ngDevMode ? { debugName: "dragThreshold" } : /* istanbul ignore next */ {}), transform: numberAttribute });
122
+ /**
123
+ * Let the user drag a `'half'` sheet up to `'full'` (and back down again).
124
+ * The detent change is the only motion that touches `height`.
125
+ */
126
+ this.enableSnapping = input(false, { ...(ngDevMode ? { debugName: "enableSnapping" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
127
+ /** Show the grab handle at the top of the sheet. */
128
+ this.showHandle = input(true, { ...(ngDevMode ? { debugName: "showHandle" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
129
+ /** Trap Tab focus inside the sheet while it is open. */
130
+ this.trapFocus = input(true, { ...(ngDevMode ? { debugName: "trapFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
131
+ /** Move focus into the sheet when it opens (restored on close). */
132
+ this.focusOnShow = input(true, { ...(ngDevMode ? { debugName: "focusOnShow" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
133
+ /** CSS selector of the element to focus on opening (e.g. `'#searchInput'`). */
134
+ this.autoFocusElement = input(null, /* @ts-ignore */
135
+ ...(ngDevMode ? [{ debugName: "autoFocusElement" }] : /* istanbul ignore next */ []));
136
+ /** Simple header text (ignored when a header slot is projected). */
137
+ this.header = input(/* @ts-ignore */
138
+ ...(ngDevMode ? [undefined, { debugName: "header" }] : /* istanbul ignore next */ []));
139
+ /** Show the close (×) button in the header region. Off by default, as in the design. */
140
+ this.closable = input(false, { ...(ngDevMode ? { debugName: "closable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
141
+ /** FontAwesome name of the close button icon. */
142
+ this.closeIcon = input('xmark', /* @ts-ignore */
143
+ ...(ngDevMode ? [{ debugName: "closeIcon" }] : /* istanbul ignore next */ []));
144
+ /** Accessible name of the close button. */
145
+ this.closeAriaLabel = input('Fermer', /* @ts-ignore */
146
+ ...(ngDevMode ? [{ debugName: "closeAriaLabel" }] : /* istanbul ignore next */ []));
147
+ /** Accessible name of the handle when it is operable (`enableSnapping`). */
148
+ this.handleAriaLabel = input('Redimensionner le panneau', /* @ts-ignore */
149
+ ...(ngDevMode ? [{ debugName: "handleAriaLabel" }] : /* istanbul ignore next */ []));
150
+ /** ARIA role of the sheet surface. */
151
+ this.role = input('dialog', /* @ts-ignore */
152
+ ...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
153
+ /** Accessible name when there is no visible header to reference. */
154
+ this.ariaLabel = input(/* @ts-ignore */
155
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
156
+ /** Id of an external element naming the sheet (overrides the header title). */
157
+ this.ariaLabelledBy = input(/* @ts-ignore */
158
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
159
+ /** Reserve the OS inset at the bottom of the screen (home indicator, gesture bar). */
160
+ this.safeArea = input(true, { ...(ngDevMode ? { debugName: "safeArea" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
161
+ /**
162
+ * Scope the sheet to the nearest positioned ancestor (`position: absolute`)
163
+ * instead of the viewport, and skip the body scroll lock. Detents become
164
+ * fractions of that container.
165
+ */
166
+ this.contained = input(false, { ...(ngDevMode ? { debugName: "contained" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
167
+ /** Disable the open/close animation for this sheet. */
168
+ this.motionDisabled = input(false, { ...(ngDevMode ? { debugName: "motionDisabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
169
+ /** Extra class(es) merged onto the sheet surface. */
170
+ this.styleClass = input(/* @ts-ignore */
171
+ ...(ngDevMode ? [undefined, { debugName: "styleClass" }] : /* istanbul ignore next */ []));
172
+ /** Layer this sheet above earlier overlays automatically. */
173
+ this.autoZIndex = input(true, { ...(ngDevMode ? { debugName: "autoZIndex" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
174
+ /** Floor z-index (added to the auto value, or used as-is when `autoZIndex=false`). */
175
+ this.baseZIndex = input(0, { ...(ngDevMode ? { debugName: "baseZIndex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
176
+ /** Emitted at the end of the opening animation. */
177
+ this.opened = output();
178
+ /** Emitted at the end of the closing animation. */
179
+ this.closed = output();
180
+ /** @ignore */
181
+ this.headerSlot = contentChild(UiBottomSheetHeader, /* @ts-ignore */
182
+ ...(ngDevMode ? [{ debugName: "headerSlot" }] : /* istanbul ignore next */ []));
183
+ /** @ignore */
184
+ this.contentSlot = contentChild(UiBottomSheetContent, /* @ts-ignore */
185
+ ...(ngDevMode ? [{ debugName: "contentSlot" }] : /* istanbul ignore next */ []));
186
+ /** @ignore */
187
+ this.footerSlot = contentChild(UiBottomSheetFooter, /* @ts-ignore */
188
+ ...(ngDevMode ? [{ debugName: "footerSlot" }] : /* istanbul ignore next */ []));
189
+ /** @ignore */
190
+ this.positionerRef = viewChild('positioner', /* @ts-ignore */
191
+ ...(ngDevMode ? [{ debugName: "positionerRef" }] : /* istanbul ignore next */ []));
192
+ /** @ignore */
193
+ this.panelRef = viewChild('panel', /* @ts-ignore */
194
+ ...(ngDevMode ? [{ debugName: "panelRef" }] : /* istanbul ignore next */ []));
195
+ /** @ignore */
196
+ this.document = inject(DOCUMENT);
197
+ /** @ignore */
198
+ this.injector = inject(Injector);
199
+ /** @ignore */
200
+ this.isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
201
+ /** @ignore Per-instance layering rank for `autoZIndex`. */
202
+ this.zSeq = ++zIndexSeq;
203
+ /** @ignore */
204
+ this.uid = `ui-bottom-sheet-${nextUid++}`;
205
+ /** @ignore */
206
+ this.titleId = `${this.uid}-title`;
207
+ // --- Internal state --------------------------------------------------
208
+ // `mounted` keeps the node in the DOM while the leave transition plays;
209
+ // `atRest` is the position the panel transitions towards.
210
+ /** @ignore */
211
+ this.mounted = signal(false, /* @ts-ignore */
212
+ ...(ngDevMode ? [{ debugName: "mounted" }] : /* istanbul ignore next */ []));
213
+ /** @ignore */
214
+ this.atRest = signal(false, /* @ts-ignore */
215
+ ...(ngDevMode ? [{ debugName: "atRest" }] : /* istanbul ignore next */ []));
216
+ /** @ignore Live drag distance, downwards only (px). */
217
+ this.dragOffset = signal(0, /* @ts-ignore */
218
+ ...(ngDevMode ? [{ debugName: "dragOffset" }] : /* istanbul ignore next */ []));
219
+ /** @ignore Live height while dragging a snapping sheet upwards (px). */
220
+ this.dragHeight = signal(null, /* @ts-ignore */
221
+ ...(ngDevMode ? [{ debugName: "dragHeight" }] : /* istanbul ignore next */ []));
222
+ /** @ignore */
223
+ this.dragging = signal(false, /* @ts-ignore */
224
+ ...(ngDevMode ? [{ debugName: "dragging" }] : /* istanbul ignore next */ []));
225
+ /** @ignore The `'half'` sheet is currently snapped to `'full'`. */
226
+ this.snapped = signal(false, /* @ts-ignore */
227
+ ...(ngDevMode ? [{ debugName: "snapped" }] : /* istanbul ignore next */ []));
228
+ /** @ignore */
229
+ this.locked = false;
230
+ /** @ignore Transition currently awaited, if any. */
231
+ this.pending = null;
232
+ /** @ignore */
233
+ this.settleTimer = null;
234
+ /** @ignore */
235
+ this.focusTimer = null;
236
+ /** @ignore */
237
+ this.dragPointerId = null;
238
+ /** @ignore */
239
+ this.dragStartY = 0;
240
+ /** @ignore Panel height when the drag started (px), for the upward clamp. */
241
+ this.dragStartHeight = 0;
242
+ /** @ignore Effective stacking level. */
243
+ this.zIndex = computed(() => {
244
+ const base = this.baseZIndex();
245
+ if (this.autoZIndex())
246
+ return SHEET_BASE_Z_INDEX + base + this.zSeq;
247
+ return base > 0 ? base : SHEET_BASE_Z_INDEX;
248
+ }, /* @ts-ignore */
249
+ ...(ngDevMode ? [{ debugName: "zIndex" }] : /* istanbul ignore next */ []));
250
+ /** @ignore The `'half'` detent can grow to `'full'` on a drag. */
251
+ this.canSnap = computed(() => this.enableSnapping() && this.height() === 'half', /* @ts-ignore */
252
+ ...(ngDevMode ? [{ debugName: "canSnap" }] : /* istanbul ignore next */ []));
253
+ /** @ignore A gesture on the drag area does something. */
254
+ this.dragEnabled = computed(() => this.enableDragToClose() || this.canSnap(), /* @ts-ignore */
255
+ ...(ngDevMode ? [{ debugName: "dragEnabled" }] : /* istanbul ignore next */ []));
256
+ /** @ignore Detent in force, once snapping is taken into account. */
257
+ this.effectiveHeight = computed(() => this.canSnap() && this.snapped() ? 'full' : this.height(), /* @ts-ignore */
258
+ ...(ngDevMode ? [{ debugName: "effectiveHeight" }] : /* istanbul ignore next */ []));
259
+ /** @ignore Preset detent, or `null` for a free-form CSS length. */
260
+ this.heightPreset = computed(() => {
261
+ const h = this.effectiveHeight();
262
+ return HEIGHT_PRESETS.includes(h) ? h : null;
263
+ }, /* @ts-ignore */
264
+ ...(ngDevMode ? [{ debugName: "heightPreset" }] : /* istanbul ignore next */ []));
265
+ /**
266
+ * @ignore Height written inline: the live drag height, else the free-form
267
+ * value. A preset resolves through its class so the SCSS hook stays in charge.
268
+ */
269
+ this.inlineHeight = computed(() => {
270
+ const drag = this.dragHeight();
271
+ if (drag !== null)
272
+ return `${drag}px`;
273
+ return this.heightPreset() ? null : this.effectiveHeight();
274
+ }, /* @ts-ignore */
275
+ ...(ngDevMode ? [{ debugName: "inlineHeight" }] : /* istanbul ignore next */ []));
276
+ /** @ignore Sheet position: off-screen, dragged, or at rest. */
277
+ this.panelTransform = computed(() => {
278
+ if (!this.atRest())
279
+ return 'translateY(100%)';
280
+ const offset = this.dragOffset();
281
+ return offset > 0 ? `translateY(${offset}px)` : 'translateY(0)';
282
+ }, /* @ts-ignore */
283
+ ...(ngDevMode ? [{ debugName: "panelTransform" }] : /* istanbul ignore next */ []));
284
+ /** @ignore */
285
+ this.panelClasses = computed(() => {
286
+ const classes = ['ui-bottom-sheet'];
287
+ const preset = this.heightPreset();
288
+ if (preset)
289
+ classes.push(`_${preset}`);
290
+ if (this.contained())
291
+ classes.push('_contained');
292
+ if (this.safeArea() && !this.contained())
293
+ classes.push('_safe-area');
294
+ if (this.dragging())
295
+ classes.push('_dragging');
296
+ if (this.motionDisabled())
297
+ classes.push('_no-motion');
298
+ const extra = this.styleClass();
299
+ if (extra)
300
+ classes.push(extra);
301
+ return classes.join(' ');
302
+ }, /* @ts-ignore */
303
+ ...(ngDevMode ? [{ debugName: "panelClasses" }] : /* istanbul ignore next */ []));
304
+ /** @ignore A title is available, from the slot or the string shorthand. */
305
+ this.hasTitle = computed(() => !!this.headerSlot() || !!this.header(), /* @ts-ignore */
306
+ ...(ngDevMode ? [{ debugName: "hasTitle" }] : /* istanbul ignore next */ []));
307
+ /** @ignore The header region is rendered at all. */
308
+ this.hasHeaderRegion = computed(() => this.hasTitle() || this.closable(), /* @ts-ignore */
309
+ ...(ngDevMode ? [{ debugName: "hasHeaderRegion" }] : /* istanbul ignore next */ []));
310
+ /** @ignore The `header` string is the title source (a slot takes precedence). */
311
+ this.showHeaderString = computed(() => !this.headerSlot() && !!this.header(), /* @ts-ignore */
312
+ ...(ngDevMode ? [{ debugName: "showHeaderString" }] : /* istanbul ignore next */ []));
313
+ /** @ignore Id of the element naming the sheet (header title, or an external id). */
314
+ this.labelledBy = computed(() => this.ariaLabelledBy() ?? (this.hasTitle() ? this.titleId : null), /* @ts-ignore */
315
+ ...(ngDevMode ? [{ debugName: "labelledBy" }] : /* istanbul ignore next */ []));
316
+ /** @ignore Fallback accessible name when nothing is referenced. */
317
+ this.resolvedAriaLabel = computed(() => this.labelledBy() ? null : this.ariaLabel(), /* @ts-ignore */
318
+ ...(ngDevMode ? [{ debugName: "resolvedAriaLabel" }] : /* istanbul ignore next */ []));
319
+ let wasVisible = false;
320
+ effect(() => {
321
+ const v = this.visible();
322
+ untracked(() => {
323
+ if (v && !wasVisible) {
324
+ wasVisible = true;
325
+ this.beginOpen();
326
+ }
327
+ else if (!v && wasVisible) {
328
+ wasVisible = false;
329
+ this.beginClose();
330
+ }
331
+ });
332
+ });
333
+ // A11y safeguard: a dialog must have an accessible name.
334
+ if (isDevMode()) {
335
+ effect(() => {
336
+ if (this.visible() && !this.labelledBy() && !this.resolvedAriaLabel()) {
337
+ console.warn('[ui-bottom-sheet] Panel has no accessible name: provide `header`, `ariaLabel` or `ariaLabelledBy`.');
338
+ }
339
+ });
340
+ }
341
+ inject(DestroyRef).onDestroy(() => {
342
+ this.clearSettle();
343
+ this.clearFocus();
344
+ this.releaseLock();
345
+ });
346
+ }
347
+ /** Open the sheet. */
348
+ open() {
349
+ this.visible.set(true);
350
+ }
351
+ /** Close the sheet. */
352
+ close() {
353
+ this.visible.set(false);
354
+ }
355
+ /** Toggle the sheet. */
356
+ toggle() {
357
+ this.visible.update((v) => !v);
358
+ }
359
+ /** Move focus onto the sheet surface. */
360
+ focus() {
361
+ this.panelRef()?.nativeElement.focus({ preventScroll: true });
362
+ }
363
+ // --- Open / close lifecycle ------------------------------------------
364
+ /** @ignore Mount off-screen, then transition to the rest position. */
365
+ beginOpen() {
366
+ this.clearSettle();
367
+ this.snapped.set(false);
368
+ this.dragOffset.set(0);
369
+ this.dragHeight.set(null);
370
+ this.dragging.set(false);
371
+ this.mounted.set(true);
372
+ if (!this.isBrowser) {
373
+ this.atRest.set(true);
374
+ return;
375
+ }
376
+ if (this.blockScroll() && !this.contained() && !this.locked) {
377
+ lockBodyScroll(this.document);
378
+ this.locked = true;
379
+ }
380
+ afterNextRender(() => {
381
+ // Flush the off-screen position so the class swap below interpolates
382
+ // instead of jumping. A layout read is enough, and unlike a rAF it also
383
+ // runs in a throttled tab.
384
+ void this.positionerRef()?.nativeElement.offsetHeight;
385
+ this.atRest.set(true);
386
+ this.awaitTransition('open');
387
+ this.applyAutoFocus();
388
+ }, { injector: this.injector });
389
+ }
390
+ /** @ignore Transition back off-screen, then unmount. */
391
+ beginClose() {
392
+ if (!this.mounted())
393
+ return;
394
+ this.clearSettle();
395
+ this.clearFocus();
396
+ this.endDrag();
397
+ this.dragOffset.set(0);
398
+ this.dragHeight.set(null);
399
+ this.atRest.set(false);
400
+ this.awaitTransition('close');
401
+ }
402
+ /**
403
+ * @ignore Wait for the panel transition to end. `transitionend` is the accurate
404
+ * signal, but it never fires when the duration is zero (motion off, reduced
405
+ * motion) or while the tab is hidden, hence the measured fallback timer.
406
+ */
407
+ awaitTransition(phase) {
408
+ this.pending = phase;
409
+ if (!this.isBrowser) {
410
+ this.settle(phase);
411
+ return;
412
+ }
413
+ this.settleTimer = setTimeout(() => this.settle(phase), this.transitionMs() + SETTLE_MARGIN_MS);
414
+ }
415
+ /** @ignore Resolved transition duration of the panel (ms). */
416
+ transitionMs() {
417
+ const el = this.positionerRef()?.nativeElement;
418
+ const view = this.document.defaultView;
419
+ if (!el || !view)
420
+ return SETTLE_FALLBACK_MS;
421
+ const raw = view.getComputedStyle(el).transitionDuration.split(',')[0]?.trim() ?? '';
422
+ const value = Number.parseFloat(raw);
423
+ if (Number.isNaN(value))
424
+ return SETTLE_FALLBACK_MS;
425
+ return raw.endsWith('ms') ? value : value * 1000;
426
+ }
427
+ /** @ignore */
428
+ onTransitionEnd(event) {
429
+ if (event.propertyName !== 'transform')
430
+ return;
431
+ if (event.target !== this.positionerRef()?.nativeElement)
432
+ return;
433
+ if (this.pending)
434
+ this.settle(this.pending);
435
+ }
436
+ /** @ignore End of an open/close transition: emit, and unmount on close. */
437
+ settle(phase) {
438
+ if (this.pending !== phase)
439
+ return;
440
+ this.clearSettle();
441
+ if (phase === 'open') {
442
+ this.opened.emit();
443
+ }
444
+ else {
445
+ this.mounted.set(false);
446
+ this.releaseLock();
447
+ this.closed.emit();
448
+ }
449
+ }
450
+ /** @ignore */
451
+ clearSettle() {
452
+ this.pending = null;
453
+ if (this.settleTimer !== null) {
454
+ clearTimeout(this.settleTimer);
455
+ this.settleTimer = null;
456
+ }
457
+ }
458
+ /** @ignore */
459
+ releaseLock() {
460
+ if (this.locked) {
461
+ unlockBodyScroll(this.document);
462
+ this.locked = false;
463
+ }
464
+ }
465
+ // --- Focus -----------------------------------------------------------
466
+ /**
467
+ * @ignore Focus the `autoFocusElement` target once it exists. The CDK focus
468
+ * trap captures first (which is what restores focus on close), so this runs
469
+ * after it and wins. Retried a few times because the target is often projected
470
+ * content that renders a tick later; `setTimeout` rather than a rAF, which
471
+ * never fires in a throttled tab.
472
+ */
473
+ applyAutoFocus() {
474
+ const selector = this.autoFocusElement();
475
+ if (!selector || !this.focusOnShow())
476
+ return;
477
+ let attempts = 0;
478
+ const tryFocus = () => {
479
+ const target = this.panelRef()?.nativeElement.querySelector(selector);
480
+ if (target) {
481
+ target.focus({ preventScroll: true });
482
+ this.focusTimer = null;
483
+ return;
484
+ }
485
+ if (++attempts >= 5) {
486
+ this.focusTimer = null;
487
+ if (isDevMode()) {
488
+ console.warn(`[ui-bottom-sheet] autoFocusElement "${selector}" matched nothing.`);
489
+ }
490
+ return;
491
+ }
492
+ this.focusTimer = setTimeout(tryFocus, 16);
493
+ };
494
+ this.focusTimer = setTimeout(tryFocus, 0);
495
+ }
496
+ /** @ignore */
497
+ clearFocus() {
498
+ if (this.focusTimer !== null) {
499
+ clearTimeout(this.focusTimer);
500
+ this.focusTimer = null;
501
+ }
502
+ }
503
+ // --- Keyboard --------------------------------------------------------
504
+ /** @ignore Escape-to-close. Only swallowed when it actually closes, so a
505
+ * parent overlay still sees the key otherwise. */
506
+ onKeydown(event) {
507
+ if (event.key === 'Escape' && this.closeOnEscape()) {
508
+ event.stopPropagation();
509
+ this.close();
510
+ }
511
+ }
512
+ /** @ignore Keyboard equivalent of the snap gesture (the handle is a button). */
513
+ onHandleKeydown(event) {
514
+ if (!this.canSnap())
515
+ return;
516
+ switch (event.key) {
517
+ case 'ArrowUp':
518
+ this.snapped.set(true);
519
+ break;
520
+ case 'ArrowDown':
521
+ this.snapped.set(false);
522
+ break;
523
+ case 'Enter':
524
+ case ' ':
525
+ this.snapped.update((s) => !s);
526
+ break;
527
+ default:
528
+ return;
529
+ }
530
+ event.preventDefault();
531
+ }
532
+ // --- Overlay ---------------------------------------------------------
533
+ /** @ignore Backdrop click dismiss (backdrop target only). */
534
+ onScrimPointerDown(event) {
535
+ if (!this.closeOnOverlayClick())
536
+ return;
537
+ if (event.target === event.currentTarget)
538
+ this.close();
539
+ }
540
+ // --- Drag gesture (touch / mouse / pen) ------------------------------
541
+ /** @ignore */
542
+ onDragPointerDown(event) {
543
+ if (!this.dragEnabled() || this.dragPointerId !== null)
544
+ return;
545
+ if (event.pointerType === 'mouse' && event.button !== 0)
546
+ return;
547
+ // A control inside the drag area keeps its own gesture (close button, link…),
548
+ // except the handle, which is a button in snapping mode.
549
+ const control = event.target?.closest(INTERACTIVE);
550
+ if (control && !control.classList.contains(HANDLE_CLASS))
551
+ return;
552
+ const host = event.currentTarget;
553
+ this.dragPointerId = event.pointerId;
554
+ this.dragStartY = event.clientY;
555
+ this.dragStartHeight = this.panelRef()?.nativeElement.offsetHeight ?? 0;
556
+ this.dragging.set(true);
557
+ host.setPointerCapture(event.pointerId);
558
+ }
559
+ /** @ignore */
560
+ onDragPointerMove(event) {
561
+ if (event.pointerId !== this.dragPointerId)
562
+ return;
563
+ const delta = event.clientY - this.dragStartY;
564
+ if (delta >= 0) {
565
+ // Downwards: translate the sheet, the cheap property.
566
+ this.dragHeight.set(null);
567
+ this.dragOffset.set(this.enableDragToClose() ? delta : 0);
568
+ return;
569
+ }
570
+ // Upwards: only a snapping sheet reacts, by growing towards `full`.
571
+ this.dragOffset.set(0);
572
+ if (!this.canSnap() || this.snapped())
573
+ return;
574
+ const ceiling = this.viewportHeight();
575
+ this.dragHeight.set(Math.min(ceiling, this.dragStartHeight - delta));
576
+ }
577
+ /** @ignore Release: past the threshold the gesture commits, otherwise it springs back. */
578
+ onDragPointerUp(event) {
579
+ if (event.pointerId !== this.dragPointerId)
580
+ return;
581
+ const offset = this.dragOffset();
582
+ const grown = (this.dragHeight() ?? this.dragStartHeight) - this.dragStartHeight;
583
+ const threshold = Math.max(1, this.dragThreshold());
584
+ this.endDrag();
585
+ this.dragOffset.set(0);
586
+ this.dragHeight.set(null);
587
+ if (grown >= threshold) {
588
+ this.snapped.set(true);
589
+ }
590
+ else if (offset >= threshold) {
591
+ // From `full`, a snapping sheet steps back to `half` before closing.
592
+ if (this.canSnap() && this.snapped())
593
+ this.snapped.set(false);
594
+ else if (this.enableDragToClose())
595
+ this.close();
596
+ }
597
+ }
598
+ /** @ignore */
599
+ endDrag() {
600
+ this.dragPointerId = null;
601
+ this.dragging.set(false);
602
+ }
603
+ /** @ignore Ceiling of the upward drag: the viewport, or the container when `contained`. */
604
+ viewportHeight() {
605
+ if (this.contained()) {
606
+ const parent = this.positionerRef()?.nativeElement.parentElement;
607
+ if (parent)
608
+ return parent.clientHeight;
609
+ }
610
+ return this.document.defaultView?.innerHeight ?? this.dragStartHeight;
611
+ }
612
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiBottomSheet, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
613
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: UiBottomSheet, isStandalone: true, selector: "ui-bottom-sheet", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, hasBackdrop: { classPropertyName: "hasBackdrop", publicName: "hasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, closeOnOverlayClick: { classPropertyName: "closeOnOverlayClick", publicName: "closeOnOverlayClick", 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 }, enableDragToClose: { classPropertyName: "enableDragToClose", publicName: "enableDragToClose", isSignal: true, isRequired: false, transformFunction: null }, dragThreshold: { classPropertyName: "dragThreshold", publicName: "dragThreshold", isSignal: true, isRequired: false, transformFunction: null }, enableSnapping: { classPropertyName: "enableSnapping", publicName: "enableSnapping", isSignal: true, isRequired: false, transformFunction: null }, showHandle: { classPropertyName: "showHandle", publicName: "showHandle", isSignal: true, isRequired: false, transformFunction: null }, trapFocus: { classPropertyName: "trapFocus", publicName: "trapFocus", isSignal: true, isRequired: false, transformFunction: null }, focusOnShow: { classPropertyName: "focusOnShow", publicName: "focusOnShow", isSignal: true, isRequired: false, transformFunction: null }, autoFocusElement: { classPropertyName: "autoFocusElement", publicName: "autoFocusElement", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", 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 }, handleAriaLabel: { classPropertyName: "handleAriaLabel", publicName: "handleAriaLabel", 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 }, safeArea: { classPropertyName: "safeArea", publicName: "safeArea", isSignal: true, isRequired: false, transformFunction: null }, contained: { classPropertyName: "contained", publicName: "contained", isSignal: true, isRequired: false, transformFunction: null }, motionDisabled: { classPropertyName: "motionDisabled", publicName: "motionDisabled", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", 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 } }, outputs: { visible: "visibleChange", opened: "opened", closed: "closed" }, queries: [{ propertyName: "headerSlot", first: true, predicate: UiBottomSheetHeader, descendants: true, isSignal: true }, { propertyName: "contentSlot", first: true, predicate: UiBottomSheetContent, descendants: true, isSignal: true }, { propertyName: "footerSlot", first: true, predicate: UiBottomSheetFooter, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "positionerRef", first: true, predicate: ["positioner"], descendants: true, isSignal: true }, { propertyName: "panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (mounted()) {\n <!-- Backdrop and positioner are siblings so the sheet can slide over a static\n scrim, and a click beside the sheet lands on the scrim (dismiss). -->\n @if (hasBackdrop()) {\n <div\n class=\"ui-bottom-sheet-scrim\"\n [class._open]=\"atRest()\"\n [class._contained]=\"contained()\"\n [class._no-motion]=\"motionDisabled()\"\n [style.z-index]=\"zIndex()\"\n (pointerdown)=\"onScrimPointerDown($event)\"\n ></div>\n }\n\n <!-- Dialog: Escape/Tab handled on the container, focus lives inside\n (CDK focus-trap). The positioner carries the slide transform. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n #positioner\n class=\"ui-bottom-sheet-positioner\"\n [class._contained]=\"contained()\"\n [class._dragging]=\"dragging()\"\n [class._no-motion]=\"motionDisabled()\"\n [style.z-index]=\"zIndex()\"\n [style.transform]=\"panelTransform()\"\n (transitionend)=\"onTransitionEnd($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <div\n #panel\n [class]=\"panelClasses()\"\n [attr.role]=\"role()\"\n [attr.aria-modal]=\"hasBackdrop() ? 'true' : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [style.height]=\"inlineHeight()\"\n tabindex=\"-1\"\n [cdkTrapFocus]=\"trapFocus()\"\n [cdkTrapFocusAutoCapture]=\"focusOnShow()\"\n >\n <!-- Grab zone: handle + header. The body is left out so it keeps its\n native scroll. -->\n @if (showHandle() || hasHeaderRegion()) {\n <div\n class=\"ui-bottom-sheet-grab\"\n [class._draggable]=\"dragEnabled()\"\n (pointerdown)=\"onDragPointerDown($event)\"\n (pointermove)=\"onDragPointerMove($event)\"\n (pointerup)=\"onDragPointerUp($event)\"\n (pointercancel)=\"onDragPointerUp($event)\"\n >\n @if (showHandle()) {\n @if (canSnap()) {\n <button\n type=\"button\"\n class=\"ui-bottom-sheet-handle _operable\"\n [attr.aria-label]=\"handleAriaLabel()\"\n [attr.aria-expanded]=\"snapped()\"\n (keydown)=\"onHandleKeydown($event)\"\n ></button>\n } @else {\n <div class=\"ui-bottom-sheet-handle\" aria-hidden=\"true\"></div>\n }\n }\n\n @if (hasHeaderRegion()) {\n <div class=\"ui-bottom-sheet-header\">\n @if (hasTitle()) {\n <div [attr.id]=\"titleId\" class=\"ui-bottom-sheet-title\">\n @if (showHeaderString()) {\n {{ header() }}\n }\n <ng-content select=\"[uiBottomSheetHeader], [ui-bottom-sheet-header]\" />\n </div>\n }\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-bottom-sheet-action\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"close()\"\n >\n <ui-icon [name]=\"closeIcon()\" size=\"sm\" />\n </button>\n }\n </div>\n }\n </div>\n }\n\n <!-- Body: scrolls natively, scroll chaining kept inside the sheet.\n `tabindex` is what makes that scroll reachable at the keyboard when the\n body holds no focusable element of its own (WCAG 2.1.1). -->\n <div class=\"ui-bottom-sheet-content\" tabindex=\"0\">\n <ng-content select=\"[uiBottomSheetContent], [ui-bottom-sheet-content]\" />\n <ng-content />\n </div>\n\n @if (footerSlot()) {\n <div class=\"ui-bottom-sheet-footer\">\n <ng-content select=\"[uiBottomSheetFooter], [ui-bottom-sheet-footer]\" />\n </div>\n }\n </div>\n </div>\n}\n", styles: [".ui-bottom-sheet-scrim{position:fixed;inset:0;z-index:var(--ui-bottom-sheet-z-index, 1100);background-color:var(--ui-bottom-sheet-mask-background, var(--primitives-black-50));opacity:0;transition:opacity var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms)}.ui-bottom-sheet-scrim._open{opacity:1}.ui-bottom-sheet-scrim._contained{position:absolute}.ui-bottom-sheet-scrim._no-motion{transition:none}@media(prefers-reduced-motion:reduce){.ui-bottom-sheet-scrim{transition-duration:.01ms}}:root[data-motion=off] .ui-bottom-sheet-scrim{transition-duration:.01ms}.ui-bottom-sheet-positioner{position:fixed;inset-inline:0;inset-block-end:0;z-index:var(--ui-bottom-sheet-z-index, 1100);display:flex;justify-content:center;transition:transform var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms)}.ui-bottom-sheet-positioner._contained{position:absolute}.ui-bottom-sheet-positioner._dragging,.ui-bottom-sheet-positioner._no-motion{transition:none}@media(prefers-reduced-motion:reduce){.ui-bottom-sheet-positioner{transition-duration:.01ms}}:root[data-motion=off] .ui-bottom-sheet-positioner{transition-duration:.01ms}.ui-bottom-sheet{box-sizing:border-box;display:flex;flex-direction:column;width:100%;max-width:var(--ui-bottom-sheet-max-width, 90rem);max-height:var(--ui-bottom-sheet-max-height, 92dvh);border-radius:var(--ui-bottom-sheet-radius, var(--radius-default)) var(--ui-bottom-sheet-radius, var(--radius-default)) 0 0;background-color:var(--ui-bottom-sheet-surface, var(--global-background-default));box-shadow:var(--ui-bottom-sheet-shadow, var(--shadow-default-lg));color:var(--ui-bottom-sheet-color, var(--global-text-default));font-family:var(--ui-bottom-sheet-font-family, var(--fontfamily-base));overflow:hidden;outline:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:height var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms)}.ui-bottom-sheet._half{height:var(--ui-bottom-sheet-half-height, 50dvh)}.ui-bottom-sheet._full{height:var(--ui-bottom-sheet-full-height, 100dvh);max-height:var(--ui-bottom-sheet-full-height, 100dvh)}.ui-bottom-sheet._dragging{max-height:var(--ui-bottom-sheet-full-height, 100dvh)}.ui-bottom-sheet._dragging,.ui-bottom-sheet._no-motion{transition:none}.ui-bottom-sheet._contained{max-height:92%}.ui-bottom-sheet._contained._half{height:50%}.ui-bottom-sheet._contained._full{height:100%;max-height:100%}.ui-bottom-sheet._contained._dragging{max-height:100%}.ui-bottom-sheet._safe-area{padding-bottom:var(--ui-bottom-sheet-safe-area-offset, env(safe-area-inset-bottom, 0px))}.ui-bottom-sheet-grab{flex:0 0 auto;display:flex;flex-direction:column;padding:var(--ui-bottom-sheet-grab-padding-y, var(--units-sm)) var(--ui-bottom-sheet-grab-padding-x, var(--units-md))}.ui-bottom-sheet-grab._draggable{touch-action:none;-webkit-user-select:none;user-select:none;cursor:grab}.ui-bottom-sheet-grab._draggable:active{cursor:grabbing}.ui-bottom-sheet-handle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-bottom-sheet-handle-width, 3.375rem);height:var(--ui-bottom-sheet-handle-height, .25rem);margin-inline:auto;padding:0;border:none;border-radius:var(--ui-bottom-sheet-handle-radius, var(--radius-full));background:none}.ui-bottom-sheet-handle:after{content:\"\";display:block;width:var(--ui-bottom-sheet-handle-width, 3.375rem);height:var(--ui-bottom-sheet-handle-height, .25rem);border-radius:var(--ui-bottom-sheet-handle-radius, var(--radius-full));background-color:var(--ui-bottom-sheet-handle-color, var(--global-text-default))}.ui-bottom-sheet-handle._operable{width:var(--ui-bottom-sheet-handle-target-width, 4rem);height:var(--ui-bottom-sheet-handle-target-height, 1.5rem)}.ui-bottom-sheet-handle._operable:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-bottom-sheet-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-bottom-sheet-handle-focus-ring-color, var(--global-border-focus))}.ui-bottom-sheet-header{flex:0 0 auto;display:flex;align-items:flex-start;gap:var(--ui-bottom-sheet-header-gap, var(--units-sm));padding-top:var(--ui-bottom-sheet-grab-padding-y, var(--units-sm))}.ui-bottom-sheet-grab>.ui-bottom-sheet-header:first-child{padding-top:0}.ui-bottom-sheet-title{flex:1 1 auto;min-width:0;margin:0;font-family:var(--ui-bottom-sheet-title-font-family, var(--fontfamily-title));font-size:var(--size-typography-title-sm);font-weight:var(--ui-bottom-sheet-weight, var(--weight-bold));line-height:1.3;overflow-wrap:break-word}.ui-bottom-sheet-action{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-bottom-sheet-action-size, 2rem);height:var(--ui-bottom-sheet-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(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-bottom-sheet-action:hover{background-color:var(--ui-bottom-sheet-close-surface-hover, var(--global-background-muted-hover));color:var(--ui-bottom-sheet-close-color-hover, var(--global-text-muted-hover))}.ui-bottom-sheet-action:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-bottom-sheet-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-bottom-sheet-close-focus-ring-color, var(--global-border-focus))}@media(prefers-reduced-motion:reduce){.ui-bottom-sheet-action{transition-duration:.01ms}}:root[data-motion=off] .ui-bottom-sheet-action{transition-duration:.01ms}.ui-bottom-sheet-content{flex:1 1 auto;min-height:0;padding:var(--ui-bottom-sheet-padding, var(--units-default)) var(--ui-bottom-sheet-padding, var(--units-default)) var(--ui-bottom-sheet-padding-bottom, var(--units-lg));overflow-y:auto;overscroll-behavior:contain;font-size:var(--size-typography-text-md);line-height:1.5}.ui-bottom-sheet-footer{flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--ui-bottom-sheet-footer-gap, var(--units-default));padding:var(--ui-bottom-sheet-footer-padding-top, var(--units-sm)) var(--ui-bottom-sheet-padding, var(--units-default)) var(--ui-bottom-sheet-padding-bottom, var(--units-lg));border-top:var(--ui-bottom-sheet-footer-stroke-width, var(--stroke-sm)) solid var(--ui-bottom-sheet-footer-stroke, transparent)}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }] }); }
614
+ }
615
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiBottomSheet, decorators: [{
616
+ type: Component,
617
+ args: [{ selector: 'ui-bottom-sheet', imports: [A11yModule, UiIcon], template: "@if (mounted()) {\n <!-- Backdrop and positioner are siblings so the sheet can slide over a static\n scrim, and a click beside the sheet lands on the scrim (dismiss). -->\n @if (hasBackdrop()) {\n <div\n class=\"ui-bottom-sheet-scrim\"\n [class._open]=\"atRest()\"\n [class._contained]=\"contained()\"\n [class._no-motion]=\"motionDisabled()\"\n [style.z-index]=\"zIndex()\"\n (pointerdown)=\"onScrimPointerDown($event)\"\n ></div>\n }\n\n <!-- Dialog: Escape/Tab handled on the container, focus lives inside\n (CDK focus-trap). The positioner carries the slide transform. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n #positioner\n class=\"ui-bottom-sheet-positioner\"\n [class._contained]=\"contained()\"\n [class._dragging]=\"dragging()\"\n [class._no-motion]=\"motionDisabled()\"\n [style.z-index]=\"zIndex()\"\n [style.transform]=\"panelTransform()\"\n (transitionend)=\"onTransitionEnd($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <div\n #panel\n [class]=\"panelClasses()\"\n [attr.role]=\"role()\"\n [attr.aria-modal]=\"hasBackdrop() ? 'true' : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [style.height]=\"inlineHeight()\"\n tabindex=\"-1\"\n [cdkTrapFocus]=\"trapFocus()\"\n [cdkTrapFocusAutoCapture]=\"focusOnShow()\"\n >\n <!-- Grab zone: handle + header. The body is left out so it keeps its\n native scroll. -->\n @if (showHandle() || hasHeaderRegion()) {\n <div\n class=\"ui-bottom-sheet-grab\"\n [class._draggable]=\"dragEnabled()\"\n (pointerdown)=\"onDragPointerDown($event)\"\n (pointermove)=\"onDragPointerMove($event)\"\n (pointerup)=\"onDragPointerUp($event)\"\n (pointercancel)=\"onDragPointerUp($event)\"\n >\n @if (showHandle()) {\n @if (canSnap()) {\n <button\n type=\"button\"\n class=\"ui-bottom-sheet-handle _operable\"\n [attr.aria-label]=\"handleAriaLabel()\"\n [attr.aria-expanded]=\"snapped()\"\n (keydown)=\"onHandleKeydown($event)\"\n ></button>\n } @else {\n <div class=\"ui-bottom-sheet-handle\" aria-hidden=\"true\"></div>\n }\n }\n\n @if (hasHeaderRegion()) {\n <div class=\"ui-bottom-sheet-header\">\n @if (hasTitle()) {\n <div [attr.id]=\"titleId\" class=\"ui-bottom-sheet-title\">\n @if (showHeaderString()) {\n {{ header() }}\n }\n <ng-content select=\"[uiBottomSheetHeader], [ui-bottom-sheet-header]\" />\n </div>\n }\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-bottom-sheet-action\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"close()\"\n >\n <ui-icon [name]=\"closeIcon()\" size=\"sm\" />\n </button>\n }\n </div>\n }\n </div>\n }\n\n <!-- Body: scrolls natively, scroll chaining kept inside the sheet.\n `tabindex` is what makes that scroll reachable at the keyboard when the\n body holds no focusable element of its own (WCAG 2.1.1). -->\n <div class=\"ui-bottom-sheet-content\" tabindex=\"0\">\n <ng-content select=\"[uiBottomSheetContent], [ui-bottom-sheet-content]\" />\n <ng-content />\n </div>\n\n @if (footerSlot()) {\n <div class=\"ui-bottom-sheet-footer\">\n <ng-content select=\"[uiBottomSheetFooter], [ui-bottom-sheet-footer]\" />\n </div>\n }\n </div>\n </div>\n}\n", styles: [".ui-bottom-sheet-scrim{position:fixed;inset:0;z-index:var(--ui-bottom-sheet-z-index, 1100);background-color:var(--ui-bottom-sheet-mask-background, var(--primitives-black-50));opacity:0;transition:opacity var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms)}.ui-bottom-sheet-scrim._open{opacity:1}.ui-bottom-sheet-scrim._contained{position:absolute}.ui-bottom-sheet-scrim._no-motion{transition:none}@media(prefers-reduced-motion:reduce){.ui-bottom-sheet-scrim{transition-duration:.01ms}}:root[data-motion=off] .ui-bottom-sheet-scrim{transition-duration:.01ms}.ui-bottom-sheet-positioner{position:fixed;inset-inline:0;inset-block-end:0;z-index:var(--ui-bottom-sheet-z-index, 1100);display:flex;justify-content:center;transition:transform var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms)}.ui-bottom-sheet-positioner._contained{position:absolute}.ui-bottom-sheet-positioner._dragging,.ui-bottom-sheet-positioner._no-motion{transition:none}@media(prefers-reduced-motion:reduce){.ui-bottom-sheet-positioner{transition-duration:.01ms}}:root[data-motion=off] .ui-bottom-sheet-positioner{transition-duration:.01ms}.ui-bottom-sheet{box-sizing:border-box;display:flex;flex-direction:column;width:100%;max-width:var(--ui-bottom-sheet-max-width, 90rem);max-height:var(--ui-bottom-sheet-max-height, 92dvh);border-radius:var(--ui-bottom-sheet-radius, var(--radius-default)) var(--ui-bottom-sheet-radius, var(--radius-default)) 0 0;background-color:var(--ui-bottom-sheet-surface, var(--global-background-default));box-shadow:var(--ui-bottom-sheet-shadow, var(--shadow-default-lg));color:var(--ui-bottom-sheet-color, var(--global-text-default));font-family:var(--ui-bottom-sheet-font-family, var(--fontfamily-base));overflow:hidden;outline:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:height var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms)}.ui-bottom-sheet._half{height:var(--ui-bottom-sheet-half-height, 50dvh)}.ui-bottom-sheet._full{height:var(--ui-bottom-sheet-full-height, 100dvh);max-height:var(--ui-bottom-sheet-full-height, 100dvh)}.ui-bottom-sheet._dragging{max-height:var(--ui-bottom-sheet-full-height, 100dvh)}.ui-bottom-sheet._dragging,.ui-bottom-sheet._no-motion{transition:none}.ui-bottom-sheet._contained{max-height:92%}.ui-bottom-sheet._contained._half{height:50%}.ui-bottom-sheet._contained._full{height:100%;max-height:100%}.ui-bottom-sheet._contained._dragging{max-height:100%}.ui-bottom-sheet._safe-area{padding-bottom:var(--ui-bottom-sheet-safe-area-offset, env(safe-area-inset-bottom, 0px))}.ui-bottom-sheet-grab{flex:0 0 auto;display:flex;flex-direction:column;padding:var(--ui-bottom-sheet-grab-padding-y, var(--units-sm)) var(--ui-bottom-sheet-grab-padding-x, var(--units-md))}.ui-bottom-sheet-grab._draggable{touch-action:none;-webkit-user-select:none;user-select:none;cursor:grab}.ui-bottom-sheet-grab._draggable:active{cursor:grabbing}.ui-bottom-sheet-handle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-bottom-sheet-handle-width, 3.375rem);height:var(--ui-bottom-sheet-handle-height, .25rem);margin-inline:auto;padding:0;border:none;border-radius:var(--ui-bottom-sheet-handle-radius, var(--radius-full));background:none}.ui-bottom-sheet-handle:after{content:\"\";display:block;width:var(--ui-bottom-sheet-handle-width, 3.375rem);height:var(--ui-bottom-sheet-handle-height, .25rem);border-radius:var(--ui-bottom-sheet-handle-radius, var(--radius-full));background-color:var(--ui-bottom-sheet-handle-color, var(--global-text-default))}.ui-bottom-sheet-handle._operable{width:var(--ui-bottom-sheet-handle-target-width, 4rem);height:var(--ui-bottom-sheet-handle-target-height, 1.5rem)}.ui-bottom-sheet-handle._operable:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-bottom-sheet-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-bottom-sheet-handle-focus-ring-color, var(--global-border-focus))}.ui-bottom-sheet-header{flex:0 0 auto;display:flex;align-items:flex-start;gap:var(--ui-bottom-sheet-header-gap, var(--units-sm));padding-top:var(--ui-bottom-sheet-grab-padding-y, var(--units-sm))}.ui-bottom-sheet-grab>.ui-bottom-sheet-header:first-child{padding-top:0}.ui-bottom-sheet-title{flex:1 1 auto;min-width:0;margin:0;font-family:var(--ui-bottom-sheet-title-font-family, var(--fontfamily-title));font-size:var(--size-typography-title-sm);font-weight:var(--ui-bottom-sheet-weight, var(--weight-bold));line-height:1.3;overflow-wrap:break-word}.ui-bottom-sheet-action{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-bottom-sheet-action-size, 2rem);height:var(--ui-bottom-sheet-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(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-bottom-sheet-action:hover{background-color:var(--ui-bottom-sheet-close-surface-hover, var(--global-background-muted-hover));color:var(--ui-bottom-sheet-close-color-hover, var(--global-text-muted-hover))}.ui-bottom-sheet-action:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-bottom-sheet-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-bottom-sheet-close-focus-ring-color, var(--global-border-focus))}@media(prefers-reduced-motion:reduce){.ui-bottom-sheet-action{transition-duration:.01ms}}:root[data-motion=off] .ui-bottom-sheet-action{transition-duration:.01ms}.ui-bottom-sheet-content{flex:1 1 auto;min-height:0;padding:var(--ui-bottom-sheet-padding, var(--units-default)) var(--ui-bottom-sheet-padding, var(--units-default)) var(--ui-bottom-sheet-padding-bottom, var(--units-lg));overflow-y:auto;overscroll-behavior:contain;font-size:var(--size-typography-text-md);line-height:1.5}.ui-bottom-sheet-footer{flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--ui-bottom-sheet-footer-gap, var(--units-default));padding:var(--ui-bottom-sheet-footer-padding-top, var(--units-sm)) var(--ui-bottom-sheet-padding, var(--units-default)) var(--ui-bottom-sheet-padding-bottom, var(--units-lg));border-top:var(--ui-bottom-sheet-footer-stroke-width, var(--stroke-sm)) solid var(--ui-bottom-sheet-footer-stroke, transparent)}\n"] }]
618
+ }], ctorParameters: () => [], propDecorators: { visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], hasBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasBackdrop", required: false }] }], closeOnOverlayClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnOverlayClick", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], blockScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "blockScroll", required: false }] }], enableDragToClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableDragToClose", required: false }] }], dragThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragThreshold", required: false }] }], enableSnapping: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableSnapping", required: false }] }], showHandle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHandle", required: false }] }], trapFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "trapFocus", required: false }] }], focusOnShow: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusOnShow", required: false }] }], autoFocusElement: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFocusElement", required: false }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], closeIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeIcon", required: false }] }], closeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeAriaLabel", required: false }] }], handleAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "handleAriaLabel", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], safeArea: [{ type: i0.Input, args: [{ isSignal: true, alias: "safeArea", required: false }] }], contained: [{ type: i0.Input, args: [{ isSignal: true, alias: "contained", required: false }] }], motionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionDisabled", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], autoZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoZIndex", required: false }] }], baseZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseZIndex", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], headerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => UiBottomSheetHeader), { isSignal: true }] }], contentSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => UiBottomSheetContent), { isSignal: true }] }], footerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => UiBottomSheetFooter), { isSignal: true }] }], positionerRef: [{ type: i0.ViewChild, args: ['positioner', { isSignal: true }] }], panelRef: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
619
+
620
+ /*
621
+ * Public API Surface of ui-kit/ui-bottom-sheet
622
+ */
623
+
624
+ /**
625
+ * Generated bundle index. Do not edit.
626
+ */
627
+
628
+ export { UiBottomSheet, UiBottomSheetContent, UiBottomSheetFooter, UiBottomSheetHeader };
629
+ //# sourceMappingURL=4sh-ui-kit-layout-ui-bottom-sheet.mjs.map