@limetech/lime-elements 40.6.0 → 40.6.1

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 (441) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/{adapt-color-contrast-Beo1IEl_.js → adapt-color-contrast-h6iwOfZd.js} +1 -1
  3. package/dist/cjs/{checkbox.template-BPk8WkQF.js → checkbox.template-CoNVC4Nf.js} +2 -2
  4. package/dist/cjs/{files-DI4jItxi.js → files-DpGigQ8k.js} +1 -1
  5. package/dist/cjs/{format-bytes-CpUKKU86.js → format-bytes-WTHVI718.js} +1 -4
  6. package/dist/cjs/{hotkeys-BtR8uxvl.js → hotkeys-D761KWnZ.js} +1 -0
  7. package/dist/cjs/{image-resize-CG2fitJT.js → image-resize-JlRLB97I.js} +1 -0
  8. package/dist/cjs/{image.template-DY7qwbuy.js → image.template-DlF-f23b.js} +1 -1
  9. package/dist/cjs/{index--B6-r0uo.js → index-BlsqxTB1.js} +1 -7
  10. package/dist/cjs/index.cjs.js +1 -1
  11. package/dist/cjs/{isArrayLikeObject-U2Ddbw4n.js → isArrayLikeObject-BhSkOTkw.js} +17 -0
  12. package/dist/cjs/{language-CaqPKPyW.js → language-v-MMS6ym.js} +1 -1
  13. package/dist/cjs/lime-elements.cjs.js +2 -2
  14. package/dist/cjs/limel-3d-hover-effect-glow.cjs.entry.js +2 -2
  15. package/dist/cjs/limel-action-bar_3.cjs.entry.js +20 -18
  16. package/dist/cjs/limel-ai-avatar.cjs.entry.js +5 -5
  17. package/dist/cjs/limel-badge.cjs.entry.js +3 -3
  18. package/dist/cjs/limel-banner.cjs.entry.js +2 -2
  19. package/dist/cjs/limel-breadcrumbs_6.cjs.entry.js +80 -80
  20. package/dist/cjs/limel-button-group.cjs.entry.js +3 -3
  21. package/dist/cjs/limel-button.cjs.entry.js +4 -4
  22. package/dist/cjs/limel-callout.cjs.entry.js +6 -6
  23. package/dist/cjs/limel-card.cjs.entry.js +8 -7
  24. package/dist/cjs/limel-chart.cjs.entry.js +5 -5
  25. package/dist/cjs/limel-checkbox.cjs.entry.js +12 -10
  26. package/dist/cjs/limel-chip-set.cjs.entry.js +30 -39
  27. package/dist/cjs/limel-chip_2.cjs.entry.js +9 -9
  28. package/dist/cjs/limel-circular-progress.cjs.entry.js +2 -2
  29. package/dist/cjs/limel-code-diff.cjs.entry.js +25 -28
  30. package/dist/cjs/limel-code-editor.cjs.entry.js +17 -12
  31. package/dist/cjs/limel-collapsible-section.cjs.entry.js +8 -8
  32. package/dist/cjs/limel-color-picker-palette.cjs.entry.js +3 -3
  33. package/dist/cjs/limel-color-picker.cjs.entry.js +6 -5
  34. package/dist/cjs/limel-config.cjs.entry.js +3 -3
  35. package/dist/cjs/limel-date-picker.cjs.entry.js +8 -11
  36. package/dist/cjs/limel-dialog.cjs.entry.js +6 -9
  37. package/dist/cjs/limel-dock-button.cjs.entry.js +6 -11
  38. package/dist/cjs/limel-dock.cjs.entry.js +3 -3
  39. package/dist/cjs/limel-drag-handle.cjs.entry.js +6 -6
  40. package/dist/cjs/limel-dynamic-label.cjs.entry.js +1 -1
  41. package/dist/cjs/limel-email-viewer.cjs.entry.js +11 -17
  42. package/dist/cjs/limel-file-dropzone_2.cjs.entry.js +11 -12
  43. package/dist/cjs/limel-file-viewer.cjs.entry.js +1098 -1146
  44. package/dist/cjs/limel-file.cjs.entry.js +17 -16
  45. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +100 -94
  46. package/dist/cjs/limel-flex-container.cjs.entry.js +2 -2
  47. package/dist/cjs/limel-form.cjs.entry.js +67 -68
  48. package/dist/cjs/limel-grid.cjs.entry.js +2 -2
  49. package/dist/cjs/limel-header.cjs.entry.js +2 -2
  50. package/dist/cjs/limel-help-content.cjs.entry.js +2 -2
  51. package/dist/cjs/limel-help.cjs.entry.js +3 -3
  52. package/dist/cjs/limel-helper-line_3.cjs.entry.js +12 -14
  53. package/dist/cjs/limel-hotkey_4.cjs.entry.js +23 -23
  54. package/dist/cjs/limel-icon-button.cjs.entry.js +4 -4
  55. package/dist/cjs/limel-icon.cjs.entry.js +15 -13
  56. package/dist/cjs/limel-info-tile.cjs.entry.js +10 -10
  57. package/dist/cjs/limel-list-item.cjs.entry.js +10 -10
  58. package/dist/cjs/limel-markdown.cjs.entry.js +25 -22
  59. package/dist/cjs/limel-masonry-layout.cjs.entry.js +6 -5
  60. package/dist/cjs/limel-menu-item-meta.cjs.entry.js +3 -3
  61. package/dist/cjs/limel-pagination-jump.cjs.entry.js +17 -15
  62. package/dist/cjs/limel-pagination.cjs.entry.js +10 -9
  63. package/dist/cjs/limel-picker.cjs.entry.js +31 -29
  64. package/dist/cjs/limel-popover_2.cjs.entry.js +25 -21
  65. package/dist/cjs/limel-profile-picture.cjs.entry.js +12 -11
  66. package/dist/cjs/limel-progress-flow-item.cjs.entry.js +1 -1
  67. package/dist/cjs/limel-progress-flow.cjs.entry.js +11 -10
  68. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +475 -407
  69. package/dist/cjs/limel-radio-button-group.cjs.entry.js +2 -2
  70. package/dist/cjs/limel-radio-button.cjs.entry.js +3 -3
  71. package/dist/cjs/limel-scroller.cjs.entry.js +180 -0
  72. package/dist/cjs/limel-select.cjs.entry.js +17 -17
  73. package/dist/cjs/limel-shortcut.cjs.entry.js +1 -1
  74. package/dist/cjs/limel-slider.cjs.entry.js +18 -27
  75. package/dist/cjs/limel-snackbar.cjs.entry.js +5 -5
  76. package/dist/cjs/limel-split-button.cjs.entry.js +1 -1
  77. package/dist/cjs/limel-switch.cjs.entry.js +3 -3
  78. package/dist/cjs/limel-tab-bar.cjs.entry.js +66 -97
  79. package/dist/cjs/limel-tab-panel.cjs.entry.js +12 -9
  80. package/dist/cjs/limel-table.cjs.entry.js +527 -106
  81. package/dist/cjs/limel-text-editor-link-menu.cjs.entry.js +15 -14
  82. package/dist/cjs/limel-text-editor.cjs.entry.js +3 -3
  83. package/dist/cjs/loader.cjs.js +2 -2
  84. package/dist/cjs/{make-enter-clickable-NuTMC9MU.js → make-enter-clickable-BZHEWIJD.js} +19 -12
  85. package/dist/cjs/{markdown-exporter-9p7d3Q76.js → markdown-exporter-C-UW43FF.js} +1 -1
  86. package/dist/cjs/{markdown-parser-Cgv5Y9Z4.js → markdown-parser-ssDij8_l.js} +24 -22
  87. package/dist/cjs/{moment-CqRdiK10.js → moment-Cfsz2WF1.js} +1062 -833
  88. package/dist/cjs/{random-string-BTzDB2ee.js → random-string-CFCtFh5l.js} +1 -0
  89. package/dist/cjs/{render-list-component-5ZKWpCnM.js → render-list-component-BtAliHQp.js} +3 -5
  90. package/dist/cjs/{sv-BSR4W58y.js → sv-Co78RX70.js} +31 -3
  91. package/dist/cjs/{translations-DFFpR6AZ.js → translations-CNTWud2a.js} +5 -8
  92. package/dist/collection/collection-manifest.json +1 -0
  93. package/dist/collection/components/3d-hover-effect-glow/3d-hover-effect-glow.js +1 -1
  94. package/dist/collection/components/action-bar/action-bar-item/action-bar-item.js +8 -7
  95. package/dist/collection/components/action-bar/action-bar-item/action-bar-overflow-menu.js +1 -1
  96. package/dist/collection/components/action-bar/action-bar.js +6 -5
  97. package/dist/collection/components/ai-avatar/ai-avatar.js +1 -1
  98. package/dist/collection/components/badge/badge.js +2 -2
  99. package/dist/collection/components/banner/banner.js +1 -1
  100. package/dist/collection/components/breadcrumbs/breadcrumbs.js +2 -2
  101. package/dist/collection/components/button/button.js +2 -2
  102. package/dist/collection/components/button-group/button-group.js +1 -1
  103. package/dist/collection/components/callout/callout.js +1 -1
  104. package/dist/collection/components/card/card.js +6 -5
  105. package/dist/collection/components/checkbox/checkbox.js +9 -7
  106. package/dist/collection/components/checkbox/checkbox.template.js +1 -1
  107. package/dist/collection/components/chip/chip.js +1 -1
  108. package/dist/collection/components/chip-set/chip-set-input-helpers.js +18 -21
  109. package/dist/collection/components/chip-set/chip-set.js +7 -13
  110. package/dist/collection/components/circular-progress/circular-progress.js +1 -1
  111. package/dist/collection/components/code-diff/code-diff.js +19 -22
  112. package/dist/collection/components/code-diff/diff-engine.js +2 -2
  113. package/dist/collection/components/code-editor/code-editor.js +8 -3
  114. package/dist/collection/components/collapsible-section/collapsible-section.js +1 -1
  115. package/dist/collection/components/color-picker/color-picker-palette.js +2 -2
  116. package/dist/collection/components/color-picker/color-picker.js +5 -4
  117. package/dist/collection/components/config/config.js +2 -2
  118. package/dist/collection/components/date-picker/date-picker.js +3 -6
  119. package/dist/collection/components/date-picker/flatpickr-adapter/deferred-destroy.js +4 -3
  120. package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.js +1 -1
  121. package/dist/collection/components/date-picker/pickers/month-picker.js +40 -36
  122. package/dist/collection/components/date-picker/pickers/quarter-picker.js +35 -30
  123. package/dist/collection/components/date-picker/pickers/year-picker.js +16 -20
  124. package/dist/collection/components/dialog/dialog.js +4 -7
  125. package/dist/collection/components/dock/dock-button/dock-button.js +4 -9
  126. package/dist/collection/components/dock/dock.js +2 -2
  127. package/dist/collection/components/drag-handle/drag-handle.js +1 -1
  128. package/dist/collection/components/email-viewer/email-loader.js +14 -10
  129. package/dist/collection/components/email-viewer/email-viewer.js +1 -1
  130. package/dist/collection/components/email-viewer/sanitize-email-html.js +1 -4
  131. package/dist/collection/components/email-viewer/split-email-address-list.js +4 -10
  132. package/dist/collection/components/file/file.js +11 -10
  133. package/dist/collection/components/file-dropzone/file-dropzone.js +1 -1
  134. package/dist/collection/components/file-input/file-input.js +7 -8
  135. package/dist/collection/components/file-viewer/file-viewer.js +12 -9
  136. package/dist/collection/components/flex-container/flex-container.js +1 -1
  137. package/dist/collection/components/form/fields/schema-field.js +1 -1
  138. package/dist/collection/components/form/form.js +2 -5
  139. package/dist/collection/components/form/form.test-schemas.js +8 -10
  140. package/dist/collection/components/form/templates/array-field.js +7 -9
  141. package/dist/collection/components/form/templates/common.js +19 -19
  142. package/dist/collection/components/form/templates/object-field.js +1 -1
  143. package/dist/collection/components/form/validation-display.js +2 -2
  144. package/dist/collection/components/form/validators/format.js +1 -0
  145. package/dist/collection/components/form/widgets/code-editor.js +6 -9
  146. package/dist/collection/components/form/widgets/date-picker.js +1 -3
  147. package/dist/collection/components/grid/grid.js +1 -1
  148. package/dist/collection/components/header/header.js +1 -1
  149. package/dist/collection/components/help/help-content.js +1 -1
  150. package/dist/collection/components/help/help.js +2 -2
  151. package/dist/collection/components/helper-line/helper-line.js +3 -3
  152. package/dist/collection/components/hotkey/hotkey.js +1 -1
  153. package/dist/collection/components/icon/icon.js +11 -9
  154. package/dist/collection/components/icon-button/icon-button.js +1 -1
  155. package/dist/collection/components/info-tile/info-tile.js +9 -9
  156. package/dist/collection/components/input-field/input-field.js +11 -11
  157. package/dist/collection/components/list/list-renderer.js +5 -7
  158. package/dist/collection/components/list/list.js +2 -2
  159. package/dist/collection/components/list-item/list-item.js +2 -2
  160. package/dist/collection/components/list-item/menu-item-meta/menu-item-meta.js +1 -1
  161. package/dist/collection/components/markdown/hydrate-custom-elements.js +6 -5
  162. package/dist/collection/components/markdown/image-intersection-observer.js +9 -8
  163. package/dist/collection/components/markdown/image-markdown-plugin.js +9 -7
  164. package/dist/collection/components/markdown/link-markdown-plugin.js +11 -10
  165. package/dist/collection/components/markdown/markdown.js +6 -5
  166. package/dist/collection/components/markdown/remove-empty-paragraphs-plugin.js +4 -5
  167. package/dist/collection/components/masonry-layout/masonry-layout.js +5 -4
  168. package/dist/collection/components/menu/menu.js +48 -46
  169. package/dist/collection/components/menu-list/menu-list-renderer.js +8 -8
  170. package/dist/collection/components/menu-list/menu-list.js +1 -1
  171. package/dist/collection/components/menu-surface/menu-surface.js +6 -8
  172. package/dist/collection/components/notched-outline/notched-outline.js +1 -1
  173. package/dist/collection/components/pagination/jump/pagination-jump.js +13 -11
  174. package/dist/collection/components/pagination/pagination.js +5 -4
  175. package/dist/collection/components/picker/picker.js +25 -23
  176. package/dist/collection/components/popover/popover.js +13 -10
  177. package/dist/collection/components/popover-surface/popover-surface.js +1 -1
  178. package/dist/collection/components/portal/contains.js +9 -8
  179. package/dist/collection/components/portal/portal.js +16 -16
  180. package/dist/collection/components/profile-picture/profile-picture.js +4 -3
  181. package/dist/collection/components/progress-flow/progress-flow.js +10 -9
  182. package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
  183. package/dist/collection/components/radio-button-group/radio-button.js +2 -2
  184. package/dist/collection/components/scroller/scroller.css +317 -0
  185. package/dist/collection/components/scroller/scroller.js +284 -0
  186. package/dist/collection/components/select/select.js +13 -11
  187. package/dist/collection/components/select/select.template.js +1 -3
  188. package/dist/collection/components/slider/get-percentage-class.js +9 -18
  189. package/dist/collection/components/slider/slider.js +2 -2
  190. package/dist/collection/components/tab-bar/tab-bar.css +7 -289
  191. package/dist/collection/components/tab-bar/tab-bar.js +59 -104
  192. package/dist/collection/components/tab-panel/tab-panel.js +11 -8
  193. package/dist/collection/components/table/columns.js +1 -3
  194. package/dist/collection/components/table/element-pool.js +1 -1
  195. package/dist/collection/components/table/table-selection.js +6 -5
  196. package/dist/collection/components/table/table.css +15 -17
  197. package/dist/collection/components/table/table.js +44 -39
  198. package/dist/collection/components/text-editor/link-menu/editor-link-menu.js +11 -10
  199. package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-command-utils/list-utils.js +1 -1
  200. package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-commands.js +6 -10
  201. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/image/inserter.js +37 -40
  202. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/image/node.js +2 -1
  203. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/link/link-plugin.js +21 -20
  204. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/menu-state-tracking-plugin.js +6 -5
  205. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/trigger/factory-helpers/detect-trigger-removal.js +15 -14
  206. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +40 -34
  207. package/dist/collection/components/text-editor/text-editor.js +1 -1
  208. package/dist/collection/components/text-editor/utils/metadata-utils.js +1 -1
  209. package/dist/collection/components/text-editor/utils/plugin-factory.js +3 -3
  210. package/dist/collection/components/tooltip/tooltip-content.js +1 -1
  211. package/dist/collection/components/tooltip/tooltip.js +2 -2
  212. package/dist/collection/global/icon-cache/factory.js +2 -3
  213. package/dist/collection/global/icon-cache/in-memory-icon-cache.js +2 -0
  214. package/dist/collection/global/translations.js +1 -3
  215. package/dist/collection/translations/fr.js +3 -3
  216. package/dist/collection/util/adapt-color-contrast.js +1 -1
  217. package/dist/collection/util/files.js +1 -1
  218. package/dist/collection/util/format-bytes.js +1 -4
  219. package/dist/collection/util/hotkeys.js +1 -0
  220. package/dist/collection/util/image-resize.js +1 -0
  221. package/dist/collection/util/language.js +1 -1
  222. package/dist/collection/util/make-enter-clickable.js +19 -12
  223. package/dist/collection/util/random-string.js +1 -0
  224. package/dist/collection/util/render-list-component.js +2 -4
  225. package/dist/esm/{adapt-color-contrast-Dgcw_h7C.js → adapt-color-contrast-BQoih_t0.js} +1 -1
  226. package/dist/esm/{checkbox.template-Cx_3u92S.js → checkbox.template-IDyv2bgn.js} +2 -2
  227. package/dist/esm/{files-DnkFEKoB.js → files-CKnLqPDj.js} +1 -1
  228. package/dist/esm/{format-bytes-u_sd2HMb.js → format-bytes-24yUSW40.js} +1 -4
  229. package/dist/esm/{hotkeys-BxrRWYts.js → hotkeys-DjmlD0Mw.js} +1 -0
  230. package/dist/esm/{image-resize-BTSG--2-.js → image-resize-Dv2HOgWN.js} +1 -0
  231. package/dist/esm/{image.template-wqMwmOF-.js → image.template-BGjw97m_.js} +1 -1
  232. package/dist/esm/{index-Bnc9lzk2.js → index-BU9IJqli.js} +1 -7
  233. package/dist/esm/index.js +1 -1
  234. package/dist/esm/{isArrayLikeObject-CJB8HbtH.js → isArrayLikeObject-tmUOLOWr.js} +17 -1
  235. package/dist/esm/{language-C3hECvXE.js → language-ChagAaNf.js} +1 -1
  236. package/dist/esm/lime-elements.js +3 -3
  237. package/dist/esm/limel-3d-hover-effect-glow.entry.js +2 -2
  238. package/dist/esm/limel-action-bar_3.entry.js +20 -18
  239. package/dist/esm/limel-ai-avatar.entry.js +5 -5
  240. package/dist/esm/limel-badge.entry.js +3 -3
  241. package/dist/esm/limel-banner.entry.js +2 -2
  242. package/dist/esm/limel-breadcrumbs_6.entry.js +80 -80
  243. package/dist/esm/limel-button-group.entry.js +3 -3
  244. package/dist/esm/limel-button.entry.js +4 -4
  245. package/dist/esm/limel-callout.entry.js +6 -6
  246. package/dist/esm/limel-card.entry.js +8 -7
  247. package/dist/esm/limel-chart.entry.js +5 -5
  248. package/dist/esm/limel-checkbox.entry.js +12 -10
  249. package/dist/esm/limel-chip-set.entry.js +30 -39
  250. package/dist/esm/limel-chip_2.entry.js +9 -9
  251. package/dist/esm/limel-circular-progress.entry.js +2 -2
  252. package/dist/esm/limel-code-diff.entry.js +25 -28
  253. package/dist/esm/limel-code-editor.entry.js +17 -12
  254. package/dist/esm/limel-collapsible-section.entry.js +8 -8
  255. package/dist/esm/limel-color-picker-palette.entry.js +3 -3
  256. package/dist/esm/limel-color-picker.entry.js +6 -5
  257. package/dist/esm/limel-config.entry.js +3 -3
  258. package/dist/esm/limel-date-picker.entry.js +8 -11
  259. package/dist/esm/limel-dialog.entry.js +6 -9
  260. package/dist/esm/limel-dock-button.entry.js +6 -11
  261. package/dist/esm/limel-dock.entry.js +3 -3
  262. package/dist/esm/limel-drag-handle.entry.js +6 -6
  263. package/dist/esm/limel-dynamic-label.entry.js +1 -1
  264. package/dist/esm/limel-email-viewer.entry.js +11 -17
  265. package/dist/esm/limel-file-dropzone_2.entry.js +11 -12
  266. package/dist/esm/limel-file-viewer.entry.js +1098 -1146
  267. package/dist/esm/limel-file.entry.js +17 -16
  268. package/dist/esm/limel-flatpickr-adapter.entry.js +100 -94
  269. package/dist/esm/limel-flex-container.entry.js +2 -2
  270. package/dist/esm/limel-form.entry.js +66 -67
  271. package/dist/esm/limel-grid.entry.js +2 -2
  272. package/dist/esm/limel-header.entry.js +2 -2
  273. package/dist/esm/limel-help-content.entry.js +2 -2
  274. package/dist/esm/limel-help.entry.js +3 -3
  275. package/dist/esm/limel-helper-line_3.entry.js +12 -14
  276. package/dist/esm/limel-hotkey_4.entry.js +23 -23
  277. package/dist/esm/limel-icon-button.entry.js +4 -4
  278. package/dist/esm/limel-icon.entry.js +15 -13
  279. package/dist/esm/limel-info-tile.entry.js +10 -10
  280. package/dist/esm/limel-list-item.entry.js +10 -10
  281. package/dist/esm/limel-markdown.entry.js +25 -22
  282. package/dist/esm/limel-masonry-layout.entry.js +6 -5
  283. package/dist/esm/limel-menu-item-meta.entry.js +3 -3
  284. package/dist/esm/limel-pagination-jump.entry.js +17 -15
  285. package/dist/esm/limel-pagination.entry.js +10 -9
  286. package/dist/esm/limel-picker.entry.js +31 -29
  287. package/dist/esm/limel-popover_2.entry.js +25 -21
  288. package/dist/esm/limel-profile-picture.entry.js +12 -11
  289. package/dist/esm/limel-progress-flow-item.entry.js +1 -1
  290. package/dist/esm/limel-progress-flow.entry.js +11 -10
  291. package/dist/esm/limel-prosemirror-adapter.entry.js +475 -407
  292. package/dist/esm/limel-radio-button-group.entry.js +2 -2
  293. package/dist/esm/limel-radio-button.entry.js +3 -3
  294. package/dist/esm/limel-scroller.entry.js +178 -0
  295. package/dist/esm/limel-select.entry.js +17 -17
  296. package/dist/esm/limel-shortcut.entry.js +1 -1
  297. package/dist/esm/limel-slider.entry.js +18 -27
  298. package/dist/esm/limel-snackbar.entry.js +5 -5
  299. package/dist/esm/limel-split-button.entry.js +1 -1
  300. package/dist/esm/limel-switch.entry.js +3 -3
  301. package/dist/esm/limel-tab-bar.entry.js +66 -97
  302. package/dist/esm/limel-tab-panel.entry.js +12 -9
  303. package/dist/esm/limel-table.entry.js +527 -106
  304. package/dist/esm/limel-text-editor-link-menu.entry.js +15 -14
  305. package/dist/esm/limel-text-editor.entry.js +3 -3
  306. package/dist/esm/loader.js +3 -3
  307. package/dist/esm/{make-enter-clickable-BgTwPGeH.js → make-enter-clickable-CIf8aGSd.js} +19 -12
  308. package/dist/esm/{markdown-exporter--3_MaqwD.js → markdown-exporter-DblYRMhY.js} +1 -1
  309. package/dist/esm/{markdown-parser-DCf-3dKZ.js → markdown-parser-CAPDx7i8.js} +24 -22
  310. package/dist/esm/{moment-DQRNe8qq.js → moment-_DadZLWp.js} +1062 -833
  311. package/dist/esm/{random-string-JbKhhoXs.js → random-string-BrjD-ITe.js} +1 -0
  312. package/dist/esm/{render-list-component-cicbMp0l.js → render-list-component-J1IzNpbv.js} +3 -5
  313. package/dist/esm/{sv-CY-6-yEp.js → sv-DpsDSi7k.js} +31 -3
  314. package/dist/esm/{translations-DMtX4tTX.js → translations-Y4i8PVc9.js} +5 -8
  315. package/dist/lime-elements/index.esm.js +1 -1
  316. package/dist/lime-elements/lime-elements.esm.js +1 -1
  317. package/dist/lime-elements/{p-3916b316.entry.js → p-03cb609e.entry.js} +1 -1
  318. package/dist/lime-elements/p-05038bbb.entry.js +1 -0
  319. package/dist/lime-elements/{p-835149c4.entry.js → p-0d6925f4.entry.js} +1 -1
  320. package/dist/lime-elements/p-0e13ec91.entry.js +1 -0
  321. package/dist/lime-elements/p-159603cf.entry.js +159 -0
  322. package/dist/lime-elements/p-22fd1c87.entry.js +1 -0
  323. package/dist/lime-elements/p-24yUSW40.js +1 -0
  324. package/dist/lime-elements/{p-f717cd7a.entry.js → p-271662d4.entry.js} +1 -1
  325. package/dist/lime-elements/{p-c2a60508.entry.js → p-29c73bdf.entry.js} +1 -1
  326. package/dist/lime-elements/{p-deceda00.entry.js → p-2a902e77.entry.js} +1 -1
  327. package/dist/lime-elements/{p-d0cec424.entry.js → p-2b033dfa.entry.js} +1 -1
  328. package/dist/lime-elements/{p-acba5700.entry.js → p-2b2253d4.entry.js} +1 -1
  329. package/dist/lime-elements/p-2e33d2a4.entry.js +1 -0
  330. package/dist/lime-elements/p-31226737.entry.js +13 -0
  331. package/dist/lime-elements/{p-36ce4fbc.entry.js → p-31f314e6.entry.js} +1 -1
  332. package/dist/lime-elements/p-32a050a3.entry.js +1 -0
  333. package/dist/lime-elements/{p-3735111e.entry.js → p-3cfe0eaf.entry.js} +1 -1
  334. package/dist/lime-elements/{p-fbcd99a3.entry.js → p-3d3bdf45.entry.js} +1 -1
  335. package/dist/lime-elements/p-440a0b43.entry.js +1 -0
  336. package/dist/lime-elements/p-45c39fb4.entry.js +1 -0
  337. package/dist/lime-elements/p-45fde7a1.entry.js +1 -0
  338. package/dist/lime-elements/p-48afa6b7.entry.js +1 -0
  339. package/dist/lime-elements/{p-f04f7c8e.entry.js → p-4a88d365.entry.js} +1 -1
  340. package/dist/lime-elements/p-4b75e653.entry.js +1 -0
  341. package/dist/lime-elements/p-4dfd1962.entry.js +67 -0
  342. package/dist/lime-elements/{p-5698e493.entry.js → p-4ecbc9f4.entry.js} +1 -1
  343. package/dist/lime-elements/p-5386c629.entry.js +1 -0
  344. package/dist/lime-elements/{p-2e568c56.entry.js → p-54a9f48f.entry.js} +1 -1
  345. package/dist/lime-elements/{p-0fba64eb.entry.js → p-5df21b25.entry.js} +2 -2
  346. package/dist/lime-elements/{p-408c4dcb.entry.js → p-5f5c6e7d.entry.js} +1 -1
  347. package/dist/lime-elements/{p-052c3bc6.entry.js → p-681cb6de.entry.js} +1 -1
  348. package/dist/lime-elements/p-6adc7c88.entry.js +1 -0
  349. package/dist/lime-elements/{p-90df3e1b.entry.js → p-6d9961f7.entry.js} +1 -1
  350. package/dist/lime-elements/{p-74bd0c1a.entry.js → p-7b4351f6.entry.js} +1 -1
  351. package/dist/lime-elements/{p-3fd7e8aa.entry.js → p-7eab1341.entry.js} +1 -1
  352. package/dist/lime-elements/p-80153f45.entry.js +1 -0
  353. package/dist/lime-elements/{p-35fa1063.entry.js → p-85318636.entry.js} +1 -1
  354. package/dist/lime-elements/p-8988b7e1.entry.js +1 -0
  355. package/dist/lime-elements/{p-4ffbfc79.entry.js → p-8ac79ef5.entry.js} +1 -1
  356. package/dist/lime-elements/{p-4902fb3f.entry.js → p-9218fa6a.entry.js} +1 -1
  357. package/dist/lime-elements/p-92669910.entry.js +1 -0
  358. package/dist/lime-elements/{p-38b09f87.entry.js → p-9415411e.entry.js} +1 -1
  359. package/dist/lime-elements/p-95ccd9e7.entry.js +1 -0
  360. package/dist/lime-elements/{p-cb407bef.entry.js → p-9afa4721.entry.js} +1 -1
  361. package/dist/lime-elements/{p-54dcf46f.entry.js → p-9c8c2fb7.entry.js} +1 -1
  362. package/dist/lime-elements/{p-B8hoCfhT.js → p-B3YP9GOq.js} +1 -1
  363. package/dist/lime-elements/{p-Dgcw_h7C.js → p-BQoih_t0.js} +1 -1
  364. package/dist/lime-elements/{p-Bnc9lzk2.js → p-BU9IJqli.js} +1 -1
  365. package/dist/lime-elements/{p-CGVVDGcv.js → p-Bkvc4sus.js} +1 -1
  366. package/dist/lime-elements/{p-BPzhuHcl.js → p-Bvyt2bmV.js} +1 -1
  367. package/dist/lime-elements/{p-BgTwPGeH.js → p-CIf8aGSd.js} +1 -1
  368. package/dist/lime-elements/{p-C3hECvXE.js → p-ChagAaNf.js} +1 -1
  369. package/dist/lime-elements/p-DTcfed02.js +3 -0
  370. package/dist/lime-elements/p-DWMfAkOE.js +1 -0
  371. package/dist/lime-elements/{p-BY85K-4J.js → p-DqQOawxc.js} +1 -1
  372. package/dist/lime-elements/{p-CC4Usa-Q.js → p-I0PrvthC.js} +1 -1
  373. package/dist/lime-elements/p-N9vxZMhe.js +1 -0
  374. package/dist/lime-elements/{p-DsDkl4Sy.js → p-ZDFVISfu.js} +3 -3
  375. package/dist/lime-elements/p-a1c69e0c.entry.js +1 -0
  376. package/dist/lime-elements/{p-2daf0482.entry.js → p-a1d1470c.entry.js} +1 -1
  377. package/dist/lime-elements/{p-cef66e53.entry.js → p-a2e6f16e.entry.js} +1 -1
  378. package/dist/lime-elements/p-a550ba18.entry.js +1 -0
  379. package/dist/lime-elements/{p-d146feda.entry.js → p-a65eb58e.entry.js} +1 -1
  380. package/dist/lime-elements/p-ab8021b9.entry.js +1 -0
  381. package/dist/lime-elements/{p-03fb2603.entry.js → p-b22b52a1.entry.js} +1 -1
  382. package/dist/lime-elements/p-b6c0dc91.entry.js +23 -0
  383. package/dist/lime-elements/{p-c2a3ca7c.entry.js → p-b6d39581.entry.js} +1 -1
  384. package/dist/lime-elements/{p-8475a3b8.entry.js → p-c439b68b.entry.js} +1 -1
  385. package/dist/lime-elements/p-d19c7a3a.entry.js +1 -0
  386. package/dist/lime-elements/{p-7cbf50fc.entry.js → p-d1e5dd12.entry.js} +1 -1
  387. package/dist/lime-elements/p-de4719a6.entry.js +1 -0
  388. package/dist/lime-elements/{p-b81a2728.entry.js → p-e02e2c5f.entry.js} +1 -1
  389. package/dist/lime-elements/{p-d351b9ae.entry.js → p-e6a34047.entry.js} +1 -1
  390. package/dist/lime-elements/p-eF09GxA_.js +1 -0
  391. package/dist/lime-elements/{p-8fa9c9ea.entry.js → p-ee719744.entry.js} +1 -1
  392. package/dist/lime-elements/{p-d3bd4b80.entry.js → p-f04e2897.entry.js} +3 -3
  393. package/dist/lime-elements/p-f3cae1e7.entry.js +1 -0
  394. package/dist/lime-elements/{p-8115da75.entry.js → p-f4a0b1bc.entry.js} +1 -1
  395. package/dist/lime-elements/{p-4855dc9b.entry.js → p-f82f72e7.entry.js} +1 -1
  396. package/dist/lime-elements/{p-2d84ea04.entry.js → p-f97ec7a5.entry.js} +1 -1
  397. package/dist/lime-elements/{p-21109d9b.entry.js → p-fdd674fc.entry.js} +1 -1
  398. package/dist/lime-elements/{p-459eea13.entry.js → p-fdec09e9.entry.js} +1 -1
  399. package/dist/lime-elements/{p-2f57c3fa.entry.js → p-fe492ff3.entry.js} +1 -1
  400. package/dist/lime-elements/{p-65cded0e.entry.js → p-ff1a8b2e.entry.js} +1 -1
  401. package/dist/types/components/chip-set/chip-set-input-helpers.d.ts +1 -1
  402. package/dist/types/components/pagination/jump/pagination-jump.d.ts +1 -1
  403. package/dist/types/components/scroller/scroller.d.ts +67 -0
  404. package/dist/types/components/tab-bar/tab-bar.d.ts +13 -16
  405. package/dist/types/components.d.ts +128 -0
  406. package/dist/types/global/icon-cache/factory.d.ts +2 -2
  407. package/dist/types/global/translations.d.ts +2 -2
  408. package/package.json +12 -12
  409. package/dist/lime-elements/p-19344984.entry.js +0 -13
  410. package/dist/lime-elements/p-1e93473a.entry.js +0 -1
  411. package/dist/lime-elements/p-20658306.entry.js +0 -1
  412. package/dist/lime-elements/p-26c5c6b9.entry.js +0 -1
  413. package/dist/lime-elements/p-452b9b01.entry.js +0 -1
  414. package/dist/lime-elements/p-4aae63bd.entry.js +0 -1
  415. package/dist/lime-elements/p-507cc8a1.entry.js +0 -159
  416. package/dist/lime-elements/p-531b6a64.entry.js +0 -1
  417. package/dist/lime-elements/p-54793c06.entry.js +0 -1
  418. package/dist/lime-elements/p-5d974afa.entry.js +0 -1
  419. package/dist/lime-elements/p-66b125f2.entry.js +0 -1
  420. package/dist/lime-elements/p-7e212fa7.entry.js +0 -1
  421. package/dist/lime-elements/p-82696d24.entry.js +0 -1
  422. package/dist/lime-elements/p-9ac39039.entry.js +0 -1
  423. package/dist/lime-elements/p-9b631363.entry.js +0 -1
  424. package/dist/lime-elements/p-DQJU9gzh.js +0 -1
  425. package/dist/lime-elements/p-DpJgXIWf.js +0 -1
  426. package/dist/lime-elements/p-a1de9bbe.entry.js +0 -1
  427. package/dist/lime-elements/p-a71f6e87.entry.js +0 -67
  428. package/dist/lime-elements/p-bd7b3f8e.entry.js +0 -1
  429. package/dist/lime-elements/p-be8610ff.entry.js +0 -1
  430. package/dist/lime-elements/p-c72e5007.entry.js +0 -1
  431. package/dist/lime-elements/p-cafec335.entry.js +0 -1
  432. package/dist/lime-elements/p-d6dadc61.entry.js +0 -1
  433. package/dist/lime-elements/p-d93b7b9f.entry.js +0 -23
  434. package/dist/lime-elements/p-dc9cd793.entry.js +0 -1
  435. package/dist/lime-elements/p-dd62042a.entry.js +0 -1
  436. package/dist/lime-elements/p-pk5KIdKH.js +0 -1
  437. package/dist/lime-elements/p-u_sd2HMb.js +0 -1
  438. package/dist/lime-elements/p-zo6O9LC9.js +0 -3
  439. /package/dist/lime-elements/{p-JbKhhoXs.js → p-BrjD-ITe.js} +0 -0
  440. /package/dist/lime-elements/{p-BxrRWYts.js → p-DjmlD0Mw.js} +0 -0
  441. /package/dist/lime-elements/{p-BTSG--2-.js → p-Dv2HOgWN.js} +0 -0
