@leavepulse/ui 0.87.1 → 0.89.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 (244) hide show
  1. package/dist/assets/{LpCommandPalette-DCZB4EAf.css → LpCommandPalette-CO_5TFOQ.css} +38 -19
  2. package/dist/assets/{LpDropzone-CfL3Vrx4.css → LpDropzone-CVGUQqgY.css} +10 -10
  3. package/dist/assets/{LpImageEditor-y3B-aW3H.css → LpImageEditor-D_ECuegW.css} +6 -6
  4. package/dist/assets/{LpTable-BqZNpWgC.css → LpTable-DAVNb-x2.css} +25 -25
  5. package/dist/chunks/{ContextMenuItems-D0jObgzN.js → ContextMenuItems-LujPZSWM.js} +2 -1
  6. package/dist/chunks/{DropzoneLinkField-DhwYRnvd.js → DropzoneLinkField-Ckuh8zFC.js} +2 -2
  7. package/dist/chunks/{IconCloseButton-CmWOJAXG.js → IconCloseButton-C_V7qngw.js} +1 -1
  8. package/dist/chunks/{LpActionBar-Cx_MSZl9.js → LpActionBar-43WHmTsM.js} +1 -1
  9. package/dist/chunks/{LpAddressInput-CfqQR5jE.js → LpAddressInput-BCqR0zmv.js} +5 -5
  10. package/dist/chunks/{LpAlert-CYtbpRYW.js → LpAlert-Q0h7Gucu.js} +1 -1
  11. package/dist/chunks/{LpAppShell-BQG98odS.js → LpAppShell-BWaVRsDB.js} +3 -3
  12. package/dist/chunks/{LpAutocomplete-VNID5zdy.js → LpAutocomplete-YPxAPHEo.js} +5 -5
  13. package/dist/chunks/{LpButton-DSHioIfD.js → LpButton-BvVoF-PO.js} +1 -1
  14. package/dist/chunks/{LpCheckbox-P7tEw8GO.js → LpCheckbox-C9VnPIQf.js} +1 -1
  15. package/dist/chunks/{LpCodeBlock-BNThgUdQ.js → LpCodeBlock-BgWcg2mk.js} +3 -3
  16. package/dist/chunks/{LpCodeDisplay-DsiE-Qy9.js → LpCodeDisplay-DBi1YPLp.js} +3 -3
  17. package/dist/chunks/{LpColorPicker-EXpwcX-t.js → LpColorPicker-KGMG8QEh.js} +4 -4
  18. package/dist/chunks/{LpConfirmDialog-DPiPVRn_.js → LpConfirmDialog-y6k0ryWR.js} +2 -2
  19. package/dist/chunks/{LpConfirmHost-Ddiljlog.js → LpConfirmHost-D-X0tDym.js} +1 -1
  20. package/dist/chunks/{LpContextMenu-DYpDm6iI.js → LpContextMenu-DEFirphS.js} +3 -3
  21. package/dist/chunks/{LpContextSwitcher-BPDSkKyA.js → LpContextSwitcher-COw6GHPW.js} +1 -1
  22. package/dist/chunks/{LpCopyButton-CxX682t4.js → LpCopyButton-BGzw95Xc.js} +2 -2
  23. package/dist/chunks/{LpDataList-DCtF7krm.js → LpDataList-B56Gu6Yt.js} +3 -3
  24. package/dist/chunks/{LpDatePicker-BElEHVm6.js → LpDatePicker-Dlyvgsan.js} +2 -2
  25. package/dist/chunks/{LpDateRangePicker-vLt-drEu.js → LpDateRangePicker-CAn2yGbn.js} +1 -1
  26. package/dist/chunks/{LpDrawer-C97k-3L2.js → LpDrawer-iRHwJOGn.js} +4 -4
  27. package/dist/chunks/{LpDropdownMenu-BPEsqZCN.js → LpDropdownMenu-CdCe7D2d.js} +3 -3
  28. package/dist/chunks/{LpEditable-CeRAzYMv.js → LpEditable-DfRUAGkA.js} +2 -2
  29. package/dist/chunks/{LpEmptyState-DrHBR3yh.js → LpEmptyState-DLOm07KH.js} +1 -1
  30. package/dist/chunks/{LpFileTree-BcQgsw4e.js → LpFileTree-BN_zybBN.js} +3 -3
  31. package/dist/chunks/{LpFileTreeNode-Dk2WqkPF.js → LpFileTreeNode-CC48DbT5.js} +3 -3
  32. package/dist/chunks/{LpHintLayer-CUSRLtLu.js → LpHintLayer-nuMqfzvy.js} +3 -3
  33. package/dist/chunks/{LpHints-BF40CP4_.js → LpHints-ByAd3a76.js} +3 -3
  34. package/dist/chunks/{LpHoverCard-CHE9jAJG.js → LpHoverCard-DYguY2AP.js} +10 -61
  35. package/dist/chunks/{LpInput-BU5IsOlE.js → LpInput-DGMpxrcg.js} +1 -1
  36. package/dist/chunks/{LpInspector-CEko6-pS.js → LpInspector-oTfkOdYd.js} +2 -2
  37. package/dist/chunks/{LpLightbox-REei-y5e.js → LpLightbox-a24V_0Wk.js} +19 -7
  38. package/dist/chunks/{LpLogInspector-Bwz351LY.js → LpLogInspector-BhJTJIst.js} +1 -1
  39. package/dist/chunks/{LpLogViewer-BCkqdH66.js → LpLogViewer-BuIzr_6h.js} +4 -4
  40. package/dist/chunks/{LpMediaGallery-BF1Bch3v.js → LpMediaGallery-B7DOV_aL.js} +2 -2
  41. package/dist/chunks/{LpModal-BK2T5uIG.js → LpModal-D1E7rQzw.js} +5 -5
  42. package/dist/chunks/{LpModalNav-Dk4eHpg6.js → LpModalNav-DivqT1NV.js} +5 -4
  43. package/dist/chunks/{LpNotificationBell-CMwUXhFg.js → LpNotificationBell-KRgdRZs-.js} +4 -4
  44. package/dist/chunks/{LpNotificationFeed-BXsRp9jm.js → LpNotificationFeed-CMGYU8c-.js} +5 -5
  45. package/dist/chunks/{LpNumberField-QUMXvpqx.js → LpNumberField-C0LSu-tl.js} +1 -1
  46. package/dist/chunks/{LpPaletteTheme-wiJtP5hV.js → LpPaletteTheme-CLwO-SDf.js} +3 -3
  47. package/dist/chunks/{LpPasswordInput-W9AZfzaL.js → LpPasswordInput-LPVI7D3v.js} +2 -2
  48. package/dist/chunks/{LpPhoneInput-DsRv-Qla.js → LpPhoneInput-BdglZsGH.js} +5 -5
  49. package/dist/chunks/{LpPie-pbrNFbRP.js → LpPie-CsiBXe-e.js} +3 -3
  50. package/dist/chunks/{LpPipeline-BHWmvOiv.js → LpPipeline-DVcoSs--.js} +1 -1
  51. package/dist/chunks/{LpPopover-BQSuxtai.js → LpPopover-w2rr4x7n.js} +2 -2
  52. package/dist/chunks/{LpRadio-CWA5Eb3M.js → LpRadio-4KyxeSz4.js} +1 -1
  53. package/dist/chunks/{LpRadioGroup-D94KMStE.js → LpRadioGroup-Cr_fmrBY.js} +1 -1
  54. package/dist/chunks/{LpRangeSlider-CkP9hYUC.js → LpRangeSlider-DbaITHtC.js} +1 -1
  55. package/dist/chunks/{LpRelativeTime-0zI-44ve.js → LpRelativeTime-CN5bWD73.js} +1 -1
  56. package/dist/chunks/{LpRepeater-DLLcbQ6J.js → LpRepeater-C0rns2xW.js} +1 -1
  57. package/dist/chunks/{LpSecretField-Au7ZQTtm.js → LpSecretField-BwrZ4TfT.js} +5 -5
  58. package/dist/chunks/{LpSection-RKCwB0xN.js → LpSection-CwsfNR7N.js} +1 -1
  59. package/dist/chunks/{LpSegmented-DD8MPj4j.js → LpSegmented-DzFYP0ZF.js} +1 -1
  60. package/dist/chunks/{LpSelect-BeXz1TWh.js → LpSelect-Dffg5r4I.js} +5 -5
  61. package/dist/chunks/{LpSidebar-DUFlf6Uu.js → LpSidebar-DQtCYlT4.js} +4 -4
  62. package/dist/chunks/{LpSidebarNav-C34YEZIR.js → LpSidebarNav-CFcI7--7.js} +1 -1
  63. package/dist/chunks/{LpSidebarRow-BeEGgsZi.js → LpSidebarRow-C5jXpcRL.js} +2 -2
  64. package/dist/chunks/{LpSlider-BCy5rjwK.js → LpSlider-DUd4gXnw.js} +1 -1
  65. package/dist/chunks/{LpStat-eVz7iUfD.js → LpStat-SyVb5JXm.js} +1 -1
  66. package/dist/chunks/{LpSwitch-D7hmVsif.js → LpSwitch-D-mcaA6C.js} +1 -1
  67. package/dist/chunks/{LpTableFilter-BGFNKyUX.js → LpTableFilter-CILHffC1.js} +3 -3
  68. package/dist/chunks/{LpTagsInput-D9uOSlvf.js → LpTagsInput-DD8-xe3F.js} +2 -2
  69. package/dist/chunks/{LpTextarea-DwE-lQt4.js → LpTextarea-CQg-dVxN.js} +1 -1
  70. package/dist/chunks/{LpThemeStudio-COn2H76d.js → LpThemeStudio-BPPctXgd.js} +4 -4
  71. package/dist/chunks/{LpThemeSwitcher-B3R3nNid.js → LpThemeSwitcher-B3c44xFH.js} +4 -4
  72. package/dist/chunks/{LpTimeField-Mi8H1g_9.js → LpTimeField-Dio7Tj9A.js} +1 -1
  73. package/dist/chunks/{LpToaster-DOJn6Vey.js → LpToaster-Cdx1tnHB.js} +2 -2
  74. package/dist/chunks/{LpTooltip-Bz_rrq5S.js → LpTooltip-BKde8Xjv.js} +43 -7
  75. package/dist/chunks/{LpTopologyCanvas-5RFMP4gR.js → LpTopologyCanvas-CQ0l6A5h.js} +3 -3
  76. package/dist/chunks/{LpTour-DUI_hoPv.js → LpTour-BGUKUxSZ.js} +1 -1
  77. package/dist/chunks/{LpTruncate-CynJhsEw.js → LpTruncate-C_C8eiIE.js} +2 -2
  78. package/dist/chunks/{LpUptimeBar-G7PfNJUH.js → LpUptimeBar-Dt6SY_-m.js} +1 -1
  79. package/dist/chunks/{LpVideoCompress-CPUxXh-c.js → LpVideoCompress-CvxNdyjp.js} +2 -2
  80. package/dist/chunks/{LpVideoPlayer-BbCjEQAx.js → LpVideoPlayer-FMuxTAU8.js} +4 -4
  81. package/dist/chunks/{LpWindow-Dp_0nNqg.js → LpWindow-DsPeiDCZ.js} +1 -1
  82. package/dist/chunks/{LpWorkspaceSwitcher-bjkncjSl.js → LpWorkspaceSwitcher-DCIiOQt_.js} +4 -4
  83. package/dist/chunks/{PickerField-CjOTUXDK.js → PickerField-DzF3UVnX.js} +1 -1
  84. package/dist/chunks/{RevealToggle-Bl1NcfxB.js → RevealToggle-BsYxY6Oz.js} +2 -2
  85. package/dist/chunks/{TourCard-BovXtMbO.js → TourCard-yrLqv4Oz.js} +1 -1
  86. package/dist/chunks/{VideoVolume-DE3i1ree.js → VideoVolume-CzL5mZPE.js} +2 -2
  87. package/dist/components/ContextMenuItems.vue.js +1 -1
  88. package/dist/components/DropzoneLinkField.vue.js +1 -1
  89. package/dist/components/IconCloseButton.vue.js +1 -1
  90. package/dist/components/LpActionBar.vue.js +1 -1
  91. package/dist/components/LpAddressInput.vue.js +1 -1
  92. package/dist/components/LpAlert.vue.js +1 -1
  93. package/dist/components/LpAppShell.vue.js +1 -1
  94. package/dist/components/LpAutocomplete.vue.js +1 -1
  95. package/dist/components/LpButton.vue.js +1 -1
  96. package/dist/components/LpChart.vue.js +2 -2
  97. package/dist/components/LpCheckbox.vue.js +1 -1
  98. package/dist/components/LpCodeBlock.vue.js +1 -1
  99. package/dist/components/LpCodeDisplay.vue.js +1 -1
  100. package/dist/components/LpColorPicker.vue.js +1 -1
  101. package/dist/components/LpCommandPalette.vue.d.ts +2 -0
  102. package/dist/components/LpCommandPalette.vue.js +69 -33
  103. package/dist/components/LpConfirmDialog.vue.js +1 -1
  104. package/dist/components/LpConfirmHost.vue.js +1 -1
  105. package/dist/components/LpContextMenu.vue.js +1 -1
  106. package/dist/components/LpContextSwitcher.vue.js +1 -1
  107. package/dist/components/LpCopyButton.vue.js +1 -1
  108. package/dist/components/LpDataList.vue.js +1 -1
  109. package/dist/components/LpDatePicker.vue.js +1 -1
  110. package/dist/components/LpDateRangePicker.vue.js +1 -1
  111. package/dist/components/LpDock.vue.js +1 -1
  112. package/dist/components/LpDrawer.vue.js +1 -1
  113. package/dist/components/LpDropdownMenu.vue.js +1 -1
  114. package/dist/components/LpDropzone.vue.js +5 -5
  115. package/dist/components/LpEditable.vue.js +1 -1
  116. package/dist/components/LpEmptyState.vue.js +1 -1
  117. package/dist/components/LpFileTree.vue.js +1 -1
  118. package/dist/components/LpFileTreeNode.vue.js +1 -1
  119. package/dist/components/LpHintLayer.vue.js +1 -1
  120. package/dist/components/LpHints.vue.js +1 -1
  121. package/dist/components/LpHoverCard.vue.d.ts +3 -3
  122. package/dist/components/LpHoverCard.vue.js +1 -1
  123. package/dist/components/LpImageEditor.vue.js +4 -4
  124. package/dist/components/LpInput.vue.js +1 -1
  125. package/dist/components/LpInspector.vue.js +1 -1
  126. package/dist/components/LpLightbox.vue.js +1 -1
  127. package/dist/components/LpLogInspector.vue.js +1 -1
  128. package/dist/components/LpLogViewer.vue.js +1 -1
  129. package/dist/components/LpMediaGallery.vue.js +1 -1
  130. package/dist/components/LpModal.vue.js +1 -1
  131. package/dist/components/LpModalNav.vue.js +1 -1
  132. package/dist/components/LpNotificationBell.vue.js +1 -1
  133. package/dist/components/LpNotificationFeed.vue.js +1 -1
  134. package/dist/components/LpNumberField.vue.js +1 -1
  135. package/dist/components/LpPaletteTheme.vue.js +1 -1
  136. package/dist/components/LpPasswordInput.vue.js +1 -1
  137. package/dist/components/LpPhoneInput.vue.js +1 -1
  138. package/dist/components/LpPie.vue.js +1 -1
  139. package/dist/components/LpPipeline.vue.js +1 -1
  140. package/dist/components/LpPopover.vue.js +1 -1
  141. package/dist/components/LpRadio.vue.js +1 -1
  142. package/dist/components/LpRadioGroup.vue.js +1 -1
  143. package/dist/components/LpRangeSlider.vue.js +1 -1
  144. package/dist/components/LpRelativeTime.vue.js +1 -1
  145. package/dist/components/LpRepeater.vue.js +1 -1
  146. package/dist/components/LpSecretField.vue.js +1 -1
  147. package/dist/components/LpSection.vue.js +1 -1
  148. package/dist/components/LpSegmented.vue.js +1 -1
  149. package/dist/components/LpSelect.vue.js +1 -1
  150. package/dist/components/LpShortcutsDialog.vue.js +1 -1
  151. package/dist/components/LpSidebar.vue.js +1 -1
  152. package/dist/components/LpSidebarNav.vue.js +1 -1
  153. package/dist/components/LpSidebarRow.vue.js +1 -1
  154. package/dist/components/LpSlider.vue.js +1 -1
  155. package/dist/components/LpStat.vue.js +1 -1
  156. package/dist/components/LpSwitch.vue.js +1 -1
  157. package/dist/components/LpTable.vue.d.ts +7 -0
  158. package/dist/components/LpTable.vue.js +48 -41
  159. package/dist/components/LpTableFilter.vue.js +1 -1
  160. package/dist/components/LpTabs.vue.js +1 -1
  161. package/dist/components/LpTagsInput.vue.js +1 -1
  162. package/dist/components/LpTextarea.vue.js +1 -1
  163. package/dist/components/LpThemeStudio.vue.js +1 -1
  164. package/dist/components/LpThemeSwitcher.vue.js +1 -1
  165. package/dist/components/LpTimeField.vue.js +1 -1
  166. package/dist/components/LpToaster.vue.js +1 -1
  167. package/dist/components/LpTooltip.vue.d.ts +9 -0
  168. package/dist/components/LpTooltip.vue.js +1 -1
  169. package/dist/components/LpTopologyCanvas.vue.js +1 -1
  170. package/dist/components/LpTour.vue.js +1 -1
  171. package/dist/components/LpTruncate.vue.js +1 -1
  172. package/dist/components/LpUptimeBar.vue.js +1 -1
  173. package/dist/components/LpVideoCompress.vue.js +1 -1
  174. package/dist/components/LpVideoPlayer.vue.js +1 -1
  175. package/dist/components/LpVideoTrim.vue.js +4 -4
  176. package/dist/components/LpWindow.vue.js +1 -1
  177. package/dist/components/LpWorkspaceSwitcher.vue.js +1 -1
  178. package/dist/components/PickerField.vue.js +1 -1
  179. package/dist/components/RevealToggle.vue.js +1 -1
  180. package/dist/components/TourCard.vue.js +1 -1
  181. package/dist/components/VideoVolume.vue.js +1 -1
  182. package/dist/components/badge.d.ts +1 -1
  183. package/dist/components/badge.js +1 -1
  184. package/dist/components/dropdown.d.ts +14 -0
  185. package/dist/components/dropdown.js +7 -1
  186. package/dist/components/menuWhen.js +1 -1
  187. package/dist/components/modalDepth.d.ts +1 -0
  188. package/dist/components/modalDepth.js +2 -0
  189. package/dist/composables/useReveal.js +3 -3
  190. package/dist/composables/useTouchHold.d.ts +19 -0
  191. package/dist/composables/useTouchHold.js +60 -0
  192. package/dist/index.js +72 -71
  193. package/package.json +1 -1
  194. package/src/components/ContextMenuItems.vue +2 -1
  195. package/src/components/IconCloseButton.vue +1 -1
  196. package/src/components/LpAlert.vue +1 -1
  197. package/src/components/LpAutocomplete.vue +4 -4
  198. package/src/components/LpButton.vue +1 -1
  199. package/src/components/LpCheckbox.vue +1 -1
  200. package/src/components/LpCodeBlock.vue +2 -2
  201. package/src/components/LpColorPicker.vue +3 -3
  202. package/src/components/LpCommandPalette.vue +89 -7
  203. package/src/components/LpContextMenu.vue +2 -2
  204. package/src/components/LpDataList.vue +1 -1
  205. package/src/components/LpDrawer.vue +7 -4
  206. package/src/components/LpDropdownMenu.vue +2 -2
  207. package/src/components/LpDropzone.vue +2 -2
  208. package/src/components/LpEditable.vue +2 -2
  209. package/src/components/LpEmptyState.vue +1 -1
  210. package/src/components/LpFileTreeNode.vue +1 -1
  211. package/src/components/LpHintLayer.vue +2 -2
  212. package/src/components/LpHoverCard.vue +11 -80
  213. package/src/components/LpImageEditor.vue +1 -1
  214. package/src/components/LpInput.vue +1 -1
  215. package/src/components/LpLightbox.vue +20 -3
  216. package/src/components/LpModal.vue +4 -4
  217. package/src/components/LpModalNav.vue +2 -1
  218. package/src/components/LpNumberField.vue +1 -1
  219. package/src/components/LpPhoneInput.vue +5 -5
  220. package/src/components/LpPopover.vue +2 -2
  221. package/src/components/LpRadio.vue +1 -1
  222. package/src/components/LpRadioGroup.vue +1 -1
  223. package/src/components/LpRangeSlider.vue +1 -1
  224. package/src/components/LpSection.vue +9 -6
  225. package/src/components/LpSegmented.vue +1 -1
  226. package/src/components/LpSelect.vue +4 -4
  227. package/src/components/LpSlider.vue +1 -1
  228. package/src/components/LpStat.vue +1 -1
  229. package/src/components/LpSwitch.vue +1 -1
  230. package/src/components/LpTable.vue +13 -1
  231. package/src/components/LpTableFilter.vue +1 -1
  232. package/src/components/LpTagsInput.vue +2 -2
  233. package/src/components/LpTextarea.vue +1 -1
  234. package/src/components/LpThemeSwitcher.vue +2 -2
  235. package/src/components/LpTimeField.vue +1 -1
  236. package/src/components/LpToaster.vue +1 -1
  237. package/src/components/LpTooltip.vue +59 -5
  238. package/src/components/badge.ts +1 -1
  239. package/src/components/dropdown.ts +24 -0
  240. package/src/components/modalDepth.ts +6 -0
  241. package/src/composables/useReveal.ts +7 -4
  242. package/src/composables/useTouchHold.ts +92 -0
  243. package/src/locales/uk.ts +1 -0
  244. package/src/tokens/utilities.css +34 -0
