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,2 @@
1
+ import{a as t}from"./p-hmBwv43R.js";function e(t="le"){return`${t}-${Math.random().toString(36).substring(2,9)}`}function r(t){if(!t)return[];return t.split(",").map((t=>t.trim())).filter(Boolean)}function o(t,e=""){const r=e?`[slot="${e}"]`:":not([slot])";return t.querySelector(r)!==null}function i(e,r){r(t(e));const o=new MutationObserver((()=>{r(t(e))}));o.observe(e,{attributes:true,attributeFilter:["mode"]});o.observe(document.documentElement,{attributes:true,attributeFilter:["mode"]});let i=e;while(i){if(i instanceof Element&&i.parentElement){i=i.parentElement;o.observe(i,{attributes:true,attributeFilter:["mode"]});if(i.hasAttribute("mode")){break}}else{const t=i.getRootNode();if(t instanceof ShadowRoot){i=t.host;o.observe(i,{attributes:true,attributeFilter:["mode"]});if(i.hasAttribute("mode")){break}}else{break}}}return()=>o.disconnect()}function n(...t){const e=[];t.forEach((t=>{if(!t)return;if(typeof t==="string"){e.push(t)}else if(Array.isArray(t)){e.push(n(...t))}else if(typeof t==="object"){Object.entries(t).forEach((([t,r])=>{if(r){e.push(t)}}))}}));return e.join(" ")}export{n as c,e as g,i as o,r as p,o as s};
2
+ //# sourceMappingURL=p-txKmCJHv.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-DaA5gINj.js","sources":["src/utils/utils.ts"],"sourcesContent":["/**\n * Utility functions for le-kit components\n */\n\nimport { getMode } from '../global/app';\n\n/**\n * Generates a unique ID for component instances\n */\nexport function generateId(prefix: string = 'le'): string {\n return `${prefix}-${Math.random().toString(36).substring(2, 9)}`;\n}\n\n/**\n * Parses a comma-separated string into an array\n */\nexport function parseCommaSeparated(value: string | undefined): string[] {\n if (!value) return [];\n return value\n .split(',')\n .map(s => s.trim())\n .filter(Boolean);\n}\n\n/**\n * Checks if a slot has content\n */\nexport function slotHasContent(el: HTMLElement, slotName: string = ''): boolean {\n const selector = slotName ? `[slot=\"${slotName}\"]` : ':not([slot])';\n return el.querySelector(selector) !== null;\n}\n\n/**\n * Sets up a MutationObserver to track mode changes on ancestor elements.\n * Returns a cleanup function to disconnect the observer.\n * \n * If the element or any ancestor has an explicit `mode` attribute, that creates\n * a \"mode boundary\" - the mode is determined from that point, not from further up.\n * This allows components like le-popover to force default mode for their children.\n * \n * @param el - The component's host element\n * @param callback - Function to call when mode changes, receives the new mode\n * @returns Cleanup function to disconnect the observer\n * \n * @example\n * ```tsx\n * export class MyComponent {\n * @Element() el: HTMLElement;\n * @State() adminMode: boolean = false;\n * private disconnectModeObserver?: () => void;\n * \n * connectedCallback() {\n * this.disconnectModeObserver = observeModeChanges(this.el, (mode) => {\n * this.adminMode = mode === 'admin';\n * });\n * }\n * \n * disconnectedCallback() {\n * this.disconnectModeObserver?.();\n * }\n * }\n * ```\n */\nexport function observeModeChanges(\n el: HTMLElement,\n callback: (mode: string) => void\n): () => void {\n // Call immediately with current mode\n callback(getMode(el));\n\n // Set up observer for mode attribute changes\n const observer = new MutationObserver(() => {\n callback(getMode(el));\n });\n\n // Observe the element itself (for mode boundary changes)\n observer.observe(el, {\n attributes: true,\n attributeFilter: ['mode'],\n });\n\n // Observe document root\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['mode'],\n });\n\n // Traverse up, crossing shadow boundaries, and observe each element\n let current: Node | null = el;\n while (current) {\n if (current instanceof Element && current.parentElement) {\n current = current.parentElement;\n observer.observe(current, {\n attributes: true,\n attributeFilter: ['mode'],\n });\n // If this element has an explicit mode, it's a boundary\n if ((current as Element).hasAttribute('mode')) {\n break;\n }\n } else {\n // Check if we're in a shadow root\n const root = current.getRootNode();\n if (root instanceof ShadowRoot) {\n // Cross the shadow boundary and observe the host\n current = root.host;\n observer.observe(current, {\n attributes: true,\n attributeFilter: ['mode'],\n });\n // If the host has an explicit mode, it's a boundary\n if ((current as Element).hasAttribute('mode')) {\n break;\n }\n } else {\n break;\n }\n }\n }\n\n // Return cleanup function\n return () => observer.disconnect();\n}\n\n/**\n * Combines multiple class names into a single string, filtering out falsy values.\n * \n * @param classes - arguments of class names, undefined, arrays, objects with boolean values and nested combinations of these\n * @returns Combined class names string\n */\nexport function classnames(...classes: any[]): string {\n const result: string[] = [];\n\n classes.forEach(cls => {\n if (!cls) return;\n\n if (typeof cls === 'string') {\n result.push(cls);\n } else if (Array.isArray(cls)) {\n result.push(classnames(...cls));\n } else if (typeof cls === 'object') {\n Object.entries(cls).forEach(([key, value]) => {\n if (value) {\n result.push(key);\n }\n });\n }\n });\n\n return result.join(' ');\n}\n"],"names":[],"mappings":";;AAAA;;AAEG;AAIH;;AAEG;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,aAAA,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AAClC,YAAA,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAI;gBAC3C,IAAI,KAAK,EAAE;AACT,oBAAA,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;;AAEpB,aAAC,CAAC;;AAEN,KAAC,CAAC;AAEF,IAAA,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AACzB;;;;"}
1
+ {"version":3,"file":"p-txKmCJHv.js","sources":["src/utils/utils.ts"],"sourcesContent":["/**\n * Utility functions for le-kit components\n */\n\nimport { getMode } from '../global/app';\n\n/**\n * Generates a unique ID for component instances\n */\nexport function generateId(prefix: string = 'le'): string {\n return `${prefix}-${Math.random().toString(36).substring(2, 9)}`;\n}\n\n/**\n * Parses a comma-separated string into an array\n */\nexport function parseCommaSeparated(value: string | undefined): string[] {\n if (!value) return [];\n return value\n .split(',')\n .map(s => s.trim())\n .filter(Boolean);\n}\n\n/**\n * Checks if a slot has content\n */\nexport function slotHasContent(el: HTMLElement, slotName: string = ''): boolean {\n const selector = slotName ? `[slot=\"${slotName}\"]` : ':not([slot])';\n return el.querySelector(selector) !== null;\n}\n\n/**\n * Sets up a MutationObserver to track mode changes on ancestor elements.\n * Returns a cleanup function to disconnect the observer.\n * \n * If the element or any ancestor has an explicit `mode` attribute, that creates\n * a \"mode boundary\" - the mode is determined from that point, not from further up.\n * This allows components like le-popover to force default mode for their children.\n * \n * @param el - The component's host element\n * @param callback - Function to call when mode changes, receives the new mode\n * @returns Cleanup function to disconnect the observer\n * \n * @example\n * ```tsx\n * export class MyComponent {\n * @Element() el: HTMLElement;\n * @State() adminMode: boolean = false;\n * private disconnectModeObserver?: () => void;\n * \n * connectedCallback() {\n * this.disconnectModeObserver = observeModeChanges(this.el, (mode) => {\n * this.adminMode = mode === 'admin';\n * });\n * }\n * \n * disconnectedCallback() {\n * this.disconnectModeObserver?.();\n * }\n * }\n * ```\n */\nexport function observeModeChanges(\n el: HTMLElement,\n callback: (mode: string) => void\n): () => void {\n // Call immediately with current mode\n callback(getMode(el));\n\n // Set up observer for mode attribute changes\n const observer = new MutationObserver(() => {\n callback(getMode(el));\n });\n\n // Observe the element itself (for mode boundary changes)\n observer.observe(el, {\n attributes: true,\n attributeFilter: ['mode'],\n });\n\n // Observe document root\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['mode'],\n });\n\n // Traverse up, crossing shadow boundaries, and observe each element\n let current: Node | null = el;\n while (current) {\n if (current instanceof Element && current.parentElement) {\n current = current.parentElement;\n observer.observe(current, {\n attributes: true,\n attributeFilter: ['mode'],\n });\n // If this element has an explicit mode, it's a boundary\n if ((current as Element).hasAttribute('mode')) {\n break;\n }\n } else {\n // Check if we're in a shadow root\n const root = current.getRootNode();\n if (root instanceof ShadowRoot) {\n // Cross the shadow boundary and observe the host\n current = root.host;\n observer.observe(current, {\n attributes: true,\n attributeFilter: ['mode'],\n });\n // If the host has an explicit mode, it's a boundary\n if ((current as Element).hasAttribute('mode')) {\n break;\n }\n } else {\n break;\n }\n }\n }\n\n // Return cleanup function\n return () => observer.disconnect();\n}\n\n/**\n * Combines multiple class names into a single string, filtering out falsy values.\n * \n * @param classes - arguments of class names, undefined, arrays, objects with boolean values and nested combinations of these\n * @returns Combined class names string\n */\nexport function classnames(...classes: any[]): string {\n const result: string[] = [];\n\n classes.forEach(cls => {\n if (!cls) return;\n\n if (typeof cls === 'string') {\n result.push(cls);\n } else if (Array.isArray(cls)) {\n result.push(classnames(...cls));\n } else if (typeof cls === 'object') {\n Object.entries(cls).forEach(([key, value]) => {\n if (value) {\n result.push(key);\n }\n });\n }\n });\n\n return result.join(' ');\n}\n"],"names":[],"mappings":";;AAAA;;AAEG;AAIH;;AAEG;AACa,SAAA,UAAU,CAAC,MAAA,GAAiB,IAAI,EAAA;IAC9C,OAAO,CAAA,EAAG,MAAM,CAAI,CAAA,E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CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAI;gBAC3C,IAAI,KAAK,EAAE;AACT,oBAAA,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;;AAEpB,aAAC,CAAC;;AAEN,KAAC,CAAC;AAEF,IAAA,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AACzB;;;;"}
@@ -18,7 +18,6 @@
18
18
  * SPACING SCALE