@@ -3,43 +3,34 @@
3
3
  * @param value
4
4
  */
5
5
  export function getPercentageClass(value) {
6
- const tenPercent = 0.1;
7
- const twentyPercent = 0.2;
8
- const thirtyPercent = 0.3;
9
- const fortyPercent = 0.4;
10
- const fiftyPercent = 0.5;
11
- const sixtyPercent = 0.6;
12
- const seventyPercent = 0.7;
13
- const eightyPercent = 0.8;
14
- const ninetyPercent = 0.9;
15
6
  if (value === 0) {
16
7
  return 'percent-0';
17
8
  }
18
- if (value < tenPercent) {
9
+ if (value < 0.1) {
19
10
  return 'percent-0-10';
20
11
  }
21
- if (value < twentyPercent) {
12
+ if (value < 0.2) {
22
13
  return 'percent-10-20';
23
14
  }
24
- if (value < thirtyPercent) {
15
+ if (value < 0.3) {
25
16
  return 'percent-20-30';
26
17
  }
27
- if (value < fortyPercent) {
18
+ if (value < 0.4) {
28
19
  return 'percent-30-40';
29
20
  }
30
- if (value < fiftyPercent) {
21
+ if (value < 0.5) {
31
22
  return 'percent-40-50';
32
23
  }
33
- if (value < sixtyPercent) {
24
+ if (value < 0.6) {
34
25
  return 'percent-50-60';
35
26
  }
36
- if (value < seventyPercent) {
27
+ if (value < 0.7) {
37
28
  return 'percent-60-70';
38
29
  }
39
- if (value < eightyPercent) {
30
+ if (value < 0.8) {
40
31
  return 'percent-70-80';
41
32
  }
42
- if (value < ninetyPercent) {
33
+ if (value < 0.9) {
43
34
  return 'percent-80-90';
44
35
  }
45
36
  return 'percent-90-100';
@@ -277,8 +277,8 @@ export class Slider {
277
277
  : undefined, ref: (el) => {
278
278
  this.inputElement = el;
279
279
  }, onInput: this.handleInput, onChange: this.handleChange, onClick: this.handleClick }, inputProps)), h("div", { key: 'c287ade5d57268fbf3d0a203f4f94363709dcb74', class: "track" }, h("div", { key: 'd65e20a0bd2da417a797be2501f70860cae04857', class: "active" }), this.renderStepDots(min, max)), h("div", { key: '72e6bf77fddaf64fcde86455bfddd1122a8f174c', class: "thumb" }, h("div", { key: '2066f97938cff1b20ffa0aad2e3c4803a5a2f6f9', class: "knob" }), h("div", { key: 'abd8845bf4d52faeffd1a4f25ca2068a8062bc09', class: "indicator", "aria-hidden": "true" }, this.isUnset
280
- ? '\u2194\uFE0E'
281
- : this.displayValue))), h("div", { key: '7107d522eb4732ca8e4ae6d901a3981853f9e97b', class: "range-labels" }, h("span", { key: 'babaa35149ef70070141f5f4e49be8fc55e367a4', class: "min" }, this.multiplyByFactor(this.valuemin), this.unit), h("span", { key: '92caa840cc1ac72681f7ee3b18754a912d1d0829', class: "max" }, this.multiplyByFactor(this.valuemax), this.unit)))), this.renderClearButton(), this.renderHelperLine()));
280
+ ? '\u{2194}\u{FE0E}'
281
+ : this.displayValue))), h("div", { key: '231a0836f6487fd99fb2aa60d075ad8d21a4ce10', class: "range-labels" }, h("span", { key: '966e8f9241124e9c61da1558ccb04ccb1cf0c402', class: "min" }, this.multiplyByFactor(this.valuemin), this.unit), h("span", { key: '427e6ff5bd7d894da16a6b9b006fd0e1a44f9348', class: "max" }, this.multiplyByFactor(this.valuemax), this.unit)))), this.renderClearButton(), this.renderHelperLine()));
282
282
  }
