@limetech/lime-elements 40.13.0 → 40.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (305) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/lime-elements.cjs.js +1 -1
  3. package/dist/cjs/limel-3d-hover-effect-glow.cjs.entry.js +1 -1
  4. package/dist/cjs/limel-action-bar_3.cjs.entry.js +4 -4
  5. package/dist/cjs/limel-ai-avatar.cjs.entry.js +2 -2
  6. package/dist/cjs/limel-badge.cjs.entry.js +2 -2
  7. package/dist/cjs/limel-banner.cjs.entry.js +1 -1
  8. package/dist/cjs/limel-breadcrumbs_6.cjs.entry.js +6 -6
  9. package/dist/cjs/limel-button-group.cjs.entry.js +1 -1
  10. package/dist/cjs/limel-button.cjs.entry.js +2 -2
  11. package/dist/cjs/limel-callout.cjs.entry.js +2 -2
  12. package/dist/cjs/limel-card.cjs.entry.js +1 -1
  13. package/dist/cjs/limel-chart.cjs.entry.js +1 -1
  14. package/dist/cjs/limel-checkbox.cjs.entry.js +1 -1
  15. package/dist/cjs/limel-chip-set.cjs.entry.js +2 -2
  16. package/dist/cjs/limel-chip_2.cjs.entry.js +2 -2
  17. package/dist/cjs/limel-circular-progress.cjs.entry.js +1 -1
  18. package/dist/cjs/limel-code-diff.cjs.entry.js +2 -2
  19. package/dist/cjs/limel-code-editor.cjs.entry.js +2 -2
  20. package/dist/cjs/limel-collapsible-section.cjs.entry.js +2 -2
  21. package/dist/cjs/limel-color-picker-palette.cjs.entry.js +2 -2
  22. package/dist/cjs/limel-color-picker.cjs.entry.js +1 -1
  23. package/dist/cjs/limel-dialog.cjs.entry.js +2 -2
  24. package/dist/cjs/limel-dock.cjs.entry.js +3 -3
  25. package/dist/cjs/limel-drag-handle_2.cjs.entry.js +4 -4
  26. package/dist/cjs/limel-email-viewer.cjs.entry.js +2 -2
  27. package/dist/cjs/limel-file-dropzone_2.cjs.entry.js +2 -2
  28. package/dist/cjs/limel-file-viewer.cjs.entry.js +732 -279
  29. package/dist/cjs/limel-file.cjs.entry.js +2 -2
  30. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +2 -2
  31. package/dist/cjs/limel-flex-container.cjs.entry.js +1 -1
  32. package/dist/cjs/limel-form.cjs.entry.js +387 -70
  33. package/dist/cjs/limel-grid.cjs.entry.js +1 -1
  34. package/dist/cjs/limel-header.cjs.entry.js +1 -1
  35. package/dist/cjs/limel-help-content.cjs.entry.js +1 -1
  36. package/dist/cjs/limel-help.cjs.entry.js +2 -2
  37. package/dist/cjs/limel-helper-line_3.cjs.entry.js +4 -4
  38. package/dist/cjs/limel-hotkey_4.cjs.entry.js +5 -5
  39. package/dist/cjs/limel-icon-button.cjs.entry.js +1 -1
  40. package/dist/cjs/limel-icon.cjs.entry.js +1 -1
  41. package/dist/cjs/limel-info-tile.cjs.entry.js +2 -2
  42. package/dist/cjs/limel-list-item.cjs.entry.js +3 -3
  43. package/dist/cjs/limel-markdown.cjs.entry.js +1 -1
  44. package/dist/cjs/limel-masonry-layout.cjs.entry.js +1 -1
  45. package/dist/cjs/limel-menu-item-meta.cjs.entry.js +1 -1
  46. package/dist/cjs/limel-pagination-jump.cjs.entry.js +1 -1
  47. package/dist/cjs/limel-pagination.cjs.entry.js +2 -2
  48. package/dist/cjs/limel-picker.cjs.entry.js +2 -2
  49. package/dist/cjs/limel-popover_2.cjs.entry.js +2 -2
  50. package/dist/cjs/limel-profile-picture.cjs.entry.js +1 -1
  51. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +2 -2
  52. package/dist/cjs/limel-radio-button-group.cjs.entry.js +1 -1
  53. package/dist/cjs/limel-radio-button.cjs.entry.js +2 -2
  54. package/dist/cjs/limel-resize-handle.cjs.entry.js +43 -2
  55. package/dist/cjs/limel-select.cjs.entry.js +1 -1
  56. package/dist/cjs/limel-shortcut.cjs.entry.js +1 -1
  57. package/dist/cjs/limel-side-panel.cjs.entry.js +16 -6
  58. package/dist/cjs/limel-slider.cjs.entry.js +4 -4
  59. package/dist/cjs/limel-snackbar.cjs.entry.js +3 -3
  60. package/dist/cjs/limel-split-button.cjs.entry.js +2 -2
  61. package/dist/cjs/limel-switch.cjs.entry.js +1 -1
  62. package/dist/cjs/limel-tab-bar.cjs.entry.js +1 -1
  63. package/dist/cjs/limel-tab-panel.cjs.entry.js +1 -1
  64. package/dist/cjs/limel-table.cjs.entry.js +3 -3
  65. package/dist/cjs/limel-text-editor-link-menu.cjs.entry.js +4 -4
  66. package/dist/cjs/limel-text-editor.cjs.entry.js +1 -1
  67. package/dist/cjs/loader.cjs.js +1 -1
  68. package/dist/cjs/{translations-DDyw5Zzz.js → translations-CLSqfR3x.js} +56 -0
  69. package/dist/collection/components/3d-hover-effect-glow/3d-hover-effect-glow.js +1 -1
  70. package/dist/collection/components/action-bar/action-bar-item/action-bar-overflow-menu.js +1 -1
  71. package/dist/collection/components/action-bar/action-bar.js +2 -2
  72. package/dist/collection/components/ai-avatar/ai-avatar.js +1 -1
  73. package/dist/collection/components/badge/badge.js +2 -2
  74. package/dist/collection/components/banner/banner.js +1 -1
  75. package/dist/collection/components/breadcrumbs/breadcrumbs.js +1 -1
  76. package/dist/collection/components/button/button.js +2 -2
  77. package/dist/collection/components/button-group/button-group.js +1 -1
  78. package/dist/collection/components/callout/callout.js +1 -1
  79. package/dist/collection/components/card/card.js +1 -1
  80. package/dist/collection/components/checkbox/checkbox.js +1 -1
  81. package/dist/collection/components/chip/chip.js +1 -1
  82. package/dist/collection/components/chip-set/chip-set.js +1 -1
  83. package/dist/collection/components/circular-progress/circular-progress.js +1 -1
  84. package/dist/collection/components/code-diff/code-diff.js +1 -1
  85. package/dist/collection/components/code-editor/code-editor.js +1 -1
  86. package/dist/collection/components/collapsible-section/collapsible-section.js +1 -1
  87. package/dist/collection/components/color-picker/color-picker-palette.js +2 -2
  88. package/dist/collection/components/color-picker/color-picker.js +1 -1
  89. package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.js +1 -1
  90. package/dist/collection/components/dialog/dialog.js +2 -2
  91. package/dist/collection/components/dock/dock.js +2 -2
  92. package/dist/collection/components/drag-handle/drag-handle.js +1 -1
  93. package/dist/collection/components/email-viewer/email-viewer.js +1 -1
  94. package/dist/collection/components/file/file.js +1 -1
  95. package/dist/collection/components/file-dropzone/file-dropzone.js +1 -1
  96. package/dist/collection/components/file-input/file-input.js +1 -1
  97. package/dist/collection/components/flex-container/flex-container.js +1 -1
  98. package/dist/collection/components/form/form.js +1 -1
  99. package/dist/collection/components/grid/grid.js +1 -1
  100. package/dist/collection/components/header/header.js +1 -1
  101. package/dist/collection/components/help/help-content.js +1 -1
  102. package/dist/collection/components/help/help.js +2 -2
  103. package/dist/collection/components/helper-line/helper-line.js +2 -2
  104. package/dist/collection/components/hotkey/hotkey.js +1 -1
  105. package/dist/collection/components/icon/icon.js +1 -1
  106. package/dist/collection/components/icon-button/icon-button.js +1 -1
  107. package/dist/collection/components/info-tile/info-tile.js +2 -2
  108. package/dist/collection/components/input-field/input-field.js +1 -1
  109. package/dist/collection/components/list/list.js +1 -1
  110. package/dist/collection/components/list-item/list-item.js +2 -2
  111. package/dist/collection/components/list-item/menu-item-meta/menu-item-meta.js +1 -1
  112. package/dist/collection/components/markdown/markdown.js +1 -1
  113. package/dist/collection/components/masonry-layout/masonry-layout.js +1 -1
  114. package/dist/collection/components/menu/menu.js +1 -1
  115. package/dist/collection/components/menu-list/menu-list.js +1 -1
  116. package/dist/collection/components/menu-surface/menu-surface.js +1 -1
  117. package/dist/collection/components/notched-outline/notched-outline.js +1 -1
  118. package/dist/collection/components/pagination/pagination.js +1 -1
  119. package/dist/collection/components/picker/picker.js +1 -1
  120. package/dist/collection/components/popover/popover.js +1 -1
  121. package/dist/collection/components/popover-surface/popover-surface.js +1 -1
  122. package/dist/collection/components/portal/portal.js +1 -1
  123. package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
  124. package/dist/collection/components/radio-button-group/radio-button.js +2 -2
  125. package/dist/collection/components/resize-handle/resize-handle.css +35 -33
  126. package/dist/collection/components/resize-handle/resize-handle.js +86 -4
  127. package/dist/collection/components/scroller/scroller.js +2 -2
  128. package/dist/collection/components/select/select.js +1 -1
  129. package/dist/collection/components/shortcut/shortcut.js +1 -1
  130. package/dist/collection/components/side-panel/side-panel.js +44 -27
  131. package/dist/collection/components/slider/slider.js +3 -3
  132. package/dist/collection/components/snackbar/snackbar.js +2 -2
  133. package/dist/collection/components/spinner/spinner.js +1 -1
  134. package/dist/collection/components/split-button/split-button.js +2 -2
  135. package/dist/collection/components/switch/switch.js +1 -1
  136. package/dist/collection/components/tab-bar/tab-bar.js +1 -1
  137. package/dist/collection/components/tab-panel/tab-panel.js +1 -1
  138. package/dist/collection/components/table/table.js +2 -2
  139. package/dist/collection/components/text-editor/link-menu/editor-link-menu.js +3 -3
  140. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +1 -1
  141. package/dist/collection/components/text-editor/text-editor.js +1 -1
  142. package/dist/collection/components/tooltip/tooltip-content.js +1 -1
  143. package/dist/collection/components/tooltip/tooltip.js +2 -2
  144. package/dist/collection/translations/da.js +7 -0
  145. package/dist/collection/translations/de.js +7 -0
  146. package/dist/collection/translations/en.js +7 -0
  147. package/dist/collection/translations/fi.js +7 -0
  148. package/dist/collection/translations/fr.js +7 -0
  149. package/dist/collection/translations/nl.js +7 -0
  150. package/dist/collection/translations/no.js +7 -0
  151. package/dist/collection/translations/sv.js +7 -0
  152. package/dist/esm/lime-elements.js +1 -1
  153. package/dist/esm/limel-3d-hover-effect-glow.entry.js +1 -1
  154. package/dist/esm/limel-action-bar_3.entry.js +4 -4
  155. package/dist/esm/limel-ai-avatar.entry.js +2 -2
  156. package/dist/esm/limel-badge.entry.js +2 -2
  157. package/dist/esm/limel-banner.entry.js +1 -1
  158. package/dist/esm/limel-breadcrumbs_6.entry.js +6 -6
  159. package/dist/esm/limel-button-group.entry.js +1 -1
  160. package/dist/esm/limel-button.entry.js +2 -2
  161. package/dist/esm/limel-callout.entry.js +2 -2
  162. package/dist/esm/limel-card.entry.js +1 -1
  163. package/dist/esm/limel-chart.entry.js +1 -1
  164. package/dist/esm/limel-checkbox.entry.js +1 -1
  165. package/dist/esm/limel-chip-set.entry.js +2 -2
  166. package/dist/esm/limel-chip_2.entry.js +2 -2
  167. package/dist/esm/limel-circular-progress.entry.js +1 -1
  168. package/dist/esm/limel-code-diff.entry.js +2 -2
  169. package/dist/esm/limel-code-editor.entry.js +2 -2
  170. package/dist/esm/limel-collapsible-section.entry.js +2 -2
  171. package/dist/esm/limel-color-picker-palette.entry.js +2 -2
  172. package/dist/esm/limel-color-picker.entry.js +1 -1
  173. package/dist/esm/limel-dialog.entry.js +2 -2
  174. package/dist/esm/limel-dock.entry.js +3 -3
  175. package/dist/esm/limel-drag-handle_2.entry.js +4 -4
  176. package/dist/esm/limel-email-viewer.entry.js +2 -2
  177. package/dist/esm/limel-file-dropzone_2.entry.js +2 -2
  178. package/dist/esm/limel-file-viewer.entry.js +732 -279
  179. package/dist/esm/limel-file.entry.js +2 -2
  180. package/dist/esm/limel-flatpickr-adapter.entry.js +2 -2
  181. package/dist/esm/limel-flex-container.entry.js +1 -1
  182. package/dist/esm/limel-form.entry.js +387 -70
  183. package/dist/esm/limel-grid.entry.js +1 -1
  184. package/dist/esm/limel-header.entry.js +1 -1
  185. package/dist/esm/limel-help-content.entry.js +1 -1
  186. package/dist/esm/limel-help.entry.js +2 -2
  187. package/dist/esm/limel-helper-line_3.entry.js +4 -4
  188. package/dist/esm/limel-hotkey_4.entry.js +5 -5
  189. package/dist/esm/limel-icon-button.entry.js +1 -1
  190. package/dist/esm/limel-icon.entry.js +1 -1
  191. package/dist/esm/limel-info-tile.entry.js +2 -2
  192. package/dist/esm/limel-list-item.entry.js +3 -3
  193. package/dist/esm/limel-markdown.entry.js +1 -1
  194. package/dist/esm/limel-masonry-layout.entry.js +1 -1
  195. package/dist/esm/limel-menu-item-meta.entry.js +1 -1
  196. package/dist/esm/limel-pagination-jump.entry.js +1 -1
  197. package/dist/esm/limel-pagination.entry.js +2 -2
  198. package/dist/esm/limel-picker.entry.js +2 -2
  199. package/dist/esm/limel-popover_2.entry.js +2 -2
  200. package/dist/esm/limel-profile-picture.entry.js +1 -1
  201. package/dist/esm/limel-prosemirror-adapter.entry.js +2 -2
  202. package/dist/esm/limel-radio-button-group.entry.js +1 -1
  203. package/dist/esm/limel-radio-button.entry.js +2 -2
  204. package/dist/esm/limel-resize-handle.entry.js +43 -2
  205. package/dist/esm/limel-select.entry.js +1 -1
  206. package/dist/esm/limel-shortcut.entry.js +1 -1
  207. package/dist/esm/limel-side-panel.entry.js +16 -6
  208. package/dist/esm/limel-slider.entry.js +4 -4
  209. package/dist/esm/limel-snackbar.entry.js +3 -3
  210. package/dist/esm/limel-split-button.entry.js +2 -2
  211. package/dist/esm/limel-switch.entry.js +1 -1
  212. package/dist/esm/limel-tab-bar.entry.js +1 -1
  213. package/dist/esm/limel-tab-panel.entry.js +1 -1
  214. package/dist/esm/limel-table.entry.js +3 -3
  215. package/dist/esm/limel-text-editor-link-menu.entry.js +4 -4
  216. package/dist/esm/limel-text-editor.entry.js +1 -1
  217. package/dist/esm/loader.js +1 -1
  218. package/dist/esm/{translations-UrIr-5_D.js → translations-Drl5LNAD.js} +56 -0
  219. package/dist/lime-elements/lime-elements.esm.js +1 -1
  220. package/dist/lime-elements/{p-13f2afc9.entry.js → p-01de145c.entry.js} +1 -1
  221. package/dist/lime-elements/{p-3ee121fa.entry.js → p-026eed2d.entry.js} +1 -1
  222. package/dist/lime-elements/{p-9ff6a455.entry.js → p-068b141b.entry.js} +1 -1
  223. package/dist/lime-elements/{p-bd58c761.entry.js → p-09f8f883.entry.js} +1 -1
  224. package/dist/lime-elements/{p-95322502.entry.js → p-1663fa9d.entry.js} +1 -1
  225. package/dist/lime-elements/{p-def7b38f.entry.js → p-17aa9235.entry.js} +1 -1
  226. package/dist/lime-elements/{p-910807cb.entry.js → p-19426c76.entry.js} +1 -1
  227. package/dist/lime-elements/{p-622660dd.entry.js → p-1d6014ed.entry.js} +1 -1
  228. package/dist/lime-elements/p-2370ff51.entry.js +1 -0
  229. package/dist/lime-elements/{p-0f18981d.entry.js → p-242f1032.entry.js} +1 -1
  230. package/dist/lime-elements/{p-828558cf.entry.js → p-27d375f3.entry.js} +1 -1
  231. package/dist/lime-elements/{p-2ba9d62f.entry.js → p-300f80e7.entry.js} +1 -1
  232. package/dist/lime-elements/{p-9ca18ba5.entry.js → p-3b4f6329.entry.js} +1 -1
  233. package/dist/lime-elements/{p-2528f75e.entry.js → p-3de45ea6.entry.js} +2 -2
  234. package/dist/lime-elements/{p-675a7469.entry.js → p-3f447d22.entry.js} +1 -1
  235. package/dist/lime-elements/{p-780dae0b.entry.js → p-3fa66fb1.entry.js} +1 -1
  236. package/dist/lime-elements/{p-09390c6a.entry.js → p-41172b62.entry.js} +1 -1
  237. package/dist/lime-elements/{p-d5144955.entry.js → p-41fb6e88.entry.js} +1 -1
  238. package/dist/lime-elements/{p-f4c9940e.entry.js → p-44ec1f22.entry.js} +1 -1
  239. package/dist/lime-elements/{p-268b4da1.entry.js → p-4a272ac2.entry.js} +1 -1
  240. package/dist/lime-elements/{p-e25bfb2c.entry.js → p-4a381bc6.entry.js} +1 -1
  241. package/dist/lime-elements/{p-fb526a05.entry.js → p-56fe13ef.entry.js} +1 -1
  242. package/dist/lime-elements/p-5d623004.entry.js +1 -0
  243. package/dist/lime-elements/{p-8a59698f.entry.js → p-5ea07cbe.entry.js} +1 -1
  244. package/dist/lime-elements/{p-67767276.entry.js → p-600466a9.entry.js} +1 -1
  245. package/dist/lime-elements/{p-657bfa36.entry.js → p-62b6e235.entry.js} +1 -1
  246. package/dist/lime-elements/p-64540beb.entry.js +1 -0
  247. package/dist/lime-elements/{p-1020ca20.entry.js → p-674680f9.entry.js} +1 -1
  248. package/dist/lime-elements/{p-d79d777e.entry.js → p-67536ac3.entry.js} +1 -1
  249. package/dist/lime-elements/{p-dd075353.entry.js → p-6770cf06.entry.js} +1 -1
  250. package/dist/lime-elements/p-6d4d7e3f.entry.js +16 -0
  251. package/dist/lime-elements/{p-887eea11.entry.js → p-7375fac2.entry.js} +1 -1
  252. package/dist/lime-elements/{p-6d65ee35.entry.js → p-7829198d.entry.js} +1 -1
  253. package/dist/lime-elements/{p-abed5afd.entry.js → p-82672504.entry.js} +1 -1
  254. package/dist/lime-elements/{p-24e5d420.entry.js → p-8339d921.entry.js} +1 -1
  255. package/dist/lime-elements/{p-33ed0c68.entry.js → p-87c9f4de.entry.js} +1 -1
  256. package/dist/lime-elements/{p-7a290372.entry.js → p-89316964.entry.js} +1 -1
  257. package/dist/lime-elements/{p-527e9c95.entry.js → p-8a9361a2.entry.js} +1 -1
  258. package/dist/lime-elements/{p-46bf8b22.entry.js → p-8e78fd4f.entry.js} +1 -1
  259. package/dist/lime-elements/{p-db1f9eba.entry.js → p-8f133cd6.entry.js} +1 -1
  260. package/dist/lime-elements/{p-7ae71c13.entry.js → p-90198515.entry.js} +1 -1
  261. package/dist/lime-elements/{p-236743f1.entry.js → p-95ca7426.entry.js} +1 -1
  262. package/dist/lime-elements/{p-55b56742.entry.js → p-9aa921a2.entry.js} +1 -1
  263. package/dist/lime-elements/{p-540b2b24.entry.js → p-9bbf2612.entry.js} +1 -1
  264. package/dist/lime-elements/{p-a449ca04.entry.js → p-9d354eca.entry.js} +1 -1
  265. package/dist/lime-elements/{p-68542e00.entry.js → p-9e9187ce.entry.js} +1 -1
  266. package/dist/lime-elements/p-B26k4gw8.js +1 -0
  267. package/dist/lime-elements/{p-4a7df81a.entry.js → p-aac603af.entry.js} +1 -1
  268. package/dist/lime-elements/{p-5473eb74.entry.js → p-aee75ad1.entry.js} +1 -1
  269. package/dist/lime-elements/{p-4882acaa.entry.js → p-afbe54e6.entry.js} +1 -1
  270. package/dist/lime-elements/{p-a78aaf37.entry.js → p-b5ebcbfc.entry.js} +1 -1
  271. package/dist/lime-elements/{p-07916acc.entry.js → p-be8950a6.entry.js} +2 -2
  272. package/dist/lime-elements/{p-de4d261a.entry.js → p-dd065596.entry.js} +1 -1
  273. package/dist/lime-elements/{p-0c2ce99b.entry.js → p-ddabfac0.entry.js} +1 -1
  274. package/dist/lime-elements/{p-d3475514.entry.js → p-de3cf7d8.entry.js} +1 -1
  275. package/dist/lime-elements/{p-c7e34502.entry.js → p-e13e0001.entry.js} +1 -1
  276. package/dist/lime-elements/p-e2971111.entry.js +1 -0
  277. package/dist/lime-elements/{p-ecded772.entry.js → p-e332bb9b.entry.js} +1 -1
  278. package/dist/lime-elements/{p-54631dbf.entry.js → p-e50acec1.entry.js} +1 -1
  279. package/dist/lime-elements/{p-3b6d4934.entry.js → p-e6be5819.entry.js} +1 -1
  280. package/dist/lime-elements/{p-074275f4.entry.js → p-e9b1e0bd.entry.js} +1 -1
  281. package/dist/lime-elements/p-ec531ecb.entry.js +1 -0
  282. package/dist/lime-elements/{p-90286e5c.entry.js → p-f0bf3fd1.entry.js} +1 -1
  283. package/dist/lime-elements/p-f1ac7608.entry.js +1 -0
  284. package/dist/lime-elements/{p-c12fbc91.entry.js → p-f455150b.entry.js} +1 -1
  285. package/dist/types/components/form/form.types.d.ts +7 -0
  286. package/dist/types/components/resize-handle/resize-handle.d.ts +31 -2
  287. package/dist/types/components/side-panel/side-panel.d.ts +11 -4
  288. package/dist/types/components.d.ts +63 -16
  289. package/dist/types/translations/da.d.ts +7 -0
  290. package/dist/types/translations/de.d.ts +7 -0
  291. package/dist/types/translations/en.d.ts +7 -0
  292. package/dist/types/translations/fi.d.ts +7 -0
  293. package/dist/types/translations/fr.d.ts +7 -0
  294. package/dist/types/translations/nl.d.ts +7 -0
  295. package/dist/types/translations/no.d.ts +7 -0
  296. package/dist/types/translations/sv.d.ts +7 -0
  297. package/package.json +4 -4
  298. package/dist/lime-elements/p-26813b2c.entry.js +0 -1
  299. package/dist/lime-elements/p-4f58c6b3.entry.js +0 -1
  300. package/dist/lime-elements/p-714ab66d.entry.js +0 -16
  301. package/dist/lime-elements/p-9b384d62.entry.js +0 -1
  302. package/dist/lime-elements/p-a317f2fa.entry.js +0 -1
  303. package/dist/lime-elements/p-b5bb124f.entry.js +0 -1
  304. package/dist/lime-elements/p-d7e5a4a7.entry.js +0 -1
  305. package/dist/lime-elements/p-w3yKYfBQ.js +0 -1
