le-kit 0.5.2 → 0.5.4

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 (475) hide show
  1. package/LLM_CONTEXT.md +22 -33
  2. package/package.json +3 -1
  3. package/readme.md +2 -0
  4. package/dist/cjs/index-BzadfLTc.js +0 -1864
  5. package/dist/cjs/index-BzadfLTc.js.map +0 -1
  6. package/dist/cjs/index.cjs.js +0 -124
  7. package/dist/cjs/index.cjs.js.map +0 -1
  8. package/dist/cjs/le-bar_16.cjs.entry.js +0 -3709
  9. package/dist/cjs/le-box.cjs.entry.js +0 -184
  10. package/dist/cjs/le-card.cjs.entry.js +0 -29
  11. package/dist/cjs/le-code-input.cjs.entry.js +0 -181
  12. package/dist/cjs/le-combobox.cjs.entry.js +0 -237
  13. package/dist/cjs/le-header-placeholder.cjs.entry.js +0 -18
  14. package/dist/cjs/le-kit.cjs.js +0 -27
  15. package/dist/cjs/le-kit.cjs.js.map +0 -1
  16. package/dist/cjs/le-multiselect.cjs.entry.js +0 -306
  17. package/dist/cjs/le-number-input.cjs.entry.js +0 -202
  18. package/dist/cjs/le-round-progress.cjs.entry.js +0 -106
  19. package/dist/cjs/le-segmented-control.cjs.entry.js +0 -245
  20. package/dist/cjs/le-side-panel-toggle.cjs.entry.js +0 -229
  21. package/dist/cjs/le-side-panel.cjs.entry.js +0 -546
  22. package/dist/cjs/le-stack.cjs.entry.js +0 -135
  23. package/dist/cjs/le-tab-bar.cjs.entry.js +0 -242
  24. package/dist/cjs/le-tab-panel.cjs.entry.js +0 -100
  25. package/dist/cjs/le-tab.cjs.entry.js +0 -136
  26. package/dist/cjs/le-tabs.cjs.entry.js +0 -307
  27. package/dist/cjs/le-tag.cjs.entry.js +0 -68
  28. package/dist/cjs/le-text.cjs.entry.js +0 -335
  29. package/dist/cjs/le-turntable.cjs.entry.js +0 -139
  30. package/dist/cjs/loader.cjs.js +0 -15
  31. package/dist/cjs/loader.cjs.js.map +0 -1
  32. package/dist/cjs/utils-Dxx9WhWK.js +0 -152
  33. package/dist/cjs/utils-Dxx9WhWK.js.map +0 -1
  34. package/dist/collection/assets/icons/chevron-down.svg +0 -3
  35. package/dist/collection/collection-manifest.json +0 -47
  36. package/dist/collection/components/le-bar/le-bar.css +0 -255
  37. package/dist/collection/components/le-bar/le-bar.js +0 -680
  38. package/dist/collection/components/le-bar/le-bar.js.map +0 -1
  39. package/dist/collection/components/le-box/le-box.css +0 -37
  40. package/dist/collection/components/le-box/le-box.js +0 -614
  41. package/dist/collection/components/le-box/le-box.js.map +0 -1
  42. package/dist/collection/components/le-button/le-button.css +0 -290
  43. package/dist/collection/components/le-button/le-button.js +0 -460
  44. package/dist/collection/components/le-button/le-button.js.map +0 -1
  45. package/dist/collection/components/le-card/le-card.css +0 -74
  46. package/dist/collection/components/le-card/le-card.js +0 -102
  47. package/dist/collection/components/le-card/le-card.js.map +0 -1
  48. package/dist/collection/components/le-checkbox/le-checkbox.css +0 -93
  49. package/dist/collection/components/le-checkbox/le-checkbox.js +0 -192
  50. package/dist/collection/components/le-checkbox/le-checkbox.js.map +0 -1
  51. package/dist/collection/components/le-code-input/le-code-input.css +0 -106
  52. package/dist/collection/components/le-code-input/le-code-input.js +0 -466
  53. package/dist/collection/components/le-code-input/le-code-input.js.map +0 -1
  54. package/dist/collection/components/le-collapse/le-collapse.css +0 -31
  55. package/dist/collection/components/le-collapse/le-collapse.js +0 -184
  56. package/dist/collection/components/le-collapse/le-collapse.js.map +0 -1
  57. package/dist/collection/components/le-combobox/le-combobox.css +0 -144
  58. package/dist/collection/components/le-combobox/le-combobox.js +0 -659
  59. package/dist/collection/components/le-combobox/le-combobox.js.map +0 -1
  60. package/dist/collection/components/le-component/le-component.css +0 -189
  61. package/dist/collection/components/le-component/le-component.js +0 -367
  62. package/dist/collection/components/le-component/le-component.js.map +0 -1
  63. package/dist/collection/components/le-current-heading/le-current-heading.css +0 -13
  64. package/dist/collection/components/le-current-heading/le-current-heading.js +0 -130
  65. package/dist/collection/components/le-current-heading/le-current-heading.js.map +0 -1
  66. package/dist/collection/components/le-dropdown-base/le-dropdown-base.css +0 -167
  67. package/dist/collection/components/le-dropdown-base/le-dropdown-base.js +0 -761
  68. package/dist/collection/components/le-dropdown-base/le-dropdown-base.js.map +0 -1
  69. package/dist/collection/components/le-header/le-header.css +0 -120
  70. package/dist/collection/components/le-header/le-header.js +0 -508
  71. package/dist/collection/components/le-header/le-header.js.map +0 -1
  72. package/dist/collection/components/le-header-placeholder/le-header-placeholder.js +0 -21
  73. package/dist/collection/components/le-header-placeholder/le-header-placeholder.js.map +0 -1
  74. package/dist/collection/components/le-icon/le-icon.css +0 -13
  75. package/dist/collection/components/le-icon/le-icon.js +0 -185
  76. package/dist/collection/components/le-icon/le-icon.js.map +0 -1
  77. package/dist/collection/components/le-multiselect/le-multiselect.css +0 -163
  78. package/dist/collection/components/le-multiselect/le-multiselect.js +0 -734
  79. package/dist/collection/components/le-multiselect/le-multiselect.js.map +0 -1
  80. package/dist/collection/components/le-navigation/le-navigation.css +0 -330
  81. package/dist/collection/components/le-navigation/le-navigation.js +0 -700
  82. package/dist/collection/components/le-navigation/le-navigation.js.map +0 -1
  83. package/dist/collection/components/le-number-input/le-number-input.css +0 -135
  84. package/dist/collection/components/le-number-input/le-number-input.js +0 -515
  85. package/dist/collection/components/le-number-input/le-number-input.js.map +0 -1
  86. package/dist/collection/components/le-popover/le-popover.css +0 -163
  87. package/dist/collection/components/le-popover/le-popover.js +0 -853
  88. package/dist/collection/components/le-popover/le-popover.js.map +0 -1
  89. package/dist/collection/components/le-popup/le-popup.api.js +0 -102
  90. package/dist/collection/components/le-popup/le-popup.api.js.map +0 -1
  91. package/dist/collection/components/le-popup/le-popup.css +0 -222
  92. package/dist/collection/components/le-popup/le-popup.js +0 -626
  93. package/dist/collection/components/le-popup/le-popup.js.map +0 -1
  94. package/dist/collection/components/le-round-progress/le-round-progress.css +0 -34
  95. package/dist/collection/components/le-round-progress/le-round-progress.js +0 -184
  96. package/dist/collection/components/le-round-progress/le-round-progress.js.map +0 -1
  97. package/dist/collection/components/le-scroll-progress/le-scroll-progress.css +0 -29
  98. package/dist/collection/components/le-scroll-progress/le-scroll-progress.js +0 -186
  99. package/dist/collection/components/le-scroll-progress/le-scroll-progress.js.map +0 -1
  100. package/dist/collection/components/le-segmented-control/le-segmented-control.css +0 -78
  101. package/dist/collection/components/le-segmented-control/le-segmented-control.js +0 -445
  102. package/dist/collection/components/le-segmented-control/le-segmented-control.js.map +0 -1
  103. package/dist/collection/components/le-select/le-select.css +0 -121
  104. package/dist/collection/components/le-select/le-select.js +0 -578
  105. package/dist/collection/components/le-select/le-select.js.map +0 -1
  106. package/dist/collection/components/le-side-panel/le-side-panel.css +0 -193
  107. package/dist/collection/components/le-side-panel/le-side-panel.js +0 -953
  108. package/dist/collection/components/le-side-panel/le-side-panel.js.map +0 -1
  109. package/dist/collection/components/le-side-panel-toggle/le-side-panel-toggle.js +0 -610
  110. package/dist/collection/components/le-side-panel-toggle/le-side-panel-toggle.js.map +0 -1
  111. package/dist/collection/components/le-slot/le-slot.default.css +0 -222
  112. package/dist/collection/components/le-slot/le-slot.js +0 -638
  113. package/dist/collection/components/le-slot/le-slot.js.map +0 -1
  114. package/dist/collection/components/le-stack/le-stack.default.css +0 -37
  115. package/dist/collection/components/le-stack/le-stack.js +0 -389
  116. package/dist/collection/components/le-stack/le-stack.js.map +0 -1
  117. package/dist/collection/components/le-string-input/le-string-input.css +0 -83
  118. package/dist/collection/components/le-string-input/le-string-input.js +0 -413
  119. package/dist/collection/components/le-string-input/le-string-input.js.map +0 -1
  120. package/dist/collection/components/le-tab/le-tab.css +0 -289
  121. package/dist/collection/components/le-tab/le-tab.js +0 -565
  122. package/dist/collection/components/le-tab/le-tab.js.map +0 -1
  123. package/dist/collection/components/le-tab-bar/le-tab-bar.css +0 -89
  124. package/dist/collection/components/le-tab-bar/le-tab-bar.js +0 -467
  125. package/dist/collection/components/le-tab-bar/le-tab-bar.js.map +0 -1
  126. package/dist/collection/components/le-tab-panel/le-tab-panel.css +0 -30
  127. package/dist/collection/components/le-tab-panel/le-tab-panel.js +0 -302
  128. package/dist/collection/components/le-tab-panel/le-tab-panel.js.map +0 -1
  129. package/dist/collection/components/le-tabs/le-tabs.css +0 -146
  130. package/dist/collection/components/le-tabs/le-tabs.js +0 -588
  131. package/dist/collection/components/le-tabs/le-tabs.js.map +0 -1
  132. package/dist/collection/components/le-tag/le-tag.css +0 -139
  133. package/dist/collection/components/le-tag/le-tag.js +0 -266
  134. package/dist/collection/components/le-tag/le-tag.js.map +0 -1
  135. package/dist/collection/components/le-text/le-text.css +0 -169
  136. package/dist/collection/components/le-text/le-text.js +0 -475
  137. package/dist/collection/components/le-text/le-text.js.map +0 -1
  138. package/dist/collection/components/le-turntable/le-turntable.css +0 -10
  139. package/dist/collection/components/le-turntable/le-turntable.js +0 -210
  140. package/dist/collection/components/le-turntable/le-turntable.js.map +0 -1
  141. package/dist/collection/dist/components/assets/custom-elements.json +0 -11935
  142. package/dist/collection/dist/components/assets/icons/chevron-down.json +0 -13
  143. package/dist/collection/dist/components/assets/icons/chevron-down.svg +0 -3
  144. package/dist/collection/dist/components/assets/icons/ellipsis-horizontal.json +0 -14
  145. package/dist/collection/dist/components/assets/icons/ellipsis-vertical.json +0 -14
  146. package/dist/collection/dist/components/assets/icons/hamburger.json +0 -14
  147. package/dist/collection/dist/components/assets/icons/side-panel.json +0 -61
  148. package/dist/collection/dist/themes/base.css +0 -89
  149. package/dist/collection/dist/themes/dark.css +0 -104
  150. package/dist/collection/dist/themes/default.css +0 -112
  151. package/dist/collection/dist/themes/gradient.css +0 -104
  152. package/dist/collection/dist/themes/index.css +0 -76
  153. package/dist/collection/dist/themes/minimal.css +0 -104
  154. package/dist/collection/dist/themes/warm.css +0 -104
  155. package/dist/collection/global/app.js +0 -177
  156. package/dist/collection/global/app.js.map +0 -1
  157. package/dist/collection/index.js +0 -16
  158. package/dist/collection/index.js.map +0 -1
  159. package/dist/collection/types/blocks.js +0 -115
  160. package/dist/collection/types/blocks.js.map +0 -1
  161. package/dist/collection/types/options.js +0 -2
  162. package/dist/collection/types/options.js.map +0 -1
  163. package/dist/collection/utils/utils.js +0 -141
  164. package/dist/collection/utils/utils.js.map +0 -1
  165. package/dist/components/app.js +0 -180
  166. package/dist/components/app.js.map +0 -1
  167. package/dist/components/assets/custom-elements.json +0 -11935
  168. package/dist/components/assets/icons/chevron-down.json +0 -13
  169. package/dist/components/assets/icons/chevron-down.svg +0 -3
  170. package/dist/components/assets/icons/ellipsis-horizontal.json +0 -14
  171. package/dist/components/assets/icons/ellipsis-vertical.json +0 -14
  172. package/dist/components/assets/icons/hamburger.json +0 -14
  173. package/dist/components/assets/icons/side-panel.json +0 -61
  174. package/dist/components/index.d.ts +0 -33
  175. package/dist/components/index.js +0 -12
  176. package/dist/components/index.js.map +0 -1
  177. package/dist/components/le-bar.d.ts +0 -11
  178. package/dist/components/le-bar.js +0 -9
  179. package/dist/components/le-bar.js.map +0 -1
  180. package/dist/components/le-bar2.js +0 -506
  181. package/dist/components/le-bar2.js.map +0 -1
  182. package/dist/components/le-box.d.ts +0 -11
  183. package/dist/components/le-box.js +0 -273
  184. package/dist/components/le-box.js.map +0 -1
  185. package/dist/components/le-button.d.ts +0 -11
  186. package/dist/components/le-button.js +0 -9
  187. package/dist/components/le-button.js.map +0 -1
  188. package/dist/components/le-button2.js +0 -1791
  189. package/dist/components/le-button2.js.map +0 -1
  190. package/dist/components/le-card.d.ts +0 -11
  191. package/dist/components/le-card.js +0 -100
  192. package/dist/components/le-card.js.map +0 -1
  193. package/dist/components/le-checkbox.d.ts +0 -11
  194. package/dist/components/le-checkbox.js +0 -9
  195. package/dist/components/le-checkbox.js.map +0 -1
  196. package/dist/components/le-code-input.d.ts +0 -11
  197. package/dist/components/le-code-input.js +0 -265
  198. package/dist/components/le-code-input.js.map +0 -1
  199. package/dist/components/le-collapse.d.ts +0 -11
  200. package/dist/components/le-collapse.js +0 -9
  201. package/dist/components/le-collapse.js.map +0 -1
  202. package/dist/components/le-collapse2.js +0 -138
  203. package/dist/components/le-collapse2.js.map +0 -1
  204. package/dist/components/le-combobox.d.ts +0 -11
  205. package/dist/components/le-combobox.js +0 -326
  206. package/dist/components/le-combobox.js.map +0 -1
  207. package/dist/components/le-component.d.ts +0 -11
  208. package/dist/components/le-component.js +0 -9
  209. package/dist/components/le-component.js.map +0 -1
  210. package/dist/components/le-current-heading.d.ts +0 -11
  211. package/dist/components/le-current-heading.js +0 -93
  212. package/dist/components/le-current-heading.js.map +0 -1
  213. package/dist/components/le-dropdown-base.d.ts +0 -11
  214. package/dist/components/le-dropdown-base.js +0 -9
  215. package/dist/components/le-dropdown-base.js.map +0 -1
  216. package/dist/components/le-dropdown-base2.js +0 -393
  217. package/dist/components/le-dropdown-base2.js.map +0 -1
  218. package/dist/components/le-header-placeholder.d.ts +0 -11
  219. package/dist/components/le-header-placeholder.js +0 -37
  220. package/dist/components/le-header-placeholder.js.map +0 -1
  221. package/dist/components/le-header.d.ts +0 -11
  222. package/dist/components/le-header.js +0 -349
  223. package/dist/components/le-header.js.map +0 -1
  224. package/dist/components/le-icon.d.ts +0 -11
  225. package/dist/components/le-icon.js +0 -9
  226. package/dist/components/le-icon.js.map +0 -1
  227. package/dist/components/le-icon2.js +0 -150
  228. package/dist/components/le-icon2.js.map +0 -1
  229. package/dist/components/le-multiselect.d.ts +0 -11
  230. package/dist/components/le-multiselect.js +0 -405
  231. package/dist/components/le-multiselect.js.map +0 -1
  232. package/dist/components/le-navigation.d.ts +0 -11
  233. package/dist/components/le-navigation.js +0 -502
  234. package/dist/components/le-navigation.js.map +0 -1
  235. package/dist/components/le-number-input.d.ts +0 -11
  236. package/dist/components/le-number-input.js +0 -288
  237. package/dist/components/le-number-input.js.map +0 -1
  238. package/dist/components/le-popover.d.ts +0 -11
  239. package/dist/components/le-popover.js +0 -9
  240. package/dist/components/le-popover.js.map +0 -1
  241. package/dist/components/le-popover2.js +0 -667
  242. package/dist/components/le-popover2.js.map +0 -1
  243. package/dist/components/le-popup.api.js +0 -106
  244. package/dist/components/le-popup.api.js.map +0 -1
  245. package/dist/components/le-popup.d.ts +0 -11
  246. package/dist/components/le-popup.js +0 -9
  247. package/dist/components/le-popup.js.map +0 -1
  248. package/dist/components/le-round-progress.d.ts +0 -11
  249. package/dist/components/le-round-progress.js +0 -135
  250. package/dist/components/le-round-progress.js.map +0 -1
  251. package/dist/components/le-scroll-progress.d.ts +0 -11
  252. package/dist/components/le-scroll-progress.js +0 -142
  253. package/dist/components/le-scroll-progress.js.map +0 -1
  254. package/dist/components/le-segmented-control.d.ts +0 -11
  255. package/dist/components/le-segmented-control.js +0 -331
  256. package/dist/components/le-segmented-control.js.map +0 -1
  257. package/dist/components/le-select.d.ts +0 -11
  258. package/dist/components/le-select.js +0 -9
  259. package/dist/components/le-select.js.map +0 -1
  260. package/dist/components/le-side-panel-toggle.d.ts +0 -11
  261. package/dist/components/le-side-panel-toggle.js +0 -9
  262. package/dist/components/le-side-panel-toggle.js.map +0 -1
  263. package/dist/components/le-side-panel-toggle2.js +0 -311
  264. package/dist/components/le-side-panel-toggle2.js.map +0 -1
  265. package/dist/components/le-side-panel.d.ts +0 -11
  266. package/dist/components/le-side-panel.js +0 -660
  267. package/dist/components/le-side-panel.js.map +0 -1
  268. package/dist/components/le-slot.d.ts +0 -11
  269. package/dist/components/le-slot.js +0 -9
  270. package/dist/components/le-slot.js.map +0 -1
  271. package/dist/components/le-stack.d.ts +0 -11
  272. package/dist/components/le-stack.js +0 -215
  273. package/dist/components/le-stack.js.map +0 -1
  274. package/dist/components/le-string-input.d.ts +0 -11
  275. package/dist/components/le-string-input.js +0 -9
  276. package/dist/components/le-string-input.js.map +0 -1
  277. package/dist/components/le-tab-bar.d.ts +0 -11
  278. package/dist/components/le-tab-bar.js +0 -330
  279. package/dist/components/le-tab-bar.js.map +0 -1
  280. package/dist/components/le-tab-panel.d.ts +0 -11
  281. package/dist/components/le-tab-panel.js +0 -182
  282. package/dist/components/le-tab-panel.js.map +0 -1
  283. package/dist/components/le-tab.d.ts +0 -11
  284. package/dist/components/le-tab.js +0 -9
  285. package/dist/components/le-tab.js.map +0 -1
  286. package/dist/components/le-tab2.js +0 -220
  287. package/dist/components/le-tab2.js.map +0 -1
  288. package/dist/components/le-tabs.d.ts +0 -11
  289. package/dist/components/le-tabs.js +0 -397
  290. package/dist/components/le-tabs.js.map +0 -1
  291. package/dist/components/le-tag.d.ts +0 -11
  292. package/dist/components/le-tag.js +0 -9
  293. package/dist/components/le-tag.js.map +0 -1
  294. package/dist/components/le-tag2.js +0 -141
  295. package/dist/components/le-tag2.js.map +0 -1
  296. package/dist/components/le-text.d.ts +0 -11
  297. package/dist/components/le-text.js +0 -415
  298. package/dist/components/le-text.js.map +0 -1
  299. package/dist/components/le-turntable.d.ts +0 -11
  300. package/dist/components/le-turntable.js +0 -164
  301. package/dist/components/le-turntable.js.map +0 -1
  302. package/dist/components/utils.js +0 -146
  303. package/dist/components/utils.js.map +0 -1
  304. package/dist/docs.d.ts +0 -443
  305. package/dist/docs.json +0 -14289
  306. package/dist/esm/index-DFTm5BqT.js +0 -1844
  307. package/dist/esm/index-DFTm5BqT.js.map +0 -1
  308. package/dist/esm/index.js +0 -109
  309. package/dist/esm/index.js.map +0 -1
  310. package/dist/esm/le-bar_16.entry.js +0 -3692
  311. package/dist/esm/le-box.entry.js +0 -182
  312. package/dist/esm/le-box.entry.js.map +0 -1
  313. package/dist/esm/le-card.entry.js +0 -27
  314. package/dist/esm/le-card.entry.js.map +0 -1
  315. package/dist/esm/le-code-input.entry.js +0 -179
  316. package/dist/esm/le-code-input.entry.js.map +0 -1
  317. package/dist/esm/le-combobox.entry.js +0 -235
  318. package/dist/esm/le-combobox.entry.js.map +0 -1
  319. package/dist/esm/le-header-placeholder.entry.js +0 -16
  320. package/dist/esm/le-header-placeholder.entry.js.map +0 -1
  321. package/dist/esm/le-kit.js +0 -23
  322. package/dist/esm/le-kit.js.map +0 -1
  323. package/dist/esm/le-multiselect.entry.js +0 -304
  324. package/dist/esm/le-multiselect.entry.js.map +0 -1
  325. package/dist/esm/le-number-input.entry.js +0 -200
  326. package/dist/esm/le-number-input.entry.js.map +0 -1
  327. package/dist/esm/le-round-progress.entry.js +0 -104
  328. package/dist/esm/le-round-progress.entry.js.map +0 -1
  329. package/dist/esm/le-segmented-control.entry.js +0 -243
  330. package/dist/esm/le-segmented-control.entry.js.map +0 -1
  331. package/dist/esm/le-side-panel-toggle.entry.js +0 -227
  332. package/dist/esm/le-side-panel-toggle.entry.js.map +0 -1
  333. package/dist/esm/le-side-panel.entry.js +0 -544
  334. package/dist/esm/le-side-panel.entry.js.map +0 -1
  335. package/dist/esm/le-stack.entry.js +0 -133
  336. package/dist/esm/le-stack.entry.js.map +0 -1
  337. package/dist/esm/le-tab-bar.entry.js +0 -240
  338. package/dist/esm/le-tab-bar.entry.js.map +0 -1
  339. package/dist/esm/le-tab-panel.entry.js +0 -98
  340. package/dist/esm/le-tab-panel.entry.js.map +0 -1
  341. package/dist/esm/le-tab.entry.js +0 -134
  342. package/dist/esm/le-tab.entry.js.map +0 -1
  343. package/dist/esm/le-tabs.entry.js +0 -305
  344. package/dist/esm/le-tabs.entry.js.map +0 -1
  345. package/dist/esm/le-tag.entry.js +0 -66
  346. package/dist/esm/le-tag.entry.js.map +0 -1
  347. package/dist/esm/le-text.entry.js +0 -333
  348. package/dist/esm/le-text.entry.js.map +0 -1
  349. package/dist/esm/le-turntable.entry.js +0 -137
  350. package/dist/esm/le-turntable.entry.js.map +0 -1
  351. package/dist/esm/loader.js +0 -13
  352. package/dist/esm/loader.js.map +0 -1
  353. package/dist/esm/utils-DZYCZLrF.js +0 -146
  354. package/dist/esm/utils-DZYCZLrF.js.map +0 -1
  355. package/dist/index.cjs.js +0 -1
  356. package/dist/index.js +0 -1
  357. package/dist/le-kit/dist/components/assets/custom-elements.json +0 -11935
  358. package/dist/le-kit/dist/components/assets/icons/chevron-down.json +0 -13
  359. package/dist/le-kit/dist/components/assets/icons/chevron-down.svg +0 -3
  360. package/dist/le-kit/dist/components/assets/icons/ellipsis-horizontal.json +0 -14
  361. package/dist/le-kit/dist/components/assets/icons/ellipsis-vertical.json +0 -14
  362. package/dist/le-kit/dist/components/assets/icons/hamburger.json +0 -14
  363. package/dist/le-kit/dist/components/assets/icons/side-panel.json +0 -61
  364. package/dist/le-kit/dist/themes/base.css +0 -89
  365. package/dist/le-kit/dist/themes/dark.css +0 -104
  366. package/dist/le-kit/dist/themes/default.css +0 -112
  367. package/dist/le-kit/dist/themes/gradient.css +0 -104
  368. package/dist/le-kit/dist/themes/index.css +0 -76
  369. package/dist/le-kit/dist/themes/minimal.css +0 -104
  370. package/dist/le-kit/dist/themes/warm.css +0 -104
  371. package/dist/le-kit/index.esm.js +0 -2
  372. package/dist/le-kit/index.esm.js.map +0 -1
  373. package/dist/le-kit/le-kit.css +0 -1
  374. package/dist/le-kit/le-kit.esm.js +0 -2
  375. package/dist/le-kit/le-kit.esm.js.map +0 -1
  376. package/dist/le-kit/loader.esm.js.map +0 -1
  377. package/dist/le-kit/p-221d379a.entry.js +0 -2
  378. package/dist/le-kit/p-221d379a.entry.js.map +0 -1
  379. package/dist/le-kit/p-24112ca3.entry.js +0 -2
  380. package/dist/le-kit/p-24112ca3.entry.js.map +0 -1
  381. package/dist/le-kit/p-2c6d080d.entry.js +0 -2
  382. package/dist/le-kit/p-2c6d080d.entry.js.map +0 -1
  383. package/dist/le-kit/p-46276e77.entry.js +0 -2
  384. package/dist/le-kit/p-46276e77.entry.js.map +0 -1
  385. package/dist/le-kit/p-516c8531.entry.js +0 -2
  386. package/dist/le-kit/p-516c8531.entry.js.map +0 -1
  387. package/dist/le-kit/p-6ae60ba5.entry.js +0 -2
  388. package/dist/le-kit/p-6ae60ba5.entry.js.map +0 -1
  389. package/dist/le-kit/p-6b69f9a2.entry.js +0 -2
  390. package/dist/le-kit/p-6b69f9a2.entry.js.map +0 -1
  391. package/dist/le-kit/p-6d14306f.entry.js +0 -2
  392. package/dist/le-kit/p-6d14306f.entry.js.map +0 -1
  393. package/dist/le-kit/p-7bcdf2d4.entry.js +0 -2
  394. package/dist/le-kit/p-7bcdf2d4.entry.js.map +0 -1
  395. package/dist/le-kit/p-7cf1e23c.entry.js +0 -2
  396. package/dist/le-kit/p-7cf1e23c.entry.js.map +0 -1
  397. package/dist/le-kit/p-85f2fd4d.entry.js +0 -2
  398. package/dist/le-kit/p-85f2fd4d.entry.js.map +0 -1
  399. package/dist/le-kit/p-98242429.entry.js +0 -2
  400. package/dist/le-kit/p-98242429.entry.js.map +0 -1
  401. package/dist/le-kit/p-D8RYDS9p.js +0 -2
  402. package/dist/le-kit/p-D8RYDS9p.js.map +0 -1
  403. package/dist/le-kit/p-DFTm5BqT.js +0 -3
  404. package/dist/le-kit/p-DFTm5BqT.js.map +0 -1
  405. package/dist/le-kit/p-ab6c1def.entry.js +0 -2
  406. package/dist/le-kit/p-ab6c1def.entry.js.map +0 -1
  407. package/dist/le-kit/p-ae4ead64.entry.js +0 -2
  408. package/dist/le-kit/p-ae4ead64.entry.js.map +0 -1
  409. package/dist/le-kit/p-b05d4511.entry.js +0 -2
  410. package/dist/le-kit/p-b05d4511.entry.js.map +0 -1
  411. package/dist/le-kit/p-b6ac02ff.entry.js +0 -2
  412. package/dist/le-kit/p-b6ac02ff.entry.js.map +0 -1
  413. package/dist/le-kit/p-c24769e2.entry.js +0 -2
  414. package/dist/le-kit/p-c24769e2.entry.js.map +0 -1
  415. package/dist/le-kit/p-dc0445ad.entry.js +0 -2
  416. package/dist/le-kit/p-dc0445ad.entry.js.map +0 -1
  417. package/dist/le-kit/p-eb5286f2.entry.js +0 -2
  418. package/dist/le-kit/p-eb5286f2.entry.js.map +0 -1
  419. package/dist/le-kit/p-f78b1ee6.entry.js +0 -2
  420. package/dist/le-kit/p-f78b1ee6.entry.js.map +0 -1
  421. package/dist/themes/base.css +0 -89
  422. package/dist/themes/dark.css +0 -104
  423. package/dist/themes/default.css +0 -112
  424. package/dist/themes/gradient.css +0 -104
  425. package/dist/themes/index.css +0 -76
  426. package/dist/themes/minimal.css +0 -104
  427. package/dist/themes/warm.css +0 -104
  428. package/dist/types/components/le-bar/le-bar.d.ts +0 -131
  429. package/dist/types/components/le-box/le-box.d.ts +0 -111
  430. package/dist/types/components/le-button/le-button.d.ts +0 -93
  431. package/dist/types/components/le-card/le-card.d.ts +0 -37
  432. package/dist/types/components/le-checkbox/le-checkbox.d.ts +0 -46
  433. package/dist/types/components/le-code-input/le-code-input.d.ts +0 -102
  434. package/dist/types/components/le-collapse/le-collapse.d.ts +0 -43
  435. package/dist/types/components/le-combobox/le-combobox.d.ts +0 -128
  436. package/dist/types/components/le-component/le-component.d.ts +0 -115
  437. package/dist/types/components/le-current-heading/le-current-heading.d.ts +0 -25
  438. package/dist/types/components/le-dropdown-base/le-dropdown-base.d.ts +0 -118
  439. package/dist/types/components/le-header/le-header.d.ts +0 -115
  440. package/dist/types/components/le-header-placeholder/le-header-placeholder.d.ts +0 -13
  441. package/dist/types/components/le-icon/le-icon.d.ts +0 -28
  442. package/dist/types/components/le-multiselect/le-multiselect.d.ts +0 -143
  443. package/dist/types/components/le-navigation/le-navigation.d.ts +0 -125
  444. package/dist/types/components/le-number-input/le-number-input.d.ts +0 -106
  445. package/dist/types/components/le-popover/le-popover.d.ts +0 -129
  446. package/dist/types/components/le-popup/le-popup.api.d.ts +0 -73
  447. package/dist/types/components/le-popup/le-popup.d.ts +0 -127
  448. package/dist/types/components/le-round-progress/le-round-progress.d.ts +0 -37
  449. package/dist/types/components/le-scroll-progress/le-scroll-progress.d.ts +0 -40
  450. package/dist/types/components/le-segmented-control/le-segmented-control.d.ts +0 -82
  451. package/dist/types/components/le-select/le-select.d.ts +0 -125
  452. package/dist/types/components/le-side-panel/le-side-panel.d.ts +0 -100
  453. package/dist/types/components/le-side-panel-toggle/le-side-panel-toggle.d.ts +0 -48
  454. package/dist/types/components/le-slot/le-slot.d.ts +0 -149
  455. package/dist/types/components/le-stack/le-stack.d.ts +0 -73
  456. package/dist/types/components/le-string-input/le-string-input.d.ts +0 -91
  457. package/dist/types/components/le-tab/le-tab.d.ts +0 -116
  458. package/dist/types/components/le-tab-bar/le-tab-bar.d.ts +0 -88
  459. package/dist/types/components/le-tab-panel/le-tab-panel.d.ts +0 -75
  460. package/dist/types/components/le-tabs/le-tabs.d.ts +0 -108
  461. package/dist/types/components/le-tag/le-tag.d.ts +0 -78
  462. package/dist/types/components/le-text/le-text.d.ts +0 -141
  463. package/dist/types/components/le-turntable/le-turntable.d.ts +0 -55
  464. package/dist/types/components.d.ts +0 -5716
  465. package/dist/types/global/app.d.ts +0 -96
  466. package/dist/types/index.d.ts +0 -16
  467. package/dist/types/stencil-public-runtime.d.ts +0 -1799
  468. package/dist/types/types/blocks.d.ts +0 -136
  469. package/dist/types/types/options.d.ts +0 -143
  470. package/dist/types/utils/utils.d.ts +0 -54
  471. package/loader/cdn.js +0 -1
  472. package/loader/index.cjs.js +0 -1
  473. package/loader/index.d.ts +0 -24
  474. package/loader/index.es2017.js +0 -1
  475. package/loader/index.js +0 -2
