le-kit 0.1.15 → 0.1.16

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 (235) hide show
  1. package/dist/cjs/{index-C3iQZ-Ja.js → index-CHzu3ydp.js} +3 -3
  2. package/dist/cjs/index-CHzu3ydp.js.map +1 -0
  3. package/dist/cjs/index.cjs.js +2 -2
  4. package/dist/cjs/le-box.cjs.entry.js +2 -2
  5. package/dist/cjs/le-button.le-checkbox.le-collapse.le-component.le-current-heading.le-dropdown-base.le-header.le-popover.le-popup.le-scroll-progress.le-select.le-slot.le-string-input.entry.cjs.js.map +1 -0
  6. package/dist/cjs/{le-button_7.cjs.entry.js → le-button_13.cjs.entry.js} +1148 -21
  7. package/dist/cjs/le-card.cjs.entry.js +2 -2
  8. package/dist/cjs/le-combobox.cjs.entry.js +2 -2
  9. package/dist/cjs/le-header-placeholder.cjs.entry.js +18 -0
  10. package/dist/cjs/le-header-placeholder.entry.cjs.js.map +1 -0
  11. package/dist/cjs/le-kit.cjs.js +2 -2
  12. package/dist/cjs/le-multiselect.cjs.entry.js +4 -4
  13. package/dist/cjs/le-number-input.cjs.entry.js +3 -3
  14. package/dist/cjs/le-round-progress.cjs.entry.js +2 -2
  15. package/dist/cjs/le-segmented-control.cjs.entry.js +2 -2
  16. package/dist/cjs/le-stack.cjs.entry.js +3 -3
  17. package/dist/cjs/le-tab-bar.cjs.entry.js +2 -2
  18. package/dist/cjs/le-tab-panel.cjs.entry.js +3 -3
  19. package/dist/cjs/le-tab.cjs.entry.js +3 -3
  20. package/dist/cjs/le-tabs.cjs.entry.js +4 -4
  21. package/dist/cjs/le-tag.cjs.entry.js +2 -2
  22. package/dist/cjs/le-text.cjs.entry.js +2 -2
  23. package/dist/cjs/le-turntable.cjs.entry.js +2 -2
  24. package/dist/cjs/loader.cjs.js +2 -2
  25. package/dist/cjs/{utils-DjPcLPN9.js → utils-CYOKcOW8.js} +3 -3
  26. package/dist/cjs/{utils-DjPcLPN9.js.map → utils-CYOKcOW8.js.map} +1 -1
  27. package/dist/collection/collection-manifest.json +5 -0
  28. package/dist/collection/components/le-collapse/le-collapse.css +31 -0
  29. package/dist/collection/components/le-collapse/le-collapse.js +188 -0
  30. package/dist/collection/components/le-collapse/le-collapse.js.map +1 -0
  31. package/dist/collection/components/le-combobox/le-combobox.js +1 -1
  32. package/dist/collection/components/le-component/le-component.js +1 -1
  33. package/dist/collection/components/le-component/le-component.js.map +1 -1
  34. package/dist/collection/components/le-current-heading/le-current-heading.css +12 -0
  35. package/dist/collection/components/le-current-heading/le-current-heading.js +130 -0
  36. package/dist/collection/components/le-current-heading/le-current-heading.js.map +1 -0
  37. package/dist/collection/components/le-dropdown-base/le-dropdown-base.css +4 -0
  38. package/dist/collection/components/le-dropdown-base/le-dropdown-base.js +1 -1
  39. package/dist/collection/components/le-header/le-header.css +120 -0
  40. package/dist/collection/components/le-header/le-header.js +508 -0
  41. package/dist/collection/components/le-header/le-header.js.map +1 -0
  42. package/dist/collection/components/le-header-placeholder/le-header-placeholder.js +21 -0
  43. package/dist/collection/components/le-header-placeholder/le-header-placeholder.js.map +1 -0
  44. package/dist/collection/components/le-multiselect/le-multiselect.js +3 -3
  45. package/dist/collection/components/le-number-input/le-number-input.js +1 -1
  46. package/dist/collection/components/le-popover/le-popover.css +10 -0
  47. package/dist/collection/components/le-popover/le-popover.js +122 -13
  48. package/dist/collection/components/le-popover/le-popover.js.map +1 -1
  49. package/dist/collection/components/le-round-progress/le-round-progress.js +1 -1
  50. package/dist/collection/components/le-scroll-progress/le-scroll-progress.css +29 -0
  51. package/dist/collection/components/le-scroll-progress/le-scroll-progress.js +186 -0
  52. package/dist/collection/components/le-scroll-progress/le-scroll-progress.js.map +1 -0
  53. package/dist/collection/components/le-segmented-control/le-segmented-control.js +1 -1
  54. package/dist/collection/components/le-select/le-select.js +2 -2
  55. package/dist/collection/components/le-slot/le-slot.js +1 -1
  56. package/dist/collection/components/le-stack/le-stack.js +1 -1
  57. package/dist/collection/components/le-string-input/le-string-input.js +2 -2
  58. package/dist/collection/components/le-tab/le-tab.js +1 -1
  59. package/dist/collection/components/le-tab-bar/le-tab-bar.js +1 -1
  60. package/dist/collection/components/le-tab-panel/le-tab-panel.js +2 -2
  61. package/dist/collection/components/le-tabs/le-tabs.js +2 -2
  62. package/dist/collection/components/le-tag/le-tag.js +1 -1
  63. package/dist/collection/components/le-turntable/le-turntable.js +1 -1
  64. package/dist/collection/dist/components/assets/custom-elements.json +2029 -965
  65. package/dist/collection/dist/components/themes/base.css +4 -48
  66. package/dist/collection/dist/components/themes/index.css +3 -342
  67. package/dist/components/assets/custom-elements.json +2029 -965
  68. package/dist/components/index.js.map +1 -1
  69. package/dist/components/le-box.js +18 -7
  70. package/dist/components/le-box.js.map +1 -1
  71. package/dist/components/le-button.js +1 -1
  72. package/dist/components/le-button2.js +331 -31
  73. package/dist/components/le-button2.js.map +1 -1
  74. package/dist/components/le-card.js +18 -7
  75. package/dist/components/le-card.js.map +1 -1
  76. package/dist/components/le-checkbox.js +1 -1
  77. package/dist/components/le-collapse.d.ts +11 -0
  78. package/dist/components/le-collapse.js +144 -0
  79. package/dist/components/le-collapse.js.map +1 -0
  80. package/dist/components/le-combobox.js +15 -10
  81. package/dist/components/le-combobox.js.map +1 -1
  82. package/dist/components/le-component.js +1 -1
  83. package/dist/components/le-current-heading.d.ts +11 -0
  84. package/dist/components/le-current-heading.js +93 -0
  85. package/dist/components/le-current-heading.js.map +1 -0
  86. package/dist/components/le-dropdown-base2.js +2 -2
  87. package/dist/components/le-dropdown-base2.js.map +1 -1
  88. package/dist/components/le-header-placeholder.d.ts +11 -0
  89. package/dist/components/le-header-placeholder.js +37 -0
  90. package/dist/components/le-header-placeholder.js.map +1 -0
  91. package/dist/components/le-header.d.ts +11 -0
  92. package/dist/components/le-header.js +347 -0
  93. package/dist/components/le-header.js.map +1 -0
  94. package/dist/components/le-multiselect.js +17 -12
  95. package/dist/components/le-multiselect.js.map +1 -1
  96. package/dist/components/le-number-input.js +19 -8
  97. package/dist/components/le-number-input.js.map +1 -1
  98. package/dist/components/le-popover2.js +123 -14
  99. package/dist/components/le-popover2.js.map +1 -1
  100. package/dist/components/le-popup.js +1 -1
  101. package/dist/components/le-round-progress.js +1 -1
  102. package/dist/components/le-scroll-progress.d.ts +11 -0
  103. package/dist/components/le-scroll-progress.js +142 -0
  104. package/dist/components/le-scroll-progress.js.map +1 -0
  105. package/dist/components/le-segmented-control.js +19 -8
  106. package/dist/components/le-segmented-control.js.map +1 -1
  107. package/dist/components/le-select.js +1 -263
  108. package/dist/components/le-select.js.map +1 -1
  109. package/dist/components/le-slot.js +1 -1
  110. package/dist/components/le-stack.js +19 -8
  111. package/dist/components/le-stack.js.map +1 -1
  112. package/dist/components/le-string-input.js +1 -1
  113. package/dist/components/le-tab-bar.js +19 -8
  114. package/dist/components/le-tab-bar.js.map +1 -1
  115. package/dist/components/le-tab-panel.js +20 -9
  116. package/dist/components/le-tab-panel.js.map +1 -1
  117. package/dist/components/le-tab2.js +19 -8
  118. package/dist/components/le-tab2.js.map +1 -1
  119. package/dist/components/le-tabs.js +20 -9
  120. package/dist/components/le-tabs.js.map +1 -1
  121. package/dist/components/le-tag2.js +19 -8
  122. package/dist/components/le-tag2.js.map +1 -1
  123. package/dist/components/le-text.js +18 -7
  124. package/dist/components/le-text.js.map +1 -1
  125. package/dist/components/le-turntable.js +1 -1
  126. package/dist/components/themes/base.css +4 -48
  127. package/dist/components/themes/index.css +3 -342
  128. package/dist/docs.json +1089 -30
  129. package/dist/esm/{index-DzgCnDLJ.js → index-hmBwv43R.js} +3 -3
  130. package/dist/esm/index-hmBwv43R.js.map +1 -0
  131. package/dist/esm/index.js +2 -2
  132. package/dist/esm/le-box.entry.js +2 -2
  133. package/dist/esm/le-button.le-checkbox.le-collapse.le-component.le-current-heading.le-dropdown-base.le-header.le-popover.le-popup.le-scroll-progress.le-select.le-slot.le-string-input.entry.js.map +1 -0
  134. package/dist/esm/{le-button_7.entry.js → le-button_13.entry.js} +1143 -22
  135. package/dist/esm/le-card.entry.js +2 -2
  136. package/dist/esm/le-combobox.entry.js +2 -2
  137. package/dist/esm/le-header-placeholder.entry.js +16 -0
  138. package/dist/esm/le-header-placeholder.entry.js.map +1 -0
  139. package/dist/esm/le-kit.js +3 -3
  140. package/dist/esm/le-multiselect.entry.js +4 -4
  141. package/dist/esm/le-number-input.entry.js +3 -3
  142. package/dist/esm/le-round-progress.entry.js +2 -2
  143. package/dist/esm/le-segmented-control.entry.js +2 -2
  144. package/dist/esm/le-stack.entry.js +3 -3
  145. package/dist/esm/le-tab-bar.entry.js +2 -2
  146. package/dist/esm/le-tab-panel.entry.js +3 -3
  147. package/dist/esm/le-tab.entry.js +3 -3
  148. package/dist/esm/le-tabs.entry.js +4 -4
  149. package/dist/esm/le-tag.entry.js +2 -2
  150. package/dist/esm/le-text.entry.js +2 -2
  151. package/dist/esm/le-turntable.entry.js +2 -2
  152. package/dist/esm/loader.js +3 -3
  153. package/dist/esm/{utils-Dp5xFMCl.js → utils-DRTFlnxz.js} +3 -3
  154. package/dist/esm/{utils-Dp5xFMCl.js.map → utils-DRTFlnxz.js.map} +1 -1
  155. package/dist/le-kit/dist/components/assets/custom-elements.json +2029 -965
  156. package/dist/le-kit/dist/components/themes/base.css +4 -48
  157. package/dist/le-kit/dist/components/themes/index.css +3 -342
  158. package/dist/le-kit/index.esm.js +1 -1
  159. package/dist/le-kit/le-button.le-checkbox.le-collapse.le-component.le-current-heading.le-dropdown-base.le-header.le-popover.le-popup.le-scroll-progress.le-select.le-slot.le-string-input.entry.esm.js.map +1 -0
  160. package/dist/le-kit/le-header-placeholder.entry.esm.js.map +1 -0
  161. package/dist/le-kit/le-kit.css +1 -1
  162. package/dist/le-kit/le-kit.esm.js +1 -1
  163. package/dist/le-kit/{p-1f55a4a2.entry.js → p-13a4dc1d.entry.js} +2 -2
  164. package/dist/le-kit/{p-0bd7803f.entry.js → p-1a9e65d0.entry.js} +2 -2
  165. package/dist/le-kit/p-2708dc65.entry.js +2 -0
  166. package/dist/le-kit/p-2708dc65.entry.js.map +1 -0
  167. package/dist/le-kit/p-2b96a5bd.entry.js +2 -0
  168. package/dist/le-kit/p-2b96a5bd.entry.js.map +1 -0
  169. package/dist/le-kit/{p-7b180d58.entry.js → p-32cbb683.entry.js} +2 -2
  170. package/dist/le-kit/{p-71c78784.entry.js → p-476e1886.entry.js} +2 -2
  171. package/dist/le-kit/p-67d702f9.entry.js +2 -0
  172. package/dist/le-kit/{p-33612923.entry.js → p-6884e3e8.entry.js} +2 -2
  173. package/dist/le-kit/{p-6ecdad85.entry.js → p-704ad5e0.entry.js} +2 -2
  174. package/dist/le-kit/{p-432e8231.entry.js → p-88f9aa40.entry.js} +2 -2
  175. package/dist/le-kit/{p-91993261.entry.js → p-8dd8a487.entry.js} +2 -2
  176. package/dist/le-kit/{p-6ee06c44.entry.js → p-97b7658a.entry.js} +2 -2
  177. package/dist/le-kit/{p-a5d31d40.entry.js → p-c0925e92.entry.js} +2 -2
  178. package/dist/le-kit/{p-548d130b.entry.js → p-c2494a0d.entry.js} +2 -2
  179. package/dist/le-kit/{p-3a52c4de.entry.js → p-ded51018.entry.js} +2 -2
  180. package/dist/le-kit/{p-2c37f174.entry.js → p-e3db7974.entry.js} +2 -2
  181. package/dist/le-kit/{p-b66fd9e1.entry.js → p-f9b03aec.entry.js} +2 -2
  182. package/dist/le-kit/p-hmBwv43R.js +3 -0
  183. package/dist/le-kit/p-hmBwv43R.js.map +1 -0
  184. package/dist/le-kit/p-txKmCJHv.js +2 -0
  185. package/dist/le-kit/{p-DaA5gINj.js.map → p-txKmCJHv.js.map} +1 -1
  186. package/dist/themes/base.css +4 -48
  187. package/dist/themes/index.css +3 -342
  188. package/dist/types/components/le-collapse/le-collapse.d.ts +41 -0
  189. package/dist/types/components/le-current-heading/le-current-heading.d.ts +25 -0
  190. package/dist/types/components/le-header/le-header.d.ts +115 -0
  191. package/dist/types/components/le-header-placeholder/le-header-placeholder.d.ts +13 -0
  192. package/dist/types/components/le-popover/le-popover.d.ts +9 -0
  193. package/dist/types/components/le-scroll-progress/le-scroll-progress.d.ts +40 -0
  194. package/dist/types/components.d.ts +518 -0
  195. package/package.json +1 -1
  196. package/dist/cjs/index-C3iQZ-Ja.js.map +0 -1
  197. package/dist/cjs/le-button.le-checkbox.le-component.le-popover.le-popup.le-slot.le-string-input.entry.cjs.js.map +0 -1
  198. package/dist/cjs/le-dropdown-base.cjs.entry.js +0 -348
  199. package/dist/cjs/le-dropdown-base.entry.cjs.js.map +0 -1
  200. package/dist/cjs/le-select.cjs.entry.js +0 -188
  201. package/dist/cjs/le-select.entry.cjs.js.map +0 -1
  202. package/dist/esm/index-DzgCnDLJ.js.map +0 -1
  203. package/dist/esm/le-button.le-checkbox.le-component.le-popover.le-popup.le-slot.le-string-input.entry.js.map +0 -1
  204. package/dist/esm/le-dropdown-base.entry.js +0 -346
  205. package/dist/esm/le-dropdown-base.entry.js.map +0 -1
  206. package/dist/esm/le-select.entry.js +0 -186
  207. package/dist/esm/le-select.entry.js.map +0 -1
  208. package/dist/le-kit/le-button.le-checkbox.le-component.le-popover.le-popup.le-slot.le-string-input.entry.esm.js.map +0 -1
  209. package/dist/le-kit/le-dropdown-base.entry.esm.js.map +0 -1
  210. package/dist/le-kit/le-select.entry.esm.js.map +0 -1
  211. package/dist/le-kit/p-4130c60b.entry.js +0 -2
  212. package/dist/le-kit/p-4130c60b.entry.js.map +0 -1
  213. package/dist/le-kit/p-DaA5gINj.js +0 -2
  214. package/dist/le-kit/p-DzgCnDLJ.js +0 -3
  215. package/dist/le-kit/p-DzgCnDLJ.js.map +0 -1
  216. package/dist/le-kit/p-beb87e61.entry.js +0 -2
  217. package/dist/le-kit/p-cc0797b0.entry.js +0 -2
  218. package/dist/le-kit/p-cc0797b0.entry.js.map +0 -1
  219. package/dist/le-kit/p-d504a369.entry.js +0 -2
  220. package/dist/le-kit/p-d504a369.entry.js.map +0 -1
  221. /package/dist/le-kit/{p-1f55a4a2.entry.js.map → p-13a4dc1d.entry.js.map} +0 -0
  222. /package/dist/le-kit/{p-0bd7803f.entry.js.map → p-1a9e65d0.entry.js.map} +0 -0
  223. /package/dist/le-kit/{p-7b180d58.entry.js.map → p-32cbb683.entry.js.map} +0 -0
  224. /package/dist/le-kit/{p-71c78784.entry.js.map → p-476e1886.entry.js.map} +0 -0
  225. /package/dist/le-kit/{p-beb87e61.entry.js.map → p-67d702f9.entry.js.map} +0 -0
  226. /package/dist/le-kit/{p-33612923.entry.js.map → p-6884e3e8.entry.js.map} +0 -0
  227. /package/dist/le-kit/{p-6ecdad85.entry.js.map → p-704ad5e0.entry.js.map} +0 -0
  228. /package/dist/le-kit/{p-432e8231.entry.js.map → p-88f9aa40.entry.js.map} +0 -0
  229. /package/dist/le-kit/{p-91993261.entry.js.map → p-8dd8a487.entry.js.map} +0 -0
  230. /package/dist/le-kit/{p-6ee06c44.entry.js.map → p-97b7658a.entry.js.map} +0 -0
  231. /package/dist/le-kit/{p-a5d31d40.entry.js.map → p-c0925e92.entry.js.map} +0 -0
  232. /package/dist/le-kit/{p-548d130b.entry.js.map → p-c2494a0d.entry.js.map} +0 -0
  233. /package/dist/le-kit/{p-3a52c4de.entry.js.map → p-ded51018.entry.js.map} +0 -0
  234. /package/dist/le-kit/{p-2c37f174.entry.js.map → p-e3db7974.entry.js.map} +0 -0
  235. /package/dist/le-kit/{p-b66fd9e1.entry.js.map → p-f9b03aec.entry.js.map} +0 -0