@@ -1 +1 @@
1
- import{r as e,c as t,h as a,H as r}from"./p-BU9IJqli.js";import{t as i}from"./p-w3yKYfBQ.js";import{f as l}from"./p-24yUSW40.js";import{a as o}from"./p-BQoih_t0.js";import{g as s,a as n,b as d}from"./p-Bu_YRgCL.js";import"./p-ChagAaNf.js";function m(e){const t=e.trim().toLowerCase();return t.startsWith("https://")||t.startsWith("http://")}function c(e,t,a){return!!t.escapeNext&&(a(e),t.escapeNext=!1,!0)}function h(e,t,a){return!(!t.inQuotes||"\\"!==e||(a(e),t.escapeNext=!0,0))}function b(e,t,a){return'"'===e&&0===t.angleDepth&&(a(e),t.inQuotes=!t.inQuotes,!0)}function u(e,t,a){return!t.inQuotes&&("<"===e?(a(e),t.angleDepth+=1,!0):">"===e&&0!==t.angleDepth&&(a(e),t.angleDepth-=1,!0))}function p(e,t){return","===e&&!t.inQuotes&&0===t.angleDepth}const f=class{constructor(r){e(this,r),this.allowRemoteImagesChange=t(this,"allowRemoteImagesChange",7),this.language="en",this.allowRemoteImagesState=!1,this.renderAttachment=(e,t)=>{var r,i;const o=(null===(r=e.filename)||void 0===r?void 0:r.trim())||this.getTranslation("file-viewer.email.attachment.unnamed"),m=(null===(i=e.mimeType)||void 0===i?void 0:i.trim())||"",c=o.lastIndexOf("."),h=c>0?o.slice(c+1):"",b=m?`${o}\n${m}`:o,u="number"==typeof e.size?l(e.size):void 0;return a("limel-chip",{key:`attachment-${t}`,role:"listitem",title:b,text:o,icon:{name:d(h),color:n(h),backgroundColor:s(h)},badge:u,readonly:!0,language:this.language})},this.onEnableRemoteImagesClick=e=>{var t;null===(t=null==e?void 0:e.stopPropagation)||void 0===t||t.call(e),this.enableRemoteImages()},this.enableRemoteImages=()=>{void 0===this.allowRemoteImages?this.allowRemoteImagesState=!0:this.allowRemoteImagesChange.emit(!0)}}resetAllowRemoteImages(e,t){e?e.from!==(null==t?void 0:t.from)&&(this.allowRemoteImagesState=!1):this.allowRemoteImagesState=!1}componentDidRender(){var e;(null===(e=this.bodyElement)||void 0===e?void 0:e.isConnected)&&o(this.bodyElement)}render(){return a(r,{key:"f28d5f5b43643c9bb0ce9640d4d774d36e87e5ba"},a("div",{key:"33383fce3618029de03eab77b920c8ba7784ee76",class:"email",part:"email"},this.renderHeaders(),this.renderRemoteImageBanner(),a("section",{key:"64141b9920deaf952f80db9f65a7627bb36aefd9"},this.renderAttachments(),this.renderBody())))}renderHeaders(){return a("div",{class:"email-headers",part:"email-headers"},["subject","from","to","cc","date"].map((e=>{var t;return this.renderEmailHeader(e,this.getTranslation(`file-viewer.email.${e}`),null===(t=this.email)||void 0===t?void 0:t[e])})))}renderBody(){return this.renderBodyHtml()||this.renderBodyText()||this.renderFallbackUrl()||a("slot",{name:"fallback"})}renderBodyHtml(){var e;const t=null===(e=this.email)||void 0===e?void 0:e.bodyHtml;if(!t)return;const r=function(e,t){if(!t)return e;const a=(new DOMParser).parseFromString(e,"text/html"),r=a.querySelectorAll("img[data-remote-src]");for(const e of r){const t=e.dataset.remoteSrc;t&&m(t)?(e.setAttribute("src",t),delete e.dataset.remoteSrc):delete e.dataset.remoteSrc}return`${[...a.head.querySelectorAll("style")].map((e=>e.outerHTML)).join("")}${a.body.innerHTML}`}(t,this.getAllowRemoteImages());return a("div",{class:"body",innerHTML:r,part:"email-body",ref:e=>this.bodyElement=e})}renderBodyText(){var e;const t=null===(e=this.email)||void 0===e?void 0:e.bodyText;if(t)return a("pre",{class:"body plain-text",part:"email-body"},t)}renderFallbackUrl(){if(this.fallbackUrl)return a("object",{data:this.fallbackUrl,type:"text/plain"},a("slot",{name:"fallback"}))}renderEmailHeader(e,t,r){if(!r)return;const i=this.getHeaderValues(e,r);return a("dl",{class:`headers ${e}`},a("dt",null,t),i.map(((t,r)=>a("dd",{key:`${e}-${r}`},t))))}getHeaderValues(e,t){return"to"===e||"cc"===e?function(e){const t=[];let a="";const r={inQuotes:!1,escapeNext:!1,angleDepth:0},i=e=>{a+=e},l=()=>{const e=a.trim();e&&t.push(e),a=""};for(const t of e)c(t,r,i)||h(t,r,i)||b(t,r,i)||u(t,r,i)||(p(t,r)?l():i(t));return l(),t}(t):[t]}renderAttachments(){var e;const t=null===(e=this.email)||void 0===e?void 0:e.attachments;if(!(null==t?void 0:t.length))return;const r=this.getTranslation("file-viewer.email.attachments");return a("div",{class:"attachments"},a("span",{id:"attachments-label"},r),a("div",{class:"attachment-list",role:"list","aria-labelledby":"attachments-label"},t.map(((e,t)=>this.renderAttachment(e,t)))))}getTranslation(e){return i.get(e,this.language)}shouldShowRemoteImagesBanner(){var e;const t=null===(e=this.email)||void 0===e?void 0:e.bodyHtml;return!(!t||this.getAllowRemoteImages())&&(a=t,null!==(new DOMParser).parseFromString(a,"text/html").querySelector("img[data-remote-src]"));var a}renderRemoteImageBanner(){if(!this.shouldShowRemoteImagesBanner())return;const e=this.getTranslation("file-viewer.email.remote-images.warning"),t=this.getTranslation("file-viewer.email.remote-images.warning.description"),r=this.getTranslation("file-viewer.email.remote-images.load");return a("limel-collapsible-section",{header:e,icon:{name:"warning_shield",color:"rgb(var(--color-orange-default))"},language:this.language},a("button",{type:"button",class:"load-images",slot:"header",onClick:this.onEnableRemoteImagesClick},r),a("limel-markdown",{value:t}))}getAllowRemoteImages(){var e;return null!==(e=this.allowRemoteImages)&&void 0!==e?e:this.allowRemoteImagesState}static get watchers(){return{email:[{resetAllowRemoteImages:0}]}}};f.style='@charset "UTF-8";:host(limel-email-viewer){display:block;width:100%;height:100%;box-sizing:border-box}*,*::before,*::after{box-sizing:border-box;min-width:0;min-height:0}.email{display:flex;flex-direction:column;width:100%;height:100%;box-shadow:var(--shadow-depth-8)}.email-headers{position:relative;flex-shrink:0;display:flex;flex-direction:column}.email-headers dl,.email-headers dt,.email-headers dd{margin:0}.email-headers dl{display:flex;flex-wrap:wrap;gap:0 0.5rem;padding:0.5rem 0.75rem;font-size:0.75rem}.email-headers dl:nth-child(even){background-color:rgb(var(--contrast-800), 0.1)}.email-headers dl dt{opacity:0.6;min-width:3rem}.email-headers dl dt::after{content:":"}.email-headers dl dd:not(:last-child)::after{content:",";opacity:0.6}.email-headers dl.subject dd{font-weight:bold}.email-headers dl.date{position:absolute;right:0.25rem;bottom:0;transform:translateY(50%);font-size:0.625rem;border-radius:9rem;padding:0.125rem 0.25rem;background-color:rgb(var(--contrast-100), 0.8);border:rgb(var(--contrast-600)) solid 1px}.email-headers dl.date dt{position:absolute;width:0;height:0;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap}.attachments{flex-shrink:0;padding:0.5rem;border-bottom:1px dashed rgba(var(--contrast-700))}.attachments span{padding-left:0.25rem;font-size:0.75rem;opacity:0.6}.attachments span:first-child::after{content:":"}.attachments .attachment-list{display:flex;flex-wrap:wrap;gap:0.5rem;padding:0.5rem 0}.attachments limel-chip{--chip-max-width:18rem;--badge-max-width:3rem}section{flex-grow:1;display:flex;flex-direction:column;border-top:1px dashed rgba(var(--contrast-700));min-height:2rem;overflow-y:auto}limel-collapsible-section{--closed-header-background-color:var( --lime-elevated-surface-background-color );flex-grow:1;flex-shrink:0;margin:0.5rem;border-radius:0.75rem;box-shadow:var(--shadow-depth-8)}limel-collapsible-section button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;flex-shrink:0;border-radius:0.375rem;padding:0.25rem 0.5rem;font-size:var(--limel-theme-small-font-size);margin:0 0.5rem}limel-collapsible-section button.load-images{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--lime-primary-color, var(--limel-theme-primary-color));background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}limel-collapsible-section button.load-images:hover,limel-collapsible-section button.load-images:focus,limel-collapsible-section button.load-images:focus-visible{will-change:color, background-color, box-shadow, transform}limel-collapsible-section button.load-images:hover,limel-collapsible-section button.load-images:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}limel-collapsible-section button.load-images:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}limel-collapsible-section button.load-images:hover,limel-collapsible-section button.load-images:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}limel-collapsible-section limel-markdown{padding:0.5rem}.body{flex-grow:1;max-width:100%;padding:0.75rem}.body.plain-text{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-family:inherit}.body img{max-width:100% !important}';export{f as limel_email_viewer}
1
+ import{r as e,c as t,h as a,H as r}from"./p-BU9IJqli.js";import{t as i}from"./p-B26k4gw8.js";import{f as l}from"./p-24yUSW40.js";import{a as o}from"./p-BQoih_t0.js";import{g as s,a as n,b as d}from"./p-Bu_YRgCL.js";import"./p-ChagAaNf.js";function c(e){const t=e.trim().toLowerCase();return t.startsWith("https://")||t.startsWith("http://")}function m(e,t,a){return!!t.escapeNext&&(a(e),t.escapeNext=!1,!0)}function h(e,t,a){return!(!t.inQuotes||"\\"!==e||(a(e),t.escapeNext=!0,0))}function b(e,t,a){return'"'===e&&0===t.angleDepth&&(a(e),t.inQuotes=!t.inQuotes,!0)}function u(e,t,a){return!t.inQuotes&&("<"===e?(a(e),t.angleDepth+=1,!0):">"===e&&0!==t.angleDepth&&(a(e),t.angleDepth-=1,!0))}function p(e,t){return","===e&&!t.inQuotes&&0===t.angleDepth}const f=class{constructor(r){e(this,r),this.allowRemoteImagesChange=t(this,"allowRemoteImagesChange",7),this.language="en",this.allowRemoteImagesState=!1,this.renderAttachment=(e,t)=>{var r,i;const o=(null===(r=e.filename)||void 0===r?void 0:r.trim())||this.getTranslation("file-viewer.email.attachment.unnamed"),c=(null===(i=e.mimeType)||void 0===i?void 0:i.trim())||"",m=o.lastIndexOf("."),h=m>0?o.slice(m+1):"",b=c?`${o}\n${c}`:o,u="number"==typeof e.size?l(e.size):void 0;return a("limel-chip",{key:`attachment-${t}`,role:"listitem",title:b,text:o,icon:{name:d(h),color:n(h),backgroundColor:s(h)},badge:u,readonly:!0,language:this.language})},this.onEnableRemoteImagesClick=e=>{var t;null===(t=null==e?void 0:e.stopPropagation)||void 0===t||t.call(e),this.enableRemoteImages()},this.enableRemoteImages=()=>{void 0===this.allowRemoteImages?this.allowRemoteImagesState=!0:this.allowRemoteImagesChange.emit(!0)}}resetAllowRemoteImages(e,t){e?e.from!==(null==t?void 0:t.from)&&(this.allowRemoteImagesState=!1):this.allowRemoteImagesState=!1}componentDidRender(){var e;(null===(e=this.bodyElement)||void 0===e?void 0:e.isConnected)&&o(this.bodyElement)}render(){return a(r,{key:"988ce952ec8bfb1a3f6107687bf99eb921e82a68"},a("div",{key:"0c0551cf33923837a4fbc0be84bef92e5f42084a",class:"email",part:"email"},this.renderHeaders(),this.renderRemoteImageBanner(),a("section",{key:"62189859a9796e38bfa2c3aa7af83c3f2cc1e5a6"},this.renderAttachments(),this.renderBody())))}renderHeaders(){return a("div",{class:"email-headers",part:"email-headers"},["subject","from","to","cc","date"].map((e=>{var t;return this.renderEmailHeader(e,this.getTranslation(`file-viewer.email.${e}`),null===(t=this.email)||void 0===t?void 0:t[e])})))}renderBody(){return this.renderBodyHtml()||this.renderBodyText()||this.renderFallbackUrl()||a("slot",{name:"fallback"})}renderBodyHtml(){var e;const t=null===(e=this.email)||void 0===e?void 0:e.bodyHtml;if(!t)return;const r=function(e,t){if(!t)return e;const a=(new DOMParser).parseFromString(e,"text/html"),r=a.querySelectorAll("img[data-remote-src]");for(const e of r){const t=e.dataset.remoteSrc;t&&c(t)?(e.setAttribute("src",t),delete e.dataset.remoteSrc):delete e.dataset.remoteSrc}return`${[...a.head.querySelectorAll("style")].map((e=>e.outerHTML)).join("")}${a.body.innerHTML}`}(t,this.getAllowRemoteImages());return a("div",{class:"body",innerHTML:r,part:"email-body",ref:e=>this.bodyElement=e})}renderBodyText(){var e;const t=null===(e=this.email)||void 0===e?void 0:e.bodyText;if(t)return a("pre",{class:"body plain-text",part:"email-body"},t)}renderFallbackUrl(){if(this.fallbackUrl)return a("object",{data:this.fallbackUrl,type:"text/plain"},a("slot",{name:"fallback"}))}renderEmailHeader(e,t,r){if(!r)return;const i=this.getHeaderValues(e,r);return a("dl",{class:`headers ${e}`},a("dt",null,t),i.map(((t,r)=>a("dd",{key:`${e}-${r}`},t))))}getHeaderValues(e,t){return"to"===e||"cc"===e?function(e){const t=[];let a="";const r={inQuotes:!1,escapeNext:!1,angleDepth:0},i=e=>{a+=e},l=()=>{const e=a.trim();e&&t.push(e),a=""};for(const t of e)m(t,r,i)||h(t,r,i)||b(t,r,i)||u(t,r,i)||(p(t,r)?l():i(t));return l(),t}(t):[t]}renderAttachments(){var e;const t=null===(e=this.email)||void 0===e?void 0:e.attachments;if(!(null==t?void 0:t.length))return;const r=this.getTranslation("file-viewer.email.attachments");return a("div",{class:"attachments"},a("span",{id:"attachments-label"},r),a("div",{class:"attachment-list",role:"list","aria-labelledby":"attachments-label"},t.map(((e,t)=>this.renderAttachment(e,t)))))}getTranslation(e){return i.get(e,this.language)}shouldShowRemoteImagesBanner(){var e;const t=null===(e=this.email)||void 0===e?void 0:e.bodyHtml;return!(!t||this.getAllowRemoteImages())&&(a=t,null!==(new DOMParser).parseFromString(a,"text/html").querySelector("img[data-remote-src]"));var a}renderRemoteImageBanner(){if(!this.shouldShowRemoteImagesBanner())return;const e=this.getTranslation("file-viewer.email.remote-images.warning"),t=this.getTranslation("file-viewer.email.remote-images.warning.description"),r=this.getTranslation("file-viewer.email.remote-images.load");return a("limel-collapsible-section",{header:e,icon:{name:"warning_shield",color:"rgb(var(--color-orange-default))"},language:this.language},a("button",{type:"button",class:"load-images",slot:"header",onClick:this.onEnableRemoteImagesClick},r),a("limel-markdown",{value:t}))}getAllowRemoteImages(){var e;return null!==(e=this.allowRemoteImages)&&void 0!==e?e:this.allowRemoteImagesState}static get watchers(){return{email:[{resetAllowRemoteImages:0}]}}};f.style='@charset "UTF-8";:host(limel-email-viewer){display:block;width:100%;height:100%;box-sizing:border-box}*,*::before,*::after{box-sizing:border-box;min-width:0;min-height:0}.email{display:flex;flex-direction:column;width:100%;height:100%;box-shadow:var(--shadow-depth-8)}.email-headers{position:relative;flex-shrink:0;display:flex;flex-direction:column}.email-headers dl,.email-headers dt,.email-headers dd{margin:0}.email-headers dl{display:flex;flex-wrap:wrap;gap:0 0.5rem;padding:0.5rem 0.75rem;font-size:0.75rem}.email-headers dl:nth-child(even){background-color:rgb(var(--contrast-800), 0.1)}.email-headers dl dt{opacity:0.6;min-width:3rem}.email-headers dl dt::after{content:":"}.email-headers dl dd:not(:last-child)::after{content:",";opacity:0.6}.email-headers dl.subject dd{font-weight:bold}.email-headers dl.date{position:absolute;right:0.25rem;bottom:0;transform:translateY(50%);font-size:0.625rem;border-radius:9rem;padding:0.125rem 0.25rem;background-color:rgb(var(--contrast-100), 0.8);border:rgb(var(--contrast-600)) solid 1px}.email-headers dl.date dt{position:absolute;width:0;height:0;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap}.attachments{flex-shrink:0;padding:0.5rem;border-bottom:1px dashed rgba(var(--contrast-700))}.attachments span{padding-left:0.25rem;font-size:0.75rem;opacity:0.6}.attachments span:first-child::after{content:":"}.attachments .attachment-list{display:flex;flex-wrap:wrap;gap:0.5rem;padding:0.5rem 0}.attachments limel-chip{--chip-max-width:18rem;--badge-max-width:3rem}section{flex-grow:1;display:flex;flex-direction:column;border-top:1px dashed rgba(var(--contrast-700));min-height:2rem;overflow-y:auto}limel-collapsible-section{--closed-header-background-color:var( --lime-elevated-surface-background-color );flex-grow:1;flex-shrink:0;margin:0.5rem;border-radius:0.75rem;box-shadow:var(--shadow-depth-8)}limel-collapsible-section button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;flex-shrink:0;border-radius:0.375rem;padding:0.25rem 0.5rem;font-size:var(--limel-theme-small-font-size);margin:0 0.5rem}limel-collapsible-section button.load-images{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--lime-primary-color, var(--limel-theme-primary-color));background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}limel-collapsible-section button.load-images:hover,limel-collapsible-section button.load-images:focus,limel-collapsible-section button.load-images:focus-visible{will-change:color, background-color, box-shadow, transform}limel-collapsible-section button.load-images:hover,limel-collapsible-section button.load-images:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}limel-collapsible-section button.load-images:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}limel-collapsible-section button.load-images:hover,limel-collapsible-section button.load-images:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}limel-collapsible-section limel-markdown{padding:0.5rem}.body{flex-grow:1;max-width:100%;padding:0.75rem}.body.plain-text{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-family:inherit}.body img{max-width:100% !important}';export{f as limel_email_viewer}
@@ -1 +1 @@
1
- import{r,h as o,H as t}from"./p-BU9IJqli.js";import{t as l}from"./p-w3yKYfBQ.js";import"./p-ChagAaNf.js";const e=class{constructor(o){r(this,o),this.dragDirection="vertical",this.tooltipOpenDirection="left",this.language="en",this.dragHandleId="drag-handle-"+crypto.randomUUID(),this.handleClick=r=>{r.preventDefault(),r.stopPropagation()}}render(){const r=l.get("drag-handle.drag-to-reorder",this.language),e=l.get("drag-handle.drag-handle",this.language);return o(t,{key:"7ec003311284f01a8ab6fcfa681b859d80c751c9"},o("button",{key:"6c8eecad5a1ee902f8cde0d582a7f61881186516","data-drag-handle":!0,type:"button",class:"limel-drag-handle",tabindex:-1,"aria-label":e,id:this.dragHandleId,onClick:this.handleClick},o("div",{key:"ff1b68465914660147a3813950ca89e8aefd3579",class:"drag-icon",role:"presentation","aria-hidden":"true"},o("div",{key:"1"}),o("div",{key:"2"}),o("div",{key:"3"}),o("div",{key:"4"}),o("div",{key:"5"}),o("div",{key:"6"})),o("limel-tooltip",{key:"6e4858827eaf55787d5a30a1842c4ec8f106b158",openDirection:this.tooltipOpenDirection,elementId:this.dragHandleId,label:r})))}};e.style='@charset "UTF-8";limel-drag-handle{display:inline-flex;align-items:center;justify-content:center}button.limel-drag-handle{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit}button.limel-drag-handle:focus{outline:none}button.limel-drag-handle:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.limel-drag-handle{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent}button.limel-drag-handle:hover,button.limel-drag-handle:focus,button.limel-drag-handle:focus-visible{will-change:color, background-color, box-shadow, transform}button.limel-drag-handle:hover,button.limel-drag-handle:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--mdc-theme-primary);background-color:transparent}button.limel-drag-handle:hover{box-shadow:var(--button-shadow-hovered)}button.limel-drag-handle:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.limel-drag-handle:hover,button.limel-drag-handle:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.limel-drag-handle{touch-action:none;cursor:grab}button.limel-drag-handle:active{cursor:grabbing}button.limel-drag-handle:active,button.limel-drag-handle:hover{box-shadow:none !important}button.limel-drag-handle{display:inline-flex;align-items:center;justify-content:center;border-radius:0.4rem;padding:0.5rem;max-height:2.25rem;max-width:2.25rem;color:rgb(var(--contrast-900))}button.limel-drag-handle .drag-icon{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0.2rem}limel-drag-handle[drag-direction=horizontal] button.limel-drag-handle .drag-icon{grid-template-columns:1fr 1fr}button.limel-drag-handle .drag-icon div{transition:transform 0.2s ease, background-color 0.2s ease;height:0.125rem;width:0.125rem;border-radius:1rem;background-color:currentColor;transform:scale(1)}.is-being-dragged button.limel-drag-handle .drag-icon div,button.limel-drag-handle:active .drag-icon div,button.limel-drag-handle:focus .drag-icon div,button.limel-drag-handle:hover .drag-icon div,button.limel-drag-handle:focus-visible .drag-icon div{background-color:var(--mdc-theme-primary);transform:scale(1.5)}';const a=r=>r.preventDefault(),i=()=>o("svg",{class:"arrow",viewBox:"0 0 48 48","aria-hidden":"true",focusable:"false"},o("path",{d:"M18 4l20 20-20 20"})),s=class{constructor(o){r(this,o),this.orientation="horizontal",this.canScrollToStart=!1,this.canScrollToEnd=!1,this.fades={},this.handleResize=()=>{const r=this.pendingReveal;r&&this.revealItem(r.item,r.behavior),this.updateScrollability()},this.updateScrollability=()=>{const r=this.scrollArea;if(!r)return;const o="vertical"===this.orientation,t=o?r.scrollTop:r.scrollLeft,l=o?r.scrollHeight-r.clientHeight:r.scrollWidth-r.clientWidth;this.canScrollToStart=t>40,this.canScrollToEnd=Math.floor(l-t)>40},this.revealFocusedItem=r=>{const o=this.findItem(r.target);o&&requestAnimationFrame((()=>this.revealItem(o)))}}connectedCallback(){this.observeSize()}componentDidLoad(){this.observeSize()}disconnectedCallback(){var r;null===(r=this.resizeObserver)||void 0===r||r.disconnect()}render(){return o(t,{key:"c208de7a73b1d3d040a0a76b2bdc7bad3d5ab739"},o("div",{key:"5e69255f710a5f5f439553fa1f9b183e9dc5a9bd",class:{scroller:!0,[this.orientation]:!0,"can-scroll-to-start":this.canScrollToStart,"can-scroll-to-end":this.canScrollToEnd}},o("div",{key:"fc1b91baa65f317ae7bad667cba13813400ac546",class:"scroll-area",ref:r=>this.scrollArea=r,onScroll:this.updateScrollability,onFocusin:this.revealFocusedItem},o("div",{key:"43c02c4acba2ba647aaf6a7516a0326ffc0f16b1",class:"scroll-content",ref:r=>this.scrollContent=r},o("slot",{key:"3d2e82f50748410b5370741c8e8b1f44117adc35",ref:r=>this.slotElement=r}))),this.renderEdge("start"),this.renderEdge("end")))}renderEdge(r){return[o("div",{key:`fade-${r}`,class:`scroll-fade ${r}`,ref:o=>this.fades[r]=o}),o("div",{key:`button-${r}`,class:`scroll-button ${r}`,"aria-hidden":"true"},o("div",{class:"arrow-button",onMouseDown:a,onClick:()=>this.scrollOnePage(r)},o(i,null)))]}observeSize(){var r;this.scrollArea&&"undefined"!=typeof ResizeObserver&&(null!==(r=this.resizeObserver)&&void 0!==r||(this.resizeObserver=new ResizeObserver(this.handleResize)),this.resizeObserver.observe(this.scrollArea),this.resizeObserver.observe(this.scrollContent))}scrollOnePage(r){const o=this.scrollArea,t=this.fades[r],l="vertical"===this.orientation,[e,a]=l?[o.clientHeight,t.offsetHeight]:[o.clientWidth,t.offsetWidth],i=Math.max(.2*e,a),s=Math.max(e-i,.5*e),d="start"===r?-s:s,c=n();o.scrollBy(l?{top:d,behavior:c}:{left:d,behavior:c})}findItem(r){let o=r;for(;o&&o.assignedSlot!==this.slotElement;)o=o.parentElement;return o}async reveal(r,o=n()){var t;this.revealItem(null!==(t=this.findItem(r))&&void 0!==t?t:r,o)}revealItem(r,o=n()){const t=this.scrollArea;if(this.pendingReveal=void 0,!t||!r.isConnected)return;if(0===t.getClientRects().length)return void(this.pendingReveal={item:r,behavior:o});const l="vertical"===this.orientation,[e,a]=l?["top","bottom"]:["left","right"],i=l?"height":"width",s=t.getBoundingClientRect(),d=r.getBoundingClientRect(),c=getComputedStyle(r),v=s[i]/Number.parseFloat(getComputedStyle(t)[i])||1,b=r=>Number.parseFloat(c.getPropertyValue(`scroll-margin-${r}`))*v,h=s[e]-(d[e]-b(e)),u=d[a]+b(a)-s[a];let m=0;h>0?m=-h:u>0&&(m=u),0!==m&&t.scrollBy(l?{top:m/v,behavior:o}:{left:m/v,behavior:o})}};function n(){return matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}s.style='@charset "UTF-8";:host(limel-scroller){display:block}div.scroller{position:relative;overflow:hidden;height:100%}div.scroll-area{display:flex;height:100%;scrollbar-width:none}div.scroll-area::-webkit-scrollbar{display:none}div.scroll-content{display:flex;flex:1 0 auto;position:relative;isolation:isolate;padding:var(--limel-scroller-content-padding, 0)}::slotted(*){flex-shrink:0}div.scroll-fade,div.scroll-button{position:absolute;transition:transform 0.3s ease-out}div.scroll-fade{pointer-events:none}div.scroll-button{display:flex;align-items:center;justify-content:center}div.scroll-button div.arrow-button{display:flex;align-items:center;justify-content:center;border-radius:0.25rem;color:var(--limel-theme-on-surface-color)}div.scroll-button svg.arrow{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}div.scroller.horizontal div.scroll-area{overflow-x:auto;overflow-y:hidden}div.scroller.horizontal ::slotted(*){scroll-margin-inline:2.25rem}div.scroller.horizontal div.scroll-fade{top:0;width:4rem;height:100%}div.scroller.horizontal div.scroll-fade.start{left:0;transform:translate3d(-4rem, 0, 0);background:linear-gradient(270deg, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0) 0%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 40%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 100%)}div.scroller.horizontal div.scroll-fade.end{right:0;transform:translate3d(4rem, 0, 0);background:linear-gradient(90deg, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0) 0%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 40%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 100%)}div.scroller.horizontal div.scroll-button{top:0;bottom:0}div.scroller.horizontal div.scroll-button.start{left:0.25rem;transform:translate3d(-4rem, 0, 0)}div.scroller.horizontal div.scroll-button.start svg.arrow{transform:rotate(180deg)}div.scroller.horizontal div.scroll-button.end{right:0.25rem;transform:translate3d(4rem, 0, 0)}div.scroller.horizontal div.scroll-button div.arrow-button{width:1.25rem;height:calc(100% - 0.5rem)}div.scroller.vertical div.scroll-area{flex-direction:column;overflow-x:hidden;overflow-y:auto}div.scroller.vertical div.scroll-content{flex-direction:column}div.scroller.vertical ::slotted(*){scroll-margin-block:2.25rem}div.scroller.vertical div.scroll-fade{left:0;width:100%;height:4rem}div.scroller.vertical div.scroll-fade.start{top:0;transform:translate3d(0, -4rem, 0);background:linear-gradient(0deg, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0) 0%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 40%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 100%)}div.scroller.vertical div.scroll-fade.end{bottom:0;transform:translate3d(0, 4rem, 0);background:linear-gradient(180deg, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0) 0%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 40%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 100%)}div.scroller.vertical div.scroll-button{left:0;right:0}div.scroller.vertical div.scroll-button.start{top:0.25rem;transform:translate3d(0, -4rem, 0)}div.scroller.vertical div.scroll-button.start svg.arrow{transform:rotate(-90deg)}div.scroller.vertical div.scroll-button.end{bottom:0.25rem;transform:translate3d(0, 4rem, 0)}div.scroller.vertical div.scroll-button.end svg.arrow{transform:rotate(90deg)}div.scroller.vertical div.scroll-button div.arrow-button{height:1.25rem;width:calc(100% - 0.5rem)}div.scroller.can-scroll-to-start div.scroll-fade.start,div.scroller.can-scroll-to-start div.scroll-button.start{transform:translate3d(0, 0, 0)}div.scroller.can-scroll-to-end div.scroll-fade.end,div.scroller.can-scroll-to-end div.scroll-button.end{transform:translate3d(0, 0, 0)}div.scroller.can-scroll-to-start:not(.can-scroll-to-end) div.scroll-button.end,div.scroller.can-scroll-to-end:not(.can-scroll-to-start) div.scroll-button.start{opacity:0.5;transition-delay:0.5s}div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button,div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:hover,div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:focus,div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:focus-visible,div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:hover,div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:focus,div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:focus-visible{will-change:color, background-color, box-shadow, transform}div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:hover,div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:focus-visible,div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:hover,div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:active,div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:hover,div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:active,div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:hover,div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}div.scroller div.scroll-button.start:hover,div.scroller div.scroll-button.end:hover{transform:translate3d(0, 0, 0)}';export{e as limel_drag_handle,s as limel_scroller}
1
+ import{r,h as o,H as t}from"./p-BU9IJqli.js";import{t as l}from"./p-B26k4gw8.js";import"./p-ChagAaNf.js";const e=class{constructor(o){r(this,o),this.dragDirection="vertical",this.tooltipOpenDirection="left",this.language="en",this.dragHandleId="drag-handle-"+crypto.randomUUID(),this.handleClick=r=>{r.preventDefault(),r.stopPropagation()}}render(){const r=l.get("drag-handle.drag-to-reorder",this.language),e=l.get("drag-handle.drag-handle",this.language);return o(t,{key:"c88e3c81d5c24052b01bb44a6dd6d1abdddc75cb"},o("button",{key:"e45a3d7ca735bc27a4a05c13c65ec0d6e2b4df04","data-drag-handle":!0,type:"button",class:"limel-drag-handle",tabindex:-1,"aria-label":e,id:this.dragHandleId,onClick:this.handleClick},o("div",{key:"8a91aa1f70775148fb4262a9ef51129cfd89cf07",class:"drag-icon",role:"presentation","aria-hidden":"true"},o("div",{key:"1"}),o("div",{key:"2"}),o("div",{key:"3"}),o("div",{key:"4"}),o("div",{key:"5"}),o("div",{key:"6"})),o("limel-tooltip",{key:"645f814490598b794def31fde73de3bf61041904",openDirection:this.tooltipOpenDirection,elementId:this.dragHandleId,label:r})))}};e.style='@charset "UTF-8";limel-drag-handle{display:inline-flex;align-items:center;justify-content:center}button.limel-drag-handle{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit}button.limel-drag-handle:focus{outline:none}button.limel-drag-handle:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.limel-drag-handle{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent}button.limel-drag-handle:hover,button.limel-drag-handle:focus,button.limel-drag-handle:focus-visible{will-change:color, background-color, box-shadow, transform}button.limel-drag-handle:hover,button.limel-drag-handle:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--mdc-theme-primary);background-color:transparent}button.limel-drag-handle:hover{box-shadow:var(--button-shadow-hovered)}button.limel-drag-handle:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.limel-drag-handle:hover,button.limel-drag-handle:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.limel-drag-handle{touch-action:none;cursor:grab}button.limel-drag-handle:active{cursor:grabbing}button.limel-drag-handle:active,button.limel-drag-handle:hover{box-shadow:none !important}button.limel-drag-handle{display:inline-flex;align-items:center;justify-content:center;border-radius:0.4rem;padding:0.5rem;max-height:2.25rem;max-width:2.25rem;color:rgb(var(--contrast-900))}button.limel-drag-handle .drag-icon{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0.2rem}limel-drag-handle[drag-direction=horizontal] button.limel-drag-handle .drag-icon{grid-template-columns:1fr 1fr}button.limel-drag-handle .drag-icon div{transition:transform 0.2s ease, background-color 0.2s ease;height:0.125rem;width:0.125rem;border-radius:1rem;background-color:currentColor;transform:scale(1)}.is-being-dragged button.limel-drag-handle .drag-icon div,button.limel-drag-handle:active .drag-icon div,button.limel-drag-handle:focus .drag-icon div,button.limel-drag-handle:hover .drag-icon div,button.limel-drag-handle:focus-visible .drag-icon div{background-color:var(--mdc-theme-primary);transform:scale(1.5)}';const a=r=>r.preventDefault(),i=()=>o("svg",{class:"arrow",viewBox:"0 0 48 48","aria-hidden":"true",focusable:"false"},o("path",{d:"M18 4l20 20-20 20"})),s=class{constructor(o){r(this,o),this.orientation="horizontal",this.canScrollToStart=!1,this.canScrollToEnd=!1,this.fades={},this.handleResize=()=>{const r=this.pendingReveal;r&&this.revealItem(r.item,r.behavior),this.updateScrollability()},this.updateScrollability=()=>{const r=this.scrollArea;if(!r)return;const o="vertical"===this.orientation,t=o?r.scrollTop:r.scrollLeft,l=o?r.scrollHeight-r.clientHeight:r.scrollWidth-r.clientWidth;this.canScrollToStart=t>40,this.canScrollToEnd=Math.floor(l-t)>40},this.revealFocusedItem=r=>{const o=this.findItem(r.target);o&&requestAnimationFrame((()=>this.revealItem(o)))}}connectedCallback(){this.observeSize()}componentDidLoad(){this.observeSize()}disconnectedCallback(){var r;null===(r=this.resizeObserver)||void 0===r||r.disconnect()}render(){return o(t,{key:"6e546a2b31136af45497d3de8369754b33992da9"},o("div",{key:"22fbd0723a170201a422d073f41ce8e2a0d726d3",class:{scroller:!0,[this.orientation]:!0,"can-scroll-to-start":this.canScrollToStart,"can-scroll-to-end":this.canScrollToEnd}},o("div",{key:"379da89bc7f3b7b2a4700d1740df7c63906e065f",class:"scroll-area",ref:r=>this.scrollArea=r,onScroll:this.updateScrollability,onFocusin:this.revealFocusedItem},o("div",{key:"448ee73f8e9c68db5cadbd0910c9d1135d8d40ee",class:"scroll-content",ref:r=>this.scrollContent=r},o("slot",{key:"fc12618e40799918647a37be83fe8d8d5f7b8077",ref:r=>this.slotElement=r}))),this.renderEdge("start"),this.renderEdge("end")))}renderEdge(r){return[o("div",{key:`fade-${r}`,class:`scroll-fade ${r}`,ref:o=>this.fades[r]=o}),o("div",{key:`button-${r}`,class:`scroll-button ${r}`,"aria-hidden":"true"},o("div",{class:"arrow-button",onMouseDown:a,onClick:()=>this.scrollOnePage(r)},o(i,null)))]}observeSize(){var r;this.scrollArea&&"undefined"!=typeof ResizeObserver&&(null!==(r=this.resizeObserver)&&void 0!==r||(this.resizeObserver=new ResizeObserver(this.handleResize)),this.resizeObserver.observe(this.scrollArea),this.resizeObserver.observe(this.scrollContent))}scrollOnePage(r){const o=this.scrollArea,t=this.fades[r],l="vertical"===this.orientation,[e,a]=l?[o.clientHeight,t.offsetHeight]:[o.clientWidth,t.offsetWidth],i=Math.max(.2*e,a),s=Math.max(e-i,.5*e),d="start"===r?-s:s,c=n();o.scrollBy(l?{top:d,behavior:c}:{left:d,behavior:c})}findItem(r){let o=r;for(;o&&o.assignedSlot!==this.slotElement;)o=o.parentElement;return o}async reveal(r,o=n()){var t;this.revealItem(null!==(t=this.findItem(r))&&void 0!==t?t:r,o)}revealItem(r,o=n()){const t=this.scrollArea;if(this.pendingReveal=void 0,!t||!r.isConnected)return;if(0===t.getClientRects().length)return void(this.pendingReveal={item:r,behavior:o});const l="vertical"===this.orientation,[e,a]=l?["top","bottom"]:["left","right"],i=l?"height":"width",s=t.getBoundingClientRect(),d=r.getBoundingClientRect(),c=getComputedStyle(r),v=s[i]/Number.parseFloat(getComputedStyle(t)[i])||1,b=r=>Number.parseFloat(c.getPropertyValue(`scroll-margin-${r}`))*v,h=s[e]-(d[e]-b(e)),u=d[a]+b(a)-s[a];let m=0;h>0?m=-h:u>0&&(m=u),0!==m&&t.scrollBy(l?{top:m/v,behavior:o}:{left:m/v,behavior:o})}};function n(){return matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}s.style='@charset "UTF-8";:host(limel-scroller){display:block}div.scroller{position:relative;overflow:hidden;height:100%}div.scroll-area{display:flex;height:100%;scrollbar-width:none}div.scroll-area::-webkit-scrollbar{display:none}div.scroll-content{display:flex;flex:1 0 auto;position:relative;isolation:isolate;padding:var(--limel-scroller-content-padding, 0)}::slotted(*){flex-shrink:0}div.scroll-fade,div.scroll-button{position:absolute;transition:transform 0.3s ease-out}div.scroll-fade{pointer-events:none}div.scroll-button{display:flex;align-items:center;justify-content:center}div.scroll-button div.arrow-button{display:flex;align-items:center;justify-content:center;border-radius:0.25rem;color:var(--limel-theme-on-surface-color)}div.scroll-button svg.arrow{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}div.scroller.horizontal div.scroll-area{overflow-x:auto;overflow-y:hidden}div.scroller.horizontal ::slotted(*){scroll-margin-inline:2.25rem}div.scroller.horizontal div.scroll-fade{top:0;width:4rem;height:100%}div.scroller.horizontal div.scroll-fade.start{left:0;transform:translate3d(-4rem, 0, 0);background:linear-gradient(270deg, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0) 0%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 40%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 100%)}div.scroller.horizontal div.scroll-fade.end{right:0;transform:translate3d(4rem, 0, 0);background:linear-gradient(90deg, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0) 0%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 40%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 100%)}div.scroller.horizontal div.scroll-button{top:0;bottom:0}div.scroller.horizontal div.scroll-button.start{left:0.25rem;transform:translate3d(-4rem, 0, 0)}div.scroller.horizontal div.scroll-button.start svg.arrow{transform:rotate(180deg)}div.scroller.horizontal div.scroll-button.end{right:0.25rem;transform:translate3d(4rem, 0, 0)}div.scroller.horizontal div.scroll-button div.arrow-button{width:1.25rem;height:calc(100% - 0.5rem)}div.scroller.vertical div.scroll-area{flex-direction:column;overflow-x:hidden;overflow-y:auto}div.scroller.vertical div.scroll-content{flex-direction:column}div.scroller.vertical ::slotted(*){scroll-margin-block:2.25rem}div.scroller.vertical div.scroll-fade{left:0;width:100%;height:4rem}div.scroller.vertical div.scroll-fade.start{top:0;transform:translate3d(0, -4rem, 0);background:linear-gradient(0deg, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0) 0%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 40%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 100%)}div.scroller.vertical div.scroll-fade.end{bottom:0;transform:translate3d(0, 4rem, 0);background:linear-gradient(180deg, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0) 0%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 40%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 100%)}div.scroller.vertical div.scroll-button{left:0;right:0}div.scroller.vertical div.scroll-button.start{top:0.25rem;transform:translate3d(0, -4rem, 0)}div.scroller.vertical div.scroll-button.start svg.arrow{transform:rotate(-90deg)}div.scroller.vertical div.scroll-button.end{bottom:0.25rem;transform:translate3d(0, 4rem, 0)}div.scroller.vertical div.scroll-button.end svg.arrow{transform:rotate(90deg)}div.scroller.vertical div.scroll-button div.arrow-button{height:1.25rem;width:calc(100% - 0.5rem)}div.scroller.can-scroll-to-start div.scroll-fade.start,div.scroller.can-scroll-to-start div.scroll-button.start{transform:translate3d(0, 0, 0)}div.scroller.can-scroll-to-end div.scroll-fade.end,div.scroller.can-scroll-to-end div.scroll-button.end{transform:translate3d(0, 0, 0)}div.scroller.can-scroll-to-start:not(.can-scroll-to-end) div.scroll-button.end,div.scroller.can-scroll-to-end:not(.can-scroll-to-start) div.scroll-button.start{opacity:0.5;transition-delay:0.5s}div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button,div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:hover,div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:focus,div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:focus-visible,div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:hover,div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:focus,div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:focus-visible{will-change:color, background-color, box-shadow, transform}div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:hover,div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:focus-visible,div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:hover,div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:active,div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:hover,div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:active,div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:hover,div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}div.scroller div.scroll-button.start:hover,div.scroller div.scroll-button.end:hover{transform:translate3d(0, 0, 0)}';export{e as limel_drag_handle,s as limel_scroller}
@@ -0,0 +1 @@
1
+ import{r as e,c as i,h as t,H as o,a}from"./p-BU9IJqli.js";import{t as r}from"./p-B26k4gw8.js";import{E as s}from"./p-Bu6-QXrA.js";import{c as n}from"./p-BrjD-ITe.js";import"./p-ChagAaNf.js";const l=[],c={newTab:"up_right_arrow",expand:"expand"};function d(e){if(e.href&&"newTab"===e.type)return"_blank"}function h(e){e.stopPropagation()}const m=class{constructor(o){e(this,o),this.close=i(this,"close",7),this.selectAction=i(this,"selectAction",7),this.changeWidth=i(this,"changeWidth",7),this.selectStackEntry=i(this,"selectStackEntry",7),this.language="en",this.closeLabel="Close",this.stack=[],this.actions=[],this.closeOnEscape=!0,this.fullScreen=!1,this.closeButtonId=n(),this.actionIdPrefix=n(),this.backIdPrefix=n(),this.focusCloseButtonAfterRender=!1,this.renderAction=(e,i)=>{const o=`${this.actionIdPrefix}-${i}`;return t(e.href?"a":"button",{class:e.type,id:o,href:e.href,target:d(e),"aria-label":e.label,onClick:this.handleClickAction(e)},t("limel-icon",{name:c[e.type],"aria-hidden":"true"}),t("limel-tooltip",{elementId:o,label:e.label,helperLabel:e.helperLabel}))},this.renderBack=(e,i)=>{var o;const a=`${this.backIdPrefix}-${i}`;return t("button",{class:"back",id:a,style:{width:null===(o=this.panel)||void 0===o?void 0:o.style.width},"aria-label":e.heading,onClick:this.handleClickBack(i)},t("span",{class:"back-toolbar"}),t("span",{class:"back-band",style:{"background-color":e.color}}),t("limel-tooltip",{elementId:a,label:e.heading,helperLabel:e.subheading,openDirection:"left"}))},this.stopContentEvents=e=>{null==e||e.addEventListener("close",h),null==e||e.addEventListener("changeWidth",h)},this.restoreFocus=()=>{const e=!document.activeElement||document.activeElement===document.body;if(this.host.isConnected||!e)return;const i=this.focusedBefore;this.focusedBefore=void 0,(null==i?void 0:i.isConnected)&&i.focus()},this.setPanel=e=>{this.panel=e},this.setMinLimit=e=>{this.minLimit=e},this.setMaxLimit=e=>{this.maxLimit=e},this.handleKeyDown=e=>{this.closeOnEscape&&e.key===s&&!e.defaultPrevented&&this.isLastOpened()&&(e.preventDefault(),this.close.emit())},this.handleChangeSize=e=>{this.rememberWidthBeforeResize(),this.setWidth(e.detail)},this.handleEndResize=()=>{if(!this.isResizing())return;const e=this.widthBeforeResize;this.widthBeforeResize=void 0,this.keepClampedWidth(),this.updateWidthRange(),this.emitWidthIfChanged(e)},this.handleSizeChange=e=>{e.every(this.isMeasured)||this.updateWidthRange()},this.isMeasured=e=>{var i;return e.target===this.panel&&Math.round(e.borderBoxSize[0].inlineSize)===(null===(i=this.widthRange)||void 0===i?void 0:i.now)},this.updateWidthRange=()=>{this.isResizing()||(this.widthRange=this.measureWidthRange())},this.handleClickAction=e=>i=>{var t;this.selectAction.emit({id:null!==(t=e.id)&&void 0!==t?t:e.type,event:i})},this.handleClickBack=e=>()=>{this.selectStackEntry.emit(e)},this.handleClickClose=()=>{this.close.emit()}}connectedCallback(){l.push(this),window.addEventListener("keydown",this.handleKeyDown),this.rememberFocusedElement(),this.observeWidth()}componentDidLoad(){this.observeWidth(),this.moveFocusIntoPanel()}disconnectedCallback(){this.widthBeforeResize=void 0,this.stopObservingWidth(),window.removeEventListener("keydown",this.handleKeyDown),this.removeFromOpenPanels(),queueMicrotask(this.restoreFocus)}handleBacksChange(){this.focusCloseButtonAfterRender=this.isFocusedBackRemoved()}componentDidRender(){var e;this.focusCloseButtonAfterRender&&(this.focusCloseButtonAfterRender=!1,null===(e=this.host.shadowRoot.querySelector("button.close"))||void 0===e||e.focus())}render(){return t(o,{key:"f4ddb3df52344cfb6106ab2982c7d0c077e075fb"},t("section",{key:"2dcf62861e49014f9fc080a945a9c1e0c5bd3920",ref:this.setPanel,role:"dialog","aria-label":this.label,tabindex:"-1"},this.renderHandle(),t("div",{key:"169006b7eed55cf37b7db4ce393d29b5d1184d42",class:"content"},t("div",{key:"9fa270803bf650e258358e7c9031d10f58c35189",class:"toolbar"},this.renderCloseButton(),this.renderActions()),this.renderHeader(),this.renderBody())),this.renderStack(),t("span",{key:"c8e01b49683bdaa2d549830930e4247f3a49895b","data-limit":"min",ref:this.setMinLimit}),t("span",{key:"9baec9cc89a6e1f375f97d4f9069f8951f90bf6a","data-limit":"max",ref:this.setMaxLimit}))}renderCloseButton(){return t("button",{class:"close",id:this.closeButtonId,"aria-label":this.closeLabel,onClick:this.handleClickClose},t("limel-icon",{name:"multiply","aria-hidden":"true"}),t("limel-tooltip",{elementId:this.closeButtonId,label:this.closeLabel}))}renderActions(){if(0!==this.actions.length)return t("div",{class:"actions"},this.actions.map(((e,i)=>this.renderAction(e,i))))}renderStack(){const e=this.stack.slice(0,-1);if(!this.fullScreen&&0!==e.length)return t("div",{class:"stack"},e.map(((e,i)=>this.renderBack(e,i))))}isFocusedBackRemoved(){const e=[...this.host.shadowRoot.querySelectorAll(".back")].indexOf(this.host.shadowRoot.activeElement);return-1!==e&&(this.fullScreen||e>=this.stack.length-1)}renderHeader(){const e=this.stack.at(-1);if(e)return t("limel-header",{class:{header:!0,"has-color":!!e.color},style:{"--header-background-color":e.color},icon:e.icon,heading:e.heading,subheading:e.subheading},t("div",{class:"header-actions",slot:"actions",ref:this.stopContentEvents},t("slot",{name:"header-actions"})))}renderHandle(){var e,i,o;if(!this.fullScreen)return t("limel-resize-handle",{class:"handle",resizableRegionLabel:this.getRegionLabel(),language:this.language,value:null===(e=this.widthRange)||void 0===e?void 0:e.now,min:null===(i=this.widthRange)||void 0===i?void 0:i.min,max:null===(o=this.widthRange)||void 0===o?void 0:o.max,onChangeSize:this.handleChangeSize,onEndResize:this.handleEndResize})}getRegionLabel(){return this.label?r.get("side-panel.resize-region.named",this.language,{label:this.label}):r.get("side-panel.resize-region",this.language)}renderBody(){return t("div",{class:"body",ref:this.stopContentEvents},t("slot",null))}stopContentEventAtHost(e){e.target!==this.host&&e.stopImmediatePropagation()}moveFocusIntoPanel(){this.panel.focus({preventScroll:!0})}rememberFocusedElement(){const e=function(){var e;let i=document.activeElement;for(;null===(e=null==i?void 0:i.shadowRoot)||void 0===e?void 0:e.activeElement;)i=i.shadowRoot.activeElement;return i}();e&&e!==document.body&&(this.focusedBefore=e)}removeFromOpenPanels(){const e=l.indexOf(this);-1!==e&&l.splice(e,1)}isLastOpened(){return l.at(-1)===this}setWidth(e){for(const i of this.getPanelBoxes())i.style.width=`${e}px`}getPanelBoxes(){const e=this.host.shadowRoot.querySelectorAll(".back");return[this.panel,...e]}rememberWidthBeforeResize(){this.isResizing()||(this.widthBeforeResize=this.currentWidth())}isResizing(){return void 0!==this.widthBeforeResize}keepClampedWidth(){this.setWidth(this.currentWidth())}emitWidthIfChanged(e){const i=this.currentWidth();i!==e&&this.changeWidth.emit(i)}observeWidth(){if(this.stopObservingWidth(),this.panel){this.widthObserver=new ResizeObserver(this.handleSizeChange);for(const e of[this.panel,this.minLimit,this.maxLimit])e&&this.widthObserver.observe(e)}}stopObservingWidth(){var e;null===(e=this.widthObserver)||void 0===e||e.disconnect(),this.widthObserver=void 0}measureWidthRange(){const e=this.minLimit.offsetWidth,i=Math.max(e,this.maxLimit.offsetWidth);return{now:Math.round(this.currentWidth()),min:Math.round(e),max:Math.round(i)}}currentWidth(){return this.panel.offsetWidth}get host(){return a(this)}static get watchers(){return{stack:[{handleBacksChange:0}],fullScreen:[{handleBacksChange:0}]}}};m.style='@charset "UTF-8";:host(limel-side-panel){--_side-panel-width:var(--side-panel-width, 37.5rem);--_side-panel-min-width:var(--side-panel-min-width, 25rem);--_side-panel-top-inset:var(--side-panel-top-inset, 0px);--_side-panel-right-inset:var(--side-panel-right-inset, 0px);--_side-panel-bottom-inset:var(--side-panel-bottom-inset, 0px);--_side-panel-z-index:var(--side-panel-z-index, 6);--_side-panel-dropdown-z-index:var(--dropdown-z-index);--_side-panel-popover-z-index:var(--popover-z-index);--_side-panel-tooltip-z-index:var(--tooltip-z-index)}@keyframes show-side-panel{0%{transform:translate3d(12.5rem, 0, 0) scale(0.95);opacity:0}60%{opacity:1}100%{transform:translate3d(0, 0, 0) scale(1)}}section{position:absolute;top:var(--_side-panel-top-inset);right:var(--_side-panel-right-inset);bottom:var(--_side-panel-bottom-inset);margin:0.5rem;width:var(--_side-panel-width);min-width:min(var(--_side-panel-min-width), 100% - 1rem);max-width:min(100% - 1rem - 3rem, 60%);max-height:100%;border-radius:1rem;z-index:var(--_side-panel-z-index);display:flex;flex-direction:column;isolation:isolate;box-shadow:var(--shadow-depth-64);transform-origin:left center;transition:background-color 0.5s ease, transform 0.3s ease, opacity 0.2s ease, right 0.2s ease;animation:show-side-panel 0.46s cubic-bezier(0.08, 0.54, 0.06, 1.11) forwards}section:focus{outline:none}@media (prefers-reduced-motion){section{animation:none;transition:none}}.content,.stack{--dropdown-z-index:var( --_side-panel-dropdown-z-index, calc(var(--_side-panel-z-index) + 1) );--popover-z-index:var( --_side-panel-popover-z-index, calc(var(--_side-panel-z-index) + 1) );--tooltip-z-index:var( --_side-panel-tooltip-z-index, calc(var(--_side-panel-z-index) + 1) )}:host([full-screen]) section{left:0;width:100%;min-width:100%;max-width:100%;margin:0}:host([full-screen]) section,:host([full-screen]) .content{border-radius:0}.content{display:flex;flex-direction:column;flex-grow:1;min-height:0;overflow:hidden;border-radius:1rem;background-color:rgb(var(--contrast-100))}.toolbar{flex-shrink:0;display:flex;align-items:center;gap:0.25rem;box-sizing:border-box;min-height:2.375rem;padding:0.25rem 0.125rem;background-color:rgb(var(--contrast-300))}.actions{display:flex;align-items:center;gap:0.25rem;margin-left:auto}.actions>*{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent}.actions>*:hover,.actions>*:focus,.actions>*:focus-visible{will-change:color, background-color, box-shadow, transform}.actions>*:hover,.actions>*:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.actions>*:hover{box-shadow:var(--button-shadow-hovered)}.actions>*:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.actions>*:hover,.actions>*:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.actions>*:focus{outline:none}.actions>*:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.actions>*{isolation:isolate;position:relative;display:flex;justify-content:center;align-items:center;width:1.875rem;height:1.875rem;border-radius:50%}.actions>* limel-icon{width:1.25rem;transition:transform 0.2s ease, color 0.2s ease}.actions>*{--_side-panel-action-background-color:rgb(var(--contrast-300))}.actions>*:hover,.actions>*:focus-visible{--_side-panel-action-background-color:var( --lime-elevated-surface-background-color )}.actions>*:hover limel-icon{color:var(--mdc-theme-primary)}.newTab limel-icon{transition:transform 0.2s ease;transform:scale(0.8);z-index:3}.newTab:before{z-index:2}.newTab:after{z-index:1}.newTab:before,.newTab:after{content:"";transition:transform 0.2s ease, outline-color 0.2s ease;position:absolute;width:0.875rem;height:0.875rem;outline:1.5px solid rgb(var(--contrast-900));border-radius:1px;background-color:var(--_side-panel-action-background-color)}.newTab:hover limel-icon{transform:translate3d(-0.1rem, 0.1rem, 0) scale(1)}.newTab:hover:before{transform:translate3d(0.125rem, -0.125rem, 0);outline-color:rgb(var(--contrast-1000));box-shadow:var(--shadow-depth-8)}.newTab:hover:after{transform:translate3d(-0.15rem, 0.15rem, 0) scale(0.9);outline-color:rgb(var(--contrast-700))}.expand:after{transition:transform 0.2s ease;content:"";position:absolute;z-index:1;background-color:var(--_side-panel-action-background-color);width:0.75rem;height:0.75rem}.expand:hover:after{transform:scale(0.5)}.expand:hover limel-icon{transform:scale(1.18)}.close{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent}.close:hover,.close:focus,.close:focus-visible{will-change:color, background-color, box-shadow, transform}.close:hover,.close:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.close:hover{box-shadow:var(--button-shadow-hovered)}.close:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.close:hover,.close:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.close:focus{outline:none}.close:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.close{isolation:isolate;position:relative;display:flex;justify-content:center;align-items:center;width:1.875rem;height:1.875rem;border-radius:50%}.close limel-icon{width:1.25rem;transition:transform 0.2s ease, color 0.2s ease}.close:before,.close:after{content:"";position:absolute;z-index:-1;inset:0;border-radius:50%;opacity:0;transition-delay:0.1s}.close:before{transition:transform 0.3s ease, opacity 0.3s ease;background-color:rgb(var(--color-orange-dark))}.close:after{transition:transform 0.6s ease, opacity 0.6s ease;background-color:rgb(var(--color-orange-light))}.close:hover limel-icon{color:rgb(var(--color-white));transform:scale(0.7) rotate(90deg)}.close:hover:before{opacity:1;transform:scale(0.4)}.close:hover:after{opacity:0.4;transform:scale(0.6)}.header{--side-panel-header-text-color:var(--limel-theme-on-surface-color);--header-top-right-left-border-radius:0;flex-shrink:0;min-height:2.5rem;padding:0.125rem 0.75rem 0.125rem 0.25rem;background-color:var(--header-background-color, rgb(var(--contrast-200)))}.header-actions{display:flex;align-items:center;gap:0.25rem;flex-shrink:0;max-width:50%;overflow:hidden;box-sizing:border-box;max-height:calc(1.25rem + 1rem + 2 * 0.25rem);padding:0.25rem;margin:-0.25rem -0.25rem -0.25rem auto;color:var(--side-panel-header-text-color);text-shadow:none}.has-color{--side-panel-header-text-color:rgb(var(--color-white));--header-heading-color:var(--side-panel-header-text-color);--header-subheading-color:var(--side-panel-header-text-color);text-shadow:0 0 1px rgba(var(--color-black), 0.2), 0 0 0.25rem rgba(var(--color-black), 0.2)}.body{flex-grow:1;min-height:0;display:flex;flex-direction:column;overflow:hidden auto}.handle{position:absolute;z-index:1;top:calc(2.375rem + 0.5rem);bottom:1rem;left:calc(0.5rem / -2);width:0.5rem}[data-limit]{position:absolute;visibility:hidden;pointer-events:none;height:0}[data-limit=min]{width:min(var(--_side-panel-min-width), 100% - 1rem)}[data-limit=max]{width:min(100% - 1rem - 3rem, 60%)}.stack{position:absolute;inset:0;z-index:calc(var(--_side-panel-z-index) - 1);pointer-events:none}.back{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;position:absolute;top:var(--_side-panel-top-inset);right:var(--_side-panel-right-inset);bottom:var(--_side-panel-bottom-inset);margin:0.5rem;width:var(--_side-panel-width);min-width:min(var(--_side-panel-min-width), 100% - 1rem);max-width:min(100% - 1rem - 3rem, 60%);max-height:100%;border-radius:1rem}.back:focus{outline:none}.back:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.back{pointer-events:auto;cursor:pointer;box-sizing:border-box;overflow:hidden;display:flex;flex-direction:column;background-color:rgb(var(--contrast-100));box-shadow:var(--shadow-depth-16);transform-origin:left center;transition:transform 0.3s ease, box-shadow 0.2s ease, background-color 0.2s ease, right 0.2s ease}@media (prefers-reduced-motion){.back{transition:none}}.back:nth-last-child(1){transform:translate3d(-1.4rem, 0, 0) scale(0.98)}.back:nth-last-child(2){transform:translate3d(-2.3rem, 0, 0) scale(0.96)}.back:nth-last-child(3){transform:translate3d(-3rem, 0, 0) scale(0.94)}.back:nth-last-child(n+4){transform:translate3d(-3.4rem, 0, 0) scale(0.92)}.back:hover{box-shadow:var(--shadow-depth-64)}.back:hover,.back:focus-visible{right:calc(var(--_side-panel-right-inset) + 0.25rem);background-color:var(--lime-elevated-surface-background-color)}.stack:has(.back:hover) .back:nth-last-child(2){transform:translate3d(-2.6rem, 0, 0) scale(0.96)}.stack:has(.back:hover) .back:nth-last-child(3){transform:translate3d(-3.8rem, 0, 0) scale(0.94)}.stack:has(.back:hover) .back:nth-last-child(n+4){transform:translate3d(-4.9rem, 0, 0) scale(0.92)}.back-toolbar,.back-band{flex-shrink:0}.back-toolbar{height:2.375rem;background-color:rgb(var(--contrast-300))}.back-band{height:2.5rem;background-color:rgb(var(--contrast-200))}';export{m as limel_side_panel}
@@ -1 +1 @@
1
- import{r as e,h as i}from"./p-BU9IJqli.js";const o=class{constructor(i){e(this,i)}render(){return i("div",{key:"581430ae81fc6f6e4075a5ea62323144a33663cd"})}};o.style=":host(limel-3d-hover-effect-glow){display:block;pointer-events:none;position:absolute;inset:0;mix-blend-mode:plus-lighter}div{position:absolute;inset:0;transition:background, opacity;transition-timing-function:ease-out;transition-duration:0.8s;border-radius:inherit;opacity:var(--limel-3d-hover-effect-glow-opacity, 0.1);background-image:radial-gradient(circle at var(--limel-3d-hover-effect-glow-position, 50% -20%), rgb(var(--color-white), 0.3), rgb(var(--color-white), 0))}";export{o as limel_3d_hover_effect_glow}
1
+ import{r as i,h as o}from"./p-BU9IJqli.js";const e=class{constructor(o){i(this,o)}render(){return o("div",{key:"f1f59cc0195fa45007fff6ea262aff1a260118dc"})}};e.style=":host(limel-3d-hover-effect-glow){display:block;pointer-events:none;position:absolute;inset:0;mix-blend-mode:plus-lighter}div{position:absolute;inset:0;transition:background, opacity;transition-timing-function:ease-out;transition-duration:0.8s;border-radius:inherit;opacity:var(--limel-3d-hover-effect-glow-opacity, 0.1);background-image:radial-gradient(circle at var(--limel-3d-hover-effect-glow-position, 50% -20%), rgb(var(--color-white), 0.3), rgb(var(--color-white), 0))}";export{e as limel_3d_hover_effect_glow}
@@ -1 +1 @@
1
- import{r as t,c as e,h as r,a as i}from"./p-BU9IJqli.js";import{i as o}from"./p-Cu9Ji1iJ.js";import{g as a,b as l}from"./p-CgNJbSP4.js";import{A as n,b as s,H as c,e as d,c as b,d as h}from"./p-Bu6-QXrA.js";import{a as u,b as m,i as v,c as p,D as g}from"./p-DdnBHYb-.js";import{S as f,c as w}from"./p-DeIIlp6m.js";import"./p-CK4jS9_E.js";import"./p-9W8bTt2G.js";import"./p-DbBZn7JO.js";import"./p-BcJ-TDVt.js";import"./p-BJQylLSL.js";import"./p-DK0pjX-Y.js";import"./p-oiMYqRQ0.js";import"./p-BYfPV0O4.js";import"./p-B8VKuhvH.js";import"./p-CZ30nDJE.js";import"./p-B--C3qwe.js";var x=m((function(t,e){return v(t)?function(t,e){var r=-1,i=u,o=!0,a=t.length,l=[],n=e.length;if(!a)return l;e.length>=200&&(i=w,o=!1,e=new f(e));t:for(;++r<a;){var s=t[r],c=s;if(s=0!==s?s:0,o&&c==c){for(var d=n;d--;)if(e[d]===c)continue t;l.push(s)}else i(e,c,undefined)||l.push(s)}return l}(t,p(e,1,v)):[]}));const k={horizontal:new Map([[b,"previous"],[h,"next"],[c,"first"],[d,"last"]]),vertical:new Map([[n,"previous"],[s,"next"],[c,"first"],[d,"last"]])};function j(t,e){return t>=0&&t<e}function y(t,e){return r=>{var i;return!(null===(i=null==e?void 0:e.isDisabled)||void 0===i?void 0:i.call(e,t[r]))}}function C(t,e,r,i,o){for(let a=0;a<t;a+=1){const l=e+r*a;if(!i&&!j(l,t))break;const n=(l%t+t)%t;if(o(n))return n}return-1}const z=class{constructor(r){t(this,r),this.changeTab=e(this,"changeTab",7),this.reorderTab=e(this,"reorderTab",7),this.tabs=[],this.orientation="horizontal",this.allowTabReorder=!1,this.hasLoaded=!1,this.isLaidOutAgain=!1,this.renderedTabs=[],this.handleReorder=t=>{const e=function(t,e){const{order:r,fromIndex:i,toIndex:a}=e,l=e=>e>=0&&e<t.length;if(!l(i)||!l(a))return;const n=[...r];return n.splice(i,0,...n.splice(a,1)),o(n,t.map((({id:t})=>String(t))))?{tab:t[i],fromIndex:i,toIndex:a}:void 0}(this.tabs,t);if(!e)return;const r=this.tabs.map((({id:t})=>t));r.splice(e.toIndex,0,...r.splice(e.fromIndex,1)),this.tabIdsAfterReorder=r,this.reorderTab.emit(e)},this.handleKeyDown=this.handleKeyDown.bind(this)}async connectedCallback(){this.hasLoaded&&(this.revealedTabId=void 0,this.setUpReordering(),await this.revealActiveTab("auto"))}disconnectedCallback(){var t;null===(t=this.dragToReorder)||void 0===t||t.teardown()}componentDidLoad(){this.hasLoaded=!0,this.triggerIconColorWarning()}componentWillRender(){var t;const e=this.getTabElements().indexOf(this.host.shadowRoot.activeElement);this.tabWithFocus=-1===e?void 0:{id:null===(t=this.renderedTabs[e])||void 0===t?void 0:t.id,button:this.getTabElements()[e]}}async componentDidRender(){this.restoreFocus(),this.renderedTabs=this.tabs,this.setUpReordering();const t=this.isLaidOutAgain;this.isLaidOutAgain=!1,await this.revealActiveTab(!this.hasLoaded||t?"auto":void 0,t)}render(){const t=function(t,e,r){const i=t.length,o=y(t,r);return j(e,i)&&o(e)?e:C(i,0,1,!1,o)}(this.tabs,this.tabs.findIndex((t=>t.active)),this.getNavigationOptions());return r("div",{key:"a6fea42551095401324faac28bad996dd4137428",role:"tablist","aria-orientation":this.getOrientation(),onKeyDown:this.handleKeyDown},r("limel-scroller",{key:"956d8b890785071eacb66478e4f6af8bbc467a93",orientation:this.getOrientation()},this.tabs.map(((e,r)=>this.renderTabOrMovableTab(e,r,r===t)))))}tabsChanged(t=[],e=[]){const r=t.map((t=>t.id)),i=e.map((t=>t.id));if(o(r,i))return;const a=this.tabIdsAfterReorder;this.tabIdsAfterReorder=void 0,o(r,a)||(this.revealedTabId=void 0)}orientationChanged(){this.revealedTabId=void 0,this.isLaidOutAgain=!0}getOrientation(){return"vertical"===this.orientation?"vertical":"horizontal"}getNavigationOptions(){return{orientation:this.getOrientation(),wrap:!0}}restoreFocus(){var t;const e=this.tabWithFocus;if(this.tabWithFocus=void 0,!e||e.button.isConnected)return;const r=this.tabs.findIndex((t=>t.id===e.id));null===(t=this.getTabElements()[r])||void 0===t||t.focus()}getTabElements(){return[...this.host.shadowRoot.querySelectorAll('button[role="tab"]')]}canReorderTabs(){return this.allowTabReorder&&this.tabs.length>1}setUpReordering(){var t,e;if(!this.canReorderTabs())return void(null===(t=this.dragToReorder)||void 0===t||t.teardown());const r=this.host.shadowRoot.querySelector("limel-scroller");r&&(null!==(e=this.dragToReorder)&&void 0!==e||(this.dragToReorder=new g({draggable:"[data-reorder-id]",revertDrop:!0,onReorder:this.handleReorder})),this.dragToReorder.setup(r,this.getOrientation()))}async revealActiveTab(t,e=!1){const r=this.tabs.findIndex((t=>t.active));if(-1===r)return void(this.revealedTabId=void 0);if(this.tabs[r].id===this.revealedTabId)return;this.revealedTabId=this.tabs[r].id;const i=this.getTabElements()[r],o=this.host.shadowRoot.querySelector("limel-scroller");i&&o&&(i.matches(":focus")&&!e||(await o.componentOnReady(),await o.reveal(i,t)))}handleKeyDown(t){const e=this.getNavigationOptions();if(!function(t,e){return!(t.altKey||t.ctrlKey||t.metaKey)&&k[e.orientation].has(t.key)}(t,e))return;const r=this.getTabElements().indexOf(t.target);-1!==r&&(t.preventDefault(),this.activateTab(function(t,e,r,i){const o=k[i.orientation].get(e),a=t.length,l=y(t,i),n=C(a,0,1,!1,l);if(!o||-1===n)return-1;if("first"===o)return n;const s=C(a,a-1,-1,!1,l);if("last"===o)return s;if(!j(r,a))return"next"===o?n:s;const c="next"===o?1:-1,d=C(a,r+c,c,Boolean(i.wrap),l);return-1===d?r:d}(this.tabs,t.key,r,e)))}activateTab(t){if(-1===t)return;if(this.getTabElements()[t].focus(),t===this.tabs.findIndex((t=>t.active)))return;const e=function(t,e){const r=t.findIndex((t=>!0===t.active)),i=[...t];return-1!==r&&(i[r]=Object.assign(Object.assign({},t[r]),{active:!1})),i[e]=Object.assign(Object.assign({},t[e]),{active:!0}),i}(this.tabs,t),r=x(e,this.tabs).sort(this.sortByInactive);for(const t of r)this.changeTab.emit(t);this.tabs=e}sortByInactive(t,e){return Number(t.active)-Number(e.active)}renderIcon(t){if(!t.icon)return;const e=a(t.icon),i=l(t.icon,t.iconColor),o={color:""};return i&&(o.color=i),r("limel-icon",{name:e,style:o,size:"small","aria-hidden":"true"})}renderTabOrMovableTab(t,e,i){return this.canReorderTabs()?r("div",{key:t.id,role:"presentation","data-reorder-id":t.id},this.renderTab(t,e,i),r("limel-drag-handle",{"aria-hidden":"true",dragDirection:this.getOrientation(),tooltipOpenDirection:"vertical"===this.getOrientation()?"right":"bottom"})):this.renderTab(t,e,i)}renderTab(t,e,i){return r("button",{key:t.id,role:"tab","aria-selected":t.active?"true":"false",tabindex:i?0:-1,onClick:()=>this.activateTab(e)},r("span",{class:"content"},this.renderIcon(t),r("span",{class:"text"},t.text),t.badge?r("limel-badge",{label:t.badge}):""))}triggerIconColorWarning(){this.tabs.some((t=>t.iconColor))&&console.warn("The `iconColor` prop is deprecated now! Use the new `Icon` interface and instead of `iconColor: 'color-name'` write `icon {name: 'icon-name', color: 'color-name'}`.")}get host(){return i(this)}static get watchers(){return{tabs:[{tabsChanged:0}],orientation:[{orientationChanged:0}]}}};z.style="@charset \"UTF-8\";:host(limel-tab-bar){--limel-tab-background-color:var(--contrast-300);--limel-tab-border-radius:0.625rem;--limel-tab-content-inset:0.25rem;--limel-active-tab-background-color:var( --tab-panel-background-color, rgb(var(--contrast-100)) );--limel-active-tab-color:var( --lime-primary-color, var(--limel-theme-primary-color) );--limel-tab-active-outer-edge-curve-size:0.75rem;--limel-tab-separator-width:0.125rem;--limel-tab-separator-background-color:rgb(var(--contrast-600));isolation:isolate;display:block;position:relative}limel-scroller{--limel-scroller-fade-color:var(--limel-tab-background-color);--limel-scroller-content-padding:0.25rem var(--limel-tab-active-outer-edge-curve-size) 0;background-color:rgb(var(--limel-tab-background-color))}:host(.has-tabs-with-equal-width:not([orientation=vertical])) button[role=tab],:host(.has-tabs-with-equal-width:not([orientation=vertical])) limel-scroller>div{flex:1 0 auto;max-width:var(--tab-bar-horizontal-tab-max-width, none)}limel-scroller>div:has(limel-drag-handle:hover),limel-scroller>div:has(limel-drag-handle:focus-within),limel-scroller>div.is-elevated,limel-scroller>div.sortable-chosen{will-change:transform, box-shadow, border-radius, background-color}limel-scroller>div.sortable-ghost{border-radius:0.5rem;box-shadow:var(--shadow-depth-64), 0 0.65rem 0.75rem -0.425rem rgb(var(--color-black), 0.3)}limel-scroller>div.sortable-chosen{border-radius:0.5rem;background-color:var(--lime-elevated-surface-background-color)}limel-scroller>div.is-elevated[draggable=false]{animation:sit-here 0.8s forwards}@keyframes sit-here{0%{border-radius:0.5rem;background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--shadow-depth-64), 0 0.65rem 0.75rem -0.425rem rgb(var(--color-black), 0.3)}100%{box-shadow:none}}limel-scroller>div{position:relative;display:flex;flex:0 0 auto}limel-scroller>div button[role=tab]{flex:1 1 auto;min-width:0}limel-scroller>div span.content{padding-right:2rem}limel-scroller>div limel-drag-handle{position:absolute;z-index:3;top:0;bottom:0;right:0.25rem}button[role=tab]{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;position:relative;display:flex;box-sizing:border-box;border-radius:0;padding:var(--limel-tab-content-inset);min-width:2.5rem;background-color:transparent;flex:0 0 auto;height:2.5rem;outline:none;cursor:pointer;white-space:nowrap;font-size:var(--limel-theme-default-font-size)}button[role=tab] limel-icon{transition:color 0.2s ease;color:rgb(var(--contrast-800));margin-left:-0.25rem;flex-shrink:0}button[role=tab] span.text{transition:color 0.2s ease;line-height:1.25;overflow:hidden;text-overflow:ellipsis;color:var(--limel-theme-on-surface-color)}button[role=tab]:hover span.text{color:var(--limel-theme-text-primary-on-background-color)}button[role=tab] limel-badge{margin-right:-0.25rem;box-shadow:0 0 0 1px rgb(var(--contrast-600));pointer-events:none;flex-shrink:0}button[role=tab][aria-selected=true]{background-color:var(--limel-active-tab-background-color);z-index:2}button[role=tab][aria-selected=true]:before,button[role=tab][aria-selected=true]:after{content:\"\";display:block;width:var(--limel-tab-active-outer-edge-curve-size);height:var(--limel-tab-active-outer-edge-curve-size);position:absolute;background-color:var(--limel-active-tab-background-color);-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20stroke-linejoin='round'%20stroke-miterlimit='2'%20clip-rule='evenodd'%20viewBox='0%200%2050%2050'%3E%3Cdefs/%3E%3Cpath%20d='M0%200c0%2027.594%2022.406%2050%2050%2050H0V0z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20stroke-linejoin='round'%20stroke-miterlimit='2'%20clip-rule='evenodd'%20viewBox='0%200%2050%2050'%3E%3Cdefs/%3E%3Cpath%20d='M0%200c0%2027.594%2022.406%2050%2050%2050H0V0z'/%3E%3C/svg%3E\")}button[role=tab][aria-selected=true] limel-icon{color:var(--limel-active-tab-color)}button[role=tab][aria-selected=true] span.text{color:var(--limel-active-tab-color)}span.content{transition:box-shadow 0.2s ease;display:flex;flex-grow:1;min-width:0;align-items:center;justify-content:center;gap:0.375rem;padding:0 0.75rem;border-radius:calc(var(--limel-tab-border-radius) - var(--limel-tab-content-inset))}button[role=tab]:focus-visible span.content{transition-duration:0.3s;box-shadow:var(--shadow-depth-8-focused)}:host(limel-tab-bar:not([orientation=vertical])) button[role=tab]{max-width:var(--tab-bar-horizontal-tab-max-width, 16rem)}:host(limel-tab-bar:not([orientation=vertical])) button[role=tab]:not([aria-selected=true]):after{content:\"\";display:block;background-color:var(--limel-tab-separator-background-color);width:var(--limel-tab-separator-width);height:1rem;margin:auto;position:absolute;top:0;bottom:0;border-radius:1rem;right:calc(-1 * var(--limel-tab-separator-width))}:host(limel-tab-bar:not([orientation=vertical])) limel-scroller>:last-child:not([aria-selected=true]):after,:host(limel-tab-bar:not([orientation=vertical])) limel-scroller>:last-child>button[role=tab]:not([aria-selected=true]):after{display:none}:host(limel-tab-bar:not([orientation=vertical])) button[role=tab][aria-selected=true]{border-radius:var(--limel-tab-border-radius) var(--limel-tab-border-radius) 0 0}:host(limel-tab-bar:not([orientation=vertical])) button[role=tab][aria-selected=true]:before,:host(limel-tab-bar:not([orientation=vertical])) button[role=tab][aria-selected=true]:after{bottom:0}:host(limel-tab-bar:not([orientation=vertical])) button[role=tab][aria-selected=true]:before{left:calc(-1 * var(--limel-tab-active-outer-edge-curve-size));transform:rotateY(180deg)}:host(limel-tab-bar:not([orientation=vertical])) button[role=tab][aria-selected=true]:after{right:calc(-1 * var(--limel-tab-active-outer-edge-curve-size))}:host(limel-tab-bar[orientation=vertical]){width:var(--tab-bar-vertical-width, 10rem)}:host(limel-tab-bar[orientation=vertical]) div[role=tablist]{height:100%}:host(limel-tab-bar[orientation=vertical]) limel-scroller{--limel-scroller-content-padding:var( --limel-tab-active-outer-edge-curve-size ) 0 var(--limel-tab-active-outer-edge-curve-size) 0.25rem;height:100%}:host(limel-tab-bar[orientation=vertical]) button[role=tab][aria-selected=true]{border-radius:var(--limel-tab-border-radius) 0 0 var(--limel-tab-border-radius)}:host(limel-tab-bar[orientation=vertical]) button[role=tab][aria-selected=true]:before,:host(limel-tab-bar[orientation=vertical]) button[role=tab][aria-selected=true]:after{right:0}:host(limel-tab-bar[orientation=vertical]) button[role=tab][aria-selected=true]:before{bottom:100%;transform:rotateY(180deg)}:host(limel-tab-bar[orientation=vertical]) button[role=tab][aria-selected=true]:after{top:100%;transform:rotate(180deg)}:host(limel-tab-bar[orientation=vertical]) span.content{justify-content:flex-start}:host(limel-tab-bar[orientation=vertical]) span.text{flex-grow:1}";export{z as limel_tab_bar}
1
+ import{r as t,c as e,h as r,a as i}from"./p-BU9IJqli.js";import{i as o}from"./p-Cu9Ji1iJ.js";import{g as a,b as l}from"./p-CgNJbSP4.js";import{A as n,b as s,H as c,e as d,c as b,d as h}from"./p-Bu6-QXrA.js";import{a as u,b as m,i as v,c as p,D as g}from"./p-DdnBHYb-.js";import{S as f,c as w}from"./p-DeIIlp6m.js";import"./p-CK4jS9_E.js";import"./p-9W8bTt2G.js";import"./p-DbBZn7JO.js";import"./p-BcJ-TDVt.js";import"./p-BJQylLSL.js";import"./p-DK0pjX-Y.js";import"./p-oiMYqRQ0.js";import"./p-BYfPV0O4.js";import"./p-B8VKuhvH.js";import"./p-CZ30nDJE.js";import"./p-B--C3qwe.js";var x=m((function(t,e){return v(t)?function(t,e){var r=-1,i=u,o=!0,a=t.length,l=[],n=e.length;if(!a)return l;e.length>=200&&(i=w,o=!1,e=new f(e));t:for(;++r<a;){var s=t[r],c=s;if(s=0!==s?s:0,o&&c==c){for(var d=n;d--;)if(e[d]===c)continue t;l.push(s)}else i(e,c,undefined)||l.push(s)}return l}(t,p(e,1,v)):[]}));const k={horizontal:new Map([[b,"previous"],[h,"next"],[c,"first"],[d,"last"]]),vertical:new Map([[n,"previous"],[s,"next"],[c,"first"],[d,"last"]])};function j(t,e){return t>=0&&t<e}function y(t,e){return r=>{var i;return!(null===(i=null==e?void 0:e.isDisabled)||void 0===i?void 0:i.call(e,t[r]))}}function C(t,e,r,i,o){for(let a=0;a<t;a+=1){const l=e+r*a;if(!i&&!j(l,t))break;const n=(l%t+t)%t;if(o(n))return n}return-1}const z=class{constructor(r){t(this,r),this.changeTab=e(this,"changeTab",7),this.reorderTab=e(this,"reorderTab",7),this.tabs=[],this.orientation="horizontal",this.allowTabReorder=!1,this.hasLoaded=!1,this.isLaidOutAgain=!1,this.renderedTabs=[],this.handleReorder=t=>{const e=function(t,e){const{order:r,fromIndex:i,toIndex:a}=e,l=e=>e>=0&&e<t.length;if(!l(i)||!l(a))return;const n=[...r];return n.splice(i,0,...n.splice(a,1)),o(n,t.map((({id:t})=>String(t))))?{tab:t[i],fromIndex:i,toIndex:a}:void 0}(this.tabs,t);if(!e)return;const r=this.tabs.map((({id:t})=>t));r.splice(e.toIndex,0,...r.splice(e.fromIndex,1)),this.tabIdsAfterReorder=r,this.reorderTab.emit(e)},this.handleKeyDown=this.handleKeyDown.bind(this)}async connectedCallback(){this.hasLoaded&&(this.revealedTabId=void 0,this.setUpReordering(),await this.revealActiveTab("auto"))}disconnectedCallback(){var t;null===(t=this.dragToReorder)||void 0===t||t.teardown()}componentDidLoad(){this.hasLoaded=!0,this.triggerIconColorWarning()}componentWillRender(){var t;const e=this.getTabElements().indexOf(this.host.shadowRoot.activeElement);this.tabWithFocus=-1===e?void 0:{id:null===(t=this.renderedTabs[e])||void 0===t?void 0:t.id,button:this.getTabElements()[e]}}async componentDidRender(){this.restoreFocus(),this.renderedTabs=this.tabs,this.setUpReordering();const t=this.isLaidOutAgain;this.isLaidOutAgain=!1,await this.revealActiveTab(!this.hasLoaded||t?"auto":void 0,t)}render(){const t=function(t,e,r){const i=t.length,o=y(t,r);return j(e,i)&&o(e)?e:C(i,0,1,!1,o)}(this.tabs,this.tabs.findIndex((t=>t.active)),this.getNavigationOptions());return r("div",{key:"dc7667c302c9f0e6646fde68910a7db307df4981",role:"tablist","aria-orientation":this.getOrientation(),onKeyDown:this.handleKeyDown},r("limel-scroller",{key:"bedbb5b569822a394582a7f1c3e108206d230912",orientation:this.getOrientation()},this.tabs.map(((e,r)=>this.renderTabOrMovableTab(e,r,r===t)))))}tabsChanged(t=[],e=[]){const r=t.map((t=>t.id)),i=e.map((t=>t.id));if(o(r,i))return;const a=this.tabIdsAfterReorder;this.tabIdsAfterReorder=void 0,o(r,a)||(this.revealedTabId=void 0)}orientationChanged(){this.revealedTabId=void 0,this.isLaidOutAgain=!0}getOrientation(){return"vertical"===this.orientation?"vertical":"horizontal"}getNavigationOptions(){return{orientation:this.getOrientation(),wrap:!0}}restoreFocus(){var t;const e=this.tabWithFocus;if(this.tabWithFocus=void 0,!e||e.button.isConnected)return;const r=this.tabs.findIndex((t=>t.id===e.id));null===(t=this.getTabElements()[r])||void 0===t||t.focus()}getTabElements(){return[...this.host.shadowRoot.querySelectorAll('button[role="tab"]')]}canReorderTabs(){return this.allowTabReorder&&this.tabs.length>1}setUpReordering(){var t,e;if(!this.canReorderTabs())return void(null===(t=this.dragToReorder)||void 0===t||t.teardown());const r=this.host.shadowRoot.querySelector("limel-scroller");r&&(null!==(e=this.dragToReorder)&&void 0!==e||(this.dragToReorder=new g({draggable:"[data-reorder-id]",revertDrop:!0,onReorder:this.handleReorder})),this.dragToReorder.setup(r,this.getOrientation()))}async revealActiveTab(t,e=!1){const r=this.tabs.findIndex((t=>t.active));if(-1===r)return void(this.revealedTabId=void 0);if(this.tabs[r].id===this.revealedTabId)return;this.revealedTabId=this.tabs[r].id;const i=this.getTabElements()[r],o=this.host.shadowRoot.querySelector("limel-scroller");i&&o&&(i.matches(":focus")&&!e||(await o.componentOnReady(),await o.reveal(i,t)))}handleKeyDown(t){const e=this.getNavigationOptions();if(!function(t,e){return!(t.altKey||t.ctrlKey||t.metaKey)&&k[e.orientation].has(t.key)}(t,e))return;const r=this.getTabElements().indexOf(t.target);-1!==r&&(t.preventDefault(),this.activateTab(function(t,e,r,i){const o=k[i.orientation].get(e),a=t.length,l=y(t,i),n=C(a,0,1,!1,l);if(!o||-1===n)return-1;if("first"===o)return n;const s=C(a,a-1,-1,!1,l);if("last"===o)return s;if(!j(r,a))return"next"===o?n:s;const c="next"===o?1:-1,d=C(a,r+c,c,Boolean(i.wrap),l);return-1===d?r:d}(this.tabs,t.key,r,e)))}activateTab(t){if(-1===t)return;if(this.getTabElements()[t].focus(),t===this.tabs.findIndex((t=>t.active)))return;const e=function(t,e){const r=t.findIndex((t=>!0===t.active)),i=[...t];return-1!==r&&(i[r]=Object.assign(Object.assign({},t[r]),{active:!1})),i[e]=Object.assign(Object.assign({},t[e]),{active:!0}),i}(this.tabs,t),r=x(e,this.tabs).sort(this.sortByInactive);for(const t of r)this.changeTab.emit(t);this.tabs=e}sortByInactive(t,e){return Number(t.active)-Number(e.active)}renderIcon(t){if(!t.icon)return;const e=a(t.icon),i=l(t.icon,t.iconColor),o={color:""};return i&&(o.color=i),r("limel-icon",{name:e,style:o,size:"small","aria-hidden":"true"})}renderTabOrMovableTab(t,e,i){return this.canReorderTabs()?r("div",{key:t.id,role:"presentation","data-reorder-id":t.id},this.renderTab(t,e,i),r("limel-drag-handle",{"aria-hidden":"true",dragDirection:this.getOrientation(),tooltipOpenDirection:"vertical"===this.getOrientation()?"right":"bottom"})):this.renderTab(t,e,i)}renderTab(t,e,i){return r("button",{key:t.id,role:"tab","aria-selected":t.active?"true":"false",tabindex:i?0:-1,onClick:()=>this.activateTab(e)},r("span",{class:"content"},this.renderIcon(t),r("span",{class:"text"},t.text),t.badge?r("limel-badge",{label:t.badge}):""))}triggerIconColorWarning(){this.tabs.some((t=>t.iconColor))&&console.warn("The `iconColor` prop is deprecated now! Use the new `Icon` interface and instead of `iconColor: 'color-name'` write `icon {name: 'icon-name', color: 'color-name'}`.")}get host(){return i(this)}static get watchers(){return{tabs:[{tabsChanged:0}],orientation:[{orientationChanged:0}]}}};z.style="@charset \"UTF-8\";:host(limel-tab-bar){--limel-tab-background-color:var(--contrast-300);--limel-tab-border-radius:0.625rem;--limel-tab-content-inset:0.25rem;--limel-active-tab-background-color:var( --tab-panel-background-color, rgb(var(--contrast-100)) );--limel-active-tab-color:var( --lime-primary-color, var(--limel-theme-primary-color) );--limel-tab-active-outer-edge-curve-size:0.75rem;--limel-tab-separator-width:0.125rem;--limel-tab-separator-background-color:rgb(var(--contrast-600));isolation:isolate;display:block;position:relative}limel-scroller{--limel-scroller-fade-color:var(--limel-tab-background-color);--limel-scroller-content-padding:0.25rem var(--limel-tab-active-outer-edge-curve-size) 0;background-color:rgb(var(--limel-tab-background-color))}:host(.has-tabs-with-equal-width:not([orientation=vertical])) button[role=tab],:host(.has-tabs-with-equal-width:not([orientation=vertical])) limel-scroller>div{flex:1 0 auto;max-width:var(--tab-bar-horizontal-tab-max-width, none)}limel-scroller>div:has(limel-drag-handle:hover),limel-scroller>div:has(limel-drag-handle:focus-within),limel-scroller>div.is-elevated,limel-scroller>div.sortable-chosen{will-change:transform, box-shadow, border-radius, background-color}limel-scroller>div.sortable-ghost{border-radius:0.5rem;box-shadow:var(--shadow-depth-64), 0 0.65rem 0.75rem -0.425rem rgb(var(--color-black), 0.3)}limel-scroller>div.sortable-chosen{border-radius:0.5rem;background-color:var(--lime-elevated-surface-background-color)}limel-scroller>div.is-elevated[draggable=false]{animation:sit-here 0.8s forwards}@keyframes sit-here{0%{border-radius:0.5rem;background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--shadow-depth-64), 0 0.65rem 0.75rem -0.425rem rgb(var(--color-black), 0.3)}100%{box-shadow:none}}limel-scroller>div{position:relative;display:flex;flex:0 0 auto}limel-scroller>div button[role=tab]{flex:1 1 auto;min-width:0}limel-scroller>div span.content{padding-right:2rem}limel-scroller>div limel-drag-handle{position:absolute;z-index:3;top:0;bottom:0;right:0.25rem}button[role=tab]{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;position:relative;display:flex;box-sizing:border-box;border-radius:0;padding:var(--limel-tab-content-inset);min-width:2.5rem;background-color:transparent;flex:0 0 auto;height:2.5rem;outline:none;cursor:pointer;white-space:nowrap;font-size:var(--limel-theme-default-font-size)}button[role=tab] limel-icon{transition:color 0.2s ease;color:rgb(var(--contrast-800));margin-left:-0.25rem;flex-shrink:0}button[role=tab] span.text{transition:color 0.2s ease;line-height:1.25;overflow:hidden;text-overflow:ellipsis;color:var(--limel-theme-on-surface-color)}button[role=tab]:hover span.text{color:var(--limel-theme-text-primary-on-background-color)}button[role=tab] limel-badge{margin-right:-0.25rem;box-shadow:0 0 0 1px rgb(var(--contrast-600));pointer-events:none;flex-shrink:0}button[role=tab][aria-selected=true]{background-color:var(--limel-active-tab-background-color);z-index:2}button[role=tab][aria-selected=true]:before,button[role=tab][aria-selected=true]:after{content:\"\";display:block;width:var(--limel-tab-active-outer-edge-curve-size);height:var(--limel-tab-active-outer-edge-curve-size);position:absolute;background-color:var(--limel-active-tab-background-color);-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20stroke-linejoin='round'%20stroke-miterlimit='2'%20clip-rule='evenodd'%20viewBox='0%200%2050%2050'%3E%3Cdefs/%3E%3Cpath%20d='M0%200c0%2027.594%2022.406%2050%2050%2050H0V0z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20stroke-linejoin='round'%20stroke-miterlimit='2'%20clip-rule='evenodd'%20viewBox='0%200%2050%2050'%3E%3Cdefs/%3E%3Cpath%20d='M0%200c0%2027.594%2022.406%2050%2050%2050H0V0z'/%3E%3C/svg%3E\")}button[role=tab][aria-selected=true] limel-icon{color:var(--limel-active-tab-color)}button[role=tab][aria-selected=true] span.text{color:var(--limel-active-tab-color)}span.content{transition:box-shadow 0.2s ease;display:flex;flex-grow:1;min-width:0;align-items:center;justify-content:center;gap:0.375rem;padding:0 0.75rem;border-radius:calc(var(--limel-tab-border-radius) - var(--limel-tab-content-inset))}button[role=tab]:focus-visible span.content{transition-duration:0.3s;box-shadow:var(--shadow-depth-8-focused)}:host(limel-tab-bar:not([orientation=vertical])) button[role=tab]{max-width:var(--tab-bar-horizontal-tab-max-width, 16rem)}:host(limel-tab-bar:not([orientation=vertical])) button[role=tab]:not([aria-selected=true]):after{content:\"\";display:block;background-color:var(--limel-tab-separator-background-color);width:var(--limel-tab-separator-width);height:1rem;margin:auto;position:absolute;top:0;bottom:0;border-radius:1rem;right:calc(-1 * var(--limel-tab-separator-width))}:host(limel-tab-bar:not([orientation=vertical])) limel-scroller>:last-child:not([aria-selected=true]):after,:host(limel-tab-bar:not([orientation=vertical])) limel-scroller>:last-child>button[role=tab]:not([aria-selected=true]):after{display:none}:host(limel-tab-bar:not([orientation=vertical])) button[role=tab][aria-selected=true]{border-radius:var(--limel-tab-border-radius) var(--limel-tab-border-radius) 0 0}:host(limel-tab-bar:not([orientation=vertical])) button[role=tab][aria-selected=true]:before,:host(limel-tab-bar:not([orientation=vertical])) button[role=tab][aria-selected=true]:after{bottom:0}:host(limel-tab-bar:not([orientation=vertical])) button[role=tab][aria-selected=true]:before{left:calc(-1 * var(--limel-tab-active-outer-edge-curve-size));transform:rotateY(180deg)}:host(limel-tab-bar:not([orientation=vertical])) button[role=tab][aria-selected=true]:after{right:calc(-1 * var(--limel-tab-active-outer-edge-curve-size))}:host(limel-tab-bar[orientation=vertical]){width:var(--tab-bar-vertical-width, 10rem)}:host(limel-tab-bar[orientation=vertical]) div[role=tablist]{height:100%}:host(limel-tab-bar[orientation=vertical]) limel-scroller{--limel-scroller-content-padding:var( --limel-tab-active-outer-edge-curve-size ) 0 var(--limel-tab-active-outer-edge-curve-size) 0.25rem;height:100%}:host(limel-tab-bar[orientation=vertical]) button[role=tab][aria-selected=true]{border-radius:var(--limel-tab-border-radius) 0 0 var(--limel-tab-border-radius)}:host(limel-tab-bar[orientation=vertical]) button[role=tab][aria-selected=true]:before,:host(limel-tab-bar[orientation=vertical]) button[role=tab][aria-selected=true]:after{right:0}:host(limel-tab-bar[orientation=vertical]) button[role=tab][aria-selected=true]:before{bottom:100%;transform:rotateY(180deg)}:host(limel-tab-bar[orientation=vertical]) button[role=tab][aria-selected=true]:after{top:100%;transform:rotate(180deg)}:host(limel-tab-bar[orientation=vertical]) span.content{justify-content:flex-start}:host(limel-tab-bar[orientation=vertical]) span.text{flex-grow:1}";export{z as limel_tab_bar}
@@ -1 +1 @@
1
- import{r as t,c as e,h as i,H as r}from"./p-BU9IJqli.js";import{i as o}from"./p-Bkvc4sus.js";import{g as s}from"./p-CgNJbSP4.js";import{t as a}from"./p-w3yKYfBQ.js";import{c as l}from"./p-BrjD-ITe.js";import{r as n}from"./p-Dv2HOgWN.js";import{I as h}from"./p-N9vxZMhe.js";import"./p-BCq5M9TE.js";import"./p-Bu_YRgCL.js";import"./p-ChagAaNf.js";const c=class{constructor(r){t(this,r),this.change=e(this,"change",7),this.filesRejected=e(this,"filesRejected",7),this.language="en",this.icon="user",this.disabled=!1,this.readonly=!1,this.required=!1,this.invalid=!1,this.loading=!1,this.imageFit="cover",this.accept="image/jpeg,image/png,image/heic,.jpg,.jpeg,.png,.heic",this.imageError=!1,this.isErrorMessagePopoverOpen=!1,this.removeButtonId=l(),this.browseButtonId=l(),this.renderHelperText=()=>{if(this.helperText)return i("limel-tooltip",{elementId:this.browseButtonId,label:this.helperText})},this.handleNewFiles=async t=>{var e,i,r,s;if(t.stopPropagation(),this.disabled)return;const a=null===(e=t.detail)||void 0===e?void 0:e[0];if(!a)return;if(!o(a,this.accept))return void this.filesRejected.emit([a]);this.revokeObjectUrl(),this.imageError=!1;let l=a;if(this.resize&&a.fileContent instanceof File)try{const t=await n(a.fileContent,Object.assign(Object.assign({},this.resize),{fit:null!==(i=this.resize.fit)&&void 0!==i?i:this.imageFit,type:null!==(r=this.resize.type)&&void 0!==r?r:"image/jpeg",quality:null!==(s=this.resize.quality)&&void 0!==s?s:.85}));l=Object.assign(Object.assign({},a),{filename:t.name,size:t.size,contentType:t.type,fileContent:t})}catch(t){l=a}!l.href&&l.fileContent instanceof File&&(this.objectUrl=URL.createObjectURL(l.fileContent)),this.change.emit(l)},this.handleRejectedFiles=t=>{t.stopPropagation(),this.filesRejected.emit(t.detail)},this.handleClear=t=>{t.stopPropagation(),this.revokeObjectUrl(),this.imageError=!1,this.change.emit(void 0)},this.onImageError=()=>{this.imageError=!0},this.openPopover=t=>{t.stopPropagation(),this.isErrorMessagePopoverOpen=!0},this.onPopoverClose=t=>{t.stopPropagation(),this.isErrorMessagePopoverOpen=!1},this.getTranslation=t=>a.get(t,this.language)}disconnectedCallback(){this.revokeObjectUrl()}handleValueChange(){this.revokeObjectUrl(),this.imageError=!1;const t=this.value;t&&"string"!=typeof t&&!t.href&&t.fileContent instanceof File&&(this.objectUrl=URL.createObjectURL(t.fileContent))}render(){const t={"has-image-error":this.imageError};return this.readonly?i(r,{class:t},this.renderAvatar()):i(r,{class:t},i("limel-file-dropzone",{disabled:this.disabled,accept:this.accept,onFilesSelected:this.handleNewFiles,onFilesRejected:this.handleRejectedFiles},i("limel-file-input",{accept:this.accept,disabled:this.disabled,"aria-required":this.required?"true":void 0,"aria-invalid":this.invalid?"true":void 0},this.renderBrowseButton())),this.renderClearButton(),this.renderSpinner(),this.renderErrorMessage(),this.renderHelperText())}get hasValue(){return"string"==typeof this.value?!!this.value:!(!this.value||!this.value.href&&!this.value.fileContent)||!!this.objectUrl}renderBrowseButton(){return i("button",{id:this.browseButtonId,type:"button",class:"avatar",disabled:this.disabled,"aria-label":this.label,"aria-busy":this.loading?"true":"false","aria-live":"polite"},this.renderAvatar())}renderAvatar(){const t=this.getImageSrc();return t?i(h,{image:{src:t,alt:"",referrerpolicy:"no-referrer"},style:{"--limel-profile-picture-object-fit":this.imageFit},onError:this.onImageError}):this.renderIcon()}renderIcon(){var t,e;const r=s(this.icon);return i("limel-icon",{name:r,style:{color:`${null===(t=this.icon)||void 0===t?void 0:t.color}`,"background-color":`${null===(e=this.icon)||void 0===e?void 0:e.backgroundColor}`}})}renderClearButton(){if(this.hasValue&&!this.disabled)return[i("button",{class:"remove",type:"button",id:this.removeButtonId,onClick:this.handleClear}),i("limel-tooltip",{label:this.getTranslation("profile-picture.remove"),elementId:this.removeButtonId})]}renderSpinner(){if(this.loading)return i("limel-spinner",null)}getUnsupportedPreviewContext(){const t=this.value;return{hasNoSrc:!this.getImageSrc(),hasLocalFile:!(!(t&&"string"!=typeof t&&t.fileContent instanceof File)||t.href),isResizeConfigured:!!this.resize}}shouldShowErrorMessage(){const{hasNoSrc:t,hasLocalFile:e,isResizeConfigured:i}=this.getUnsupportedPreviewContext();return(t||this.imageError)&&e&&i}renderErrorMessage(){if(this.shouldShowErrorMessage())return i("limel-popover",{open:this.isErrorMessagePopoverOpen,onClick:this.openPopover,onClose:this.onPopoverClose},i("limel-icon-button",{slot:"trigger",elevated:!0,icon:{name:"error",color:"rgb(var(--color-orange-dark))"},"aria-live":"polite",label:this.getTranslation("profile-picture.unsupported-preview.title")}),i("limel-callout",{type:"warning",style:{maxWidth:"20rem",borderRadius:"0.75rem"},heading:this.getTranslation("profile-picture.unsupported-preview.title")},this.getTranslation("profile-picture.unsupported-preview.description")))}getImageSrc(){return this.value?"string"==typeof this.value?this.value:this.value.href?this.value.href:this.value.fileContent instanceof File?this.objectUrl:void 0:this.objectUrl}revokeObjectUrl(){this.objectUrl&&(URL.revokeObjectURL(this.objectUrl),this.objectUrl=void 0)}static get watchers(){return{value:[{handleValueChange:0}]}}};c.style="@charset \"UTF-8\";:host(limel-profile-picture){position:relative;display:inline-flex;min-width:1.5rem;min-height:1.5rem;border-radius:var(--profile-picture-border-radius, 100vw);background-color:rgb(var(--contrast-400))}*{box-sizing:border-box}limel-file-dropzone,limel-file-input,button.avatar{display:flex;align-items:center;justify-content:center;width:100%;height:100%}button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;display:block}button:focus{outline:none}button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.avatar{overflow:hidden;border-radius:var(--profile-picture-border-radius, 100vw)}:host(:not([disabled]):not([disabled=true])) button.avatar{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent}:host(:not([disabled]):not([disabled=true])) button.avatar:hover,:host(:not([disabled]):not([disabled=true])) button.avatar:focus,:host(:not([disabled]):not([disabled=true])) button.avatar:focus-visible{will-change:color, background-color, box-shadow, transform}:host(:not([disabled]):not([disabled=true])) button.avatar:hover,:host(:not([disabled]):not([disabled=true])) button.avatar:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}:host(:not([disabled]):not([disabled=true])) button.avatar:hover{box-shadow:var(--button-shadow-hovered)}:host(:not([disabled]):not([disabled=true])) button.avatar:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}:host(:not([disabled]):not([disabled=true])) button.avatar:hover,:host(:not([disabled]):not([disabled=true])) button.avatar:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}:host([invalid]:not([invalid=false])) button.avatar{box-shadow:var(--shadow-error-state)}button.remove{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:rgb(var(--contrast-900))}button.remove:hover,button.remove:focus,button.remove:focus-visible{will-change:color, background-color, box-shadow, transform}button.remove:hover,button.remove:focus-visible{transform:translate3d(0, 0.01rem, 0);color:rgb(var(--color-white));background-color:rgb(var(--color-red-default))}button.remove:hover{box-shadow:var(--button-shadow-hovered)}button.remove:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.remove:hover,button.remove:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.remove{cursor:pointer;height:1.25rem;width:1.25rem;border-radius:50%;background-repeat:no-repeat;background-position:center;background-size:0.75rem;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3E%3Cdefs/%3E%3Cpath%20fill='rgb(255,255,255)'%20d='M7.219%205.781L5.78%207.22%2014.563%2016%205.78%2024.781%207.22%2026.22%2016%2017.437l8.781%208.782%201.438-1.438L17.437%2016l8.782-8.781L24.78%205.78%2016%2014.563z'/%3E%3C/svg%3E\");position:absolute;top:0;left:0;opacity:0}:host(:hover) button.remove,:host(:focus) button.remove,:host(:focus-visible) button.remove,:host(:focus-within) button.remove,:host(:active) button.remove{animation:show 0.4s ease-in-out forwards}@keyframes show{0%{transform:scale(0.9);opacity:0}100%{transform:scale(1);opacity:1}}button.avatar,img,limel-icon{border-radius:var(--profile-picture-border-radius, 100vw)}limel-icon{width:calc(100% - 1rem);min-width:1rem;max-width:4rem;color:var(--limel-theme-text-secondary-on-background-color);margin:auto}img{object-fit:var(--limel-profile-picture-object-fit);width:100%;height:100%}:host(.has-image-error) img{border:1px dashed rgb(var(--contrast-600));background:url(\"data:image/svg+xml;charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' style='fill-rule:evenodd;'><path fill='rgba(186,186,192,0.16)' d='M0 0h4v4H0zM4 4h4v4H4z'/></svg>\");background-size:0.5rem}limel-spinner{position:absolute;inset:0;margin:auto}limel-popover{position:absolute;inset:auto 0 0 auto;display:block;width:2.25rem;height:2.25rem}";export{c as limel_profile_picture}
1
+ import{r as t,c as e,h as i,H as r}from"./p-BU9IJqli.js";import{i as o}from"./p-Bkvc4sus.js";import{g as s}from"./p-CgNJbSP4.js";import{t as a}from"./p-B26k4gw8.js";import{c as l}from"./p-BrjD-ITe.js";import{r as n}from"./p-Dv2HOgWN.js";import{I as h}from"./p-N9vxZMhe.js";import"./p-BCq5M9TE.js";import"./p-Bu_YRgCL.js";import"./p-ChagAaNf.js";const c=class{constructor(r){t(this,r),this.change=e(this,"change",7),this.filesRejected=e(this,"filesRejected",7),this.language="en",this.icon="user",this.disabled=!1,this.readonly=!1,this.required=!1,this.invalid=!1,this.loading=!1,this.imageFit="cover",this.accept="image/jpeg,image/png,image/heic,.jpg,.jpeg,.png,.heic",this.imageError=!1,this.isErrorMessagePopoverOpen=!1,this.removeButtonId=l(),this.browseButtonId=l(),this.renderHelperText=()=>{if(this.helperText)return i("limel-tooltip",{elementId:this.browseButtonId,label:this.helperText})},this.handleNewFiles=async t=>{var e,i,r,s;if(t.stopPropagation(),this.disabled)return;const a=null===(e=t.detail)||void 0===e?void 0:e[0];if(!a)return;if(!o(a,this.accept))return void this.filesRejected.emit([a]);this.revokeObjectUrl(),this.imageError=!1;let l=a;if(this.resize&&a.fileContent instanceof File)try{const t=await n(a.fileContent,Object.assign(Object.assign({},this.resize),{fit:null!==(i=this.resize.fit)&&void 0!==i?i:this.imageFit,type:null!==(r=this.resize.type)&&void 0!==r?r:"image/jpeg",quality:null!==(s=this.resize.quality)&&void 0!==s?s:.85}));l=Object.assign(Object.assign({},a),{filename:t.name,size:t.size,contentType:t.type,fileContent:t})}catch(t){l=a}!l.href&&l.fileContent instanceof File&&(this.objectUrl=URL.createObjectURL(l.fileContent)),this.change.emit(l)},this.handleRejectedFiles=t=>{t.stopPropagation(),this.filesRejected.emit(t.detail)},this.handleClear=t=>{t.stopPropagation(),this.revokeObjectUrl(),this.imageError=!1,this.change.emit(void 0)},this.onImageError=()=>{this.imageError=!0},this.openPopover=t=>{t.stopPropagation(),this.isErrorMessagePopoverOpen=!0},this.onPopoverClose=t=>{t.stopPropagation(),this.isErrorMessagePopoverOpen=!1},this.getTranslation=t=>a.get(t,this.language)}disconnectedCallback(){this.revokeObjectUrl()}handleValueChange(){this.revokeObjectUrl(),this.imageError=!1;const t=this.value;t&&"string"!=typeof t&&!t.href&&t.fileContent instanceof File&&(this.objectUrl=URL.createObjectURL(t.fileContent))}render(){const t={"has-image-error":this.imageError};return this.readonly?i(r,{class:t},this.renderAvatar()):i(r,{class:t},i("limel-file-dropzone",{disabled:this.disabled,accept:this.accept,onFilesSelected:this.handleNewFiles,onFilesRejected:this.handleRejectedFiles},i("limel-file-input",{accept:this.accept,disabled:this.disabled,"aria-required":this.required?"true":void 0,"aria-invalid":this.invalid?"true":void 0},this.renderBrowseButton())),this.renderClearButton(),this.renderSpinner(),this.renderErrorMessage(),this.renderHelperText())}get hasValue(){return"string"==typeof this.value?!!this.value:!(!this.value||!this.value.href&&!this.value.fileContent)||!!this.objectUrl}renderBrowseButton(){return i("button",{id:this.browseButtonId,type:"button",class:"avatar",disabled:this.disabled,"aria-label":this.label,"aria-busy":this.loading?"true":"false","aria-live":"polite"},this.renderAvatar())}renderAvatar(){const t=this.getImageSrc();return t?i(h,{image:{src:t,alt:"",referrerpolicy:"no-referrer"},style:{"--limel-profile-picture-object-fit":this.imageFit},onError:this.onImageError}):this.renderIcon()}renderIcon(){var t,e;const r=s(this.icon);return i("limel-icon",{name:r,style:{color:`${null===(t=this.icon)||void 0===t?void 0:t.color}`,"background-color":`${null===(e=this.icon)||void 0===e?void 0:e.backgroundColor}`}})}renderClearButton(){if(this.hasValue&&!this.disabled)return[i("button",{class:"remove",type:"button",id:this.removeButtonId,onClick:this.handleClear}),i("limel-tooltip",{label:this.getTranslation("profile-picture.remove"),elementId:this.removeButtonId})]}renderSpinner(){if(this.loading)return i("limel-spinner",null)}getUnsupportedPreviewContext(){const t=this.value;return{hasNoSrc:!this.getImageSrc(),hasLocalFile:!(!(t&&"string"!=typeof t&&t.fileContent instanceof File)||t.href),isResizeConfigured:!!this.resize}}shouldShowErrorMessage(){const{hasNoSrc:t,hasLocalFile:e,isResizeConfigured:i}=this.getUnsupportedPreviewContext();return(t||this.imageError)&&e&&i}renderErrorMessage(){if(this.shouldShowErrorMessage())return i("limel-popover",{open:this.isErrorMessagePopoverOpen,onClick:this.openPopover,onClose:this.onPopoverClose},i("limel-icon-button",{slot:"trigger",elevated:!0,icon:{name:"error",color:"rgb(var(--color-orange-dark))"},"aria-live":"polite",label:this.getTranslation("profile-picture.unsupported-preview.title")}),i("limel-callout",{type:"warning",style:{maxWidth:"20rem",borderRadius:"0.75rem"},heading:this.getTranslation("profile-picture.unsupported-preview.title")},this.getTranslation("profile-picture.unsupported-preview.description")))}getImageSrc(){return this.value?"string"==typeof this.value?this.value:this.value.href?this.value.href:this.value.fileContent instanceof File?this.objectUrl:void 0:this.objectUrl}revokeObjectUrl(){this.objectUrl&&(URL.revokeObjectURL(this.objectUrl),this.objectUrl=void 0)}static get watchers(){return{value:[{handleValueChange:0}]}}};c.style="@charset \"UTF-8\";:host(limel-profile-picture){position:relative;display:inline-flex;min-width:1.5rem;min-height:1.5rem;border-radius:var(--profile-picture-border-radius, 100vw);background-color:rgb(var(--contrast-400))}*{box-sizing:border-box}limel-file-dropzone,limel-file-input,button.avatar{display:flex;align-items:center;justify-content:center;width:100%;height:100%}button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;display:block}button:focus{outline:none}button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.avatar{overflow:hidden;border-radius:var(--profile-picture-border-radius, 100vw)}:host(:not([disabled]):not([disabled=true])) button.avatar{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent}:host(:not([disabled]):not([disabled=true])) button.avatar:hover,:host(:not([disabled]):not([disabled=true])) button.avatar:focus,:host(:not([disabled]):not([disabled=true])) button.avatar:focus-visible{will-change:color, background-color, box-shadow, transform}:host(:not([disabled]):not([disabled=true])) button.avatar:hover,:host(:not([disabled]):not([disabled=true])) button.avatar:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}:host(:not([disabled]):not([disabled=true])) button.avatar:hover{box-shadow:var(--button-shadow-hovered)}:host(:not([disabled]):not([disabled=true])) button.avatar:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}:host(:not([disabled]):not([disabled=true])) button.avatar:hover,:host(:not([disabled]):not([disabled=true])) button.avatar:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}:host([invalid]:not([invalid=false])) button.avatar{box-shadow:var(--shadow-error-state)}button.remove{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:rgb(var(--contrast-900))}button.remove:hover,button.remove:focus,button.remove:focus-visible{will-change:color, background-color, box-shadow, transform}button.remove:hover,button.remove:focus-visible{transform:translate3d(0, 0.01rem, 0);color:rgb(var(--color-white));background-color:rgb(var(--color-red-default))}button.remove:hover{box-shadow:var(--button-shadow-hovered)}button.remove:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.remove:hover,button.remove:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.remove{cursor:pointer;height:1.25rem;width:1.25rem;border-radius:50%;background-repeat:no-repeat;background-position:center;background-size:0.75rem;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3E%3Cdefs/%3E%3Cpath%20fill='rgb(255,255,255)'%20d='M7.219%205.781L5.78%207.22%2014.563%2016%205.78%2024.781%207.22%2026.22%2016%2017.437l8.781%208.782%201.438-1.438L17.437%2016l8.782-8.781L24.78%205.78%2016%2014.563z'/%3E%3C/svg%3E\");position:absolute;top:0;left:0;opacity:0}:host(:hover) button.remove,:host(:focus) button.remove,:host(:focus-visible) button.remove,:host(:focus-within) button.remove,:host(:active) button.remove{animation:show 0.4s ease-in-out forwards}@keyframes show{0%{transform:scale(0.9);opacity:0}100%{transform:scale(1);opacity:1}}button.avatar,img,limel-icon{border-radius:var(--profile-picture-border-radius, 100vw)}limel-icon{width:calc(100% - 1rem);min-width:1rem;max-width:4rem;color:var(--limel-theme-text-secondary-on-background-color);margin:auto}img{object-fit:var(--limel-profile-picture-object-fit);width:100%;height:100%}:host(.has-image-error) img{border:1px dashed rgb(var(--contrast-600));background:url(\"data:image/svg+xml;charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' style='fill-rule:evenodd;'><path fill='rgba(186,186,192,0.16)' d='M0 0h4v4H0zM4 4h4v4H4z'/></svg>\");background-size:0.5rem}limel-spinner{position:absolute;inset:0;margin:auto}limel-popover{position:absolute;inset:auto 0 0 auto;display:block;width:2.25rem;height:2.25rem}";export{c as limel_profile_picture}
@@ -0,0 +1 @@
1
+ import{r as e,c as o,h as t,H as r,a as i}from"./p-BU9IJqli.js";import{t as a}from"./p-B26k4gw8.js";import{A as s,b as n,c as l,d as c}from"./p-Bu6-QXrA.js";import"./p-ChagAaNf.js";const h={left:{axis:"x",cursor:"col-resize",direction:-1,growKey:l,shrinkKey:c},right:{axis:"x",cursor:"col-resize",direction:1,growKey:c,shrinkKey:l},top:{axis:"y",cursor:"row-resize",direction:-1,growKey:s,shrinkKey:n},bottom:{axis:"y",cursor:"row-resize",direction:1,growKey:n,shrinkKey:s}};function d(e){return"x"===h[e].axis?"vertical":"horizontal"}const p={activeDrags:0};function b(e){document.body.style.cursor=e.cursor,document.body.style.userSelect=e.userSelect}function m(e,o){let t,r,i,a=h.left,s=!1;const n=e=>"x"===a.axis?e.clientX:e.clientY,l=l=>{var c;void 0===t&&(l.preventDefault(),t=l.pointerId,s=!1,a=h[o.getLocation()],r=n(l),i=o.getSize(),e.setPointerCapture(l.pointerId),c=a.cursor,0===p.activeDrags&&(p.before={cursor:document.body.style.cursor,userSelect:document.body.style.userSelect}),p.activeDrags+=1,b({cursor:c,userSelect:"none"}))},c=e=>{e.pointerId===t&&(s=!0,o.resize(i+a.direction*(n(e)-r)))},d=e=>{e.pointerId===t&&(m(),s&&o.end())},m=()=>{void 0!==t&&(t=void 0,p.activeDrags-=1,0===p.activeDrags&&b(p.before))};return e.addEventListener("pointerdown",l),e.addEventListener("pointermove",c),e.addEventListener("pointerup",d),e.addEventListener("pointercancel",d),e.addEventListener("lostpointercapture",d),()=>{m(),e.removeEventListener("pointerdown",l),e.removeEventListener("pointermove",c),e.removeEventListener("pointerup",d),e.removeEventListener("pointercancel",d),e.removeEventListener("lostpointercapture",d)}}const v="separator",u=class{constructor(t){e(this,t),this.changeSize=o(this,"changeSize",1),this.endResize=o(this,"endResize",1),this.location="left",this.language="en",this.isPointerOver=!1,this.hasKeyboardFocus=!1,this.handlePointerEnter=()=>{this.isPointerOver=!0},this.handlePointerLeave=()=>{this.isPointerOver=!1},this.handleFocus=e=>{this.hasKeyboardFocus=e.currentTarget.matches(":focus-visible")},this.handleBlur=()=>{this.hasKeyboardFocus=!1},this.handleKeyDown=e=>{const o=function(e,o){const{growKey:t,shrinkKey:r}=h[e];return o===t?8:o===r?-8:void 0}(this.location,e.key);void 0!==o&&(e.preventDefault(),this.hasKeyboardFocus=!0,this.changeSize.emit(this.elementSize()+o),this.endResize.emit())},this.elementSize=()=>{return e=this.resizableElement(),"x"===h[this.location].axis?e.offsetWidth:e.offsetHeight;var e}}connectedCallback(){this.stopResizing=m(this.host,{getLocation:()=>this.location,getSize:this.elementSize,resize:e=>this.changeSize.emit(e),end:()=>this.endResize.emit()})}disconnectedCallback(){var e;null===(e=this.stopResizing)||void 0===e||e.call(this),this.stopResizing=void 0}render(){const e=this.getName();return t(r,{key:"a764146953b0d52a3a3b81450e8e1e65c90c5210",onKeyDown:this.handleKeyDown,onPointerEnter:this.handlePointerEnter,onPointerLeave:this.handlePointerLeave},t("div",{key:"0d65a5646d9ede0f310045cb2858c554210c001a",role:"separator",id:v,tabindex:"0","aria-orientation":d(this.location),"aria-label":e,"aria-valuenow":this.value,"aria-valuemin":this.min,"aria-valuemax":this.max,onFocus:this.handleFocus,onBlur:this.handleBlur},t("div",{key:"6c5d001384b9b7289c7a40c641c858c7c72de3ca",role:"presentation"},t("span",{key:"c43208aff2850d3e3ce439774e069d3bba23bdec"}),t("span",{key:"f30a64d1bde31ba4a6578d2cdb71ad742bc55ae6"}),t("span",{key:"6d6bac3ba8a6ad7cbdebc730084eed8a8df2f9a2"}))),t("limel-tooltip",{key:"9e2c59edf8223ff52a634e227855ca8b1b4d7664",elementId:v,label:e,helperLabel:this.getHint(),openDirection:this.location}))}getName(){return this.resizableRegionLabel?a.get("resize-handle.resize",this.language,{region:this.resizableRegionLabel}):a.get("resize-handle.resize-this-region",this.language)}getHint(){if(this.isPointerOver&&!this.hasKeyboardFocus)return a.get("resize-handle.drag",this.language);const e="vertical"===d(this.location)?"resize-handle.keys-left-right":"resize-handle.keys-up-down";return a.get(e,this.language)}resizableElement(){return this.host.parentElement?this.host.parentElement:this.host.getRootNode().host}static get delegatesFocus(){return!0}get host(){return i(this)}};u.style='@charset "UTF-8";:host(limel-resize-handle){position:absolute;z-index:1;touch-action:none}div[role=separator]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:100vh;outline:none}div[role=separator]::before,div[role=separator]::after{pointer-events:none;content:"";display:block;position:absolute;inset:0;border-radius:100vh;margin:auto}div[role=separator]::before{transition:scale 0.3s ease, opacity 0.3s ease;transition-delay:0.2s;opacity:0}div[role=separator]::after{transition:background-color 0.4s ease;transition-delay:0.2s;background-color:rgb(var(--contrast-600))}:host([location=top]),:host([location=bottom]){cursor:row-resize;height:var(--limel-resize-handle-thickness, 0.5rem) !important;right:0;left:0}:host([location=top]) div[role=separator]::before,:host([location=bottom]) div[role=separator]::before{scale:1 0.9;height:0.5rem;width:var(--limel-resize-handle-visual-length, auto)}:host([location=top]) div[role=separator]::after,:host([location=bottom]) div[role=separator]::after{height:0.125rem;width:var(--limel-resize-handle-visual-length, auto)}:host([location=top]){top:0}:host([location=top]) div[role=separator]::before{top:0;bottom:auto}:host([location=top]) div[role=separator]::after{top:calc((0.5rem - 0.125rem) / 2);bottom:auto}:host([location=bottom]){bottom:0}:host([location=bottom]) div[role=separator]::before{top:auto;bottom:0}:host([location=bottom]) div[role=separator]::after{top:auto;bottom:calc((0.5rem - 0.125rem) / 2)}:host([location=left]),:host([location=right]){cursor:col-resize;width:0.5rem;top:0;bottom:0}:host([location=left]) div[role=separator]::before,:host([location=right]) div[role=separator]::before{scale:0.9 1}:host([location=left]) div[role=separator]::after,:host([location=right]) div[role=separator]::after{width:0.125rem}:host([location=left]){left:0}:host([location=right]){right:0}:host(:hover) div[role=separator]::before,:host div[role=separator]:focus-visible::before{transition-duration:0.46s;transition-timing-function:ease-in;opacity:1;scale:1 1;background-color:rgb(var(--color-sky-light), 0.4)}:host(:hover) div[role=separator]::after,:host div[role=separator]:focus-visible::after{transition-duration:0.2s;transition-timing-function:ease-in;background-color:rgb(var(--color-sky-default))}div[role=presentation]{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);pointer-events:none;position:relative;z-index:1;display:flex;gap:0.25rem;align-items:center;justify-content:center;width:fit-content;padding:0.1875rem 0.25rem;border-radius:100vh;margin:auto;background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-pressed)}div[role=presentation] span{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);border-radius:0.125rem;width:0.25rem;height:0.125rem;background-color:rgb(var(--contrast-700))}:host([location=top]) div[role=presentation]{margin-top:0;margin-bottom:auto}:host([location=bottom]) div[role=presentation]{margin-top:auto;margin-bottom:0}div[role=separator][aria-orientation=vertical]>div[role=presentation]{rotate:90deg}:host(:hover),:host div[role=separator]:focus-visible{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}:host(:hover) div[role=presentation],:host div[role=separator]:focus-visible div[role=presentation]{will-change:background-color, box-shadow, transform;transform:translate3d(0, -0.04rem, 0);box-shadow:var(--button-shadow-normal)}:host(:hover) span,:host div[role=separator]:focus-visible span{will-change:background-color;background-color:var(--mdc-theme-primary)}';export{u as limel_resize_handle}
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,H as o,a as r}from"./p-BU9IJqli.js";import{t as a}from"./p-w3yKYfBQ.js";import{i as s}from"./p-CrvUOVvg.js";import{c as n}from"./p-BrjD-ITe.js";import{m as l,r as c}from"./p-CIf8aGSd.js";import{b as h,d,g as b}from"./p-CgNJbSP4.js";import"./p-ChagAaNf.js";const m=class{constructor(o){t(this,o),this.itemSelected=i(this,"itemSelected",7),this.actions=[],this.language="en",this.collapsible=!1,this.overflowCutoff=this.actions.length,this.hasRendered=!1,this.isFirstIntersectionCheck=!0,this.actionBarItems=[],this.renderActionBarItem=(t,i)=>e("limel-action-bar-item",{item:t,onSelect:this.handleSelect,isVisible:this.isVisible(i),role:"gridcell"}),this.renderOverflowMenu=t=>{if(this.actions.length-this.overflowCutoff)return e("limel-action-bar-overflow-menu",{openDirection:this.openDirection,items:t,onSelect:this.handleSelect,role:"gridcell"})},this.handleSelect=t=>{t.stopPropagation(),s(t.detail)&&this.itemSelected.emit(t.detail)},this.handleIntersection=t=>{const i=t.filter((t=>t.isIntersecting)),e=t.filter((t=>!t.isIntersecting));this.overflowCutoff=this.isFirstIntersectionCheck?i.length:this.overflowCutoff+i.length-e.length,this.isFirstIntersectionCheck=!1}}componentWillLoad(){this.collapsible&&console.warn("The `collapsible` prop on `limel-action-bar` is deprecated and no longer has any effect. It will be removed in a future major version. If you need expand/shrink behavior, implement it in the consuming UI instead of relying on the action bar itself.")}connectedCallback(){this.hasRendered&&this.createIntersectionObserver()}componentDidRender(){var t;this.haveItemsChanged()&&(null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),this.createIntersectionObserver())}disconnectedCallback(){var t;null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),this.intersectionObserver=void 0,this.actionBarItems=[]}render(){var t;this.hasRendered=!0;let i=[];return this.actions.length>0&&(i=this.actions.slice(this.overflowCutoff)),e(o,{key:"e640a88791dcb0eedb27e7fdc446b9e2de4d3abb","aria-label":null!==(t=this.accessibleLabel)&&void 0!==t?t:a.get("action-bar",this.language),class:{"is-full-width":"fullWidth"===this.layout,"is-floating":"floating"===this.layout},role:"grid"},e("div",{key:"419affc9dade0b73c308af4f824d8407ac76adc6",class:"items",role:"rowgroup"},this.actions.map(this.renderActionBarItem)),this.renderOverflowMenu(i))}isVisible(t){return t<this.overflowCutoff}createIntersectionObserver(){const t={root:this.host.shadowRoot.querySelector(".items"),rootMargin:"0px",threshold:1};this.overflowCutoff=this.actions.length,this.isFirstIntersectionCheck=!0,this.actionBarItems=[],this.intersectionObserver=new IntersectionObserver(this.handleIntersection,t);for(const t of this.host.shadowRoot.querySelectorAll("limel-action-bar-item"))this.observe(t)}observe(t){this.intersectionObserver.observe(t),this.actionBarItems.push(t)}haveItemsChanged(){const t=this.actionBarItems.some((t=>!this.host.shadowRoot.contains(t))),i=[...this.host.shadowRoot.querySelectorAll("limel-action-bar-item")].some((t=>!this.actionBarItems.includes(t)));return t||i}get host(){return r(this)}};m.style=":host(limel-action-bar){--action-bar-item-height:2rem;--limel-action-bar-item-text-color:var( --action-bar-item-text-color, rgb(var(--contrast-1100)) );--limel-action-bar-background-color:var( --action-bar-background-color, rgb(var(--contrast-100)) );box-sizing:border-box;display:inline-flex;align-items:center;padding:0.125rem 0.25rem;max-width:100%;border-radius:var(--action-bar-border-radius);background-color:var(--limel-action-bar-background-color)}:host(limel-action-bar),.items{gap:0.25rem}@media (pointer: coarse){:host(limel-action-bar),.items{gap:0.5rem}}.items{display:inline-flex;max-width:100%;min-width:0}:host(limel-action-bar.is-full-width){width:100%}:host(limel-action-bar.is-floating){--action-bar-border-radius:100vw;padding-right:0.125rem;padding-left:0.125rem;max-width:calc(100% - 2rem);box-shadow:var(--shadow-brighten-edges-inside), var(--shadow-depth-16), var(--shadow-depth-8)}";const u=class{constructor(e){t(this,e),this.select=i(this,"select",7),this.isVisible=!0,this.selected=!1,this.handleClick=t=>{t.stopPropagation(),this.select.emit(this.item)},this.tooltipId=n()}componentWillLoad(){l(this.host)}componentDidLoad(){this.triggerIconColorWarning()}disconnectedCallback(){c(this.host)}render(){return!this.isItem(this.item)&&this.item.separator?e("hr",null):e("button",{id:this.tooltipId,type:"button",onClick:this.handleClick,disabled:this.isDisabled(),class:{"is-selected":this.isItem(this.item)&&this.item.selected}},this.renderIcon(),this.renderLabel(),this.renderTooltip())}isItem(t){return!("separator"in t)}isDisabled(){return!(!this.isItem(this.item)||!this.item.disabled)||!this.isVisible||void 0}renderIcon(){if(this.isItem(this.item)&&!this.item.icon)return;if(!("icon"in this.item))return;const t=b(this.item.icon),i=h(this.item.icon,this.item.iconColor),o=d(this.item.icon);return e("limel-icon",{name:t,"aria-label":o,"aria-hidden":o?null:"true",style:{"--action-bar-item-icon-color":`${i}`}})}renderLabel(){if(this.isItem(this.item)&&!this.item.iconOnly)return e("span",{class:"text"},this.item.text)}renderTooltip(){if(this.isItem(this.item))return e("limel-tooltip",{elementId:this.tooltipId,label:this.getTooltipLabel(this.item),helperLabel:this.item.commandText})}getTooltipLabel(t){const i=d(t.icon),e=t.text;return i&&e?`${i} ${e}`:e}triggerIconColorWarning(){this.isItem(this.item)&&this.item.iconColor&&console.warn("The `iconColor` prop is deprecated now! Use the new `Icon` interface and instead of `iconColor: 'color-name'` write `icon {name: 'icon-name', color: 'color-name'}`.")}get host(){return r(this)}};u.style='@charset "UTF-8";limel-action-bar-item{transition:opacity 0.2s ease-in-out;position:relative;display:flex;align-items:center}limel-action-bar-item:not([is-visible]){opacity:0;pointer-events:none}button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit}button:not([disabled]){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-action-bar-item-text-color);background-color:transparent}button:not([disabled]):hover,button:not([disabled]):focus,button:not([disabled]):focus-visible{will-change:color, background-color, box-shadow, transform}button:not([disabled]):hover,button:not([disabled]):focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-action-bar-item-text-color);background-color:color-mix(in srgb, var(--limel-action-bar-background-color), white 20%)}button:not([disabled]):hover{box-shadow:var(--button-shadow-hovered)}button:not([disabled]):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);background-color:var(--limel-action-bar-background-color);box-shadow:var(--button-shadow-inset-pressed)}button:not([disabled]):hover,button:not([disabled]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button:not([disabled]):focus{outline:none}button:not([disabled]):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:0.25rem;width:100%;min-width:var(--action-bar-item-height);max-width:var(--action-bar-item-max-width, 10rem);height:var(--action-bar-item-height);color:var(--limel-action-bar-item-text-color);border-radius:var(--action-bar-item-height);font-size:var(--limel-theme-default-font-size);padding:0 0.25rem}button:has(.text){padding:0 0.5rem}button[disabled]{opacity:0.4}button.is-selected:not(:hover){box-shadow:var(--button-shadow-inset)}button.is-selected{color:var(--lime-primary-color, var(--limel-theme-primary-color)) !important}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0 0.25rem}limel-icon{flex-shrink:0;width:calc(var(--action-bar-item-height) - 0.75rem);height:calc(var(--action-bar-item-height) - 0.75rem);color:var(--action-bar-item-icon-color, var(--limel-action-bar-item-text-color))}hr{all:unset;width:1px;height:1.5rem;border-radius:var(--action-bar-item-height);background-color:var(--limel-action-bar-item-text-color);opacity:0.2}@media (pointer: fine){hr{margin-right:0.5rem;margin-left:0.5rem}}limel-menu{--notification-badge-background-color:rgb(var(--contrast-600));--notification-badge-text-color:rgb(var(--contrast-1200))}limel-menu[open] button{box-shadow:var(--button-shadow-inset)}button[slot=trigger]{animation:fade-in ease-out 0.25s;font-size:0.75rem;font-weight:bold;transform:translate3d(0, 0, 0)}@keyframes fade-in{0%{scale:0.8;opacity:0}100%{scale:1;opacity:1}}';const f=class{constructor(e){t(this,e),this.select=i(this,"select",7),this.openDirection="bottom-end",this.handleSelect=t=>{t.stopPropagation(),this.select.emit(t.detail)}}render(){return e(o,{key:"64cc5ad6027351f4871d937e87ce01094b6bdf08"},e("limel-menu",{key:"09067f13ef156a171f092989bbb0c01d341136c1",openDirection:this.openDirection,items:this.items,onSelect:this.handleSelect},e("button",{key:"cf9fac0fe20942858a2bf56cd97bd13b1b46dc31",type:"button",slot:"trigger"},`+${this.numberOfMenuItems}`)))}get numberOfMenuItems(){return this.items.filter((t=>this.isMenuItem(t))).length}isMenuItem(t){return!("separator"in t)}};export{m as limel_action_bar,u as limel_action_bar_item,f as limel_action_bar_overflow_menu}
1
+ import{r as t,c as i,h as e,H as o,a as r}from"./p-BU9IJqli.js";import{t as a}from"./p-B26k4gw8.js";import{i as s}from"./p-CrvUOVvg.js";import{c as n}from"./p-BrjD-ITe.js";import{m as l,r as c}from"./p-CIf8aGSd.js";import{b as h,d,g as b}from"./p-CgNJbSP4.js";import"./p-ChagAaNf.js";const m=class{constructor(o){t(this,o),this.itemSelected=i(this,"itemSelected",7),this.actions=[],this.language="en",this.collapsible=!1,this.overflowCutoff=this.actions.length,this.hasRendered=!1,this.isFirstIntersectionCheck=!0,this.actionBarItems=[],this.renderActionBarItem=(t,i)=>e("limel-action-bar-item",{item:t,onSelect:this.handleSelect,isVisible:this.isVisible(i),role:"gridcell"}),this.renderOverflowMenu=t=>{if(this.actions.length-this.overflowCutoff)return e("limel-action-bar-overflow-menu",{openDirection:this.openDirection,items:t,onSelect:this.handleSelect,role:"gridcell"})},this.handleSelect=t=>{t.stopPropagation(),s(t.detail)&&this.itemSelected.emit(t.detail)},this.handleIntersection=t=>{const i=t.filter((t=>t.isIntersecting)),e=t.filter((t=>!t.isIntersecting));this.overflowCutoff=this.isFirstIntersectionCheck?i.length:this.overflowCutoff+i.length-e.length,this.isFirstIntersectionCheck=!1}}componentWillLoad(){this.collapsible&&console.warn("The `collapsible` prop on `limel-action-bar` is deprecated and no longer has any effect. It will be removed in a future major version. If you need expand/shrink behavior, implement it in the consuming UI instead of relying on the action bar itself.")}connectedCallback(){this.hasRendered&&this.createIntersectionObserver()}componentDidRender(){var t;this.haveItemsChanged()&&(null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),this.createIntersectionObserver())}disconnectedCallback(){var t;null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),this.intersectionObserver=void 0,this.actionBarItems=[]}render(){var t;this.hasRendered=!0;let i=[];return this.actions.length>0&&(i=this.actions.slice(this.overflowCutoff)),e(o,{key:"d67bfebc30b1c7b7342fe2106bd1bc76fe0340fa","aria-label":null!==(t=this.accessibleLabel)&&void 0!==t?t:a.get("action-bar",this.language),class:{"is-full-width":"fullWidth"===this.layout,"is-floating":"floating"===this.layout},role:"grid"},e("div",{key:"22a49f1af02c92d4d00e3dd4f85aeb96e3868482",class:"items",role:"rowgroup"},this.actions.map(this.renderActionBarItem)),this.renderOverflowMenu(i))}isVisible(t){return t<this.overflowCutoff}createIntersectionObserver(){const t={root:this.host.shadowRoot.querySelector(".items"),rootMargin:"0px",threshold:1};this.overflowCutoff=this.actions.length,this.isFirstIntersectionCheck=!0,this.actionBarItems=[],this.intersectionObserver=new IntersectionObserver(this.handleIntersection,t);for(const t of this.host.shadowRoot.querySelectorAll("limel-action-bar-item"))this.observe(t)}observe(t){this.intersectionObserver.observe(t),this.actionBarItems.push(t)}haveItemsChanged(){const t=this.actionBarItems.some((t=>!this.host.shadowRoot.contains(t))),i=[...this.host.shadowRoot.querySelectorAll("limel-action-bar-item")].some((t=>!this.actionBarItems.includes(t)));return t||i}get host(){return r(this)}};m.style=":host(limel-action-bar){--action-bar-item-height:2rem;--limel-action-bar-item-text-color:var( --action-bar-item-text-color, rgb(var(--contrast-1100)) );--limel-action-bar-background-color:var( --action-bar-background-color, rgb(var(--contrast-100)) );box-sizing:border-box;display:inline-flex;align-items:center;padding:0.125rem 0.25rem;max-width:100%;border-radius:var(--action-bar-border-radius);background-color:var(--limel-action-bar-background-color)}:host(limel-action-bar),.items{gap:0.25rem}@media (pointer: coarse){:host(limel-action-bar),.items{gap:0.5rem}}.items{display:inline-flex;max-width:100%;min-width:0}:host(limel-action-bar.is-full-width){width:100%}:host(limel-action-bar.is-floating){--action-bar-border-radius:100vw;padding-right:0.125rem;padding-left:0.125rem;max-width:calc(100% - 2rem);box-shadow:var(--shadow-brighten-edges-inside), var(--shadow-depth-16), var(--shadow-depth-8)}";const u=class{constructor(e){t(this,e),this.select=i(this,"select",7),this.isVisible=!0,this.selected=!1,this.handleClick=t=>{t.stopPropagation(),this.select.emit(this.item)},this.tooltipId=n()}componentWillLoad(){l(this.host)}componentDidLoad(){this.triggerIconColorWarning()}disconnectedCallback(){c(this.host)}render(){return!this.isItem(this.item)&&this.item.separator?e("hr",null):e("button",{id:this.tooltipId,type:"button",onClick:this.handleClick,disabled:this.isDisabled(),class:{"is-selected":this.isItem(this.item)&&this.item.selected}},this.renderIcon(),this.renderLabel(),this.renderTooltip())}isItem(t){return!("separator"in t)}isDisabled(){return!(!this.isItem(this.item)||!this.item.disabled)||!this.isVisible||void 0}renderIcon(){if(this.isItem(this.item)&&!this.item.icon)return;if(!("icon"in this.item))return;const t=b(this.item.icon),i=h(this.item.icon,this.item.iconColor),o=d(this.item.icon);return e("limel-icon",{name:t,"aria-label":o,"aria-hidden":o?null:"true",style:{"--action-bar-item-icon-color":`${i}`}})}renderLabel(){if(this.isItem(this.item)&&!this.item.iconOnly)return e("span",{class:"text"},this.item.text)}renderTooltip(){if(this.isItem(this.item))return e("limel-tooltip",{elementId:this.tooltipId,label:this.getTooltipLabel(this.item),helperLabel:this.item.commandText})}getTooltipLabel(t){const i=d(t.icon),e=t.text;return i&&e?`${i} ${e}`:e}triggerIconColorWarning(){this.isItem(this.item)&&this.item.iconColor&&console.warn("The `iconColor` prop is deprecated now! Use the new `Icon` interface and instead of `iconColor: 'color-name'` write `icon {name: 'icon-name', color: 'color-name'}`.")}get host(){return r(this)}};u.style='@charset "UTF-8";limel-action-bar-item{transition:opacity 0.2s ease-in-out;position:relative;display:flex;align-items:center}limel-action-bar-item:not([is-visible]){opacity:0;pointer-events:none}button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit}button:not([disabled]){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-action-bar-item-text-color);background-color:transparent}button:not([disabled]):hover,button:not([disabled]):focus,button:not([disabled]):focus-visible{will-change:color, background-color, box-shadow, transform}button:not([disabled]):hover,button:not([disabled]):focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-action-bar-item-text-color);background-color:color-mix(in srgb, var(--limel-action-bar-background-color), white 20%)}button:not([disabled]):hover{box-shadow:var(--button-shadow-hovered)}button:not([disabled]):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);background-color:var(--limel-action-bar-background-color);box-shadow:var(--button-shadow-inset-pressed)}button:not([disabled]):hover,button:not([disabled]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button:not([disabled]):focus{outline:none}button:not([disabled]):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:0.25rem;width:100%;min-width:var(--action-bar-item-height);max-width:var(--action-bar-item-max-width, 10rem);height:var(--action-bar-item-height);color:var(--limel-action-bar-item-text-color);border-radius:var(--action-bar-item-height);font-size:var(--limel-theme-default-font-size);padding:0 0.25rem}button:has(.text){padding:0 0.5rem}button[disabled]{opacity:0.4}button.is-selected:not(:hover){box-shadow:var(--button-shadow-inset)}button.is-selected{color:var(--lime-primary-color, var(--limel-theme-primary-color)) !important}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0 0.25rem}limel-icon{flex-shrink:0;width:calc(var(--action-bar-item-height) - 0.75rem);height:calc(var(--action-bar-item-height) - 0.75rem);color:var(--action-bar-item-icon-color, var(--limel-action-bar-item-text-color))}hr{all:unset;width:1px;height:1.5rem;border-radius:var(--action-bar-item-height);background-color:var(--limel-action-bar-item-text-color);opacity:0.2}@media (pointer: fine){hr{margin-right:0.5rem;margin-left:0.5rem}}limel-menu{--notification-badge-background-color:rgb(var(--contrast-600));--notification-badge-text-color:rgb(var(--contrast-1200))}limel-menu[open] button{box-shadow:var(--button-shadow-inset)}button[slot=trigger]{animation:fade-in ease-out 0.25s;font-size:0.75rem;font-weight:bold;transform:translate3d(0, 0, 0)}@keyframes fade-in{0%{scale:0.8;opacity:0}100%{scale:1;opacity:1}}';const p=class{constructor(e){t(this,e),this.select=i(this,"select",7),this.openDirection="bottom-end",this.handleSelect=t=>{t.stopPropagation(),this.select.emit(t.detail)}}render(){return e(o,{key:"84d31eca62216b7659d665486be1084a5242a6a2"},e("limel-menu",{key:"7a7ecad9797d9f960c9bae111e60b2301f4d7285",openDirection:this.openDirection,items:this.items,onSelect:this.handleSelect},e("button",{key:"b9890451a4a538dc667a21611f445c434ff16d58",type:"button",slot:"trigger"},`+${this.numberOfMenuItems}`)))}get numberOfMenuItems(){return this.items.filter((t=>this.isMenuItem(t))).length}isMenuItem(t){return!("separator"in t)}};export{m as limel_action_bar,u as limel_action_bar_item,p as limel_action_bar_overflow_menu}
@@ -1 +1 @@
1
- import{r as e,h as t,H as r}from"./p-BU9IJqli.js";import{m as o}from"./p-C0wwdPYT.js";import{g as a}from"./p-Dnt5w_Bp.js";import{d as n}from"./p-_UXAljNc.js";import{a as l}from"./p-BQoih_t0.js";import"./p-B85MJLTf.js";class i{constructor(e){this.handleIntersection=e=>{for(const t of e){if(!t.isIntersecting)continue;const e=t.target,r=e.dataset.src;r&&(e.setAttribute("src",r),delete e.dataset.src),this.observer.unobserve(e)}},this.observer=new IntersectionObserver(this.handleIntersection);const t=e.querySelectorAll("img");for(const e of t)this.observer.observe(e)}disconnect(){this.observer.disconnect()}}var s;const d=new Map(Object.entries(null!==(s=n.protocols)&&void 0!==s?s:{}).map((([e,t])=>[e,new Set(t)])));function m(e,t){for(const r of t){const t=e.getAttribute(r);if(!t)continue;const o=c(t);if(void 0===o)continue;const a=f(o);e[b(r)]=a}}function c(e){const t=e.trim();if(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]"))try{return JSON.parse(t)}catch(e){try{const e=t.replaceAll("&#x22;",'"').replaceAll("&#34;",'"').replaceAll("&quot;",'"').replaceAll("&#x27;","'").replaceAll("&#39;","'").replaceAll("&apos;","'").replaceAll("&amp;","&");return JSON.parse(e)}catch(e){return}}}function h(e,t){const r=e.trim(),o=r.indexOf(":");if(-1===o||/[?#/]/.test(r.slice(0,o)))return!0;const a=r.slice(0,o).toLowerCase();return t.has(a)}function f(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(f);const t=Object.assign({},e);for(const e of Object.keys(t)){const r=d.get(e);r&&"string"==typeof t[e]&&!h(t[e],r)?(console.warn(`limel-markdown: Removed unsafe URL from "${e}" during sanitization.`),delete t[e]):"object"==typeof t[e]&&null!==t[e]&&(t[e]=f(t[e]))}return t}function b(e){return e.replaceAll(/-([a-z])/g,((e,t)=>t.toUpperCase()))}var u,g="undefined"==typeof document?void 0:document,p=!!g&&"content"in g.createElement("template"),v=!!g&&g.createRange&&"createContextualFragment"in g.createRange();function w(e,t){var r,o,a=e.nodeName,n=t.nodeName;return a===n||(r=a.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?a===n.toUpperCase():o<=90&&r>=97&&n===a.toUpperCase())}function k(e,t,r){e[r]!==t[r]&&(e[r]=t[r],e[r]?e.setAttribute(r,""):e.removeAttribute(r))}var y={OPTION:function(e,t){var r=e.parentNode;if(r){var o=r.nodeName.toUpperCase();"OPTGROUP"===o&&(o=(r=r.parentNode)&&r.nodeName.toUpperCase()),"SELECT"!==o||r.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),r.selectedIndex=-1)}k(e,t,"selected")},INPUT:function(e,t){k(e,t,"checked"),k(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var r=t.value;e.value!==r&&(e.value=r);var o=e.firstChild;if(o){var a=o.nodeValue;if(a==r||!r&&a==e.placeholder)return;o.nodeValue=r}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var r,o,a=-1,n=0,l=e.firstChild;l;)if("OPTGROUP"===(o=l.nodeName&&l.nodeName.toUpperCase()))(l=(r=l).firstChild)||(l=r.nextSibling,r=null);else{if("OPTION"===o){if(l.hasAttribute("selected")){a=n;break}n++}!(l=l.nextSibling)&&r&&(l=r.nextSibling,r=null)}e.selectedIndex=a}}};function j(){}function x(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}var z=function(e,t,r){if(r||(r={}),"string"==typeof t)if("#document"===e.nodeName||"HTML"===e.nodeName){var o=t;(t=g.createElement("html")).innerHTML=o}else if("BODY"===e.nodeName){var a=t;(t=g.createElement("html")).innerHTML=a;var n=t.querySelector("body");n&&(t=n)}else l=(l=t).trim(),t=p?function(e){var t=g.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(l):v?function(e){return u||(u=g.createRange()).selectNode(g.body),u.createContextualFragment(e).childNodes[0]}(l):function(e){var t=g.createElement("body");return t.innerHTML=e,t.childNodes[0]}(l);else 11===t.nodeType&&(t=t.firstElementChild);var l,i=r.getNodeKey||x,s=r.onBeforeNodeAdded||j,d=r.onNodeAdded||j,m=r.onBeforeElUpdated||j,c=r.onElUpdated||j,h=r.onBeforeNodeDiscarded||j,f=r.onNodeDiscarded||j,b=r.onBeforeElChildrenUpdated||j,k=r.skipFromChildren||j,z=r.addChild||function(e,t){return e.appendChild(t)},C=!0===r.childrenOnly,O=Object.create(null),T=[];function N(e){T.push(e)}function q(e,t){if(1===e.nodeType)for(var r=e.firstChild;r;){var o=void 0;t&&(o=i(r))?N(o):(f(r),r.firstChild&&q(r,t)),r=r.nextSibling}}function M(e,t,r){!1!==h(e)&&(t&&t.removeChild(e),f(e),q(e,r))}function P(e){if(1===e.nodeType||11===e.nodeType)for(var t=e.firstChild;t;){var r=i(t);r&&(O[r]=t),P(t),t=t.nextSibling}}function E(e){d(e);for(var t=e.firstChild;t;){var r=t.nextSibling,o=i(t);if(o){var a=O[o];a&&w(t,a)?(t.parentNode.replaceChild(a,t),H(a,t)):E(t)}else E(t);t=r}}function H(e,t,r){var o=i(t);if(o&&delete O[o],!r){var a=m(e,t);if(!1===a)return;if(a instanceof HTMLElement&&P(e=a),function(e,t){var r,o,a,n,l=t.attributes;if(11!==t.nodeType&&11!==e.nodeType){for(var i=l.length-1;i>=0;i--)o=(r=l[i]).name,n=r.value,(a=r.namespaceURI)?e.getAttributeNS(a,o=r.localName||o)!==n&&("xmlns"===r.prefix&&(o=r.name),e.setAttributeNS(a,o,n)):e.getAttribute(o)!==n&&e.setAttribute(o,n);for(var s=e.attributes,d=s.length-1;d>=0;d--)o=(r=s[d]).name,(a=r.namespaceURI)?t.hasAttributeNS(a,o=r.localName||o)||e.removeAttributeNS(a,o):t.hasAttribute(o)||e.removeAttribute(o)}}(e,t),c(e),!1===b(e,t))return}"TEXTAREA"!==e.nodeName?function(e,t){var r,o,a,n,l,d=k(e,t),m=t.firstChild,c=e.firstChild;e:for(;m;){for(n=m.nextSibling,r=i(m);!d&&c;){if(a=c.nextSibling,m.isSameNode&&m.isSameNode(c)){m=n,c=a;continue e}o=i(c);var h=c.nodeType,f=void 0;if(h===m.nodeType&&(1===h?(r?r!==o&&((l=O[r])?a===l?f=!1:(e.insertBefore(l,c),o?N(o):M(c,e,!0),o=i(c=l)):f=!1):o&&(f=!1),(f=!1!==f&&w(c,m))&&H(c,m)):3!==h&&8!=h||(f=!0,c.nodeValue!==m.nodeValue&&(c.nodeValue=m.nodeValue))),f){m=n,c=a;continue e}o?N(o):M(c,e,!0),c=a}if(r&&(l=O[r])&&w(l,m))d||z(e,l),H(l,m);else{var b=s(m);!1!==b&&(b&&(m=b),m.actualize&&(m=m.actualize(e.ownerDocument||g)),z(e,m),E(m))}m=n,c=a}!function(e,t,r){for(;t;){var o=t.nextSibling;(r=i(t))?N(r):M(t,e,!0),t=o}}(e,c,o);var u=y[e.nodeName];u&&u(e,t)}(e,t):y.TEXTAREA(e,t)}P(e);var I,L,S=e,A=S.nodeType,R=t.nodeType;if(!C)if(1===A)1===R?w(e,t)||(f(e),S=function(e,t){for(var r=e.firstChild;r;){var o=r.nextSibling;t.appendChild(r),r=o}return t}(e,(I=t.nodeName,(L=t.namespaceURI)&&"http://www.w3.org/1999/xhtml"!==L?g.createElementNS(L,I):g.createElement(I)))):S=t;else if(3===A||8===A){if(R===A)return S.nodeValue!==t.nodeValue&&(S.nodeValue=t.nodeValue),S;S=t}if(S===t)f(e);else{if(t.isSameNode&&t.isSameNode(S))return;if(H(S,t,C),T)for(var B=0,U=T.length;B<U;B++){var D=O[T[B]];D&&M(D,D.parentNode,!1)}}return!C&&S!==e&&e.parentNode&&(S.actualize&&(S=S.actualize(e.ownerDocument||g)),e.parentNode.replaceChild(S,e)),S};const C=[{tagName:"limel-chip",attributes:["text","icon","link","badge","disabled","readonly","selected","type","size"]},{tagName:"limel-icon",attributes:["name","size","badge"]},{tagName:"limel-badge",attributes:["label"]},{tagName:"limel-callout",attributes:["heading","icon","type"]},{tagName:"limel-linear-progress",attributes:["value","indeterminate"]},{tagName:"limel-circular-progress",attributes:["value","max-value","prefix","suffix","size","display-percentage-colors"]},{tagName:"limel-spinner",attributes:["size"]},{tagName:"limel-info-tile",attributes:["value","icon","label","prefix","suffix","badge"]}],O=class{constructor(t){e(this,t),this.value="",this.whitelist=a.markdownWhitelist,this.lazyLoadImages=!1,this.removeEmptyParagraphs=!0,this.adaptColorContrast=!1,this.imageIntersectionObserver=null}async toMarkdown(){await this.rendering;const{exportMarkdown:e}=await import("./p-Bgn2bikC.js");return e(this.rootElement,this.cachedCombinedWhitelist)}textChanged(){return this.rendering=this.renderMarkdown(),this.rendering}async renderMarkdown(){try{this.cleanupImageIntersectionObserver(),this.cachedCombinedWhitelist&&this.whitelist===this.cachedConsumerWhitelist||(this.cachedConsumerWhitelist=this.whitelist,this.cachedCombinedWhitelist=function(e,t){if(!(null==t?void 0:t.length))return e.map((e=>Object.assign(Object.assign({},e),{attributes:[...e.attributes]})));const r=new Map;for(const o of[...e,...t]){const e=r.get(o.tagName);if(e)for(const t of o.attributes)e.add(t);else r.set(o.tagName,new Set(o.attributes))}return[...r].map((([e,t])=>({tagName:e,attributes:[...t]})))}(C,this.whitelist));const e=this.cachedCombinedWhitelist,t=await o(this.value,{forceHardLineBreaks:!0,whitelist:e,lazyLoadImages:this.lazyLoadImages,removeEmptyParagraphs:this.removeEmptyParagraphs});!function(e,t=""){try{z(e,`<div>${t}</div>`,{childrenOnly:!0})}catch(r){console.warn("morphdom failed, falling back to innerHTML:",r),e.innerHTML=t}}(this.rootElement,t),function(e,t){if(e&&(null==t?void 0:t.length))for(const r of t){const t=e.querySelectorAll(r.tagName);for(const e of t)m(e,r.attributes)}}(this.rootElement,e),this.adaptColorContrast&&l(this.rootElement),this.setupImageIntersectionObserver()}catch(e){console.error(e)}}handleWhitelistChange(){return this.textChanged()}handleRemoveEmptyParagraphsChange(){return this.textChanged()}handleAdaptColorContrastChange(){return this.textChanged()}async componentDidLoad(){this.textChanged()}disconnectedCallback(){this.cleanupImageIntersectionObserver()}render(){return t(r,{key:"a1883ae4c80a775bc1dbdd9f2b993ab4af8c4cba"},t("div",{key:"d8a1cd8f5a102a209fa89f8baf0b08912ead1059",id:"markdown",ref:e=>this.rootElement=e}))}setupImageIntersectionObserver(){this.lazyLoadImages&&(this.imageIntersectionObserver=new i(this.rootElement))}cleanupImageIntersectionObserver(){this.imageIntersectionObserver&&(this.imageIntersectionObserver.disconnect(),this.imageIntersectionObserver=null)}static get watchers(){return{value:[{textChanged:0}],whitelist:[{handleWhitelistChange:0}],removeEmptyParagraphs:[{handleRemoveEmptyParagraphsChange:0}],adaptColorContrast:[{handleAdaptColorContrastChange:0}]}}};O.style='@charset "UTF-8";pre,pre p,code{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-size:0.75rem}pre{max-width:100%;white-space:pre-wrap;word-wrap:break-word}code{letter-spacing:-0.0125rem;color:rgb(var(--contrast-1300));tab-size:4;hyphens:none;display:inline;border-radius:0.25rem;padding:0.03125rem 0.25rem;background-color:rgb(var(--contrast-600))}pre>code{display:block;margin:0.5rem 0;padding:0.5rem 0.75rem}h1{font-size:1.5rem}h2{font-size:1.25rem}h3{font-size:1.125rem}h4{font-size:1rem}h5{font-size:var(--limel-theme-default-font-size)}h6{font-size:0.75rem}h1,h2{margin-top:0.5rem;margin-bottom:0.5rem;letter-spacing:-0.03125rem;font-weight:500}h3,h4{margin-top:0.75rem;margin-bottom:0.25rem;font-weight:600}h5,h6{margin-top:0.5rem;margin-bottom:0.125rem;font-weight:600}h1,h2,h3,h4,h5,h6{word-break:break-word;hyphens:auto;-webkit-hyphens:auto}h1 code,h2 code,h3 code,h4 code,h5 code,h6 code{font-size:inherit}:not([contenteditable=true]) h1,:not([contenteditable=true]) h2,:not([contenteditable=true]) h3,:not([contenteditable=true]) h4,:not([contenteditable=true]) h5,:not([contenteditable=true]) h6{text-wrap:balance}[contenteditable=true] h1,[contenteditable=true] h2,[contenteditable=true] h3,[contenteditable=true] h4,[contenteditable=true] h5,[contenteditable=true] h6{text-wrap:initial}:host(limel-markdown.truncate-paragraphs) p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}p,li{font-size:var(--limel-theme-default-font-size);word-break:break-word}a{word-break:break-all}p{margin-top:0;margin-bottom:0.5rem}p:last-child{margin-bottom:0}a{transition:color 0.2s ease;color:var(--markdown-hyperlink-color, rgb(var(--color-blue-dark)));text-decoration:none}a:hover{color:var(--markdown-hyperlink-color--hovered, rgb(var(--color-blue-default)))}hr{margin:1.75rem 0 2rem 0;border-width:0;border-top:1px solid rgb(var(--contrast-500))}ul{list-style:none}ul>li{margin-left:0.75rem}ul>li:before{content:"";position:absolute;left:-0.5rem;top:0.5rem;width:0.25rem;height:0.25rem;border-radius:50%;background-color:rgb(var(--contrast-700));display:block}ol{margin-top:0.25rem;padding-left:1rem}ul{margin-top:0.25rem;padding-left:0}ul ul,ul ol,ol ol,ol ul{margin-left:0}li{position:relative;margin-bottom:0.25rem}:host(limel-markdown:not(.no-table-styles)) table{table-layout:auto;min-width:100%;border-collapse:collapse;border-spacing:0;background:transparent;margin:0.75rem 0}:host(limel-markdown:not(.no-table-styles)) tbody{border:1px solid rgb(var(--contrast-400));border-radius:0.25rem}:host(limel-markdown:not(.no-table-styles)) th,:host(limel-markdown:not(.no-table-styles)) td{text-align:left;vertical-align:top;transition:background-color 0.2s ease;font-size:var(--limel-theme-default-font-size)}:host(limel-markdown:not(.no-table-styles)) th p,:host(limel-markdown:not(.no-table-styles)) th li,:host(limel-markdown:not(.no-table-styles)) th a,:host(limel-markdown:not(.no-table-styles)) td p,:host(limel-markdown:not(.no-table-styles)) td li,:host(limel-markdown:not(.no-table-styles)) td a{word-break:normal;overflow-wrap:normal}:host(limel-markdown:not(.no-table-styles)) td{padding:0.5rem 0.375rem 0.75rem 0.375rem}:host(limel-markdown:not(.no-table-styles)) tr th{background-color:rgb(var(--contrast-400));padding:0.25rem 0.375rem;font-weight:normal}:host(limel-markdown:not(.no-table-styles)) tr th:only-child{text-align:center}:host(limel-markdown:not(.no-table-styles)) tbody tr:nth-child(odd) td{background-color:rgb(var(--contrast-200))}:host(limel-markdown:not(.no-table-styles)) tbody tr:hover td{background-color:rgb(var(--contrast-300))}table{display:block;box-sizing:border-box;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}blockquote{position:relative;max-width:100%;margin:0.75rem 0;padding:0.5rem;border-left:0.25rem solid rgb(var(--contrast-500));background-color:rgb(var(--contrast-200))}blockquote:before,blockquote:after{position:absolute;line-height:0;font-size:2rem;opacity:0.4}blockquote:before{content:"“";left:-0.5rem;top:0.5rem}blockquote:after{content:"”";right:-0.25rem;bottom:-0.25rem}blockquote blockquote{padding-top:0;padding-right:0;padding-bottom:0;padding-left:0.25rem;border-color:rgb(var(--contrast-700));border-left-width:1px}blockquote blockquote:before,blockquote blockquote:after{display:none}blockquote:has(>blockquote){padding-left:0.25rem;padding-bottom:0}dl{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;margin-bottom:2rem;border:1px solid rgb(var(--contrast-400));border-radius:0.375rem;background-color:rgb(var(--contrast-200))}dl dt,dl dd{padding:0.375rem 0.5rem;font-size:var(--limel-theme-default-font-size);margin:0}dl dt:nth-of-type(even),dl dd:nth-of-type(even){background-color:rgb(var(--contrast-300))}dl dt:first-child{border-top-left-radius:0.375rem}dl dt:last-child{border-bottom-left-radius:0.375rem}dl dd:first-child{border-top-right-radius:0.375rem}dl dd:last-child{border-bottom-right-radius:0.375rem}img{max-width:100%;border-radius:0.25rem}kbd{display:inline-block;font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-weight:600;color:rgb(var(--contrast-1100));white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:normal;border-radius:0.125rem;border-style:solid;border-color:rgb(var(--contrast-500));border-width:0 1px 0.1875rem 1px;padding:0.0625rem 0.375rem;margin:0 0.25rem;background-color:rgb(var(--contrast-200));box-shadow:var(--button-shadow-normal), 0 0.625rem 0.375rem -0.5rem rgb(var(--color-black), 0.02), 0 0.025rem 0.5rem 0 rgb(var(--contrast-100)) inset}:host(limel-markdown.adjust-for-table-cell) img{max-height:1.25rem;vertical-align:middle}:host(limel-markdown.adjust-for-table-cell) p{display:inline}:host(limel-markdown.adjust-for-table-cell) h1,:host(limel-markdown.adjust-for-table-cell) h2,:host(limel-markdown.adjust-for-table-cell) h3,:host(limel-markdown.adjust-for-table-cell) h4,:host(limel-markdown.adjust-for-table-cell) h5,:host(limel-markdown.adjust-for-table-cell) h6{display:inline-block;vertical-align:bottom;font-size:var(--limel-theme-default-font-size);margin:0 0.25rem 0 0;letter-spacing:normal;font-weight:500}:host(limel-markdown.adjust-for-table-cell) h1:before,:host(limel-markdown.adjust-for-table-cell) h2:before,:host(limel-markdown.adjust-for-table-cell) h3:before,:host(limel-markdown.adjust-for-table-cell) h4:before,:host(limel-markdown.adjust-for-table-cell) h5:before,:host(limel-markdown.adjust-for-table-cell) h6:before{opacity:0.6;vertical-align:middle;font-size:0.5rem;border-radius:0.25rem 0 0 0.25rem;padding:0.25rem;padding-right:2rem;margin-right:-1.75rem;background:linear-gradient(to right, rgb(var(--contrast-800), 0.6), rgb(var(--contrast-800), 0))}:host(limel-markdown.adjust-for-table-cell) h1:before{content:"H1"}:host(limel-markdown.adjust-for-table-cell) h2:before{content:"H2"}:host(limel-markdown.adjust-for-table-cell) h3:before{content:"H3"}:host(limel-markdown.adjust-for-table-cell) h4:before{content:"H4"}:host(limel-markdown.adjust-for-table-cell) h5:before{content:"H5"}:host(limel-markdown.adjust-for-table-cell) h6:before{content:"H6"}:host(limel-markdown.adjust-for-table-cell) pre{margin:0}:host(limel-markdown.adjust-for-table-cell) pre>code{padding:0.125rem;margin:0}:host(limel-markdown.adjust-for-table-cell) dl{margin:0}:host(limel-markdown.adjust-for-table-cell) dl dt,:host(limel-markdown.adjust-for-table-cell) dl dd{padding:0.00625rem 0.125rem}*,*::before,*::after{box-sizing:border-box}* :where(:not(img,video,svg,canvas,iframe)),*::before :where(:not(img,video,svg,canvas,iframe)),*::after :where(:not(img,video,svg,canvas,iframe)){min-width:0;min-height:0}hr{border-top:1px solid rgb(var(--contrast-700))}.MsoNormal{margin:0}:host(limel-markdown.reset-img-height) #markdown img{height:auto !important}';export{O as limel_markdown}
1
+ import{r as e,h as t,H as r}from"./p-BU9IJqli.js";import{m as o}from"./p-C0wwdPYT.js";import{g as a}from"./p-Dnt5w_Bp.js";import{d as n}from"./p-_UXAljNc.js";import{a as l}from"./p-BQoih_t0.js";import"./p-B85MJLTf.js";class i{constructor(e){this.handleIntersection=e=>{for(const t of e){if(!t.isIntersecting)continue;const e=t.target,r=e.dataset.src;r&&(e.setAttribute("src",r),delete e.dataset.src),this.observer.unobserve(e)}},this.observer=new IntersectionObserver(this.handleIntersection);const t=e.querySelectorAll("img");for(const e of t)this.observer.observe(e)}disconnect(){this.observer.disconnect()}}var s;const d=new Map(Object.entries(null!==(s=n.protocols)&&void 0!==s?s:{}).map((([e,t])=>[e,new Set(t)])));function m(e,t){for(const r of t){const t=e.getAttribute(r);if(!t)continue;const o=c(t);if(void 0===o)continue;const a=f(o);e[b(r)]=a}}function c(e){const t=e.trim();if(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]"))try{return JSON.parse(t)}catch(e){try{const e=t.replaceAll("&#x22;",'"').replaceAll("&#34;",'"').replaceAll("&quot;",'"').replaceAll("&#x27;","'").replaceAll("&#39;","'").replaceAll("&apos;","'").replaceAll("&amp;","&");return JSON.parse(e)}catch(e){return}}}function h(e,t){const r=e.trim(),o=r.indexOf(":");if(-1===o||/[?#/]/.test(r.slice(0,o)))return!0;const a=r.slice(0,o).toLowerCase();return t.has(a)}function f(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(f);const t=Object.assign({},e);for(const e of Object.keys(t)){const r=d.get(e);r&&"string"==typeof t[e]&&!h(t[e],r)?(console.warn(`limel-markdown: Removed unsafe URL from "${e}" during sanitization.`),delete t[e]):"object"==typeof t[e]&&null!==t[e]&&(t[e]=f(t[e]))}return t}function b(e){return e.replaceAll(/-([a-z])/g,((e,t)=>t.toUpperCase()))}var u,g="undefined"==typeof document?void 0:document,p=!!g&&"content"in g.createElement("template"),v=!!g&&g.createRange&&"createContextualFragment"in g.createRange();function w(e,t){var r,o,a=e.nodeName,n=t.nodeName;return a===n||(r=a.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?a===n.toUpperCase():o<=90&&r>=97&&n===a.toUpperCase())}function k(e,t,r){e[r]!==t[r]&&(e[r]=t[r],e[r]?e.setAttribute(r,""):e.removeAttribute(r))}var y={OPTION:function(e,t){var r=e.parentNode;if(r){var o=r.nodeName.toUpperCase();"OPTGROUP"===o&&(o=(r=r.parentNode)&&r.nodeName.toUpperCase()),"SELECT"!==o||r.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),r.selectedIndex=-1)}k(e,t,"selected")},INPUT:function(e,t){k(e,t,"checked"),k(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var r=t.value;e.value!==r&&(e.value=r);var o=e.firstChild;if(o){var a=o.nodeValue;if(a==r||!r&&a==e.placeholder)return;o.nodeValue=r}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var r,o,a=-1,n=0,l=e.firstChild;l;)if("OPTGROUP"===(o=l.nodeName&&l.nodeName.toUpperCase()))(l=(r=l).firstChild)||(l=r.nextSibling,r=null);else{if("OPTION"===o){if(l.hasAttribute("selected")){a=n;break}n++}!(l=l.nextSibling)&&r&&(l=r.nextSibling,r=null)}e.selectedIndex=a}}};function j(){}function x(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}var z=function(e,t,r){if(r||(r={}),"string"==typeof t)if("#document"===e.nodeName||"HTML"===e.nodeName){var o=t;(t=g.createElement("html")).innerHTML=o}else if("BODY"===e.nodeName){var a=t;(t=g.createElement("html")).innerHTML=a;var n=t.querySelector("body");n&&(t=n)}else l=(l=t).trim(),t=p?function(e){var t=g.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(l):v?function(e){return u||(u=g.createRange()).selectNode(g.body),u.createContextualFragment(e).childNodes[0]}(l):function(e){var t=g.createElement("body");return t.innerHTML=e,t.childNodes[0]}(l);else 11===t.nodeType&&(t=t.firstElementChild);var l,i=r.getNodeKey||x,s=r.onBeforeNodeAdded||j,d=r.onNodeAdded||j,m=r.onBeforeElUpdated||j,c=r.onElUpdated||j,h=r.onBeforeNodeDiscarded||j,f=r.onNodeDiscarded||j,b=r.onBeforeElChildrenUpdated||j,k=r.skipFromChildren||j,z=r.addChild||function(e,t){return e.appendChild(t)},C=!0===r.childrenOnly,O=Object.create(null),T=[];function N(e){T.push(e)}function q(e,t){if(1===e.nodeType)for(var r=e.firstChild;r;){var o=void 0;t&&(o=i(r))?N(o):(f(r),r.firstChild&&q(r,t)),r=r.nextSibling}}function M(e,t,r){!1!==h(e)&&(t&&t.removeChild(e),f(e),q(e,r))}function P(e){if(1===e.nodeType||11===e.nodeType)for(var t=e.firstChild;t;){var r=i(t);r&&(O[r]=t),P(t),t=t.nextSibling}}function E(e){d(e);for(var t=e.firstChild;t;){var r=t.nextSibling,o=i(t);if(o){var a=O[o];a&&w(t,a)?(t.parentNode.replaceChild(a,t),H(a,t)):E(t)}else E(t);t=r}}function H(e,t,r){var o=i(t);if(o&&delete O[o],!r){var a=m(e,t);if(!1===a)return;if(a instanceof HTMLElement&&P(e=a),function(e,t){var r,o,a,n,l=t.attributes;if(11!==t.nodeType&&11!==e.nodeType){for(var i=l.length-1;i>=0;i--)o=(r=l[i]).name,n=r.value,(a=r.namespaceURI)?e.getAttributeNS(a,o=r.localName||o)!==n&&("xmlns"===r.prefix&&(o=r.name),e.setAttributeNS(a,o,n)):e.getAttribute(o)!==n&&e.setAttribute(o,n);for(var s=e.attributes,d=s.length-1;d>=0;d--)o=(r=s[d]).name,(a=r.namespaceURI)?t.hasAttributeNS(a,o=r.localName||o)||e.removeAttributeNS(a,o):t.hasAttribute(o)||e.removeAttribute(o)}}(e,t),c(e),!1===b(e,t))return}"TEXTAREA"!==e.nodeName?function(e,t){var r,o,a,n,l,d=k(e,t),m=t.firstChild,c=e.firstChild;e:for(;m;){for(n=m.nextSibling,r=i(m);!d&&c;){if(a=c.nextSibling,m.isSameNode&&m.isSameNode(c)){m=n,c=a;continue e}o=i(c);var h=c.nodeType,f=void 0;if(h===m.nodeType&&(1===h?(r?r!==o&&((l=O[r])?a===l?f=!1:(e.insertBefore(l,c),o?N(o):M(c,e,!0),o=i(c=l)):f=!1):o&&(f=!1),(f=!1!==f&&w(c,m))&&H(c,m)):3!==h&&8!=h||(f=!0,c.nodeValue!==m.nodeValue&&(c.nodeValue=m.nodeValue))),f){m=n,c=a;continue e}o?N(o):M(c,e,!0),c=a}if(r&&(l=O[r])&&w(l,m))d||z(e,l),H(l,m);else{var b=s(m);!1!==b&&(b&&(m=b),m.actualize&&(m=m.actualize(e.ownerDocument||g)),z(e,m),E(m))}m=n,c=a}!function(e,t,r){for(;t;){var o=t.nextSibling;(r=i(t))?N(r):M(t,e,!0),t=o}}(e,c,o);var u=y[e.nodeName];u&&u(e,t)}(e,t):y.TEXTAREA(e,t)}P(e);var I,L,S=e,A=S.nodeType,R=t.nodeType;if(!C)if(1===A)1===R?w(e,t)||(f(e),S=function(e,t){for(var r=e.firstChild;r;){var o=r.nextSibling;t.appendChild(r),r=o}return t}(e,(I=t.nodeName,(L=t.namespaceURI)&&"http://www.w3.org/1999/xhtml"!==L?g.createElementNS(L,I):g.createElement(I)))):S=t;else if(3===A||8===A){if(R===A)return S.nodeValue!==t.nodeValue&&(S.nodeValue=t.nodeValue),S;S=t}if(S===t)f(e);else{if(t.isSameNode&&t.isSameNode(S))return;if(H(S,t,C),T)for(var B=0,U=T.length;B<U;B++){var D=O[T[B]];D&&M(D,D.parentNode,!1)}}return!C&&S!==e&&e.parentNode&&(S.actualize&&(S=S.actualize(e.ownerDocument||g)),e.parentNode.replaceChild(S,e)),S};const C=[{tagName:"limel-chip",attributes:["text","icon","link","badge","disabled","readonly","selected","type","size"]},{tagName:"limel-icon",attributes:["name","size","badge"]},{tagName:"limel-badge",attributes:["label"]},{tagName:"limel-callout",attributes:["heading","icon","type"]},{tagName:"limel-linear-progress",attributes:["value","indeterminate"]},{tagName:"limel-circular-progress",attributes:["value","max-value","prefix","suffix","size","display-percentage-colors"]},{tagName:"limel-spinner",attributes:["size"]},{tagName:"limel-info-tile",attributes:["value","icon","label","prefix","suffix","badge"]}],O=class{constructor(t){e(this,t),this.value="",this.whitelist=a.markdownWhitelist,this.lazyLoadImages=!1,this.removeEmptyParagraphs=!0,this.adaptColorContrast=!1,this.imageIntersectionObserver=null}async toMarkdown(){await this.rendering;const{exportMarkdown:e}=await import("./p-Bgn2bikC.js");return e(this.rootElement,this.cachedCombinedWhitelist)}textChanged(){return this.rendering=this.renderMarkdown(),this.rendering}async renderMarkdown(){try{this.cleanupImageIntersectionObserver(),this.cachedCombinedWhitelist&&this.whitelist===this.cachedConsumerWhitelist||(this.cachedConsumerWhitelist=this.whitelist,this.cachedCombinedWhitelist=function(e,t){if(!(null==t?void 0:t.length))return e.map((e=>Object.assign(Object.assign({},e),{attributes:[...e.attributes]})));const r=new Map;for(const o of[...e,...t]){const e=r.get(o.tagName);if(e)for(const t of o.attributes)e.add(t);else r.set(o.tagName,new Set(o.attributes))}return[...r].map((([e,t])=>({tagName:e,attributes:[...t]})))}(C,this.whitelist));const e=this.cachedCombinedWhitelist,t=await o(this.value,{forceHardLineBreaks:!0,whitelist:e,lazyLoadImages:this.lazyLoadImages,removeEmptyParagraphs:this.removeEmptyParagraphs});!function(e,t=""){try{z(e,`<div>${t}</div>`,{childrenOnly:!0})}catch(r){console.warn("morphdom failed, falling back to innerHTML:",r),e.innerHTML=t}}(this.rootElement,t),function(e,t){if(e&&(null==t?void 0:t.length))for(const r of t){const t=e.querySelectorAll(r.tagName);for(const e of t)m(e,r.attributes)}}(this.rootElement,e),this.adaptColorContrast&&l(this.rootElement),this.setupImageIntersectionObserver()}catch(e){console.error(e)}}handleWhitelistChange(){return this.textChanged()}handleRemoveEmptyParagraphsChange(){return this.textChanged()}handleAdaptColorContrastChange(){return this.textChanged()}async componentDidLoad(){this.textChanged()}disconnectedCallback(){this.cleanupImageIntersectionObserver()}render(){return t(r,{key:"eb1749c0d9dda5b26400cb8a11e884d435e759f4"},t("div",{key:"2574a46c51bd1d18808f1bac945a7d356550e02c",id:"markdown",ref:e=>this.rootElement=e}))}setupImageIntersectionObserver(){this.lazyLoadImages&&(this.imageIntersectionObserver=new i(this.rootElement))}cleanupImageIntersectionObserver(){this.imageIntersectionObserver&&(this.imageIntersectionObserver.disconnect(),this.imageIntersectionObserver=null)}static get watchers(){return{value:[{textChanged:0}],whitelist:[{handleWhitelistChange:0}],removeEmptyParagraphs:[{handleRemoveEmptyParagraphsChange:0}],adaptColorContrast:[{handleAdaptColorContrastChange:0}]}}};O.style='@charset "UTF-8";pre,pre p,code{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-size:0.75rem}pre{max-width:100%;white-space:pre-wrap;word-wrap:break-word}code{letter-spacing:-0.0125rem;color:rgb(var(--contrast-1300));tab-size:4;hyphens:none;display:inline;border-radius:0.25rem;padding:0.03125rem 0.25rem;background-color:rgb(var(--contrast-600))}pre>code{display:block;margin:0.5rem 0;padding:0.5rem 0.75rem}h1{font-size:1.5rem}h2{font-size:1.25rem}h3{font-size:1.125rem}h4{font-size:1rem}h5{font-size:var(--limel-theme-default-font-size)}h6{font-size:0.75rem}h1,h2{margin-top:0.5rem;margin-bottom:0.5rem;letter-spacing:-0.03125rem;font-weight:500}h3,h4{margin-top:0.75rem;margin-bottom:0.25rem;font-weight:600}h5,h6{margin-top:0.5rem;margin-bottom:0.125rem;font-weight:600}h1,h2,h3,h4,h5,h6{word-break:break-word;hyphens:auto;-webkit-hyphens:auto}h1 code,h2 code,h3 code,h4 code,h5 code,h6 code{font-size:inherit}:not([contenteditable=true]) h1,:not([contenteditable=true]) h2,:not([contenteditable=true]) h3,:not([contenteditable=true]) h4,:not([contenteditable=true]) h5,:not([contenteditable=true]) h6{text-wrap:balance}[contenteditable=true] h1,[contenteditable=true] h2,[contenteditable=true] h3,[contenteditable=true] h4,[contenteditable=true] h5,[contenteditable=true] h6{text-wrap:initial}:host(limel-markdown.truncate-paragraphs) p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}p,li{font-size:var(--limel-theme-default-font-size);word-break:break-word}a{word-break:break-all}p{margin-top:0;margin-bottom:0.5rem}p:last-child{margin-bottom:0}a{transition:color 0.2s ease;color:var(--markdown-hyperlink-color, rgb(var(--color-blue-dark)));text-decoration:none}a:hover{color:var(--markdown-hyperlink-color--hovered, rgb(var(--color-blue-default)))}hr{margin:1.75rem 0 2rem 0;border-width:0;border-top:1px solid rgb(var(--contrast-500))}ul{list-style:none}ul>li{margin-left:0.75rem}ul>li:before{content:"";position:absolute;left:-0.5rem;top:0.5rem;width:0.25rem;height:0.25rem;border-radius:50%;background-color:rgb(var(--contrast-700));display:block}ol{margin-top:0.25rem;padding-left:1rem}ul{margin-top:0.25rem;padding-left:0}ul ul,ul ol,ol ol,ol ul{margin-left:0}li{position:relative;margin-bottom:0.25rem}:host(limel-markdown:not(.no-table-styles)) table{table-layout:auto;min-width:100%;border-collapse:collapse;border-spacing:0;background:transparent;margin:0.75rem 0}:host(limel-markdown:not(.no-table-styles)) tbody{border:1px solid rgb(var(--contrast-400));border-radius:0.25rem}:host(limel-markdown:not(.no-table-styles)) th,:host(limel-markdown:not(.no-table-styles)) td{text-align:left;vertical-align:top;transition:background-color 0.2s ease;font-size:var(--limel-theme-default-font-size)}:host(limel-markdown:not(.no-table-styles)) th p,:host(limel-markdown:not(.no-table-styles)) th li,:host(limel-markdown:not(.no-table-styles)) th a,:host(limel-markdown:not(.no-table-styles)) td p,:host(limel-markdown:not(.no-table-styles)) td li,:host(limel-markdown:not(.no-table-styles)) td a{word-break:normal;overflow-wrap:normal}:host(limel-markdown:not(.no-table-styles)) td{padding:0.5rem 0.375rem 0.75rem 0.375rem}:host(limel-markdown:not(.no-table-styles)) tr th{background-color:rgb(var(--contrast-400));padding:0.25rem 0.375rem;font-weight:normal}:host(limel-markdown:not(.no-table-styles)) tr th:only-child{text-align:center}:host(limel-markdown:not(.no-table-styles)) tbody tr:nth-child(odd) td{background-color:rgb(var(--contrast-200))}:host(limel-markdown:not(.no-table-styles)) tbody tr:hover td{background-color:rgb(var(--contrast-300))}table{display:block;box-sizing:border-box;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}blockquote{position:relative;max-width:100%;margin:0.75rem 0;padding:0.5rem;border-left:0.25rem solid rgb(var(--contrast-500));background-color:rgb(var(--contrast-200))}blockquote:before,blockquote:after{position:absolute;line-height:0;font-size:2rem;opacity:0.4}blockquote:before{content:"“";left:-0.5rem;top:0.5rem}blockquote:after{content:"”";right:-0.25rem;bottom:-0.25rem}blockquote blockquote{padding-top:0;padding-right:0;padding-bottom:0;padding-left:0.25rem;border-color:rgb(var(--contrast-700));border-left-width:1px}blockquote blockquote:before,blockquote blockquote:after{display:none}blockquote:has(>blockquote){padding-left:0.25rem;padding-bottom:0}dl{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;margin-bottom:2rem;border:1px solid rgb(var(--contrast-400));border-radius:0.375rem;background-color:rgb(var(--contrast-200))}dl dt,dl dd{padding:0.375rem 0.5rem;font-size:var(--limel-theme-default-font-size);margin:0}dl dt:nth-of-type(even),dl dd:nth-of-type(even){background-color:rgb(var(--contrast-300))}dl dt:first-child{border-top-left-radius:0.375rem}dl dt:last-child{border-bottom-left-radius:0.375rem}dl dd:first-child{border-top-right-radius:0.375rem}dl dd:last-child{border-bottom-right-radius:0.375rem}img{max-width:100%;border-radius:0.25rem}kbd{display:inline-block;font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-weight:600;color:rgb(var(--contrast-1100));white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:normal;border-radius:0.125rem;border-style:solid;border-color:rgb(var(--contrast-500));border-width:0 1px 0.1875rem 1px;padding:0.0625rem 0.375rem;margin:0 0.25rem;background-color:rgb(var(--contrast-200));box-shadow:var(--button-shadow-normal), 0 0.625rem 0.375rem -0.5rem rgb(var(--color-black), 0.02), 0 0.025rem 0.5rem 0 rgb(var(--contrast-100)) inset}:host(limel-markdown.adjust-for-table-cell) img{max-height:1.25rem;vertical-align:middle}:host(limel-markdown.adjust-for-table-cell) p{display:inline}:host(limel-markdown.adjust-for-table-cell) h1,:host(limel-markdown.adjust-for-table-cell) h2,:host(limel-markdown.adjust-for-table-cell) h3,:host(limel-markdown.adjust-for-table-cell) h4,:host(limel-markdown.adjust-for-table-cell) h5,:host(limel-markdown.adjust-for-table-cell) h6{display:inline-block;vertical-align:bottom;font-size:var(--limel-theme-default-font-size);margin:0 0.25rem 0 0;letter-spacing:normal;font-weight:500}:host(limel-markdown.adjust-for-table-cell) h1:before,:host(limel-markdown.adjust-for-table-cell) h2:before,:host(limel-markdown.adjust-for-table-cell) h3:before,:host(limel-markdown.adjust-for-table-cell) h4:before,:host(limel-markdown.adjust-for-table-cell) h5:before,:host(limel-markdown.adjust-for-table-cell) h6:before{opacity:0.6;vertical-align:middle;font-size:0.5rem;border-radius:0.25rem 0 0 0.25rem;padding:0.25rem;padding-right:2rem;margin-right:-1.75rem;background:linear-gradient(to right, rgb(var(--contrast-800), 0.6), rgb(var(--contrast-800), 0))}:host(limel-markdown.adjust-for-table-cell) h1:before{content:"H1"}:host(limel-markdown.adjust-for-table-cell) h2:before{content:"H2"}:host(limel-markdown.adjust-for-table-cell) h3:before{content:"H3"}:host(limel-markdown.adjust-for-table-cell) h4:before{content:"H4"}:host(limel-markdown.adjust-for-table-cell) h5:before{content:"H5"}:host(limel-markdown.adjust-for-table-cell) h6:before{content:"H6"}:host(limel-markdown.adjust-for-table-cell) pre{margin:0}:host(limel-markdown.adjust-for-table-cell) pre>code{padding:0.125rem;margin:0}:host(limel-markdown.adjust-for-table-cell) dl{margin:0}:host(limel-markdown.adjust-for-table-cell) dl dt,:host(limel-markdown.adjust-for-table-cell) dl dd{padding:0.00625rem 0.125rem}*,*::before,*::after{box-sizing:border-box}* :where(:not(img,video,svg,canvas,iframe)),*::before :where(:not(img,video,svg,canvas,iframe)),*::after :where(:not(img,video,svg,canvas,iframe)){min-width:0;min-height:0}hr{border-top:1px solid rgb(var(--contrast-700))}.MsoNormal{margin:0}:host(limel-markdown.reset-img-height) #markdown img{height:auto !important}';export{O as limel_markdown}
@@ -1 +1 @@
1
- import{r as t,c as e,h as i,H as a,a as r}from"./p-BU9IJqli.js";import{t as s}from"./p-w3yKYfBQ.js";import{c as n}from"./p-BrjD-ITe.js";import{g as o}from"./p-ChagAaNf.js";import{g as l}from"./p-CSC2LJ7P.js";const h="en",u=class{constructor(a){t(this,a),this.goToPage=e(this,"goToPage",6),this.page=1,this.pageSize=100,this.totalItems=null,this.loading=!1,this.language="en",this.lastKnownTotalItems=null,this.liveMessage="",this.idPrefix=n(),this.warnedAbout=new Map,this.settledLanguage=h,this.view={page:1,pageCount:null,pageSize:100,totalItems:null,slots:[]},this.renderSlot=(t,e)=>{if("gap"===t.kind)return this.renderGap(e);const a=t.page===this.currentPage;return i("button",{key:`page-${e}`,id:this.slotId(e),class:"page","aria-current":a?"page":null,"aria-disabled":this.loading?"true":null,"aria-label":this.pageLabel(t.page,a),"data-page":t.page,onClick:this.selectPage},this.formatNumber(t.page),this.renderSpinner(a),this.renderTooltip(t.page,e))},this.openJump=t=>{if(this.loading)return;const{index:e}=t.currentTarget.dataset;this.openGap=Number(e)},this.closeJump=()=>{this.openGap=void 0},this.handleJump=t=>{t.stopPropagation();const e=t.detail;this.focusGap(this.openGap),this.openGap=void 0,this.goTo(e)&&(this.awaitedJump=e,this.jumpedFrom=this.view.page)},this.step=t=>{const e=t.currentTarget.dataset.direction;this.isArrowDisabled(e)||this.goTo(this.currentPage+("next"===e?1:-1))},this.selectPage=t=>{const{page:e}=t.currentTarget.dataset;this.goTo(Number(e))},this.translate=(t,e)=>s.get(t,this.language,e)}componentWillRender(){const t=this.knownTotalItems,e=this.usablePageSize,i=this.wholePage(this.page);null!==t&&(this.lastKnownTotalItems=t);const a=this.countPages(null!=t?t:this.lastKnownTotalItems,e),r=this.capToLastPage(i,a);this.view={page:r,pageCount:a,pageSize:e,totalItems:t,slots:this.slotsFor(r,a)},this.closeJumpWithoutAGap(),this.readOut(r),this.reconcile(r,i),this.shownPage=r}countPages(t,e){return null===t?null:Math.max(1,Math.ceil(t/e))}componentDidRender(){this.reportCorrection(),this.followJumpedPage()}reportCorrection(){const t=this.pendingCorrection;void 0!==t&&(this.pendingCorrection=void 0,this.emitGoToPage(t,"clamped"))}readOut(t){const e=this.rangeIdentity(t),i=this.lastRange;this.lastRange=e,void 0!==this.shownPage&&(t!==this.shownPage||null!==e&&null!==i&&e!==i)&&(this.liveMessage=this.rangeLabel(t)||this.pageLabel(t,!0))}rangeIdentity(t){const e=this.itemsOn(t);return null===e?null:`${e.from}:${e.to}`}offsetOf(t){return(t-1)*this.view.pageSize}itemsOn(t){const{totalItems:e,pageSize:i}=this.view;if(null===e)return null;const a=this.offsetOf(t)+1;return{from:a,to:Math.min(a+i-1,e)}}reconcile(t,e){const i=this.page,a=!Object.is(e,i),r=t!==e,s=a||r&&null!==this.view.totalItems;a||r||(this.reportedAsk=void 0),s&&(t===this.shownPage&&Object.is(i,this.reportedAsk)||(this.reportedAsk=i,this.pendingCorrection=t))}handleLanguageChange(){this.numberFormat=void 0}closeJumpWithoutAGap(){var t;const e=this.openGap;void 0!==e&&"gap"!==(null===(t=this.view.slots[e])||void 0===t?void 0:t.kind)&&(this.openGap=void 0)}render(){const{slots:t}=this.view;return i(a,{key:"dce4e827fbbaba2f2423b7623caa1371b51a7750"},i("nav",{key:"18e75c58c919f78a5c19986d3a42612c0b125a55","aria-label":this.translate("pagination.label"),"aria-busy":this.loading?"true":null},this.renderArrow("previous"),t.map(((t,e)=>this.renderSlot(t,e))),this.renderArrow("next")),i("span",{key:"1aea124497cbec584bdb1977c7371b391f5576a2",class:"live-region","aria-live":"polite"},this.liveMessage))}slotsFor(t,e){return null===e?[{kind:"page",page:t}]:l(t,e)}renderGap(t){const{pageCount:e}=this.view;if(null!==e)return i("limel-popover",{key:`gap-${t}`,open:this.openGap===t,openDirection:"bottom",onClose:this.closeJump},i("button",{slot:"trigger",class:"gap",id:this.slotId(t),"aria-label":this.translate("pagination.jump-to-a-page"),"aria-disabled":this.loading?"true":null,"data-index":t,onClick:this.openJump},"···"),i("limel-pagination-jump",{open:this.openGap===t,page:this.view.page,pageCount:e,loading:this.loading,language:this.languageForNumbers,onJump:this.handleJump}))}focusGap(t){var e;const i=null===(e=this.host.shadowRoot)||void 0===e?void 0:e.querySelector(`[id="${this.slotId(t)}"]`);null==i||i.focus(),this.jumpFocus=i}followJumpedPage(){void 0!==this.awaitedJump&&(this.ownsFocus()?this.view.page===this.awaitedJump?(this.forgetJump(),this.focusCurrentPage()):this.view.page!==this.jumpedFrom&&this.forgetJump():this.forgetJump())}forgetJump(){this.awaitedJump=void 0,this.jumpedFrom=void 0}ownsFocus(){var t,e;return(null===(t=this.host.shadowRoot)||void 0===t?void 0:t.activeElement)===this.jumpFocus||!(null===(e=this.jumpFocus)||void 0===e?void 0:e.isConnected)&&document.activeElement===document.body}focusCurrentPage(){var t;const e=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector('[aria-current="page"]');null==e||e.focus(),this.jumpFocus=void 0}renderSpinner(t){if(t&&this.loading)return i("limel-spinner",null)}renderTooltip(t,e){return i("limel-tooltip",{elementId:this.slotId(e),label:this.translate("pagination.page",{page:this.formatNumber(t)}),helperLabel:this.rangeLabel(t)})}renderArrow(t){const e=this.isArrowDisabled(t);return i("button",{id:this.arrowId(t),class:`arrow ${t}`,"aria-label":this.translate(`pagination.${t}-page`),"aria-disabled":e?"true":null,"data-direction":t,onClick:this.step},i("span",{"aria-hidden":"true"}),this.renderArrowTooltip(t))}renderArrowTooltip(t){if(this.isArrowDisabled(t))return;const e="next"===t?this.currentPage+1:this.currentPage-1;return i("limel-tooltip",{elementId:this.arrowId(t),label:this.translate(`pagination.go-to-${t}-page`),helperLabel:this.translate("pagination.page",{page:this.formatNumber(e)})})}isArrowDisabled(t){if(this.loading)return!0;const{page:e,pageCount:i}=this.view;return"previous"===t?e<=1:null===i||e>=i}goTo(t){return this.awaitedJump=void 0,!this.loading&&t!==this.currentPage&&(this.emitGoToPage(t,"user"),!0)}get currentPage(){return this.view.page}emitGoToPage(t,e){this.goToPage.emit({page:t,reason:e,pageSize:this.view.pageSize,offset:this.offsetOf(t)})}get knownTotalItems(){const{totalItems:t}=this;return null==t?null:Number.isSafeInteger(t)&&t>=0?(this.warnedAbout.delete("totalItems"),t):(this.warnOnce("totalItems",t,(()=>`\`totalItems\` must be a whole number of at least 0, or null, but was ${t}. Ignoring it and keeping the last count it had.`)),null)}get usablePageSize(){return this.countable("pageSize",this.pageSize,1,100)}wholePage(t){return this.countable("page",t,1,1)}countable(t,e,i,a){return Number.isSafeInteger(e)&&e>=i?(this.warnedAbout.delete(t),e):(this.warnOnce(t,e,(()=>`\`${t}\` must be a whole number of at least ${i}, but was ${e}. Using ${a}.`)),a)}capToLastPage(t,e){return null===e?t:Math.min(t,e)}warnOnce(t,e,i){this.warnedAbout.has(t)&&Object.is(this.warnedAbout.get(t),e)||(this.warnedAbout.set(t,e),console.warn(`limel-pagination: ${i()}`))}pageLabel(t,e){return this.translate(e?"pagination.current-page":"pagination.go-to-page",{page:this.formatNumber(t)})}rangeLabel(t){const{totalItems:e,pageSize:i}=this.view;if(null===e)return"";const a=t*i;return this.translate("pagination.items-range",{from:this.formatNumber((t-1)*i+1),to:this.formatNumber(Math.min(a,e)),total:this.formatNumber(e)})}slotId(t){return`${this.idPrefix}-slot-${t}`}arrowId(t){return`${this.idPrefix}-${t}`}formatNumber(t){var e;return null!==(e=this.numberFormat)&&void 0!==e||(this.numberFormat=this.createNumberFormat()),this.numberFormat.format(t)}get languageForNumbers(){var t;return null!==(t=this.numberFormat)&&void 0!==t||(this.numberFormat=this.createNumberFormat()),this.settledLanguage}createNumberFormat(){const{language:t}=this;try{const e=new Intl.NumberFormat(t),i=e.resolvedOptions().locale;if(o(i)===o(t))return this.warnedAbout.delete("language"),this.settledLanguage=t,e}catch(t){}return this.warnOnce("language",t,(()=>`\`language\` must be one this browser can write numbers in, but was ${JSON.stringify(t)}. Using ${h}.`)),this.settledLanguage=h,new Intl.NumberFormat(h)}get host(){return r(this)}static get watchers(){return{language:[{handleLanguageChange:0}]}}};u.style='@charset "UTF-8";:host(limel-pagination){display:block;box-sizing:border-box}*{box-sizing:border-box}nav{display:flex;align-items:center}button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit}button:focus{outline:none}button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:1.75rem;min-width:1.75rem;border-radius:1.75rem;padding:0 0.5rem;font-variant-numeric:tabular-nums}button:not([aria-disabled=true]):not([aria-current=page]){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:rgb(var(--contrast-1100));background-color:transparent}button:not([aria-disabled=true]):not([aria-current=page]):hover,button:not([aria-disabled=true]):not([aria-current=page]):focus,button:not([aria-disabled=true]):not([aria-current=page]):focus-visible{will-change:color, background-color, box-shadow, transform}button:not([aria-disabled=true]):not([aria-current=page]):hover,button:not([aria-disabled=true]):not([aria-current=page]):focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}button:not([aria-disabled=true]):not([aria-current=page]):hover{box-shadow:var(--button-shadow-hovered)}button:not([aria-disabled=true]):not([aria-current=page]):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button:not([aria-disabled=true]):not([aria-current=page]):hover,button:not([aria-disabled=true]):not([aria-current=page]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button[aria-disabled=true]:not([aria-current=page]){opacity:0.4}button[aria-disabled=true]{cursor:default}button[aria-current=page]{background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset)}button limel-spinner{position:absolute;pointer-events:none}limel-popover{display:inline-flex}.gap{width:1.75rem;padding:0;color:rgb(var(--contrast-1100))}.gap[aria-expanded=true]{box-shadow:var(--button-shadow-inset-pressed) !important}.arrow span{display:block;border-style:solid;border-color:transparent;border-width:0.25rem 0 0.25rem 0.375rem;border-left-color:currentColor;transition:transform 0.2s ease}.arrow.previous span{transform:rotateZ(180deg)}.arrow:not([aria-disabled=true]):hover.next span{transform:translate3d(0.1rem, 0, 0)}.arrow:not([aria-disabled=true]):hover.previous span{transform:translate3d(-0.1rem, 0, 0) rotateZ(180deg)}.live-region{position:absolute;width:0;height:0;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap}';export{u as limel_pagination}
1
+ import{r as t,c as e,h as i,H as a,a as r}from"./p-BU9IJqli.js";import{t as s}from"./p-B26k4gw8.js";import{c as n}from"./p-BrjD-ITe.js";import{g as o}from"./p-ChagAaNf.js";import{g as l}from"./p-CSC2LJ7P.js";const h="en",u=class{constructor(a){t(this,a),this.goToPage=e(this,"goToPage",6),this.page=1,this.pageSize=100,this.totalItems=null,this.loading=!1,this.language="en",this.lastKnownTotalItems=null,this.liveMessage="",this.idPrefix=n(),this.warnedAbout=new Map,this.settledLanguage=h,this.view={page:1,pageCount:null,pageSize:100,totalItems:null,slots:[]},this.renderSlot=(t,e)=>{if("gap"===t.kind)return this.renderGap(e);const a=t.page===this.currentPage;return i("button",{key:`page-${e}`,id:this.slotId(e),class:"page","aria-current":a?"page":null,"aria-disabled":this.loading?"true":null,"aria-label":this.pageLabel(t.page,a),"data-page":t.page,onClick:this.selectPage},this.formatNumber(t.page),this.renderSpinner(a),this.renderTooltip(t.page,e))},this.openJump=t=>{if(this.loading)return;const{index:e}=t.currentTarget.dataset;this.openGap=Number(e)},this.closeJump=()=>{this.openGap=void 0},this.handleJump=t=>{t.stopPropagation();const e=t.detail;this.focusGap(this.openGap),this.openGap=void 0,this.goTo(e)&&(this.awaitedJump=e,this.jumpedFrom=this.view.page)},this.step=t=>{const e=t.currentTarget.dataset.direction;this.isArrowDisabled(e)||this.goTo(this.currentPage+("next"===e?1:-1))},this.selectPage=t=>{const{page:e}=t.currentTarget.dataset;this.goTo(Number(e))},this.translate=(t,e)=>s.get(t,this.language,e)}componentWillRender(){const t=this.knownTotalItems,e=this.usablePageSize,i=this.wholePage(this.page);null!==t&&(this.lastKnownTotalItems=t);const a=this.countPages(null!=t?t:this.lastKnownTotalItems,e),r=this.capToLastPage(i,a);this.view={page:r,pageCount:a,pageSize:e,totalItems:t,slots:this.slotsFor(r,a)},this.closeJumpWithoutAGap(),this.readOut(r),this.reconcile(r,i),this.shownPage=r}countPages(t,e){return null===t?null:Math.max(1,Math.ceil(t/e))}componentDidRender(){this.reportCorrection(),this.followJumpedPage()}reportCorrection(){const t=this.pendingCorrection;void 0!==t&&(this.pendingCorrection=void 0,this.emitGoToPage(t,"clamped"))}readOut(t){const e=this.rangeIdentity(t),i=this.lastRange;this.lastRange=e,void 0!==this.shownPage&&(t!==this.shownPage||null!==e&&null!==i&&e!==i)&&(this.liveMessage=this.rangeLabel(t)||this.pageLabel(t,!0))}rangeIdentity(t){const e=this.itemsOn(t);return null===e?null:`${e.from}:${e.to}`}offsetOf(t){return(t-1)*this.view.pageSize}itemsOn(t){const{totalItems:e,pageSize:i}=this.view;if(null===e)return null;const a=this.offsetOf(t)+1;return{from:a,to:Math.min(a+i-1,e)}}reconcile(t,e){const i=this.page,a=!Object.is(e,i),r=t!==e,s=a||r&&null!==this.view.totalItems;a||r||(this.reportedAsk=void 0),s&&(t===this.shownPage&&Object.is(i,this.reportedAsk)||(this.reportedAsk=i,this.pendingCorrection=t))}handleLanguageChange(){this.numberFormat=void 0}closeJumpWithoutAGap(){var t;const e=this.openGap;void 0!==e&&"gap"!==(null===(t=this.view.slots[e])||void 0===t?void 0:t.kind)&&(this.openGap=void 0)}render(){const{slots:t}=this.view;return i(a,{key:"b8e02650528bd6547965afb437129cad0ea6cd33"},i("nav",{key:"3b4b66479357da55ff6ff41d78cc37f77b2d32f6","aria-label":this.translate("pagination.label"),"aria-busy":this.loading?"true":null},this.renderArrow("previous"),t.map(((t,e)=>this.renderSlot(t,e))),this.renderArrow("next")),i("span",{key:"b248701311dd6da9d4fb158299d07e618297038e",class:"live-region","aria-live":"polite"},this.liveMessage))}slotsFor(t,e){return null===e?[{kind:"page",page:t}]:l(t,e)}renderGap(t){const{pageCount:e}=this.view;if(null!==e)return i("limel-popover",{key:`gap-${t}`,open:this.openGap===t,openDirection:"bottom",onClose:this.closeJump},i("button",{slot:"trigger",class:"gap",id:this.slotId(t),"aria-label":this.translate("pagination.jump-to-a-page"),"aria-disabled":this.loading?"true":null,"data-index":t,onClick:this.openJump},"···"),i("limel-pagination-jump",{open:this.openGap===t,page:this.view.page,pageCount:e,loading:this.loading,language:this.languageForNumbers,onJump:this.handleJump}))}focusGap(t){var e;const i=null===(e=this.host.shadowRoot)||void 0===e?void 0:e.querySelector(`[id="${this.slotId(t)}"]`);null==i||i.focus(),this.jumpFocus=i}followJumpedPage(){void 0!==this.awaitedJump&&(this.ownsFocus()?this.view.page===this.awaitedJump?(this.forgetJump(),this.focusCurrentPage()):this.view.page!==this.jumpedFrom&&this.forgetJump():this.forgetJump())}forgetJump(){this.awaitedJump=void 0,this.jumpedFrom=void 0}ownsFocus(){var t,e;return(null===(t=this.host.shadowRoot)||void 0===t?void 0:t.activeElement)===this.jumpFocus||!(null===(e=this.jumpFocus)||void 0===e?void 0:e.isConnected)&&document.activeElement===document.body}focusCurrentPage(){var t;const e=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector('[aria-current="page"]');null==e||e.focus(),this.jumpFocus=void 0}renderSpinner(t){if(t&&this.loading)return i("limel-spinner",null)}renderTooltip(t,e){return i("limel-tooltip",{elementId:this.slotId(e),label:this.translate("pagination.page",{page:this.formatNumber(t)}),helperLabel:this.rangeLabel(t)})}renderArrow(t){const e=this.isArrowDisabled(t);return i("button",{id:this.arrowId(t),class:`arrow ${t}`,"aria-label":this.translate(`pagination.${t}-page`),"aria-disabled":e?"true":null,"data-direction":t,onClick:this.step},i("span",{"aria-hidden":"true"}),this.renderArrowTooltip(t))}renderArrowTooltip(t){if(this.isArrowDisabled(t))return;const e="next"===t?this.currentPage+1:this.currentPage-1;return i("limel-tooltip",{elementId:this.arrowId(t),label:this.translate(`pagination.go-to-${t}-page`),helperLabel:this.translate("pagination.page",{page:this.formatNumber(e)})})}isArrowDisabled(t){if(this.loading)return!0;const{page:e,pageCount:i}=this.view;return"previous"===t?e<=1:null===i||e>=i}goTo(t){return this.awaitedJump=void 0,!this.loading&&t!==this.currentPage&&(this.emitGoToPage(t,"user"),!0)}get currentPage(){return this.view.page}emitGoToPage(t,e){this.goToPage.emit({page:t,reason:e,pageSize:this.view.pageSize,offset:this.offsetOf(t)})}get knownTotalItems(){const{totalItems:t}=this;return null==t?null:Number.isSafeInteger(t)&&t>=0?(this.warnedAbout.delete("totalItems"),t):(this.warnOnce("totalItems",t,(()=>`\`totalItems\` must be a whole number of at least 0, or null, but was ${t}. Ignoring it and keeping the last count it had.`)),null)}get usablePageSize(){return this.countable("pageSize",this.pageSize,1,100)}wholePage(t){return this.countable("page",t,1,1)}countable(t,e,i,a){return Number.isSafeInteger(e)&&e>=i?(this.warnedAbout.delete(t),e):(this.warnOnce(t,e,(()=>`\`${t}\` must be a whole number of at least ${i}, but was ${e}. Using ${a}.`)),a)}capToLastPage(t,e){return null===e?t:Math.min(t,e)}warnOnce(t,e,i){this.warnedAbout.has(t)&&Object.is(this.warnedAbout.get(t),e)||(this.warnedAbout.set(t,e),console.warn(`limel-pagination: ${i()}`))}pageLabel(t,e){return this.translate(e?"pagination.current-page":"pagination.go-to-page",{page:this.formatNumber(t)})}rangeLabel(t){const{totalItems:e,pageSize:i}=this.view;if(null===e)return"";const a=t*i;return this.translate("pagination.items-range",{from:this.formatNumber((t-1)*i+1),to:this.formatNumber(Math.min(a,e)),total:this.formatNumber(e)})}slotId(t){return`${this.idPrefix}-slot-${t}`}arrowId(t){return`${this.idPrefix}-${t}`}formatNumber(t){var e;return null!==(e=this.numberFormat)&&void 0!==e||(this.numberFormat=this.createNumberFormat()),this.numberFormat.format(t)}get languageForNumbers(){var t;return null!==(t=this.numberFormat)&&void 0!==t||(this.numberFormat=this.createNumberFormat()),this.settledLanguage}createNumberFormat(){const{language:t}=this;try{const e=new Intl.NumberFormat(t),i=e.resolvedOptions().locale;if(o(i)===o(t))return this.warnedAbout.delete("language"),this.settledLanguage=t,e}catch(t){}return this.warnOnce("language",t,(()=>`\`language\` must be one this browser can write numbers in, but was ${JSON.stringify(t)}. Using ${h}.`)),this.settledLanguage=h,new Intl.NumberFormat(h)}get host(){return r(this)}static get watchers(){return{language:[{handleLanguageChange:0}]}}};u.style='@charset "UTF-8";:host(limel-pagination){display:block;box-sizing:border-box}*{box-sizing:border-box}nav{display:flex;align-items:center}button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit}button:focus{outline:none}button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:1.75rem;min-width:1.75rem;border-radius:1.75rem;padding:0 0.5rem;font-variant-numeric:tabular-nums}button:not([aria-disabled=true]):not([aria-current=page]){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:rgb(var(--contrast-1100));background-color:transparent}button:not([aria-disabled=true]):not([aria-current=page]):hover,button:not([aria-disabled=true]):not([aria-current=page]):focus,button:not([aria-disabled=true]):not([aria-current=page]):focus-visible{will-change:color, background-color, box-shadow, transform}button:not([aria-disabled=true]):not([aria-current=page]):hover,button:not([aria-disabled=true]):not([aria-current=page]):focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}button:not([aria-disabled=true]):not([aria-current=page]):hover{box-shadow:var(--button-shadow-hovered)}button:not([aria-disabled=true]):not([aria-current=page]):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button:not([aria-disabled=true]):not([aria-current=page]):hover,button:not([aria-disabled=true]):not([aria-current=page]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button[aria-disabled=true]:not([aria-current=page]){opacity:0.4}button[aria-disabled=true]{cursor:default}button[aria-current=page]{background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset)}button limel-spinner{position:absolute;pointer-events:none}limel-popover{display:inline-flex}.gap{width:1.75rem;padding:0;color:rgb(var(--contrast-1100))}.gap[aria-expanded=true]{box-shadow:var(--button-shadow-inset-pressed) !important}.arrow span{display:block;border-style:solid;border-color:transparent;border-width:0.25rem 0 0.25rem 0.375rem;border-left-color:currentColor;transition:transform 0.2s ease}.arrow.previous span{transform:rotateZ(180deg)}.arrow:not([aria-disabled=true]):hover.next span{transform:translate3d(0.1rem, 0, 0)}.arrow:not([aria-disabled=true]):hover.previous span{transform:translate3d(-0.1rem, 0, 0) rotateZ(180deg)}.live-region{position:absolute;width:0;height:0;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap}';export{u as limel_pagination}