@@ -0,0 +1,92 @@
1
+ import { onBeforeUnmount } from "vue"
2
+
3
+ /*
4
+ * Press-and-hold on a touch screen, for things a pointer reaches by hovering
5
+ * (a hover card, a tooltip). A hold that drifts is a scroll, not a hold, so
6
+ * moving past a few pixels cancels it. Once it has fired, the click the finger
7
+ * produces on lifting is swallowed: the reader asked for the preview, not for
8
+ * the link or button under it. A mouse or pen is left alone.
9
+ *
10
+ * The handlers go on the trigger: pointerdown, pointermove, pointerup,
11
+ * pointercancel, click (capture) and contextmenu.
12
+ */
13
+ const SLOP = 8
14
+ /* A long press may produce no click at all; past this the next click is the user's own. */
15
+ const CLICK_AFTER_RELEASE_MS = 350
16
+
17
+ export interface TouchHoldOptions {
18
+ /** Whether a touch press may start a hold now. */
19
+ enabled: () => boolean
20
+ /** How long the finger must stay, in ms. */
21
+ delay: () => number
22
+ onHold: () => void
23
+ }
24
+
25
+ export function useTouchHold(options: TouchHoldOptions) {
26
+ let timer = 0
27
+ /* The finger the hold belongs to: a second one must not move or end it. */
28
+ let finger: number | null = null
29
+ let start = { x: 0, y: 0 }
30
+ let held = false
31
+
32
+ function stop() {
33
+ window.clearTimeout(timer)
34
+ timer = 0
35
+ }
36
+
37
+ function onPointerDown(event: PointerEvent) {
38
+ // Any new press starts over: on a hybrid laptop the mouse click after a
39
+ // hold must not be taken for that hold's own click.
40
+ if (timer && event.pointerId !== finger) return
41
+ held = false
42
+ if (event.pointerType !== "touch" || !options.enabled()) return
43
+ finger = event.pointerId
44
+ start = { x: event.clientX, y: event.clientY }
45
+ stop()
46
+ timer = window.setTimeout(() => {
47
+ timer = 0
48
+ held = true
49
+ options.onHold()
50
+ }, options.delay())
51
+ }
52
+
53
+ function onPointerMove(event: PointerEvent) {
54
+ if (!timer || event.pointerId !== finger) return
55
+ if (Math.hypot(event.clientX - start.x, event.clientY - start.y) > SLOP) stop()
56
+ }
57
+
58
+ function onPointerUp(event: PointerEvent) {
59
+ if (finger !== null && event.pointerId !== finger) return
60
+ finger = null
61
+ stop()
62
+ if (held) window.setTimeout(() => (held = false), CLICK_AFTER_RELEASE_MS)
63
+ }
64
+
65
+ // A cancelled press produces no click, so there is nothing left to swallow.
66
+ function onPointerCancel(event?: PointerEvent) {
67
+ if (event && finger !== null && event.pointerId !== finger) return
68
+ finger = null
69
+ stop()
70
+ held = false
71
+ }
72
+
73
+ function onClickCapture(event: MouseEvent) {
74
+ if (!held) return
75
+ held = false
76
+ event.preventDefault()
77
+ event.stopImmediatePropagation()
78
+ }
79
+
80
+ // A long press would otherwise also bring up the system's own menu.
81
+ function onContextMenu(event: Event) {
82
+ if (timer || held) event.preventDefault()
83
+ }
84
+
85
+ onBeforeUnmount(stop)
86
+
87
+ return {
88
+ /** Drops a hold in progress, as if the finger had been lifted off the screen. */
89
+ cancel: () => onPointerCancel(),
90
+ handlers: { onPointerdown: onPointerDown, onPointermove: onPointerMove, onPointerup: onPointerUp, onPointercancel: onPointerCancel, onClickCapture, onContextmenu: onContextMenu },
91
+ }
92
+ }
package/src/locales/uk.ts CHANGED
@@ -447,6 +447,7 @@ export const uk: KitLabels = {
447
447
  running: "Виконується…",
448
448
  select: "вибрати",
449
449
  close: "закрити",
450
+ dismiss: "Закрити",
450
451
  back: "назад",
451
452
  searching: "Пошук…",
452
453
  searchFailed: "Пошук зараз недоступний.",
@@ -171,3 +171,37 @@
171
171
  animation: none;
172
172
  }