19
19
  * ============================================ */
20
20
  --le-spacing-0: 0;
21
- --le-spacing-0-5: 0.125rem; /* 2px */
22
21
  --le-spacing-1: 0.25rem; /* 4px */
23
22
  --le-spacing-2: 0.5rem; /* 8px */
24
23
  --le-spacing-3: 0.75rem; /* 12px */
@@ -72,10 +71,10 @@
72
71
  /* ============================================
73
72
  * TRANSITIONS
74
73
  * ============================================ */
75
- --le-transition-fast: 100ms;
76
- --le-transition-normal: 200ms;
77
- --le-transition-slow: 300ms;
78
- --le-transition-easing: cubic-bezier(0.4, 0, 0.2, 1);
74
+ --le-transition-fast: 150ms ease;
75
+ --le-transition-normal: 250ms ease;
76
+ --le-transition-slow: 400ms ease;
77
+ --le-transition-bounce: 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
79
78
 
80
79
  /* ============================================
81
80
  * Z-INDEX LAYERS
@@ -87,47 +86,4 @@
87
86
  --le-z-modal: 1050;
88
87
  --le-z-popover: 1060;
89
88
  --le-z-tooltip: 1070;
90
-
91
- /* ============================================
92
- * RICH TEXT EDITOR
93
- * ============================================ */
94
-
95
- /* Editor Container */
96
- --le-editor-padding: var(--le-spacing-4);
97
- --le-editor-min-height: 200px;
98
-
99
- /* Blocks */
100
- --le-editor-block-spacing: var(--le-spacing-1);
101
- --le-editor-block-padding-x: var(--le-spacing-3);
102
- --le-editor-block-padding-y: var(--le-spacing-2);
103
-
104
- /* Block Controls */
105
- --le-editor-controls-size: 24px;
106
- --le-editor-controls-gap: var(--le-spacing-1);
107
-
108
- /* Typography */
109
- --le-editor-font-size: var(--le-font-size-md);
110
- --le-editor-line-height: var(--le-line-height-relaxed);
111
-
112
- /* Headings */
113
- --le-editor-h1-size: var(--le-font-size-3xl);
114
- --le-editor-h2-size: var(--le-font-size-2xl);
115
- --le-editor-h3-size: var(--le-font-size-xl);
116
- --le-editor-heading-weight: var(--le-font-weight-bold);
117
-
118
- /* Quote */
119
- --le-editor-quote-border-width: 3px;
120
-
121
- /* Code */
122
- --le-editor-code-padding: var(--le-spacing-3);
123
- --le-editor-inline-code-padding: 0.125em 0.375em;
124
-
125
- /* Divider */
126
- --le-editor-divider-margin: var(--le-spacing-4);
127
-
128
- /* Lists */
129
- --le-editor-list-indent: var(--le-spacing-6);
130
-
131
- /* Toolbar */
132
- --le-editor-toolbar-button-size: 32px;
133
89
  }