283
283
  watchValue() {
284
284
  this.syncStateFromValue();
@@ -1,216 +1,3 @@
1
- @charset "UTF-8";
2
- /**
3
- * Note! This file is forwarded via `src/style/exports.scss`
4
- * and exposed to consumers through the root `index.scss`.
5
- *
6
- * Consumers import it using:
7
- * `@use '@limetech/lime-elements' as lime-elements;`
8
- *
9
- * Legacy import paths (`dist/scss/mixins`) are maintained
10
- * for backward compatibility via copy rules in the Stencil config.
11
- */
12
- /**
13
- * Neutralizes the user-agent styles that browsers apply to `<button>` elements
14
- * (their default background, border, padding, font, etc.), without stripping
15
- * the useful defaults that `all: unset;` would also remove
16
- * (such as `display`, `cursor`, and focus behavior).
17
- *
18
- * Prefer this mixin over `all: unset;` on `<button>` elements, then layer
19
- * the styling you want on top — often one of the `is-*-clickable` mixins.
20
- */
21
- /**
22
- * This can be used on a trigger element that opens a dropdown menu or a popover.
23
- */
24
- /**
25
- * This mixin will mask out the content that is close to
26
- * the edges of a scrollable area.
27
- * - If the scrollable content has `overflow-y`, use `vertically`
28
- * as an argument for `$direction`.
29
- - If the scrollable content has `overflow-x`, use `horizontally`
30
- * as an argument for `$direction`.
31
- *
32
- * For the visual effect to work smoothly, we need to make sure that
33
- * the size of the fade-out edge effect is the same as the
34
- * internal paddings of the scrollable area. Otherwise, content of a
35
- * scrollable area that does not have a padding will fade out before
36
- * any scrolling has been done.
37
- * This is why this mixin already adds paddings, which automatically
38
- * default to the size of the fade-out effect.
39
- * This size defaults to `1rem`, but to override the size use
40
- * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
41
- * when `vertically` argument is set, and use
42
- * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
43
- * when `horizontally` argument is set.
44
- * Of course you can also programmatically increase and decrease the
45
- * size of these variables for each edge, based on the amount of
46
- * scrolling that has been done by the user. In this case, make sure
47
- * to add a custom padding where the mixin is used, to override
48
- * the paddings that are automatically added by the mixin in the
49
- * compiled CSS code.
50
- */
51
- /**
52
- * This mixin will add an animated underline to the bottom of an `a` elements.
53
- * Note that you may need to add `all: unset;` –depending on your use case–
54
- * before using this mixin.
55
- */
56
- /**
57
- * This mixin creates a cross-browser font stack.
58
- * - `sans-serif` can be used for the UI of the components.
59
- * - `monospace` can be used for code.
60
- *
61
- * ⚠️ If we change the font stacks, we need to update
62
- * 1. the consumer documentation in `README.md`, and
63
- * 2. the CSS variables of `--kompendium-example-font-family`
64
- * in the `<style>` tag of `index.html`.
65
- */
66
- /**
67
- * This mixin is a hack, using old CSS syntax
68
- * to enable you to truncate a piece of text,
69
- * after a certain number of lines.
70
- */
71
- /**
72
- * This mixin will add a chessboard background pattern,
73
- * typically used to visualize transparency.
74
- */
75
- /**
76
- * Make a container resizable by the user.
77
- * This is used in the documentations and examples
78
- * of some components, to demonstrate how the component
79
- * behaves in a resizable container.
80
- */
81
- /**
82
- * Drag to reorder mixins
83
- */
84
- /**
85
- * The breakpoints below are used to create responsive designs
86
- * in Lime's products. Therefore, they are here to get distributed
87
- * to all components in other private repos, which rely on this `mixins`
88
- * file, to create consistent styles.
89
- *
90
- * :::important
91
- * In very rare cases you should used media queries!
92
- * Nowadays, there are many better ways of achieving responsive design
93
- * without media queries. For example, using CSS Grid, Flexbox, and their features.
94
- * :::
95
- */
96
- /**
97
- * Media query mixins for responsive design based on screen width.
98
- * Note that these mixins do not detect the device type!
99
- */
100
- .scroll-fade,
101
- .scroll-button {
102
- position: absolute;
103
- transition-property: transform;
104
- transition-duration: 0.3s;
105
- transition-timing-function: ease-out;
106
- }
107
-
108
- .scroll-fade {
109
- top: 0;
110
- height: 100%;
111
- width: 4rem;
112
- pointer-events: none;
113
- }
114
- .scroll-fade.left {
115
- transform: translate3d(-4rem, 0, 0);
116
- left: 0;
117
- background: linear-gradient(270deg, rgba(var(--limel-tab-background-color), 0) 0%, rgba(var(--limel-tab-background-color), 0.8) 40%, rgba(var(--limel-tab-background-color), 0.8) 100%);
118
- }
119
- .scroll-fade.right {
120
- transform: translate3d(4rem, 0, 0);
121
- right: 0;
122
- background: linear-gradient(90deg, rgba(var(--limel-tab-background-color), 0) 0%, rgba(var(--limel-tab-background-color), 0.8) 40%, rgba(var(--limel-tab-background-color), 0.8) 100%);
123
- }
124
-
125
- .scroll-button {
126
- display: flex;
127
- align-items: center;
128
- top: 0;
129
- bottom: 0;
130
- }
131
- .scroll-button.left {
132
- transform: translate3d(-4rem, 0, 0);
133
- left: 0.25rem;
134
- }
135
- .scroll-button.right {
136
- transform: translate3d(4rem, 0, 0);
137
- right: 0.25rem;
138
- }
139
- .scroll-button:hover {
140
- transform: translate3d(0, 0, 0);
141
- }
142
- .scroll-button button {
143
- appearance: none;
144
- background: none;
145
- border: none;
146
- padding: 0;
147
- margin: 0;
148
- font: inherit;
149
- color: inherit;
150
- text-align: inherit;
151
- display: flex;
152
- align-items: center;
153
- justify-content: center;
154
- width: 1.25rem;
155
- height: calc(100% - 0.25rem * 2);
156
- border-radius: 0.25rem;
157
- }
158
- .scroll-button button:not(:disabled) {
159
- 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);
160
- cursor: pointer;
161
- color: var(--limel-theme-on-surface-color);
162
- background-color: var(--lime-elevated-surface-background-color);
163
- box-shadow: var(--button-shadow-normal);
164
- }
165
- .scroll-button button:not(:disabled):hover, .scroll-button button:not(:disabled):focus, .scroll-button button:not(:disabled):focus-visible {
166
- will-change: color, background-color, box-shadow, transform;
167
- }
168
- .scroll-button button:not(:disabled):hover, .scroll-button button:not(:disabled):focus-visible {
169
- transform: translate3d(0, -0.04rem, 0);
170
- color: var(--limel-theme-on-surface-color);
171
- background-color: var(--lime-elevated-surface-background-color);
172
- box-shadow: var(--button-shadow-hovered);
173
- }
174
- .scroll-button button:not(:disabled):active {
175
- --limel-clickable-transform-timing-function: cubic-bezier(
176
- 0.83,
177
- -0.15,
178
- 0.49,
179
- 1.16
180
- );
181
- transform: translate3d(0, 0.05rem, 0);
182
- box-shadow: var(--button-shadow-pressed);
183
- }
184
- .scroll-button button:not(:disabled):hover, .scroll-button button:not(:disabled):active {
185
- --limel-clickable-transition-speed: 0.2s;
186
- --limel-clickable-transform-speed: 0.16s;
187
- }
188
- .scroll-button limel-icon {
189
- width: 1rem;
190
- }
191
-
192
- .mdc-tab-scroller {
193
- position: relative;
194
- overflow: hidden;
195
- }
196
- .mdc-tab-scroller.can-scroll-left .scroll-fade.left, .mdc-tab-scroller.can-scroll-left .scroll-button.left, .mdc-tab-scroller.can-scroll-right .scroll-fade.right, .mdc-tab-scroller.can-scroll-right .scroll-button.right {
197
- transform: translate3d(0, 0, 0);
198
- }
199
- .mdc-tab-scroller.can-scroll-left:not(.can-scroll-right) .scroll-button.right, .mdc-tab-scroller.can-scroll-right:not(.can-scroll-left) .scroll-button.left {
200
- opacity: 0.5;
201
- transition-delay: 0.5s;
202
- }
203
-
204
- .lime-hide-scrollbars {
205
- scrollbar-width: none;
206
- -ms-overflow-style: none;
207
- }
208
-
209
- .mdc-tab-scroller__scroll-content {
210
- padding: 0.25rem var(--limel-tab-active-outer-edge-curve-size) 0 var(--limel-tab-active-outer-edge-curve-size);
211
- background-color: rgb(var(--limel-tab-background-color));
212
- }
213
-
214
1
  /**
215
2
  * @license
216
3
  * Copyright 2018 Google Inc.
@@ -245,82 +32,6 @@
245
32
  height: 72px;
246
33
  }
247
34
 
248
- /**
249
- * @license
250
- * Copyright 2018 Google Inc.
251
- *
252
- * Permission is hereby granted, free of charge, to any person obtaining a copy
253
- * of this software and associated documentation files (the "Software"), to deal
254
- * in the Software without restriction, including without limitation the rights
255
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
256
- * copies of the Software, and to permit persons to whom the Software is
257
- * furnished to do so, subject to the following conditions:
258
- *
259
- * The above copyright notice and this permission notice shall be included in
260
- * all copies or substantial portions of the Software.
261
- *
262
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
263
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
264
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
265
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
266
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
267
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
268
- * THE SOFTWARE.
269
- */
270
- .mdc-tab-scroller.mdc-tab-scroller--animating .mdc-tab-scroller__scroll-content {
271
- transition: 250ms transform cubic-bezier(0.4, 0, 0.2, 1);
272
- }
273
- .mdc-tab-scroller {
274
- overflow-y: hidden;
275
- }
276
-
277
- .mdc-tab-scroller__test {
278
- position: absolute;
279
- top: -9999px;
280
- width: 100px;
281
- height: 100px;
282
- overflow-x: scroll;
283
- }
284
-
285
- .mdc-tab-scroller__scroll-area {
286
- -webkit-overflow-scrolling: touch;
287
- display: flex;
288
- overflow-x: hidden;
289
- }
290
-
291
- .mdc-tab-scroller__scroll-area::-webkit-scrollbar,
292
- .mdc-tab-scroller__test::-webkit-scrollbar {
293
- display: none;
294
- }
295
-
296
- .mdc-tab-scroller__scroll-area--scroll {
297
- overflow-x: scroll;
298
- }
299
-
300
- .mdc-tab-scroller__scroll-content {
301
- position: relative;
302
- display: flex;
303
- flex: 1 0 auto;
304
- transform: none;
305
- will-change: transform;
306
- }
307
-
308
- .mdc-tab-scroller--align-start .mdc-tab-scroller__scroll-content {
309
- justify-content: flex-start;
310
- }
311
-
312
- .mdc-tab-scroller--align-end .mdc-tab-scroller__scroll-content {
313
- justify-content: flex-end;
314
- }
315
-
316
- .mdc-tab-scroller--align-center .mdc-tab-scroller__scroll-content {
317
- justify-content: center;
318
- }
319
-
320
- .mdc-tab-scroller--animating .mdc-tab-scroller__scroll-area {
321
- -webkit-overflow-scrolling: auto;
322
- }
323
-
324
35
  /**
325
36
  * @license
326
37
  * Copyright 2018 Google Inc.
@@ -693,6 +404,13 @@
693
404
  position: relative;
694
405
  }
695
406
 
407
+ limel-scroller {
408
+ --limel-scroller-fade-color: var(--limel-tab-background-color);
409
+ --limel-scroller-content-padding: 0.25rem
410
+ var(--limel-tab-active-outer-edge-curve-size) 0;
411
+ background-color: rgb(var(--limel-tab-background-color));
412
+ }
413
+
696
414
  :host(.has-tabs-with-equal-width) .mdc-tab {
697
415
  flex: 1 0 auto;
698
416
  }
@@ -1,14 +1,19 @@
1
1
  import { h, } from "@stencil/core";
2
2
  import { MDCTabBar } from "@material/tab-bar";
3
3
  import { strings } from "@material/tab-bar/constants";
4
- import { isEqual, difference } from "lodash-es";
4
+ import { isEqual, difference, noop } from "lodash-es";
5
5
  import { setActiveTab } from "./tabs";
6
6
  import { getIconColor, getIconName } from "../icon/get-icon-props";
7
7
  const { TAB_ACTIVATED_EVENT } = strings;
8
- const SCROLL_DISTANCE_ON_CLICK_PX = 150;
9
- const HIDE_SCROLL_BUTTONS_WHEN_SCROLLED_LESS_THAN_PX = 40;
10
- const TOTAL_WIDTH_PERCENTAGE = 100;
11
- const OVERLAP_PERCENTAGE = 20;
8
+ // MDC wants to scroll the tabs into view itself, and finds what to scroll by
9
+ // looking for the `mdc-tab-scroller` class. Scrolling is up to `limel-scroller`.
10
+ const tabScrollerForMdc = {
11
+ scrollTo: noop,
12
+ incrementScroll: noop,
13
+ getScrollPosition: () => 0,
14
+ getScrollContentWidth: () => 0,
15
+ destroy: noop,
16
+ };
12
17
  /**
13
18
  * Tabs are great to organize information hierarchically in the interface and divide it into distinct categories. Using tabs, you can create groups of content that are related and at the same level in the hierarchy.
14
19
  * :::warning
@@ -17,6 +22,7 @@ const OVERLAP_PERCENTAGE = 20;
17
22
  * :::
18
23
  * An exception for using tab bars in a high level of hierarchy is their usage in modals. This is because modals are perceived as a separate place and not a part of the current context. Therefore you can use tab bars in a modal to group and organize its content.
19
24
  * A tab bar can contain an unlimited number of tabs. However, depending on the device width and width of the tabs, the number of tabs that are visible at the same time will vary. When there is limited horizontal space, the component shows a left-arrow and/or right-arrow button, which scrolls and reveals the additional tabs. The tab bar can also be swiped left and right on a touch-device.
25
+ * The arrows are only a shortcut for people who use a mouse or a touch screen. Screen readers do not announce them, and the Tab key skips them. People who use a keyboard or a screen reader move between the tabs, and the tab bar keeps the selected tab in view.
20
26
  * :::tip Other things to consider
21
27
  * Never divide the content of a tab using a nested tab bar.
22
28
  * Never place two tab bars within the same screen.
@@ -35,22 +41,29 @@ export class TabBar {
35
41
  * List of tabs to display
36
42
  */