@@ -1,475 +0,0 @@
1
- import { h, Host } from "@stencil/core";
2
- import { observeModeChanges } from "../../utils/utils";
3
- /**
4
- * A text component with rich text editing capabilities in admin mode.
5
- *
6
- * `le-text` renders semantic text elements (headings, paragraphs, code, quotes)
7
- * and provides a Notion-like rich text editor in admin mode with formatting
8
- * toolbar for bold, italic, links, and paragraph type selection.
9
- *
10
- * @slot - Default slot for text content
11
- *
12
- * @cssprop --le-text-color - Text color
13
- * @cssprop --le-text-font-size - Font size
14
- * @cssprop --le-text-line-height - Line height
15
- * @cssprop --le-text-font-weight - Font weight
16
- *
17
- * @csspart text - The text container element
18
- *
19
- * @cmsEditable true
20
- * @cmsCategory Content
21
- */
22
- export class LeText {
23
- el;
24
- /**
25
- * The semantic variant/type of text element
26
- * @allowedValues p | h1 | h2 | h3 | h4 | h5 | h6 | code | quote | label | small
27
- */
28
- variant = 'p';
29
- /**
30
- * Text alignment
31
- * @allowedValues left | center | right | justify
32
- */
33
- align = 'left';
34
- /**
35
- * Text color (CSS value or theme token)
36
- */
37
- color;
38
- /**
39
- * Whether the text should truncate with ellipsis
40
- */
41
- truncate = false;
42
- /**
43
- * Maximum number of lines before truncating (requires truncate=true)
44
- */
45
- maxLines;
46
- /**
47
- * Internal state to track admin mode
48
- */
49
- adminMode = false;
50
- /**
51
- * The HTML content being edited
52
- */
53
- content = '';
54
- /**
55
- * Whether the editor is focused (shows toolbar)
56
- */
57
- isFocused = false;
58
- /**
59
- * Current selection state for toolbar button highlighting
60
- */
61
- selectionState = {
62
- isBold: false,
63
- isItalic: false,
64
- isUnderline: false,
65
- isStrikethrough: false,
66
- isLink: false,
67
- blockType: 'p',
68
- };
69
- /**
70
- * Reference to the contenteditable element
71
- */
72
- editorRef;
73
- /**
74
- * Reference to the slot element
75
- */
76
- slotRef;
77
- disconnectModeObserver;
78
- connectedCallback() {
79
- this.disconnectModeObserver = observeModeChanges(this.el, mode => {
80
- const wasAdmin = this.adminMode;
81
- this.adminMode = mode === 'admin';
82
- if (this.adminMode && !wasAdmin) {
83
- // Entering admin mode - read content from slot
84
- requestAnimationFrame(() => this.readSlottedContent());
85
- }
86
- else if (!this.adminMode && wasAdmin) {
87
- // Leaving admin mode - sync content back to slot
88
- this.syncContentToSlot();
89
- }
90
- });
91
- }
92
- disconnectedCallback() {
93
- this.disconnectModeObserver?.();
94
- }
95
- onVariantChange() {
96
- // When variant changes in admin mode, update the content wrapper
97
- if (this.adminMode && this.editorRef) {
98
- this.syncContentToSlot();
99
- }
100
- }
101
- /**
102
- * Read content from slotted elements
103
- */
104
- readSlottedContent() {
105
- if (!this.slotRef)
106
- return;
107
- const assignedNodes = this.slotRef.assignedNodes({ flatten: true });
108
- // Collect all content from assigned nodes
109
- let html = '';
110
- assignedNodes.forEach(node => {
111
- if (node.nodeType === Node.TEXT_NODE) {
112
- html += node.textContent;
113
- }
114
- else if (node.nodeType === Node.ELEMENT_NODE) {
115
- html += node.innerHTML || node.textContent;
116
- }
117
- });
118
- this.content = html.trim();
119
- }
120
- /**
121
- * Sync edited content back to the slot
122
- */
123
- syncContentToSlot() {
124
- if (!this.editorRef)
125
- return;
126
- const newContent = this.editorRef.innerHTML;
127
- // Update the light DOM content
128
- // We need to update the actual slotted content
129
- const slot = this.slotRef;
130
- if (slot) {
131
- const assignedNodes = slot.assignedNodes({ flatten: true });
132
- if (assignedNodes.length > 0) {
133
- const firstNode = assignedNodes[0];
134
- if (firstNode.nodeType === Node.ELEMENT_NODE) {
135
- firstNode.innerHTML = newContent;
136
- }
137
- else if (firstNode.nodeType === Node.TEXT_NODE) {
138
- // Replace text node with the new content
139
- const parent = firstNode.parentNode;
140
- if (parent) {
141
- // Create a temporary element to parse HTML
142
- const temp = document.createElement('span');
143
- temp.innerHTML = newContent;
144
- // Replace the text node
145
- parent.replaceChild(temp, firstNode);
146
- // Unwrap the span if it only contains text
147
- if (temp.childNodes.length === 1 && temp.firstChild?.nodeType === Node.TEXT_NODE) {
148
- parent.replaceChild(temp.firstChild, temp);
149
- }
150
- }
151
- }
152
- }
153
- else {
154
- // No assigned nodes, set innerHTML on the host's light DOM
155
- this.el.innerHTML = newContent;
156
- }
157
- }
158
- }
159
- /**
160
- * Handle input in the contenteditable
161
- */
162
- handleInput = () => {
163
- if (this.editorRef) {
164
- this.content = this.editorRef.innerHTML;
165
- this.updateSelectionState();
166
- }
167
- };
168
- /**
169
- * Handle focus on the editor
170
- */
171
- handleFocus = () => {
172
- this.isFocused = true;
173
- this.updateSelectionState();
174
- };
175
- /**
176
- * Handle blur on the editor
177
- */
178
- handleBlur = (e) => {
179
- // Check if focus moved to toolbar
180
- const relatedTarget = e.relatedTarget;
181
- const toolbar = this.el.shadowRoot?.querySelector('.le-text-toolbar');
182
- if (toolbar?.contains(relatedTarget)) {
183
- // Focus moved to toolbar, keep it open
184
- return;
185
- }
186
- // Small delay to allow toolbar clicks to register
187
- setTimeout(() => {
188
- if (!this.el.shadowRoot?.activeElement) {
189
- this.isFocused = false;
190
- this.syncContentToSlot();
191
- }
192
- }, 150);
193
- };
194
- /**
195
- * Handle selection change to update toolbar state
196
- */
197
- handleSelectionChange = () => {
198
- this.updateSelectionState();
199
- };
200
- /**
201
- * Update the selection state for toolbar highlighting
202
- */
203
- updateSelectionState() {
204
- const selection = window.getSelection();
205
- if (!selection || selection.rangeCount === 0)
206
- return;
207
- this.selectionState = {
208
- isBold: document.queryCommandState('bold'),
209
- isItalic: document.queryCommandState('italic'),
210
- isUnderline: document.queryCommandState('underline'),
211
- isStrikethrough: document.queryCommandState('strikeThrough'),
212
- isLink: this.isSelectionInLink(selection),
213
- blockType: this.variant,
214
- };
215
- }
216
- /**
217
- * Check if current selection is within a link
218
- */
219
- isSelectionInLink(selection) {
220
- if (!selection.anchorNode)
221
- return false;
222
- let node = selection.anchorNode;
223
- while (node && node !== this.editorRef) {
224
- if (node.nodeName === 'A')
225
- return true;
226
- node = node.parentNode;
227
- }
228
- return false;
229
- }
230
- /**
231
- * Execute a formatting command
232
- */
233
- execCommand(command, value) {
234
- // Focus the editor first
235
- this.editorRef?.focus();
236
- // Execute the command
237
- document.execCommand(command, false, value);
238
- // Update state
239
- this.handleInput();
240
- this.updateSelectionState();
241
- }
242
- /**
243
- * Toggle bold formatting
244
- */
245
- toggleBold = (e) => {
246
- e.preventDefault();
247
- this.execCommand('bold');
248
- };
249
- /**
250
- * Toggle italic formatting
251
- */
252
- toggleItalic = (e) => {
253
- e.preventDefault();
254
- this.execCommand('italic');
255
- };
256
- /**
257
- * Toggle underline formatting
258
- */
259
- toggleUnderline = (e) => {
260
- e.preventDefault();
261
- this.execCommand('underline');
262
- };
263
- /**
264
- * Toggle strikethrough formatting
265
- */
266
- toggleStrikethrough = (e) => {
267
- e.preventDefault();
268
- this.execCommand('strikeThrough');
269
- };
270
- /**
271
- * Add or edit a link
272
- */
273
- toggleLink = (e) => {
274
- e.preventDefault();
275
- if (this.selectionState.isLink) {
276
- // Remove link
277
- this.execCommand('unlink');
278
- }
279
- else {
280
- // Add link
281
- const url = prompt('Enter URL:', 'https://');
282
- if (url) {
283
- this.execCommand('createLink', url);
284
- }
285
- }
286
- };
287
- /**
288
- * Change the block type/variant
289
- */
290
- changeVariant = (e) => {
291
- const select = e.target;
292
- this.variant = select.value;
293
- };
294
- /**
295
- * Render the formatting toolbar
296
- */
297
- renderToolbar() {
298
- return (h("div", { class: "le-text-toolbar" }, h("select", { class: "le-text-toolbar-select", onChange: this.changeVariant, onMouseDown: e => e.preventDefault() }, h("option", { value: "p", selected: this.variant === 'p' }, "Paragraph"), h("option", { value: "h1", selected: this.variant === 'h1' }, "Heading 1"), h("option", { value: "h2", selected: this.variant === 'h2' }, "Heading 2"), h("option", { value: "h3", selected: this.variant === 'h3' }, "Heading 3"), h("option", { value: "h4", selected: this.variant === 'h4' }, "Heading 4"), h("option", { value: "h5", selected: this.variant === 'h5' }, "Heading 5"), h("option", { value: "h6", selected: this.variant === 'h6' }, "Heading 6"), h("option", { value: "quote", selected: this.variant === 'quote' }, "Quote"), h("option", { value: "code", selected: this.variant === 'code' }, "Code"), h("option", { value: "label", selected: this.variant === 'label' }, "Label"), h("option", { value: "small", selected: this.variant === 'small' }, "Small")), h("div", { class: "le-text-toolbar-divider" }), h("button", { type: "button", class: { 'le-text-toolbar-btn': true, 'active': this.selectionState.isBold }, onMouseDown: this.toggleBold, title: "Bold (Ctrl+B)" }, h("strong", null, "B")), h("button", { type: "button", class: { 'le-text-toolbar-btn': true, 'active': this.selectionState.isItalic }, onMouseDown: this.toggleItalic, title: "Italic (Ctrl+I)" }, h("em", null, "I")), h("button", { type: "button", class: { 'le-text-toolbar-btn': true, 'active': this.selectionState.isUnderline }, onMouseDown: this.toggleUnderline, title: "Underline (Ctrl+U)" }, h("span", { style: { textDecoration: 'underline' } }, "U")), h("button", { type: "button", class: { 'le-text-toolbar-btn': true, 'active': this.selectionState.isStrikethrough }, onMouseDown: this.toggleStrikethrough, title: "Strikethrough" }, h("span", { style: { textDecoration: 'line-through' } }, "S")), h("div", { class: "le-text-toolbar-divider" }), h("button", { type: "button", class: { 'le-text-toolbar-btn': true, 'active': this.selectionState.isLink }, onMouseDown: this.toggleLink, title: this.selectionState.isLink ? 'Remove link' : 'Add link' }, "\uD83D\uDD17")));
299
- }
300
- /**
301
- * Get the semantic tag for the current variant
302
- */
303
- getTag() {
304
- switch (this.variant) {
305
- case 'quote':
306
- return 'blockquote';
307
- case 'code':
308
- return 'pre';
309
- case 'label':
310
- return 'label';
311
- case 'small':
312
- return 'small';
313
- default:
314
- return this.variant; // h1-h6, p
315
- }
316
- }
317
- render() {
318
- const Tag = this.getTag();
319
- const textStyle = {};
320
- if (this.color) {
321
- textStyle.color = this.color;
322
- }
323
- if (this.align) {
324
- textStyle.textAlign = this.align;
325
- }
326
- const textClass = {
327
- 'le-text': true,
328
- [`variant-${this.variant}`]: true,
329
- 'truncate': this.truncate,
330
- [`max-lines-${this.maxLines}`]: this.truncate && this.maxLines,
331
- };
332
- // Admin mode - show rich text editor
333
- if (this.adminMode) {
334
- return (h(Host, { class: "admin-mode" }, h("le-component", { component: "le-text" }, h("div", { class: "le-text-editor-wrapper" }, this.isFocused && this.renderToolbar(), h(Tag, { class: textClass, part: "text", style: textStyle }, h("div", { ref: el => (this.editorRef = el), class: "le-text-editor", contentEditable: true, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyUp: this.handleSelectionChange, onMouseUp: this.handleSelectionChange, innerHTML: this.content })), h("div", { class: "hidden-slot" }, h("slot", { ref: el => (this.slotRef = el), onSlotchange: () => this.readSlottedContent() }))))));
335
- }
336
- // Default mode - render semantic element with slotted content
337
- return (h(Host, null, h(Tag, { class: textClass, part: "text", style: textStyle }, h("slot", { ref: el => (this.slotRef = el) }))));
338
- }
339
- static get is() { return "le-text"; }
340
- static get encapsulation() { return "shadow"; }
341
- static get originalStyleUrls() {
342
- return {
343
- "$": ["le-text.css"]
344
- };
345
- }
346
- static get styleUrls() {
347
- return {
348
- "$": ["le-text.css"]
349
- };
350
- }
351
- static get properties() {
352
- return {
353
- "variant": {
354
- "type": "string",
355
- "mutable": true,
356
- "complexType": {
357
- "original": "| 'p'\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'code'\n | 'quote'\n | 'label'\n | 'small'",
358
- "resolved": "\"code\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"label\" | \"p\" | \"quote\" | \"small\"",
359
- "references": {}
360
- },
361
- "required": false,
362
- "optional": false,
363
- "docs": {
364
- "tags": [{
365
- "name": "allowedValues",
366
- "text": "p | h1 | h2 | h3 | h4 | h5 | h6 | code | quote | label | small"
367
- }],
368
- "text": "The semantic variant/type of text element"
369
- },
370
- "getter": false,
371
- "setter": false,
372
- "reflect": true,
373
- "attribute": "variant",
374
- "defaultValue": "'p'"
375
- },
376
- "align": {
377
- "type": "string",
378
- "mutable": false,
379
- "complexType": {
380
- "original": "'left' | 'center' | 'right' | 'justify'",
381
- "resolved": "\"center\" | \"justify\" | \"left\" | \"right\"",
382
- "references": {}
383
- },
384
- "required": false,
385
- "optional": false,
386
- "docs": {
387
- "tags": [{
388
- "name": "allowedValues",
389
- "text": "left | center | right | justify"
390
- }],
391
- "text": "Text alignment"
392
- },
393
- "getter": false,
394
- "setter": false,
395
- "reflect": true,
396
- "attribute": "align",
397
- "defaultValue": "'left'"
398
- },
399
- "color": {
400
- "type": "string",
401
- "mutable": false,
402
- "complexType": {
403
- "original": "string",
404
- "resolved": "string",
405
- "references": {}
406
- },
407
- "required": false,
408
- "optional": true,
409
- "docs": {
410
- "tags": [],
411
- "text": "Text color (CSS value or theme token)"
412
- },
413
- "getter": false,
414
- "setter": false,
415
- "reflect": false,
416
- "attribute": "color"
417
- },
418
- "truncate": {
419
- "type": "boolean",
420
- "mutable": false,
421
- "complexType": {
422
- "original": "boolean",
423
- "resolved": "boolean",
424
- "references": {}
425
- },
426
- "required": false,
427
- "optional": false,
428
- "docs": {
429
- "tags": [],
430
- "text": "Whether the text should truncate with ellipsis"
431
- },
432
- "getter": false,
433
- "setter": false,
434
- "reflect": false,
435
- "attribute": "truncate",
436
- "defaultValue": "false"
437
- },
438
- "maxLines": {
439
- "type": "number",
440
- "mutable": false,
441
- "complexType": {
442
- "original": "number",
443
- "resolved": "number",
444
- "references": {}
445
- },
446
- "required": false,
447
- "optional": true,
448
- "docs": {
449
- "tags": [],
450
- "text": "Maximum number of lines before truncating (requires truncate=true)"
451
- },
452
- "getter": false,
453
- "setter": false,
454
- "reflect": false,
455
- "attribute": "max-lines"
456
- }
457
- };
458
- }
459
- static get states() {
460
- return {
461
- "adminMode": {},
462
- "content": {},
463
- "isFocused": {},
464
- "selectionState": {}
465
- };
466
- }
467
- static get elementRef() { return "el"; }
468
- static get watchers() {
469
- return [{
470
- "propName": "variant",
471
- "methodName": "onVariantChange"
472
- }];
473
- }
474
- }
475
- //# sourceMappingURL=le-text.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"le-text.js","sourceRoot":"","sources":["../../../src/components/le-text/le-text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;GAkBG;AAMH,MAAM,OAAO,MAAM;IACN,EAAE,CAAc;IAE3B;;;OAGG;IACqC,OAAO,GAWjC,GAAG,CAAC;IAElB;;;OAGG;IACsB,KAAK,GAA4C,MAAM,CAAC;IAEjF;;OAEG;IACK,KAAK,CAAU;IAEvB;;OAEG;IACK,QAAQ,GAAY,KAAK,CAAC;IAElC;;OAEG;IACK,QAAQ,CAAU;IAE1B;;OAEG;IACc,SAAS,GAAY,KAAK,CAAC;IAE5C;;OAEG;IACc,OAAO,GAAW,EAAE,C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AAO,GAAG,EAAqB,CAAC,GAAS,CAC5D,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, State, h, Host, Element, Watch } from '@stencil/core';\nimport { observeModeChanges } from '../../utils/utils';\n\n/**\n * A text component with rich text editing capabilities in admin mode.\n *\n * `le-text` renders semantic text elements (headings, paragraphs, code, quotes)\n * and provides a Notion-like rich text editor in admin mode with formatting\n * toolbar for bold, italic, links, and paragraph type selection.\n *\n * @slot - Default slot for text content\n *\n * @cssprop --le-text-color - Text color\n * @cssprop --le-text-font-size - Font size\n * @cssprop --le-text-line-height - Line height\n * @cssprop --le-text-font-weight - Font weight\n *\n * @csspart text - The text container element\n *\n * @cmsEditable true\n * @cmsCategory Content\n */\n@Component({\n tag: 'le-text',\n styleUrl: 'le-text.css',\n shadow: true,\n})\nexport class LeText {\n @Element() el: HTMLElement;\n\n /**\n * The semantic variant/type of text element\n * @allowedValues p | h1 | h2 | h3 | h4 | h5 | h6 | code | quote | label | small\n */\n @Prop({ mutable: true, reflect: true }) variant:\n | 'p'\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'code'\n | 'quote'\n | 'label'\n | 'small' = 'p';\n\n /**\n * Text alignment\n * @allowedValues left | center | right | justify\n */\n @Prop({ reflect: true }) align: 'left' | 'center' | 'right' | 'justify' = 'left';\n\n /**\n * Text color (CSS value or theme token)\n */\n @Prop() color?: string;\n\n /**\n * Whether the text should truncate with ellipsis\n */\n @Prop() truncate: boolean = false;\n\n /**\n * Maximum number of lines before truncating (requires truncate=true)\n */\n @Prop() maxLines?: number;\n\n /**\n * Internal state to track admin mode\n */\n @State() private adminMode: boolean = false;\n\n /**\n * The HTML content being edited\n */\n @State() private content: string = '';\n\n /**\n * Whether the editor is focused (shows toolbar)\n */\n @State() private isFocused: boolean = false;\n\n /**\n * Current selection state for toolbar button highlighting\n */\n @State() private selectionState: SelectionState = {\n isBold: false,\n isItalic: false,\n isUnderline: false,\n isStrikethrough: false,\n isLink: false,\n blockType: 'p',\n };\n\n /**\n * Reference to the contenteditable element\n */\n private editorRef?: HTMLDivElement;\n\n /**\n * Reference to the slot element\n */\n private slotRef?: HTMLSlotElement;\n\n private disconnectModeObserver?: () => void;\n\n connectedCallback() {\n this.disconnectModeObserver = observeModeChanges(this.el, mode => {\n const wasAdmin = this.adminMode;\n this.adminMode = mode === 'admin';\n\n if (this.adminMode && !wasAdmin) {\n // Entering admin mode - read content from slot\n requestAnimationFrame(() => this.readSlottedContent());\n } else if (!this.adminMode && wasAdmin) {\n // Leaving admin mode - sync content back to slot\n this.syncContentToSlot();\n }\n });\n }\n\n disconnectedCallback() {\n this.disconnectModeObserver?.();\n }\n\n @Watch('variant')\n onVariantChange() {\n // When variant changes in admin mode, update the content wrapper\n if (this.adminMode && this.editorRef) {\n this.syncContentToSlot();\n }\n }\n\n /**\n * Read content from slotted elements\n */\n private readSlottedContent() {\n if (!this.slotRef) return;\n\n const assignedNodes = this.slotRef.assignedNodes({ flatten: true });\n\n // Collect all content from assigned nodes\n let html = '';\n assignedNodes.forEach(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n html += node.textContent;\n } else if (node.nodeType === Node.ELEMENT_NODE) {\n html += (node as Element).innerHTML || node.textContent;\n }\n });\n\n this.content = html.trim();\n }\n\n /**\n * Sync edited content back to the slot\n */\n private syncContentToSlot() {\n if (!this.editorRef) return;\n\n const newContent = this.editorRef.innerHTML;\n\n // Update the light DOM content\n // We need to update the actual slotted content\n const slot = this.slotRef;\n if (slot) {\n const assignedNodes = slot.assignedNodes({ flatten: true });\n if (assignedNodes.length > 0) {\n const firstNode = assignedNodes[0];\n if (firstNode.nodeType === Node.ELEMENT_NODE) {\n (firstNode as Element).innerHTML = newContent;\n } else if (firstNode.nodeType === Node.TEXT_NODE) {\n // Replace text node with the new content\n const parent = firstNode.parentNode;\n if (parent) {\n // Create a temporary element to parse HTML\n const temp = document.createElement('span');\n temp.innerHTML = newContent;\n // Replace the text node\n parent.replaceChild(temp, firstNode);\n // Unwrap the span if it only contains text\n if (temp.childNodes.length === 1 && temp.firstChild?.nodeType === Node.TEXT_NODE) {\n parent.replaceChild(temp.firstChild, temp);\n }\n }\n }\n } else {\n // No assigned nodes, set innerHTML on the host's light DOM\n this.el.innerHTML = newContent;\n }\n }\n }\n\n /**\n * Handle input in the contenteditable\n */\n private handleInput = () => {\n if (this.editorRef) {\n this.content = this.editorRef.innerHTML;\n this.updateSelectionState();\n }\n };\n\n /**\n * Handle focus on the editor\n */\n private handleFocus = () => {\n this.isFocused = true;\n this.updateSelectionState();\n };\n\n /**\n * Handle blur on the editor\n */\n private handleBlur = (e: FocusEvent) => {\n // Check if focus moved to toolbar\n const relatedTarget = e.relatedTarget as HTMLElement;\n const toolbar = this.el.shadowRoot?.querySelector('.le-text-toolbar');\n\n if (toolbar?.contains(relatedTarget)) {\n // Focus moved to toolbar, keep it open\n return;\n }\n\n // Small delay to allow toolbar clicks to register\n setTimeout(() => {\n if (!this.el.shadowRoot?.activeElement) {\n this.isFocused = false;\n this.syncContentToSlot();\n }\n }, 150);\n };\n\n /**\n * Handle selection change to update toolbar state\n */\n private handleSelectionChange = () => {\n this.updateSelectionState();\n };\n\n /**\n * Update the selection state for toolbar highlighting\n */\n private updateSelectionState() {\n const selection = window.getSelection();\n if (!selection || selection.rangeCount === 0) return;\n\n this.selectionState = {\n isBold: document.queryCommandState('bold'),\n isItalic: document.queryCommandState('italic'),\n isUnderline: document.queryCommandState('underline'),\n isStrikethrough: document.queryCommandState('strikeThrough'),\n isLink: this.isSelectionInLink(selection),\n blockType: this.variant,\n };\n }\n\n /**\n * Check if current selection is within a link\n */\n private isSelectionInLink(selection: Selection): boolean {\n if (!selection.anchorNode) return false;\n\n let node: Node | null = selection.anchorNode;\n while (node && node !== this.editorRef) {\n if (node.nodeName === 'A') return true;\n node = node.parentNode;\n }\n return false;\n }\n\n /**\n * Execute a formatting command\n */\n private execCommand(command: string, value?: string) {\n // Focus the editor first\n this.editorRef?.focus();\n\n // Execute the command\n document.execCommand(command, false, value);\n\n // Update state\n this.handleInput();\n this.updateSelectionState();\n }\n\n /**\n * Toggle bold formatting\n */\n private toggleBold = (e: Event) => {\n e.preventDefault();\n this.execCommand('bold');\n };\n\n /**\n * Toggle italic formatting\n */\n private toggleItalic = (e: Event) => {\n e.preventDefault();\n this.execCommand('italic');\n };\n\n /**\n * Toggle underline formatting\n */\n private toggleUnderline = (e: Event) => {\n e.preventDefault();\n this.execCommand('underline');\n };\n\n /**\n * Toggle strikethrough formatting\n */\n private toggleStrikethrough = (e: Event) => {\n e.preventDefault();\n this.execCommand('strikeThrough');\n };\n\n /**\n * Add or edit a link\n */\n private toggleLink = (e: Event) => {\n e.preventDefault();\n\n if (this.selectionState.isLink) {\n // Remove link\n this.execCommand('unlink');\n } else {\n // Add link\n const url = prompt('Enter URL:', 'https://');\n if (url) {\n this.execCommand('createLink', url);\n }\n }\n };\n\n /**\n * Change the block type/variant\n */\n private changeVariant = (e: Event) => {\n const select = e.target as HTMLSelectElement;\n this.variant = select.value as typeof this.variant;\n };\n\n /**\n * Render the formatting toolbar\n */\n private renderToolbar() {\n return (\n <div class=\"le-text-toolbar\">\n <select\n class=\"le-text-toolbar-select\"\n onChange={this.changeVariant}\n onMouseDown={e => e.preventDefault()}\n >\n <option value=\"p\" selected={this.variant === 'p'}>\n Paragraph\n </option>\n <option value=\"h1\" selected={this.variant === 'h1'}>\n Heading 1\n </option>\n <option value=\"h2\" selected={this.variant === 'h2'}>\n Heading 2\n </option>\n <option value=\"h3\" selected={this.variant === 'h3'}>\n Heading 3\n </option>\n <option value=\"h4\" selected={this.variant === 'h4'}>\n Heading 4\n </option>\n <option value=\"h5\" selected={this.variant === 'h5'}>\n Heading 5\n </option>\n <option value=\"h6\" selected={this.variant === 'h6'}>\n Heading 6\n </option>\n <option value=\"quote\" selected={this.variant === 'quote'}>\n Quote\n </option>\n <option value=\"code\" selected={this.variant === 'code'}>\n Code\n </option>\n <option value=\"label\" selected={this.variant === 'label'}>\n Label\n </option>\n <option value=\"small\" selected={this.variant === 'small'}>\n Small\n </option>\n </select>\n\n <div class=\"le-text-toolbar-divider\"></div>\n\n <button\n type=\"button\"\n class={{ 'le-text-toolbar-btn': true, 'active': this.selectionState.isBold }}\n onMouseDown={this.toggleBold}\n title=\"Bold (Ctrl+B)\"\n >\n <strong>B</strong>\n </button>\n\n <button\n type=\"button\"\n class={{ 'le-text-toolbar-btn': true, 'active': this.selectionState.isItalic }}\n onMouseDown={this.toggleItalic}\n title=\"Italic (Ctrl+I)\"\n >\n <em>I</em>\n </button>\n\n <button\n type=\"button\"\n class={{ 'le-text-toolbar-btn': true, 'active': this.selectionState.isUnderline }}\n onMouseDown={this.toggleUnderline}\n title=\"Underline (Ctrl+U)\"\n >\n <span style={{ textDecoration: 'underline' }}>U</span>\n </button>\n\n <button\n type=\"button\"\n class={{ 'le-text-toolbar-btn': true, 'active': this.selectionState.isStrikethrough }}\n onMouseDown={this.toggleStrikethrough}\n title=\"Strikethrough\"\n >\n <span style={{ textDecoration: 'line-through' }}>S</span>\n </button>\n\n <div class=\"le-text-toolbar-divider\"></div>\n\n <button\n type=\"button\"\n class={{ 'le-text-toolbar-btn': true, 'active': this.selectionState.isLink }}\n onMouseDown={this.toggleLink}\n title={this.selectionState.isLink ? 'Remove link' : 'Add link'}\n >\n 🔗\n </button>\n </div>\n );\n }\n\n /**\n * Get the semantic tag for the current variant\n */\n private getTag(): string {\n switch (this.variant) {\n case 'quote':\n return 'blockquote';\n case 'code':\n return 'pre';\n case 'label':\n return 'label';\n case 'small':\n return 'small';\n default:\n return this.variant; // h1-h6, p\n }\n }\n\n render() {\n const Tag = this.getTag();\n\n const textStyle: { [key: string]: string } = {};\n if (this.color) {\n textStyle.color = this.color;\n }\n if (this.align) {\n textStyle.textAlign = this.align;\n }\n\n const textClass = {\n 'le-text': true,\n [`variant-${this.variant}`]: true,\n 'truncate': this.truncate,\n [`max-lines-${this.maxLines}`]: this.truncate && this.maxLines,\n };\n\n // Admin mode - show rich text editor\n if (this.adminMode) {\n return (\n <Host class=\"admin-mode\">\n <le-component component=\"le-text\">\n <div class=\"le-text-editor-wrapper\">\n {this.isFocused && this.renderToolbar()}\n <Tag class={textClass} part=\"text\" style={textStyle}>\n <div\n ref={el => (this.editorRef = el)}\n class=\"le-text-editor\"\n contentEditable={true}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n onKeyUp={this.handleSelectionChange}\n onMouseUp={this.handleSelectionChange}\n innerHTML={this.content}\n ></div>\n </Tag>\n {/* Hidden slot to receive light DOM content */}\n <div class=\"hidden-slot\">\n <slot\n ref={el => (this.slotRef = el as HTMLSlotElement)}\n onSlotchange={() => this.readSlottedContent()}\n ></slot>\n </div>\n </div>\n </le-component>\n </Host>\n );\n }\n\n // Default mode - render semantic element with slotted content\n return (\n <Host>\n <Tag class={textClass} part=\"text\" style={textStyle}>\n <slot ref={el => (this.slotRef = el as HTMLSlotElement)}></slot>\n </Tag>\n </Host>\n );\n }\n}\n\n/**\n * Selection state for toolbar\n */\ninterface SelectionState {\n isBold: boolean;\n isItalic: boolean;\n isUnderline: boolean;\n isStrikethrough: boolean;\n isLink: boolean;\n blockType: string;\n}\n"]}
@@ -1,10 +0,0 @@
1
- :host {
2
- display: block;
3
- cursor: grab;
4
- }
5
-
6
- div.turntable {
7
- width: 100%;
8
- height: 100%;
9
- padding: 1px;
10
- }