173
173
  }
174
+
175
+ /*
176
+ * Text entry on a touch screen. iOS Safari zooms the page in when a field whose
177
+ * text is smaller than 16px takes focus, and leaves it zoomed after the field
178
+ * loses it. Every kit field that takes typing carries this class, so on a
179
+ * coarse pointer its text is 16px; a mouse keeps the size it was drawn at.
180
+ * Unlayered on purpose: it has to win over the field's own `text-sm`.
181
+ */
182
+ @media (hover: none) and (pointer: coarse) {
183
+ .lp-entry {
184
+ font-size: 16px;
185
+ }
186
+ }
187
+
188
+ /*
189
+ * A control drawn smaller than a fingertip: a checkbox, a switch, an icon or a
190
+ * small button, a chip's remove. On a coarse pointer an invisible ::after
191
+ * grows what it answers to to 40px on each axis, centred on the control, so it
192
+ * keeps its look and a thumb still lands on it. Bigger controls are left as
193
+ * they are. Both rules sit in the components layer, so a control placed with
194
+ * `absolute`, or one that draws its own ::after, keeps what its classes say.
195
+ */
196
+ @layer components {
197
+ @media (hover: none) and (pointer: coarse) {
198
+ .lp-tap {
199
+ position: relative;
200
+ }
201
+ .lp-tap::after {
202
+ content: "";
203
+ position: absolute;
204
+ inset: min(0px, calc((100% - 40px) / 2));
205
+ }
206
+ }
207
+ }