37
43
  this.tabs = [];
38
- this.canScrollLeft = false;
39
- this.canScrollRight = false;
40
44
  this.setupMdc = false;
45
+ this.hasLoaded = false;
41
46
  this.handleTabActivated = this.handleTabActivated.bind(this);
42
- this.handleScroll = this.handleScroll.bind(this);
43
- this.handleLeftScrollClick = this.handleLeftScrollClick.bind(this);
44
- this.handleRightScrollClick = this.handleRightScrollClick.bind(this);
45
47
  this.renderTab = this.renderTab.bind(this);
46
48
  }
47
- connectedCallback() {
49
+ async connectedCallback() {
48
50
  this.setup();
51
+ // Connecting after the first render means that the bar was moved, which
52
+ // resets how far it is scrolled.
53
+ if (!this.hasLoaded) {
54
+ return;
55
+ }
56
+ this.revealedTabId = undefined;
57
+ await this.revealActiveTab('auto');
49
58
  }
50
59
  componentDidLoad() {
60
+ this.hasLoaded = true;
51
61
  this.setup();
52
62
  this.triggerIconColorWarning();
53
63
  }
64
+ async componentDidRender() {
65
+ await this.revealActiveTab(this.hasLoaded ? undefined : 'auto');
66
+ }
54
67
  componentDidUpdate() {
55
68
  if (!this.setupMdc) {
56
69
  return;
@@ -62,11 +75,7 @@ export class TabBar {
62
75
  this.tearDown();
63
76
  }
64
77
  render() {
65
- return (h("div", { key: 'b0a62a521861357770e12bc6183b9590c49760e0', class: "mdc-tab-bar", role: "tablist" }, h("div", { key: '97750d5ded531aee2fca5cd1f129fee4194b8f09', class: {
66
- 'mdc-tab-scroller': true,
67
- 'can-scroll-left': this.canScrollLeft,
68
- 'can-scroll-right': this.canScrollRight,
69
- } }, h("div", { key: '6547764cdcfc4f2f60e510863ede4d58d48b1b0e', class: "mdc-tab-scroller__scroll-area lime-hide-scrollbars" }, h("div", { key: 'b95453f5a1fe8b4aae7ebad439cfb795198623a8', class: "mdc-tab-scroller__scroll-content" }, this.tabs.map(this.renderTab))), h("div", { key: 'a4703fa681f371d69ab7a6994aa3457c803563bf', class: "scroll-fade left" }), h("div", { key: '6599c7035550249f81b5488deda63900363be953', class: "scroll-button left" }, h("button", { key: '09a0a7f41a8f0dfe458af7bb719aef0fb0e1b9d7', type: "button", tabindex: "-1", "aria-hidden": "true", disabled: !this.canScrollLeft, onClick: this.handleLeftScrollClick }, h("limel-icon", { key: 'dd5f4cf8562fd74148778d5414f98d4c1c949bd0', name: "angle_left" }))), h("div", { key: 'b380cf4e3679d35270453b6a8671e7de8d9a92a7', class: "scroll-fade right" }), h("div", { key: '3589c3bec4d29eee61da6bc0b293201412bd343f', class: "scroll-button right" }, h("button", { key: '8af680e4abefcf6920a602c269f9a937270d70f2', type: "button", tabindex: "-1", "aria-hidden": "true", disabled: !this.canScrollRight, onClick: this.handleRightScrollClick }, h("limel-icon", { key: 'be2dcc0f1ba494cce96eab05450ce8c9619981e0', name: "angle_right" }))))));
78
+ return (h("div", { key: '343865b4ddac8aa25042cb91916ad411366b4602', class: "mdc-tab-bar", role: "tablist" }, h("limel-scroller", { key: '7329ad9bb97c09afc79c3770d27db9fbb16093f3', class: "mdc-tab-scroller" }, this.tabs.map(this.renderTab))));
70
79
  }
71
80
  tabsChanged(newTabs = [], oldTabs = []) {
72
81
  const newIds = newTabs.map((tab) => tab.id);
@@ -75,102 +84,63 @@ export class TabBar {
75
84
  return;
76
85
  }
77
86
  this.setupMdc = true;
87
+ this.revealedTabId = undefined;
78
88
  this.tearDown();
79
89
  }
80
- handleWindowResize() {
81
- if (!this.scrollArea) {
82
- return;
83
- }
84
- this.handleScroll();
85
- }
86
90
  setup() {
87
91
  const element = this.host.shadowRoot.querySelector('.mdc-tab-bar');
88
92
  if (!element) {
89
93
  return;
90
94
  }
91
- this.mdcTabBar = new MDCTabBar(element);
95
+ this.mdcTabBar = new MDCTabBar(element, undefined, undefined, () => tabScrollerForMdc);
92
96
  this.mdcTabBar.focusOnActivate = true;
93
97
  this.mdcTabBar.useAutomaticActivation = true;
94
- this.scrollArea = element.querySelector('.mdc-tab-scroller__scroll-area');
95
- this.scrollContent = element.querySelector('.mdc-tab-scroller__scroll-content');
96
- this.setupListeners();
97
- // Use timeout to avoid Stencil warning about re-renders. /Ads
98
- setTimeout(this.handleScroll, 0);
98
+ this.mdcTabBar.listen(TAB_ACTIVATED_EVENT, this.handleTabActivated);
99
99
  }
100
100
  tearDown() {
101
- if (this.scrollArea) {
102
- this.scrollArea.removeEventListener('scroll', this.handleScroll);
103
- }
104
- if (this.mdcTabBar) {
105
- this.mdcTabBar.unlisten(TAB_ACTIVATED_EVENT, this.handleTabActivated);
106
- this.mdcTabBar.destroy();
101
+ if (!this.mdcTabBar) {
102
+ return;
107
103
  }
104
+ this.mdcTabBar.unlisten(TAB_ACTIVATED_EVENT, this.handleTabActivated);
105
+ this.mdcTabBar.destroy();
108
106
  }
109
- setupListeners() {
110
- this.mdcTabBar.listen(TAB_ACTIVATED_EVENT, this.handleTabActivated);
111
- this.scrollArea.addEventListener('scroll', this.handleScroll, {
112
- passive: true,
113
- });
107
+ /**
108
+ * A tab that is activated by the user has focus, and the scroller reveals
109
+ * what has focus. This is for a tab that becomes active without it.
110
+ *
111
+ * @param behavior - `auto` to jump to the tab. Leave it out to let the
112
+ * scroller glide there.
113
+ */
114
+ async revealActiveTab(behavior) {
115
+ const index = this.tabs.findIndex((tab) => tab.active);
116
+ if (index === -1) {
117
+ this.revealedTabId = undefined;
118
+ return;
119
+ }
120
+ if (this.tabs[index].id === this.revealedTabId) {
121
+ return;
122
+ }
123
+ this.revealedTabId = this.tabs[index].id;
124
+ const element = this.host.shadowRoot.querySelectorAll('button[role="tab"]')[index];
125
+ const scroller = this.host.shadowRoot.querySelector('limel-scroller');
126
+ if (!element || !scroller || element.matches(':focus')) {
127
+ return;
128
+ }
129
+ await scroller.componentOnReady();
130
+ await scroller.reveal(element, behavior);
114
131
  }
115
132
  handleTabActivated(event) {
116
133
  const index = event.detail.index;
117
134
  const newTabs = setActiveTab(this.tabs, index);
118
- difference(newTabs, this.tabs)
119
- .sort(this.sortByInactive)
120
- // eslint-disable-next-line unicorn/no-array-for-each
121
- .forEach((tab) => {
135
+ const changedTabs = difference(newTabs, this.tabs).sort(this.sortByInactive);
136
+ for (const tab of changedTabs) {
122
137
  this.changeTab.emit(tab);
123
- });
138
+ }
124
139
  this.tabs = newTabs;
125
140
  }
126
141
  sortByInactive(a, b) {
127
142
  return Number(a.active) - Number(b.active);
128
143
  }
129
- handleScroll() {
130
- const scrollLeft = this.scrollArea.scrollLeft;
131
- const scrollRight = Math.floor(this.scrollContent.getBoundingClientRect().width -
132
- this.scrollArea.getBoundingClientRect().width -
133
- scrollLeft);
134
- if (scrollLeft > HIDE_SCROLL_BUTTONS_WHEN_SCROLLED_LESS_THAN_PX) {
135
- this.canScrollLeft = true;
136
- }
137
- else {
138
- this.canScrollLeft = false;
139
- }
140
- if (scrollRight > HIDE_SCROLL_BUTTONS_WHEN_SCROLLED_LESS_THAN_PX) {
141
- this.canScrollRight = true;
142
- }
143
- else {
144
- this.canScrollRight = false;
145
- }
146
- }
147
- handleLeftScrollClick() {
148
- const scrollDistance = this.getScrollDistance();
149
- this.scrollArea.scroll({
150
- left: this.scrollArea.scrollLeft - scrollDistance,
151
- behavior: 'smooth',
152
- });
153
- }
154
- handleRightScrollClick() {
155
- const scrollDistance = this.getScrollDistance();
156
- this.scrollArea.scroll({
157
- left: this.scrollArea.scrollLeft + scrollDistance,
158
- behavior: 'smooth',
159
- });
160
- }
161
- /**
162
- * Calculates how far to scroll when navigation buttons are clicked.
163
- * Returns the visible width minus an overlap percentage to maintain context.
164
- * Falls back to the constant value if something goes wrong.
165
- */
166
- getScrollDistance() {
167
- if (!this.scrollArea) {
168
- return SCROLL_DISTANCE_ON_CLICK_PX;
169
- }
170
- const containerWidth = this.scrollArea.getBoundingClientRect().width;
171
- const scrollDistance = containerWidth * (1 - OVERLAP_PERCENTAGE / TOTAL_WIDTH_PERCENTAGE);
172
- return Math.max(scrollDistance, SCROLL_DISTANCE_ON_CLICK_PX);
173
- }
174
144
  renderIcon(tab) {
175
145
  if (!tab.icon) {
176
146
  return;
@@ -238,12 +208,6 @@ export class TabBar {
238
208
  }
239
209
  };
240
210
  }
241
- static get states() {
242
- return {
243
- "canScrollLeft": {},
244
- "canScrollRight": {}
245
- };
246
- }
247
211
  static get events() {
248
212
  return [{
249
213
  "method": "changeTab",
@@ -276,13 +240,4 @@ export class TabBar {
276
240
  "methodName": "tabsChanged"
277
241
  }];
278
242
  }
279
- static get listeners() {
280
- return [{
281
- "name": "resize",
282
- "method": "handleWindowResize",
283
- "target": "window",
284
- "capture": false,
285
- "passive": true
286
- }];
287
- }
288
243
  }
@@ -43,8 +43,9 @@ export class TabPanel {
43
43
  }
44
44
  slot.addEventListener('slotchange', this.setSlotElements);
45
45
  this.setSlotElements();
46
- // eslint-disable-next-line unicorn/no-array-for-each
47
- this.tabs.forEach(this.setTabStatus);
46
+ for (const tab of this.tabs) {
47
+ this.setTabStatus(tab);
48
+ }
48
49
  }
49
50
  disconnectedCallback() {
50
51
  const slot = this.getSlot();
@@ -52,18 +53,20 @@ export class TabPanel {
52
53
  }
53
54
  tabsChanged() {
54
55
  this.hidePanels();
55
- // eslint-disable-next-line unicorn/no-array-for-each
56
- this.tabs.forEach(this.setTabStatus);
56
+ for (const tab of this.tabs) {
57
+ this.setTabStatus(tab);
58
+ }
57
59
  }
58
60
  render() {
59
- return (h(Host, { key: 'e81003e7cb21f7d348368393b6ac6c8039510f26', onChangeTab: this.handleChangeTabs }, h("div", { key: '591a3cd5176b359ce6ce9eef69355d5084656be7', class: "tab-panel" }, h("limel-tab-bar", { key: '1097440df6c6e01693a39efe3647e9511a664887', tabs: this.tabs }), h("div", { key: 'a6c49f26996ecc40f4a5d3d70de52777438adb13', class: "tab-content" }, h("slot", { key: '192808544a1534a3799ab5a438f08cbbe1d6bd40' })))));
61
+ return (h(Host, { key: 'acb9f2f1081972fc45104cc357055af883ebad2d', onChangeTab: this.handleChangeTabs }, h("div", { key: '318df7ddc8d28f5952c7e67b154088ca13f4355a', class: "tab-panel" }, h("limel-tab-bar", { key: '2656eb61f4e815eba9636bf939e368651bbd8dcf', tabs: this.tabs }), h("div", { key: '41d1bf3149a19d28d7d9f1ace0744ffe26811080', class: "tab-content" }, h("slot", { key: 'ee234615e96536b40ce089978cba5bd21a1fb129' })))));
60
62
  }
61
63
  setSlotElements() {
62
64
  const slot = this.getSlot();
63
65
  this.hidePanels();
64
66
  this.slotElements = Array.prototype.slice.call(slot.assignedElements());
65
- // eslint-disable-next-line unicorn/no-array-for-each
66
- this.tabs.forEach(this.setTabStatus);
67
+ for (const tab of this.tabs) {
68
+ this.setTabStatus(tab);
69
+ }
67
70
  }
68
71
  setTabStatus(tab) {
69
72
  const element = this.slotElements.find((e) => e.id === tab.id);
@@ -88,7 +91,7 @@ export class TabPanel {
88
91
  this.setTabStatus(event.detail);
89
92
  // Content inside the newly activated tab may need to redraw once
90
93
  // visible, so we use the resize event trick. /Ads
91
- setTimeout(dispatchResizeEvent);
94
+ setTimeout(dispatchResizeEvent, 0);
92
95
  }
93
96
  getSlot() {
94
97
  return this.host.shadowRoot.querySelector('slot');
@@ -84,9 +84,7 @@ function columnElementExists(column) {
84
84
  const customElementExists = customElements.get(column.component.name);
85
85
  return isNativeElement || customElementExists;
86
86
  }
87
- else {
88
- return false;
89
- }
87
+ return false;
90
88
  }
91
89
  /**
92
90
  * Format the value of a cell in the table