@@ -70,346 +70,7 @@
70
70
  --le-z-tooltip: 1070;
71
71
  }
72
72
 
73
- /* ============================================
74
- DEFAULT THEME
75
- Clean, professional light theme
76
- ============================================ */
77
-
78
- :root,
79
- [theme="default"] {
80
- /* Primary Colors */
81
- --le-color-primary: #3b82f6;
82
- --le-color-primary-hover: #2563eb;
83
- --le-color-primary-active: #1d4ed8;
84
- --le-color-primary-subtle: #eff6ff;
85
- --le-color-on-primary: #ffffff;
86
-
87
- /* Secondary Colors */
88
- --le-color-secondary: #64748b;
89
- --le-color-secondary-hover: #475569;
90
- --le-color-secondary-active: #334155;
91
- --le-color-secondary-subtle: #f1f5f9;
92
- --le-color-on-secondary: #ffffff;
93
-
94
- /* Semantic Colors */
95
- --le-color-success: #22c55e;
96
- --le-color-success-subtle: #f0fdf4;
97
- --le-color-on-success: #ffffff;
98
-
99
- --le-color-warning: #f59e0b;
100
- --le-color-warning-subtle: #fffbeb;
101
- --le-color-on-warning: #000000;
102
-
103
- --le-color-error: #ef4444;
104
- --le-color-error-subtle: #fef2f2;
105
- --le-color-on-error: #ffffff;
106
-
107
- --le-color-info: #06b6d4;
108
- --le-color-info-subtle: #ecfeff;
109
- --le-color-on-info: #ffffff;
110
-
111
- /* Surface Colors */
112
- --le-color-background: #ffffff;
113
- --le-color-surface: #ffffff;
114
- --le-color-surface-raised: #ffffff;
115
- --le-color-surface-overlay: rgba(0, 0, 0, 0.5);
116
-
117
- /* Text Colors */
118
- --le-color-text: #1e293b;
119
- --le-color-text-secondary: #64748b;
120
- --le-color-text-muted: #94a3b8;
121
- --le-color-text-inverse: #ffffff;
122
-
123
- /* Border Colors */
124
- --le-color-border: #e2e8f0;
125
- --le-color-border-strong: #cbd5e1;
126
- --le-color-border-focus: var(--le-color-primary);
127
-
128
- /* Border Radius */
129
- --le-radius-none: 0;
130
- --le-radius-sm: 4px;
131
- --le-radius-md: 7px;
132
- --le-radius-lg: 12px;
133
- --le-radius-xl: 16px;
134
- --le-radius-2xl: 24px;
135
- --le-radius-full: 9999px;
136
-
137
- /* Shadows */
138
- --le-color-shadow: color-mix(in srgb, var(--le-color-primary) 80%, transparent);
139
- --le-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
140
- --le-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
141
- --le-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
142
- --le-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
143
- --le-shadow-focus: 0 0 0 3px rgba(59, 130, 246, 0.3);
144
- }
145
-
146
- /* ============================================
147
- DARK THEME
148
- Modern dark mode with blue accents
149
- ============================================ */
150
-
151
- [theme="dark"] {
152
- /* Primary Colors */
153
- --le-color-primary: #60a5fa;
154
- --le-color-primary-hover: #93c5fd;
155
- --le-color-primary-active: #3b82f6;
156
- --le-color-primary-subtle: #1e3a5f;
157
- --le-color-on-primary: #0f172a;
158
-
159
- /* Secondary Colors */
160
- --le-color-secondary: #94a3b8;
161
- --le-color-secondary-hover: #cbd5e1;
162
- --le-color-secondary-active: #64748b;
163
- --le-color-secondary-subtle: #1e293b;
164
- --le-color-on-secondary: #0f172a;
165
-
166
- /* Semantic Colors */
167
- --le-color-success: #4ade80;
168
- --le-color-success-subtle: #14532d;
169
- --le-color-on-success: #0f172a;
170
-
171
- --le-color-warning: #fbbf24;
172
- --le-color-warning-subtle: #422006;
173
- --le-color-on-warning: #0f172a;
174
-
175
- --le-color-error: #f87171;
176
- --le-color-error-subtle: #450a0a;
177
- --le-color-on-error: #0f172a;
178
-
179
- --le-color-info: #22d3ee;
180
- --le-color-info-subtle: #164e63;
181
- --le-color-on-info: #0f172a;
182
-
183
- /* Surface Colors */
184
- --le-color-background: #0f172a;
185
- --le-color-surface: #1e293b;
186
- --le-color-surface-raised: #334155;
187
- --le-color-surface-overlay: rgba(0, 0, 0, 0.7);
188
-
189
- /* Text Colors */
190
- --le-color-text: #f1f5f9;
191
- --le-color-text-secondary: #94a3b8;
192
- --le-color-text-muted: #64748b;
193
- --le-color-text-inverse: #0f172a;
194
-
195
- /* Border Colors */
196
- --le-color-border: #334155;
197
- --le-color-border-strong: #475569;
198
- --le-color-border-focus: var(--le-color-primary);
199
-
200
- /* Shadows (adjusted for dark mode) */
201
- --le-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
202
- --le-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
203
- --le-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
204
- --le-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
205
- --le-shadow-focus: 0 0 0 3px rgba(96, 165, 250, 0.4);
206
- }
207
-
208
- /* ============================================
209
- GRADIENT THEME
210
- Vibrant gradients with purple/pink accents
211
- ============================================ */
212
-
213
- [theme="gradient"] {
214
- /* Primary Colors - Purple gradient feel */
215
- --le-color-primary: #8b5cf6;
216
- --le-color-primary-hover: #a78bfa;
217
- --le-color-primary-active: #7c3aed;
218
- --le-color-primary-subtle: #f5f3ff;
219
- --le-color-on-primary: #ffffff;
220
-
221
- /* Secondary Colors - Pink accent */
222
- --le-color-secondary: #ec4899;
223
- --le-color-secondary-hover: #f472b6;
224
- --le-color-secondary-active: #db2777;
225
- --le-color-secondary-subtle: #fdf2f8;
226
- --le-color-on-secondary: #ffffff;
227
-
228
- /* Semantic Colors */
229
- --le-color-success: #10b981;
230
- --le-color-success-subtle: #ecfdf5;
231
- --le-color-on-success: #ffffff;
232
-
233
- --le-color-warning: #f59e0b;
234
- --le-color-warning-subtle: #fffbeb;
235
- --le-color-on-warning: #000000;
236
-
237
- --le-color-error: #f43f5e;
238
- --le-color-error-subtle: #fff1f2;
239
- --le-color-on-error: #ffffff;
240
-
241
- --le-color-info: #06b6d4;
242
- --le-color-info-subtle: #ecfeff;
243
- --le-color-on-info: #ffffff;
244
-
245
- /* Surface Colors */
246
- --le-color-background: linear-gradient(135deg, #faf5ff 0%, #fdf2f8 50%, #fff7ed 100%);
247
- --le-color-surface: rgba(255, 255, 255, 0.9);
248
- --le-color-surface-raised: #ffffff;
249
- --le-color-surface-overlay: rgba(139, 92, 246, 0.3);
250
-
251
- /* Text Colors */
252
- --le-color-text: #1f2937;
253
- --le-color-text-secondary: #6b7280;
254
- --le-color-text-muted: #9ca3af;
255
- --le-color-text-inverse: #ffffff;
256
-
257
- /* Border Colors */
258
- --le-color-border: rgba(139, 92, 246, 0.2);
259
- --le-color-border-strong: rgba(139, 92, 246, 0.4);
260
- --le-color-border-focus: var(--le-color-primary);
261
-
262
- /* Border Radius - More rounded for playful feel */
263
- --le-radius-sm: 6px;
264
- --le-radius-md: 12px;
265
- --le-radius-lg: 16px;
266
- --le-radius-xl: 20px;
267
- --le-radius-2xl: 28px;
268
-
269
- /* Shadows - Colored shadows */
270
- --le-shadow-sm: 0 1px 3px 0 rgba(139, 92, 246, 0.1);
271
- --le-shadow-md: 0 4px 6px -1px rgba(139, 92, 246, 0.15), 0 2px 4px -2px rgba(236, 72, 153, 0.1);
272
- --le-shadow-lg: 0 10px 15px -3px rgba(139, 92, 246, 0.2), 0 4px 6px -4px rgba(236, 72, 153, 0.15);
273
- --le-shadow-xl: 0 20px 25px -5px rgba(139, 92, 246, 0.25), 0 8px 10px -6px rgba(236, 72, 153, 0.2);
274
- --le-shadow-focus: 0 0 0 3px rgba(139, 92, 246, 0.4);
275
- }
276
-
277
- /* ============================================
278
- MINIMAL THEME
279
- Clean, minimal design with subtle grays
280
- ============================================ */
281
-
282
- [theme="minimal"] {
283
- /* Primary Colors - Subtle dark gray */
284
- --le-color-primary: #374151;
285
- --le-color-primary-hover: #1f2937;
286
- --le-color-primary-active: #111827;
287
- --le-color-primary-subtle: #f3f4f6;
288
- --le-color-on-primary: #ffffff;
289
-
290
- /* Secondary Colors - Light gray */
291
- --le-color-secondary: #9ca3af;
292
- --le-color-secondary-hover: #6b7280;
293
- --le-color-secondary-active: #4b5563;
294
- --le-color-secondary-subtle: #f9fafb;
295
- --le-color-on-secondary: #ffffff;
296
-
297
- /* Semantic Colors - Muted versions */
298
- --le-color-success: #059669;
299
- --le-color-success-subtle: #f0fdf4;
300
- --le-color-on-success: #ffffff;
301
-
302
- --le-color-warning: #d97706;
303
- --le-color-warning-subtle: #fffbeb;
304
- --le-color-on-warning: #ffffff;
305
-
306
- --le-color-error: #dc2626;
307
- --le-color-error-subtle: #fef2f2;
308
- --le-color-on-error: #ffffff;
309
-
310
- --le-color-info: #0891b2;
311
- --le-color-info-subtle: #ecfeff;
312
- --le-color-on-info: #ffffff;
313
-
314
- /* Surface Colors */
315
- --le-color-background: #fafafa;
316
- --le-color-surface: #ffffff;
317
- --le-color-surface-raised: #ffffff;
318
- --le-color-surface-overlay: rgba(0, 0, 0, 0.4);
319
-
320
- /* Text Colors */
321
- --le-color-text: #111827;
322
- --le-color-text-secondary: #6b7280;
323
- --le-color-text-muted: #9ca3af;
324
- --le-color-text-inverse: #ffffff;
325
-
326
- /* Border Colors - Very subtle */
327
- --le-color-border: #e5e7eb;
328
- --le-color-border-strong: #d1d5db;
329
- --le-color-border-focus: var(--le-color-primary);
330
-
331
- /* Border Radius - Sharp, minimal */
332
- --le-radius-none: 0;
333
- --le-radius-sm: 2px;
334
- --le-radius-md: 4px;
335
- --le-radius-lg: 6px;
336
- --le-radius-xl: 8px;
337
- --le-radius-2xl: 12px;
338
- --le-radius-full: 9999px;
339
-
340
- /* Shadows - Minimal, subtle */
341
- --le-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
342
- --le-shadow-md: 0 2px 4px -1px rgba(0, 0, 0, 0.06);
343
- --le-shadow-lg: 0 4px 8px -2px rgba(0, 0, 0, 0.08);
344
- --le-shadow-xl: 0 8px 16px -4px rgba(0, 0, 0, 0.1);
345
- --le-shadow-focus: 0 0 0 2px rgba(55, 65, 81, 0.2);
346
- }
347
-
348
- /* ============================================
349
- WARM THEME
350
- Warm earthy tones with orange/amber accents
351
- ============================================ */
352
-
353
- [theme="warm"] {
354
- /* Primary Colors - Warm orange */
355
- --le-color-primary: #ea580c;
356
- --le-color-primary-hover: #f97316;
357
- --le-color-primary-active: #c2410c;
358
- --le-color-primary-subtle: #fff7ed;
359
- --le-color-on-primary: #ffffff;
360
-
361
- /* Secondary Colors - Warm brown */
362
- --le-color-secondary: #78716c;
363
- --le-color-secondary-hover: #57534e;
364
- --le-color-secondary-active: #44403c;
365
- --le-color-secondary-subtle: #fafaf9;
366
- --le-color-on-secondary: #ffffff;
367
-
368
- /* Semantic Colors */
369
- --le-color-success: #65a30d;
370
- --le-color-success-subtle: #f7fee7;
371
- --le-color-on-success: #ffffff;
372
-
373
- --le-color-warning: #d97706;
374
- --le-color-warning-subtle: #fffbeb;
375
- --le-color-on-warning: #000000;
376
-
377
- --le-color-error: #dc2626;
378
- --le-color-error-subtle: #fef2f2;
379
- --le-color-on-error: #ffffff;
380
-
381
- --le-color-info: #0891b2;
382
- --le-color-info-subtle: #ecfeff;
383
- --le-color-on-info: #ffffff;
384
-
385
- /* Surface Colors - Warm tinted */
386
- --le-color-background: #fffbf5;
387
- --le-color-surface: #ffffff;
388
- --le-color-surface-raised: #ffffff;
389
- --le-color-surface-overlay: rgba(120, 53, 15, 0.4);
390
-
391
- /* Text Colors - Warm grays */
392
- --le-color-text: #292524;
393
- --le-color-text-secondary: #78716c;
394
- --le-color-text-muted: #a8a29e;
395
- --le-color-text-inverse: #ffffff;
396
-
397
- /* Border Colors - Warm tinted */
398
- --le-color-border: #e7e5e4;
399
- --le-color-border-strong: #d6d3d1;
400
- --le-color-border-focus: var(--le-color-primary);
401
-
402
- /* Border Radius - Soft, friendly */
403
- --le-radius-sm: 4px;
404
- --le-radius-md: 8px;
405
- --le-radius-lg: 12px;
406
- --le-radius-xl: 16px;
407
- --le-radius-2xl: 24px;
408
-
409
- /* Shadows - Warm tinted */
410
- --le-shadow-sm: 0 1px 2px 0 rgba(120, 53, 15, 0.05);
411
- --le-shadow-md: 0 4px 6px -1px rgba(120, 53, 15, 0.1), 0 2px 4px -2px rgba(120, 53, 15, 0.08);
412
- --le-shadow-lg: 0 10px 15px -3px rgba(120, 53, 15, 0.12), 0 4px 6px -4px rgba(120, 53, 15, 0.1);
413
- --le-shadow-xl: 0 20px 25px -5px rgba(120, 53, 15, 0.15), 0 8px 10px -6px rgba(120, 53, 15, 0.12);
414
- --le-shadow-focus: 0 0 0 3px rgba(234, 88, 12, 0.3);
73
+ /* Utility class to hide elements when header is shrunk */
74
+ .header-is-shrunk .hidden-on-shrink {
75
+ display: none;
415
76
  }
@@ -0,0 +1,41 @@
1
+ export type LeCollapseAnimation = 'fade' | 'collapse' | 'fade-collapse';
2
+ /**
3
+ * Animated show/hide wrapper.
4
+ *
5
+ * Supports height collapse (auto->0) and/or fading.
6
+ * Can optionally listen to the nearest `le-header` shrink events.
7
+ *
8
+ * @slot - Content to animate
9
+ *
10
+ * @cssprop --le-collapse-duration - Transition duration
11
+ *
12
+ * @csspart region - Collapsible region
13
+ * @csspart content - Inner content
14
+ *
15
+ * @cmsEditable true
16
+ * @cmsCategory Layout
17
+ */
18
+ export declare class LeCollapse {
19
+ el: HTMLElement;
20
+ /** Whether the content should be shown. */
21
+ open: boolean;
22
+ /** Whether the content should scroll down from the top when open. */
23
+ scrollDown: boolean;
24
+ /** Stop fading the content when collapsing/expanding. */
25
+ noFading: boolean;
26
+ /** If true, collapse/expand based on the nearest header shrink event. */
27
+ collapseOnHeaderShrink: boolean;
28
+ /**
29
+ * Handles `leHeaderShrinkChange` events from the `le-header`.
30
+ * In case multiple headers are present, only the nearest one in the DOM tree is used.
31
+ */
32
+ handleHeaderShrink(ev: Event): void;
33
+ private headerShrunk;
34
+ componentWillLoad(): void;
35
+ componentDidLoad(): void;
36
+ protected onOpenChange(): void;
37
+ protected onDrivenStateChange(): void;
38
+ private shouldBeOpen;
39
+ private applyOpenState;
40
+ render(): any;
41
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Shows a "smart" header title based on what has scrolled out of view.
3
+ *
4
+ * When `selector` matches multiple elements, the title becomes the last element
5
+ * (top-to-bottom) that has fully scrolled out above the viewport.
6
+ *
7
+ * @slot - Optional fallback content if no watched title is active
8
+ *
9
+ * @csspart title - The rendered title
10
+ *
11
+ * @cmsEditable true
12
+ * @cmsCategory Layout
13
+ */
14
+ export declare class LeCurrentHeading {
15
+ el: HTMLElement;
16
+ /** CSS selector for page title/headings to watch (e.g. `.page-title`, `main h2`). */
17
+ selector: string;
18
+ private activeText;
19
+ componentWillLoad(): void;
20
+ protected onSelectorChange(): void;
21
+ protected onScroll(): void;
22
+ protected onResize(): void;
23
+ private updateActiveTitle;
24
+ render(): any;
25
+ }
@@ -0,0 +1,115 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ export type LeHeaderPosition = 'static' | 'sticky' | 'fixed';
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 declare class LeHeader {
47
+ el: HTMLElement;
48
+ /** Force static positioning (default). Ignored if `sticky` or `fixed` are true. */
49
+ isStatic: boolean;
50
+ /** Sticky positioning (in-flow). Ignored if `fixed` is true. */
51
+ sticky: boolean;
52
+ /** Fixed positioning (out-of-flow). Takes precedence over `sticky`/`static`. */
53
+ fixed: boolean;
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?: string;
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?: string;
69
+ /**
70
+ * If true, expand the header when hovered
71
+ */
72
+ expandOnHover: boolean;
73
+ /** Emits whenever scroll-driven state changes. */
74
+ leHeaderState: EventEmitter<{
75
+ y: number;
76
+ direction: 'up' | 'down';
77
+ revealed: boolean;
78
+ shrunk: boolean;
79
+ }>;
80
+ /** Emits when the header shrinks/expands (only on change). */
81
+ leHeaderShrinkChange: EventEmitter<{
82
+ shrunk: boolean;
83
+ y: number;
84
+ }>;
85
+ /** Emits when the header hides/shows (only on change). */
86
+ leHeaderVisibilityChange: EventEmitter<{
87
+ visible: boolean;
88
+ y: number;
89
+ }>;
90
+ private revealed;
91
+ private shrunk;
92
+ private placeholderHeight;
93
+ private hoverActive;
94
+ private disconnectModeObserver?;
95
+ private rafId;
96
+ private measureRafId;
97
+ private lastY;
98
+ private lastEmittedDirection;
99
+ private headerEl?;
100
+ private shrinkSelectorEl?;
101
+ private setShrunk;
102
+ componentDidLoad(): void;
103
+ disconnectedCallback(): void;
104
+ protected onBehaviorPropsChange(): void;
105
+ protected onWindowScroll(): void;
106
+ protected onWindowResize(): void;
107
+ private getPosition;
108
+ private parseRevealThreshold;
109
+ private resolveShrinkStartPx;
110
+ private scheduleUpdate;
111
+ private scheduleMeasure;
112
+ private measurePlaceholderHeight;
113
+ private updateFromScroll;
114
+ render(): any;
115
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Placeholder for `le-header`.
3
+ *
4
+ * Reserves space using the global CSS variable `--le-header-height`.
5
+ * The header component updates that variable when it renders.
6
+ *
7
+ * @cssprop --le-header-height - Published header height (px)
8
+ *
9
+ * @cmsInternal true
10
+ */
11
+ export declare class LeHeaderPlaceholder {
12
+ render(): any;
13
+ }
@@ -85,8 +85,15 @@ export declare class LePopover {
85
85
  private popoverEl?;
86
86
  private uniqueId;
87
87
  private scrollParents;
88
+ private isListeningForDismiss;
89
+ private get supportsPopoverApi();
90
+ private shadowContains;
88
91
  componentDidLoad(): void;
89
92
  disconnectedCallback(): void;
93
+ private addDismissListeners;
94
+ private removeDismissListeners;
95
+ private handleDocumentPointerDown;
96
+ private handleDocumentKeyDown;
90
97
  /**
91
98
  * Find all scrollable parent elements
92
99
  */
@@ -100,6 +107,8 @@ export declare class LePopover {
100
107
  */
101
108
  private removeScrollListeners;
102
109
  private handleScroll;
110
+ private handleOpened;
111
+ private handleClosed;
103
112
  private handlePopoverToggle;
104
113
  private handleOtherPopoverOpen;
105
114
  /**