@@ -0,0 +1,120 @@
1
+ :host {
2
+ display: block;
3
+ width: 100%;
4
+
5
+ /* Container styles */
6
+ /* Offset from the top of the page (e.g. if page has top padding or another fixed bar). */
7
+ --le-header-top-offset: 0;
8
+
9
+ --le-header-bg: var(--le-color-surface);
10
+ --le-header-max-width: var(--le-header-max-width, auto);
11
+ --le-header-margin: 0 auto;
12
+ --le-header-border: 1px solid var(--le-color-border);
13
+ --le-header-border-radius: 0px;
14
+ --le-header-shadow: var(--le-header-shadow, none);
15
+
16
+ /* Content styles */
17
+ --le-header-color: var(--le-color-text);
18
+ --le-header-content-max-width: 800px;
19
+ --le-header-padding-x: var(--le-space-md);
20
+ --le-header-padding-y: var(--le-space-sm);
21
+ --le-header-gap: var(--le-space-sm);
22
+
23
+ --le-header-transition: var(--le-transition-normal);
24
+ --le-header-z: 1000;
25
+ }
26
+
27
+ .header {
28
+ width: 100%;
29
+ max-width: var(--le-header-max-width);
30
+ margin: var(--le-header-margin);
31
+ background: var(--le-header-bg);
32
+ color: var(--le-header-color);
33
+ border-bottom: var(--le-header-border);
34
+ border-radius: var(--le-header-border-radius);
35
+ box-shadow: var(--le-header-shadow);
36
+ }
37
+
38
+ :host(.is-fixed) {
39
+ position: fixed;
40
+ top: var(--le-header-top-offset);
41
+ left: 0;
42
+ right: 0;
43
+ z-index: var(--le-header-z);
44
+ }
45
+
46
+ :host(.is-sticky) {
47
+ position: sticky;
48
+ top: var(--le-header-top-offset);
49
+ z-index: var(--le-header-z);
50
+ }
51
+
52
+ :host(.is-static) {
53
+ position: relative;
54
+ }
55
+
56
+ .inner {
57
+ max-width: var(--le-header-content-max-width);
58
+ margin: 0 auto;
59
+ padding: var(--le-header-padding-y) var(--le-header-padding-x);
60
+ }
61
+
62
+ .row {
63
+ display: grid;
64
+ grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
65
+ align-items: center;
66
+ gap: var(--le-header-gap);
67
+ transition:
68
+ height var(--le-header-transition),
69
+ padding var(--le-header-transition),
70
+ transform var(--le-header-transition);
71
+ }
72
+
73
+ :host(.is-shrunk) .row {
74
+ height: var(--le-header-height-condensed);
75
+ }
76
+
77
+ /* reveal behavior (sticky only) */
78
+ :host(.is-sticky.is-hidden) {
79
+ transform: translateY(-150%);
80
+ transition: transform var(--le-header-transition);
81
+ }
82
+
83
+ :host(.is-sticky.is-revealed) {
84
+ transform: translateY(0);
85
+ transition: transform var(--le-header-transition);
86
+ }
87
+
88
+ .start,
89
+ .title,
90
+ .end {
91
+ min-width: 0;
92
+ display: flex;
93
+ align-items: center;
94
+ }
95
+
96
+ .start {
97
+ justify-content: flex-start;
98
+ }
99
+
100
+ .end {
101
+ justify-content: flex-end;
102
+ }
103
+
104
+ .title {
105
+ justify-content: center;
106
+ text-align: center;
107
+ }
108
+
109
+ .title-slot ::slotted(*) {
110
+ white-space: nowrap;
111
+ overflow: hidden;
112
+ text-overflow: ellipsis;
113
+ }
114
+
115
+ .compact-title {
116
+ font: inherit;
117
+ white-space: nowrap;
118
+ overflow: hidden;
119
+ text-overflow: ellipsis;
120
+ }
@@ -0,0 +1,508 @@
1
+ import { h, Host, } from "@stencil/core";
2
+ import { classnames } from "../../utils/utils";
3
+ /**
4
+ * A functional page header with scroll-aware behaviors.
5
+ *
6
+ * Features:
7
+ * - Static (default), sticky, or fixed positioning
8
+ * - Optional shrink-on-scroll behavior via `shrink-offset`
9
+ * - Optional reveal-on-scroll-up via `reveal-on-scroll` (sticky only)
10
+ *
11
+ * Slots:
12
+ * - `start`: left side (logo/back button)
13
+ * - `title`: centered/primary title content
14
+ * - `end`: right side actions
15
+ * - default: extra content row (e.g., tabs/search) rendered below main row
16
+ *
17
+ * @slot start - Start area content
18
+ * @slot title - Title content
19
+ * @slot end - End area content
20
+ * @slot - Optional secondary row content
21
+ *
22
+ * @cssprop --le-header-bg - Background (color/gradient)
23
+ * @cssprop --le-header-color - Text color
24
+ * @cssprop --le-header-border - Border (e.g. 1px solid ...)
25
+ * @cssprop --le-header-shadow - Shadow/elevation
26
+ * @cssprop --le-header-max-width - Inner content max width
27
+ * @cssprop --le-header-padding-x - Horizontal padding
28
+ * @cssprop --le-header-padding-y - Vertical padding
29
+ * @cssprop --le-header-gap - Gap between zones
30
+ * @cssprop --le-header-height - Base height (main row)
31
+ * @cssprop --le-header-height-condensed - Condensed height when shrunk
32
+ * @cssprop --le-header-transition - Transition timing
33
+ * @cssprop --le-header-z - Z-index (fixed mode)
34
+ *
35
+ * @csspart header - The header container
36
+ * @csspart inner - Inner max-width container
37
+ * @csspart row - Main row
38
+ * @csspart start - Start zone
39
+ * @csspart title - Title zone
40
+ * @csspart end - End zone
41
+ * @csspart secondary - Secondary row
42
+ *
43
+ * @cmsEditable true
44
+ * @cmsCategory Layout
45
+ */
46
+ export class LeHeader {
47
+ el;
48
+ /** Force static positioning (default). Ignored if `sticky` or `fixed` are true. */
49
+ isStatic = false;
50
+ /** Sticky positioning (in-flow). Ignored if `fixed` is true. */
51
+ sticky = false;
52
+ /** Fixed positioning (out-of-flow). Takes precedence over `sticky`/`static`. */
53
+ fixed = false;
54
+ /**
55
+ * Sticky-only reveal behavior (hide on scroll down, show on scroll up).
56
+ * - missing/false: disabled
57
+ * - true/empty attribute: enabled with default threshold (16)
58
+ * - number (as string): enabled and used as threshold
59
+ */
60
+ revealOnScroll;
61
+ /**
62
+ * Shrink trigger.
63
+ * - missing/0: disabled
64
+ * - number (px): shrink when scrollY >= that value (but never before header height)
65
+ * - css var name (e.g. --foo): shrink when scrollY >= resolved var value
66
+ * - selector (e.g. .page-title): shrink when that element scrolls out of view above the viewport
67
+ */
68
+ shrinkOffset;
69
+ /**
70
+ * If true, expand the header when hovered
71
+ */
72
+ expandOnHover = false;
73
+ /** Emits whenever scroll-driven state changes. */
74
+ leHeaderState;
75
+ /** Emits when the header shrinks/expands (only on change). */
76
+ leHeaderShrinkChange;
77
+ /** Emits when the header hides/shows (only on change). */
78
+ leHeaderVisibilityChange;
79
+ revealed = true;
80
+ shrunk = false;
81
+ placeholderHeight = null;
82
+ hoverActive = false;
83
+ disconnectModeObserver;
84
+ rafId = null;
85
+ measureRafId = null;
86
+ lastY = 0;
87
+ lastEmittedDirection = 'down';
88
+ headerEl;
89
+ shrinkSelectorEl;
90
+ setShrunk(next, y) {
91
+ if (next === this.shrunk)
92
+ return;
93
+ this.shrunk = next;
94
+ this.leHeaderShrinkChange.emit({ shrunk: this.shrunk, y });
95
+ }
96
+ componentDidLoad() {
97
+ if (typeof window === 'undefined')
98
+ return;
99
+ this.lastY = window.scrollY || 0;
100
+ this.scheduleMeasure(true);
101
+ this.scheduleUpdate(true);
102
+ }
103
+ disconnectedCallback() {
104
+ this.disconnectModeObserver?.();
105
+ if (this.rafId != null) {
106
+ cancelAnimationFrame(this.rafId);
107
+ this.rafId = null;
108
+ }
109
+ if (this.measureRafId != null) {
110
+ cancelAnimationFrame(this.measureRafId);
111
+ this.measureRafId = null;
112
+ }
113
+ }
114
+ onBehaviorPropsChange() {
115
+ this.scheduleUpdate(true);
116
+ this.scheduleMeasure(true);
117
+ }
118
+ onWindowScroll() {
119
+ this.scheduleUpdate();
120
+ }
121
+ onWindowResize() {
122
+ this.scheduleMeasure(true);
123
+ this.scheduleUpdate(true);
124
+ }
125
+ getPosition() {
126
+ if (this.fixed)
127
+ return 'fixed';
128
+ if (this.sticky)
129
+ return 'sticky';
130
+ return 'static';
131
+ }
132
+ parseRevealThreshold() {
133
+ // Only applies in sticky mode.
134
+ if (!this.sticky || this.fixed)
135
+ return null;
136
+ if (this.revealOnScroll == null)
137
+ return null;
138
+ const raw = String(this.revealOnScroll).trim();
139
+ if (raw === '' || raw === 'true')
140
+ return 16;
141
+ if (raw === 'false')
142
+ return null;
143
+ const n = Number(raw);
144
+ return Number.isFinite(n) ? Math.max(0, n) : 16;
145
+ }
146
+ resolveShrinkStartPx() {
147
+ const raw = (this.shrinkOffset ?? '').trim();
148
+ if (!raw || raw === '0')
149
+ return null;
150
+ // Numeric
151
+ const numeric = Number(raw);
152
+ if (Number.isFinite(numeric))
153
+ return Math.max(0, numeric);
154
+ // CSS variable name
155
+ if (raw.startsWith('--')) {
156
+ const value = getComputedStyle(document.documentElement).getPropertyValue(raw).trim();
157
+ const v = Number(value.replace('px', '').trim());
158
+ return Number.isFinite(v) ? Math.max(0, v) : null;
159
+ }
160
+ // Selector
161
+ try {
162
+ const el = document.querySelector(raw);
163
+ this.shrinkSelectorEl = el;
164
+ return null;
165
+ }
166
+ catch {
167
+ this.shrinkSelectorEl = null;
168
+ return null;
169
+ }
170
+ }
171
+ scheduleUpdate(force = false) {
172
+ if (this.rafId != null) {
173
+ if (!force)
174
+ return;
175
+ cancelAnimationFrame(this.rafId);
176
+ this.rafId = null;
177
+ }
178
+ this.rafId = requestAnimationFrame(() => {
179
+ this.rafId = null;
180
+ this.updateFromScroll();
181
+ });
182
+ }
183
+ scheduleMeasure(force = false) {
184
+ if (this.measureRafId != null && !force)
185
+ return;
186
+ this.measureRafId = requestAnimationFrame(() => {
187
+ this.measureRafId = null;
188
+ this.measurePlaceholderHeight();
189
+ });
190
+ }
191
+ measurePlaceholderHeight() {
192
+ // Measure the rendered header height once (and on resize/mode change).
193
+ // This intentionally ignores scroll/shrink behavior; it should reserve the full header height.
194
+ if (!this.headerEl)
195
+ return;
196
+ const next = Math.ceil(this.headerEl.getBoundingClientRect().height);
197
+ if (!Number.isFinite(next) || next <= 0)
198
+ return;
199
+ if (next !== this.placeholderHeight) {
200
+ this.placeholderHeight = next;
201
+ // Publish to global root so placeholders anywhere can read it.
202
+ if (typeof document !== 'undefined') {
203
+ document.documentElement.style.setProperty('--le-header-height', `${next}px`);
204
+ }
205
+ }
206
+ }
207
+ updateFromScroll() {
208
+ const y = typeof window !== 'undefined' ? window.scrollY || 0 : 0;
209
+ const delta = y - this.lastY;
210
+ const direction = delta < 0 ? 'up' : 'down';
211
+ // Shrink behavior
212
+ let computedShrunk = false;
213
+ const headerHeight = Math.max(0, this.placeholderHeight ?? 0);
214
+ const shrinkStartPx = typeof window !== 'undefined' ? this.resolveShrinkStartPx() : null;
215
+ if (this.shrinkSelectorEl) {
216
+ const rect = this.shrinkSelectorEl.getBoundingClientRect();
217
+ computedShrunk = rect.bottom <= 0;
218
+ }
219
+ else if (shrinkStartPx != null) {
220
+ const effectiveStart = Math.max(shrinkStartPx, headerHeight);
221
+ computedShrunk = y >= effectiveStart;
222
+ }
223
+ // Hover override: when enabled and hovered, force expanded.
224
+ const nextShrunk = this.expandOnHover && this.hoverActive ? false : computedShrunk;
225
+ this.setShrunk(nextShrunk, y);
226
+ // Reveal-on-scroll (sticky-only)
227
+ const revealThreshold = this.parseRevealThreshold();
228
+ if (revealThreshold != null) {
229
+ // Always show the header near the top of the page.
230
+ const topLock = Math.max(0, this.placeholderHeight ?? 0);
231
+ if (y <= topLock) {
232
+ if (!this.revealed) {
233
+ this.revealed = true;
234
+ this.leHeaderVisibilityChange.emit({ visible: true, y });
235
+ }
236
+ }
237
+ else if (Math.abs(delta) >= revealThreshold) {
238
+ const nextRevealed = direction === 'up' || y <= 0;
239
+ if (nextRevealed !== this.revealed) {
240
+ this.revealed = nextRevealed;
241
+ this.leHeaderVisibilityChange.emit({ visible: this.revealed, y });
242
+ }
243
+ this.lastEmittedDirection = direction;
244
+ }
245
+ }
246
+ else {
247
+ if (!this.revealed) {
248
+ this.revealed = true;
249
+ this.leHeaderVisibilityChange.emit({ visible: true, y });
250
+ }
251
+ }
252
+ this.lastY = y;
253
+ this.leHeaderState.emit({
254
+ y,
255
+ direction: this.lastEmittedDirection,
256
+ revealed: this.revealed,
257
+ shrunk: this.shrunk,
258
+ });
259
+ }
260
+ render() {
261
+ const position = this.getPosition();
262
+ const hostClass = classnames('le-header', {
263
+ 'header-is-shrunk': this.shrunk,
264
+ 'is-fixed': position === 'fixed',
265
+ 'is-sticky': position === 'sticky',
266
+ 'is-static': position === 'static',
267
+ 'is-revealed': this.revealed,
268
+ 'is-hidden': !this.revealed,
269
+ 'is-shrunk': this.shrunk,
270
+ });
271
+ return (h(Host, { key: '3fc823975a0ebcae3cb799bf94e35a289813cd35', class: hostClass, onMouseEnter: () => {
272
+ if (!this.expandOnHover)
273
+ return;
274
+ this.hoverActive = true;
275
+ this.scheduleUpdate(true);
276
+ }, onMouseLeave: () => {
277
+ if (!this.expandOnHover)
278
+ return;
279
+ this.hoverActive = false;
280
+ this.scheduleUpdate(true);
281
+ } }, h("le-component", { key: 'bb8e3c5717112e427fd86a6af4231b33147769e7', component: "le-header" }, h("header", { key: 'da96d6a1eb91a85ea8050870895fcd13bdb28391', class: "header", part: "header", role: "banner", ref: el => (this.headerEl = el) }, h("div", { key: '04386a3d535189012655ee352822812349d386d7', class: "inner", part: "inner" }, h("div", { key: '4b1fc43ca08e981f3dc810a23c14e6ed3200a1de', class: "row", part: "row" }, h("div", { key: '8fad255865a0d2e2662f3ad1030d48f8586ae8c7', class: "start", part: "start" }, h("le-slot", { key: '702eeebfe3133dae44e5268848ce5cac81f3b306', name: "start", label: "Start", description: "Logo / back button / nav", "allowed-components": "le-button,le-text,le-tag,le-box,le-stack" }, h("slot", { key: 'bdd3478abbdcd46143ce8a79d096baab84d12588', name: "start" }))), h("div", { key: 'e5b7d3d42e28d80b2df89a3ab365a29b39544f14', class: "title", part: "title" }, h("le-slot", { key: 'b5a68c8baaf05769ea838ca0482fa1db52b03b3a', name: "title", label: "Title", description: "Header title", type: "text", tag: "span" }, h("span", { key: '91763f968886e052a637959253863e583da51b76', class: "title-slot", part: "title" }, h("slot", { key: '060be7c91cca50c26db56cd15ad5d38962c8003f', name: "title" })))), h("div", { key: '938222741cbe15e531ff355185c4f599a3d26147', class: "end", part: "end" }, h("le-slot", { key: '8e1c91426dc87f1bdcb98d33b7da4cc6988781cf', name: "end", label: "End", description: "Actions", "allowed-components": "le-button,le-text,le-tag,le-box,le-stack" }, h("slot", { key: '67e4bda7e7c754dda5a7d9505a9b451f2487f47b', name: "end" })))), h("div", { key: '84dfedd30ec9bd49b668b2e1676ce3712b9d2faf', class: "secondary", part: "secondary" }, h("le-slot", { key: '95c56a8e3dbaaf284b03d72f1d9ec01d24c148d2', name: "", label: "Secondary", description: "Secondary row content", "allowed-components": "le-tabs,le-tab-bar,le-select,le-combobox,le-text,le-stack,le-box" }, h("slot", { key: '240df8fc23a9bc4e7aa294c52b229c7abf7c427d' }))))))));
282
+ }
283
+ static get is() { return "le-header"; }
284
+ static get encapsulation() { return "shadow"; }
285
+ static get originalStyleUrls() {
286
+ return {
287
+ "$": ["le-header.css"]
288
+ };
289
+ }
290
+ static get styleUrls() {
291
+ return {
292
+ "$": ["le-header.css"]
293
+ };
294
+ }
295
+ static get properties() {
296
+ return {
297
+ "isStatic": {
298
+ "type": "boolean",
299
+ "mutable": false,
300
+ "complexType": {
301
+ "original": "boolean",
302
+ "resolved": "boolean",
303
+ "references": {}
304
+ },
305
+ "required": false,
306
+ "optional": false,
307
+ "docs": {
308
+ "tags": [],
309
+ "text": "Force static positioning (default). Ignored if `sticky` or `fixed` are true."
310
+ },
311
+ "getter": false,
312
+ "setter": false,
313
+ "reflect": true,
314
+ "attribute": "static",
315
+ "defaultValue": "false"
316
+ },
317
+ "sticky": {
318
+ "type": "boolean",
319
+ "mutable": false,
320
+ "complexType": {
321
+ "original": "boolean",
322
+ "resolved": "boolean",
323
+ "references": {}
324
+ },
325
+ "required": false,
326
+ "optional": false,
327
+ "docs": {
328
+ "tags": [],
329
+ "text": "Sticky positioning (in-flow). Ignored if `fixed` is true."
330
+ },
331
+ "getter": false,
332
+ "setter": false,
333
+ "reflect": true,
334
+ "attribute": "sticky",
335
+ "defaultValue": "false"
336
+ },
337
+ "fixed": {
338
+ "type": "boolean",
339
+ "mutable": false,
340
+ "complexType": {
341
+ "original": "boolean",
342
+ "resolved": "boolean",
343
+ "references": {}
344
+ },
345
+ "required": false,
346
+ "optional": false,
347
+ "docs": {
348
+ "tags": [],
349
+ "text": "Fixed positioning (out-of-flow). Takes precedence over `sticky`/`static`."
350
+ },
351
+ "getter": false,
352
+ "setter": false,
353
+ "reflect": true,
354
+ "attribute": "fixed",
355
+ "defaultValue": "false"
356
+ },
357
+ "revealOnScroll": {
358
+ "type": "string",
359
+ "mutable": false,
360
+ "complexType": {
361
+ "original": "string",
362
+ "resolved": "string",
363
+ "references": {}
364
+ },
365
+ "required": false,
366
+ "optional": true,
367
+ "docs": {
368
+ "tags": [],
369
+ "text": "Sticky-only reveal behavior (hide on scroll down, show on scroll up).\n- missing/false: disabled\n- true/empty attribute: enabled with default threshold (16)\n- number (as string): enabled and used as threshold"
370
+ },
371
+ "getter": false,
372
+ "setter": false,
373
+ "reflect": true,
374
+ "attribute": "reveal-on-scroll"
375
+ },
376
+ "shrinkOffset": {
377
+ "type": "string",
378
+ "mutable": false,
379
+ "complexType": {
380
+ "original": "string",
381
+ "resolved": "string",
382
+ "references": {}
383
+ },
384
+ "required": false,
385
+ "optional": true,
386
+ "docs": {
387
+ "tags": [],
388
+ "text": "Shrink trigger.\n- missing/0: disabled\n- number (px): shrink when scrollY >= that value (but never before header height)\n- css var name (e.g. --foo): shrink when scrollY >= resolved var value\n- selector (e.g. .page-title): shrink when that element scrolls out of view above the viewport"
389
+ },
390
+ "getter": false,
391
+ "setter": false,
392
+ "reflect": true,
393
+ "attribute": "shrink-offset"
394
+ },
395
+ "expandOnHover": {
396
+ "type": "boolean",
397
+ "mutable": false,
398
+ "complexType": {
399
+ "original": "boolean",
400
+ "resolved": "boolean",
401
+ "references": {}
402
+ },
403
+ "required": false,
404
+ "optional": false,
405
+ "docs": {
406
+ "tags": [],
407
+ "text": "If true, expand the header when hovered"
408
+ },
409
+ "getter": false,
410
+ "setter": false,
411
+ "reflect": true,
412
+ "attribute": "expand-on-hover",
413
+ "defaultValue": "false"
414
+ }
415
+ };
416
+ }
417
+ static get states() {
418
+ return {
419
+ "revealed": {},
420
+ "shrunk": {},
421
+ "placeholderHeight": {},
422
+ "hoverActive": {}
423
+ };
424
+ }
425
+ static get events() {
426
+ return [{
427
+ "method": "leHeaderState",
428
+ "name": "leHeaderState",
429
+ "bubbles": true,
430
+ "cancelable": true,
431
+ "composed": true,
432
+ "docs": {
433
+ "tags": [],
434
+ "text": "Emits whenever scroll-driven state changes."
435
+ },
436
+ "complexType": {
437
+ "original": "{\n y: number;\n direction: 'up' | 'down';\n revealed: boolean;\n shrunk: boolean;\n }",
438
+ "resolved": "{ y: number; direction: \"up\" | \"down\"; revealed: boolean; shrunk: boolean; }",
439
+ "references": {}
440
+ }
441
+ }, {
442
+ "method": "leHeaderShrinkChange",
443
+ "name": "leHeaderShrinkChange",
444
+ "bubbles": true,
445
+ "cancelable": true,
446
+ "composed": true,
447
+ "docs": {
448
+ "tags": [],
449
+ "text": "Emits when the header shrinks/expands (only on change)."
450
+ },
451
+ "complexType": {
452
+ "original": "{ shrunk: boolean; y: number }",
453
+ "resolved": "{ shrunk: boolean; y: number; }",
454
+ "references": {}
455
+ }
456
+ }, {
457
+ "method": "leHeaderVisibilityChange",
458
+ "name": "leHeaderVisibilityChange",
459
+ "bubbles": true,
460
+ "cancelable": true,
461
+ "composed": true,
462
+ "docs": {
463
+ "tags": [],
464
+ "text": "Emits when the header hides/shows (only on change)."
465
+ },
466
+ "complexType": {
467
+ "original": "{ visible: boolean; y: number }",
468
+ "resolved": "{ visible: boolean; y: number; }",
469
+ "references": {}
470
+ }
471
+ }];
472
+ }
473
+ static get elementRef() { return "el"; }
474
+ static get watchers() {
475
+ return [{
476
+ "propName": "revealOnScroll",
477
+ "methodName": "onBehaviorPropsChange"
478
+ }, {
479
+ "propName": "shrinkOffset",
480
+ "methodName": "onBehaviorPropsChange"
481
+ }, {
482
+ "propName": "fixed",
483
+ "methodName": "onBehaviorPropsChange"
484
+ }, {
485
+ "propName": "sticky",
486
+ "methodName": "onBehaviorPropsChange"
487
+ }, {
488
+ "propName": "isStatic",
489
+ "methodName": "onBehaviorPropsChange"
490
+ }];
491
+ }
492
+ static get listeners() {
493
+ return [{
494
+ "name": "scroll",
495
+ "method": "onWindowScroll",
496
+ "target": "window",
497
+ "capture": false,
498
+ "passive": true
499
+ }, {
500
+ "name": "resize",
501
+ "method": "onWindowResize",
502
+ "target": "window",
503
+ "capture": false,
504
+ "passive": true
505
+ }];
506
+ }
507
+ }
508
+ //# sourceMappingURL=le-header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"le-header.js","sourceRoot":"","sources":["../../../src/components/le-header/le-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,EACJ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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { classnames } from '../../utils/utils';\n\nexport type LeHeaderPosition = 'static' | 'sticky' | 'fixed';\n\n/**\n * A functional page header with scroll-aware behaviors.\n *\n * Features:\n * - Static (default), sticky, or fixed positioning\n * - Optional shrink-on-scroll behavior via `shrink-offset`\n * - Optional reveal-on-scroll-up via `reveal-on-scroll` (sticky only)\n *\n * Slots:\n * - `start`: left side (logo/back button)\n * - `title`: centered/primary title content\n * - `end`: right side actions\n * - default: extra content row (e.g., tabs/search) rendered below main row\n *\n * @slot start - Start area content\n * @slot title - Title content\n * @slot end - End area content\n * @slot - Optional secondary row content\n *\n * @cssprop --le-header-bg - Background (color/gradient)\n * @cssprop --le-header-color - Text color\n * @cssprop --le-header-border - Border (e.g. 1px solid ...)\n * @cssprop --le-header-shadow - Shadow/elevation\n * @cssprop --le-header-max-width - Inner content max width\n * @cssprop --le-header-padding-x - Horizontal padding\n * @cssprop --le-header-padding-y - Vertical padding\n * @cssprop --le-header-gap - Gap between zones\n * @cssprop --le-header-height - Base height (main row)\n * @cssprop --le-header-height-condensed - Condensed height when shrunk\n * @cssprop --le-header-transition - Transition timing\n * @cssprop --le-header-z - Z-index (fixed mode)\n *\n * @csspart header - The header container\n * @csspart inner - Inner max-width container\n * @csspart row - Main row\n * @csspart start - Start zone\n * @csspart title - Title zone\n * @csspart end - End zone\n * @csspart secondary - Secondary row\n *\n * @cmsEditable true\n * @cmsCategory Layout\n */\n@Component({\n tag: 'le-header',\n styleUrl: 'le-header.css',\n shadow: true,\n})\nexport class LeHeader {\n @Element() el: HTMLElement;\n\n /** Force static positioning (default). Ignored if `sticky` or `fixed` are true. */\n @Prop({ attribute: 'static', reflect: true }) isStatic: boolean = false;\n\n /** Sticky positioning (in-flow). Ignored if `fixed` is true. */\n @Prop({ reflect: true }) sticky: boolean = false;\n\n /** Fixed positioning (out-of-flow). Takes precedence over `sticky`/`static`. */\n @Prop({ reflect: true }) fixed: boolean = false;\n\n /**\n * Sticky-only reveal behavior (hide on scroll down, show on scroll up).\n * - missing/false: disabled\n * - true/empty attribute: enabled with default threshold (16)\n * - number (as string): enabled and used as threshold\n */\n @Prop({ attribute: 'reveal-on-scroll', reflect: true }) revealOnScroll?: string;\n\n /**\n * Shrink trigger.\n * - missing/0: disabled\n * - number (px): shrink when scrollY >= that value (but never before header height)\n * - css var name (e.g. --foo): shrink when scrollY >= resolved var value\n * - selector (e.g. .page-title): shrink when that element scrolls out of view above the viewport\n */\n @Prop({ attribute: 'shrink-offset', reflect: true }) shrinkOffset?: string;\n\n /**\n * If true, expand the header when hovered\n */\n @Prop({ attribute: 'expand-on-hover', reflect: true }) expandOnHover: boolean = false;\n\n /** Emits whenever scroll-driven state changes. */\n @Event() leHeaderState: EventEmitter<{\n y: number;\n direction: 'up' | 'down';\n revealed: boolean;\n shrunk: boolean;\n }>;\n\n /** Emits when the header shrinks/expands (only on change). */\n @Event({ bubbles: true, composed: true })\n leHeaderShrinkChange: EventEmitter<{ shrunk: boolean; y: number }>;\n\n /** Emits when the header hides/shows (only on change). */\n @Event({ bubbles: true, composed: true })\n leHeaderVisibilityChange: EventEmitter<{ visible: boolean; y: number }>;\n\n @State() private revealed: boolean = true;\n @State() private shrunk: boolean = false;\n @State() private placeholderHeight: number | null = null;\n @State() private hoverActive: boolean = false;\n\n private disconnectModeObserver?: () => void;\n private rafId: number | null = null;\n private measureRafId: number | null = null;\n private lastY: number = 0;\n private lastEmittedDirection: 'up' | 'down' = 'down';\n private headerEl?: HTMLElement;\n private shrinkSelectorEl?: Element | null;\n\n private setShrunk(next: boolean, y: number) {\n if (next === this.shrunk) return;\n this.shrunk = next;\n this.leHeaderShrinkChange.emit({ shrunk: this.shrunk, y });\n }\n\n componentDidLoad() {\n if (typeof window === 'undefined') return;\n this.lastY = window.scrollY || 0;\n this.scheduleMeasure(true);\n this.scheduleUpdate(true);\n }\n\n disconnectedCallback() {\n this.disconnectModeObserver?.();\n if (this.rafId != null) {\n cancelAnimationFrame(this.rafId);\n this.rafId = null;\n }\n\n if (this.measureRafId != null) {\n cancelAnimationFrame(this.measureRafId);\n this.measureRafId = null;\n }\n }\n\n @Watch('revealOnScroll')\n @Watch('shrinkOffset')\n @Watch('fixed')\n @Watch('sticky')\n @Watch('isStatic')\n protected onBehaviorPropsChange() {\n this.scheduleUpdate(true);\n this.scheduleMeasure(true);\n }\n\n @Listen('scroll', { target: 'window', passive: true })\n protected onWindowScroll() {\n this.scheduleUpdate();\n }\n\n @Listen('resize', { target: 'window', passive: true })\n protected onWindowResize() {\n this.scheduleMeasure(true);\n this.scheduleUpdate(true);\n }\n\n private getPosition(): LeHeaderPosition {\n if (this.fixed) return 'fixed';\n if (this.sticky) return 'sticky';\n return 'static';\n }\n\n private parseRevealThreshold(): number | null {\n // Only applies in sticky mode.\n if (!this.sticky || this.fixed) return null;\n if (this.revealOnScroll == null) return null;\n const raw = String(this.revealOnScroll).trim();\n if (raw === '' || raw === 'true') return 16;\n if (raw === 'false') return null;\n const n = Number(raw);\n return Number.isFinite(n) ? Math.max(0, n) : 16;\n }\n\n private resolveShrinkStartPx(): number | null {\n const raw = (this.shrinkOffset ?? '').trim();\n if (!raw || raw === '0') return null;\n\n // Numeric\n const numeric = Number(raw);\n if (Number.isFinite(numeric)) return Math.max(0, numeric);\n\n // CSS variable name\n if (raw.startsWith('--')) {\n const value = getComputedStyle(document.documentElement).getPropertyValue(raw).trim();\n const v = Number(value.replace('px', '').trim());\n return Number.isFinite(v) ? Math.max(0, v) : null;\n }\n\n // Selector\n try {\n const el = document.querySelector(raw);\n this.shrinkSelectorEl = el;\n return null;\n } catch {\n this.shrinkSelectorEl = null;\n return null;\n }\n }\n\n private scheduleUpdate(force: boolean = false) {\n if (this.rafId != null) {\n if (!force) return;\n cancelAnimationFrame(this.rafId);\n this.rafId = null;\n }\n this.rafId = requestAnimationFrame(() => {\n this.rafId = null;\n this.updateFromScroll();\n });\n }\n\n private scheduleMeasure(force: boolean = false) {\n if (this.measureRafId != null && !force) return;\n this.measureRafId = requestAnimationFrame(() => {\n this.measureRafId = null;\n this.measurePlaceholderHeight();\n });\n }\n\n private measurePlaceholderHeight() {\n // Measure the rendered header height once (and on resize/mode change).\n // This intentionally ignores scroll/shrink behavior; it should reserve the full header height.\n if (!this.headerEl) return;\n\n const next = Math.ceil(this.headerEl.getBoundingClientRect().height);\n if (!Number.isFinite(next) || next <= 0) return;\n\n if (next !== this.placeholderHeight) {\n this.placeholderHeight = next;\n // Publish to global root so placeholders anywhere can read it.\n if (typeof document !== 'undefined') {\n document.documentElement.style.setProperty('--le-header-height', `${next}px`);\n }\n }\n }\n\n private updateFromScroll() {\n const y = typeof window !== 'undefined' ? window.scrollY || 0 : 0;\n const delta = y - this.lastY;\n\n const direction: 'up' | 'down' = delta < 0 ? 'up' : 'down';\n\n // Shrink behavior\n let computedShrunk = false;\n const headerHeight = Math.max(0, this.placeholderHeight ?? 0);\n const shrinkStartPx = typeof window !== 'undefined' ? this.resolveShrinkStartPx() : null;\n\n if (this.shrinkSelectorEl) {\n const rect = (this.shrinkSelectorEl as HTMLElement).getBoundingClientRect();\n computedShrunk = rect.bottom <= 0;\n } else if (shrinkStartPx != null) {\n const effectiveStart = Math.max(shrinkStartPx, headerHeight);\n computedShrunk = y >= effectiveStart;\n }\n\n // Hover override: when enabled and hovered, force expanded.\n const nextShrunk = this.expandOnHover && this.hoverActive ? false : computedShrunk;\n this.setShrunk(nextShrunk, y);\n\n // Reveal-on-scroll (sticky-only)\n const revealThreshold = this.parseRevealThreshold();\n if (revealThreshold != null) {\n // Always show the header near the top of the page.\n const topLock = Math.max(0, this.placeholderHeight ?? 0);\n if (y <= topLock) {\n if (!this.revealed) {\n this.revealed = true;\n this.leHeaderVisibilityChange.emit({ visible: true, y });\n }\n } else if (Math.abs(delta) >= revealThreshold) {\n const nextRevealed = direction === 'up' || y <= 0;\n if (nextRevealed !== this.revealed) {\n this.revealed = nextRevealed;\n this.leHeaderVisibilityChange.emit({ visible: this.revealed, y });\n }\n this.lastEmittedDirection = direction;\n }\n } else {\n if (!this.revealed) {\n this.revealed = true;\n this.leHeaderVisibilityChange.emit({ visible: true, y });\n }\n }\n\n this.lastY = y;\n\n this.leHeaderState.emit({\n y,\n direction: this.lastEmittedDirection,\n revealed: this.revealed,\n shrunk: this.shrunk,\n });\n }\n\n render() {\n const position = this.getPosition();\n\n const hostClass = classnames('le-header', {\n 'header-is-shrunk': this.shrunk,\n 'is-fixed': position === 'fixed',\n 'is-sticky': position === 'sticky',\n 'is-static': position === 'static',\n 'is-revealed': this.revealed,\n 'is-hidden': !this.revealed,\n 'is-shrunk': this.shrunk,\n });\n\n return (\n <Host\n class={hostClass}\n onMouseEnter={() => {\n if (!this.expandOnHover) return;\n this.hoverActive = true;\n this.scheduleUpdate(true);\n }}\n onMouseLeave={() => {\n if (!this.expandOnHover) return;\n this.hoverActive = false;\n this.scheduleUpdate(true);\n }}\n >\n <le-component component=\"le-header\">\n <header\n class=\"header\"\n part=\"header\"\n role=\"banner\"\n ref={el => (this.headerEl = el as HTMLElement)}\n >\n <div class=\"inner\" part=\"inner\">\n <div class=\"row\" part=\"row\">\n <div class=\"start\" part=\"start\">\n <le-slot\n name=\"start\"\n label=\"Start\"\n description=\"Logo / back button / nav\"\n allowed-components=\"le-button,le-text,le-tag,le-box,le-stack\"\n >\n <slot name=\"start\"></slot>\n </le-slot>\n </div>\n\n <div class=\"title\" part=\"title\">\n <le-slot\n name=\"title\"\n label=\"Title\"\n description=\"Header title\"\n type=\"text\"\n tag=\"span\"\n >\n <span class=\"title-slot\" part=\"title\">\n <slot name=\"title\"></slot>\n </span>\n </le-slot>\n </div>\n\n <div class=\"end\" part=\"end\">\n <le-slot\n name=\"end\"\n label=\"End\"\n description=\"Actions\"\n allowed-components=\"le-button,le-text,le-tag,le-box,le-stack\"\n >\n <slot name=\"end\"></slot>\n </le-slot>\n </div>\n </div>\n\n <div class=\"secondary\" part=\"secondary\">\n <le-slot\n name=\"\"\n label=\"Secondary\"\n description=\"Secondary row content\"\n allowed-components=\"le-tabs,le-tab-bar,le-select,le-combobox,le-text,le-stack,le-box\"\n >\n <slot></slot>\n </le-slot>\n </div>\n </div>\n </header>\n </le-component>\n </Host>\n );\n }\n}\n"]}