@apple-pie/slice 0.0.6 → 0.0.7

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 (412) hide show
  1. package/dist/cjs/chunks/Avatar-0EXaRG4e.js +54 -0
  2. package/dist/cjs/chunks/AvatarGroup-BsRUAZl0.js +37 -0
  3. package/dist/cjs/chunks/Badge-Bv6c2YVC.js +23 -0
  4. package/dist/cjs/chunks/Button-DFAWHJmQ.js +246 -0
  5. package/dist/cjs/chunks/ButtonBar-DOgYDAda.js +53 -0
  6. package/dist/cjs/chunks/Card-BPClSuHa.js +37 -0
  7. package/dist/cjs/chunks/CheckBox-tsExpwtr.js +56 -0
  8. package/dist/cjs/chunks/Chip-CPHF1zn-.js +84 -0
  9. package/dist/cjs/chunks/DivInput-DDQVtlot.js +102 -0
  10. package/dist/cjs/chunks/DocIcons-B5TcBqSH.js +108 -0
  11. package/dist/cjs/chunks/Dot-BSSClfHQ.js +73 -0
  12. package/dist/cjs/chunks/DrggablePanel-wWLPesc8.js +202 -0
  13. package/dist/cjs/chunks/DropDown-COdCr77A.js +102 -0
  14. package/dist/cjs/chunks/ErrorSummary-CIUqlSLC.js +60 -0
  15. package/dist/cjs/chunks/FileIcon-DTQaXxfC.js +221 -0
  16. package/dist/cjs/chunks/FileList-J2EgJyCo.js +217 -0
  17. package/dist/cjs/chunks/FlexDiv-CW5gSa4V.js +65 -0
  18. package/dist/cjs/chunks/Grouper-QwwunKen.js +61 -0
  19. package/dist/cjs/chunks/IconButton-B53y3z1_.js +77 -0
  20. package/dist/cjs/chunks/Label-DoiS07-y.js +111 -0
  21. package/dist/cjs/chunks/Logos-CAHU-eIP.js +483 -0
  22. package/dist/cjs/chunks/Overlay-Bb2YoSKr.js +36 -0
  23. package/dist/cjs/chunks/Pager-CN2z8M9E.js +37 -0
  24. package/dist/cjs/chunks/ProgressIndicator-BbrZ7Aoc.js +157 -0
  25. package/dist/cjs/chunks/PromptInput-BXDqUXFQ.js +150 -0
  26. package/dist/cjs/chunks/RadioButton-GKRhZEmb.js +56 -0
  27. package/dist/cjs/chunks/RadioButtonList-CFpZmyAX.js +59 -0
  28. package/dist/cjs/chunks/Slider-CZvCAodl.js +136 -0
  29. package/dist/cjs/chunks/Spacer-CtxV2Pww.js +18 -0
  30. package/dist/cjs/chunks/Switch-C94aofxQ.js +37 -0
  31. package/dist/cjs/chunks/TabBar-D6akzNUf.js +123 -0
  32. package/dist/cjs/chunks/TextArea-DjF8Koup.js +82 -0
  33. package/dist/cjs/chunks/TextField-Cg6mQcYl.js +204 -0
  34. package/dist/cjs/chunks/Tip-CjMHa-fD.js +88 -0
  35. package/dist/cjs/chunks/Toast-Cdyh6T-l.js +163 -0
  36. package/dist/cjs/chunks/UploadArea-BmZ50EEl.js +123 -0
  37. package/dist/cjs/chunks/_types-B5xXv4NA.js +1386 -0
  38. package/dist/cjs/chunks/sharedTypes-gCECyn2N.js +6 -0
  39. package/dist/cjs/chunks/style-inject.es-CMuL-BfJ.js +11 -0
  40. package/dist/cjs/chunks/tipStore-Ck4NLvml.js +17 -0
  41. package/dist/cjs/chunks/toastStore-CSStgB9d.js +17 -0
  42. package/dist/cjs/chunks/tslib.es6-C8dZW5nY.js +49 -0
  43. package/dist/cjs/chunks/uploads-worker-mD8pcsGP.js +221 -0
  44. package/dist/cjs/chunks/uploadsStore-CxWIctvI.js +75 -0
  45. package/dist/cjs/chunks/utils-BsBHecUI.js +70 -0
  46. package/dist/cjs/chunks/windowStore-RaJswiHM.js +70 -0
  47. package/dist/cjs/hooks/useDoubleClick.js +11 -23
  48. package/dist/cjs/hooks/useKeyboardShortcuts.js +18 -35
  49. package/dist/cjs/hooks/useLastUpdated.js +20 -42
  50. package/dist/cjs/hooks/useLocalStore.js +23 -39
  51. package/dist/cjs/hooks/useObserveResize.js +26 -44
  52. package/dist/cjs/hooks/useObserveTheme.js +18 -36
  53. package/dist/cjs/hooks/useTheme.js +17 -40
  54. package/dist/cjs/hooks/useToolTip.js +19 -32
  55. package/dist/cjs/hooks/useTrackRenders.js +11 -29
  56. package/dist/cjs/hooks/useWindow.js +29 -65
  57. package/dist/cjs/hooks.js +12 -30
  58. package/dist/cjs/index.js +46 -134
  59. package/dist/cjs/providers/ThemeProvider.js +27 -45
  60. package/dist/cjs/providers.js +5 -12
  61. package/dist/cjs/stores/tip.js +4 -9
  62. package/dist/cjs/stores/toast.js +4 -9
  63. package/dist/cjs/stores/uploads.js +11 -0
  64. package/dist/cjs/stores/window.js +8 -10
  65. package/dist/cjs/stores.js +18 -21
  66. package/dist/cjs/theme/colors.js +371 -379
  67. package/dist/cjs/theme/corners.js +10 -12
  68. package/dist/cjs/theme/elevations.js +10 -13
  69. package/dist/cjs/theme/themes.js +8 -13
  70. package/dist/cjs/theme/type.js +225 -384
  71. package/dist/cjs/theme.js +5 -13
  72. package/dist/cjs/uikit/Avatar/index.js +6 -0
  73. package/dist/cjs/uikit/AvatarGroup/index.js +7 -0
  74. package/dist/cjs/uikit/Badge/index.js +6 -0
  75. package/dist/cjs/uikit/Button/index.js +12 -0
  76. package/dist/cjs/uikit/ButtonBar/index.js +12 -0
  77. package/dist/cjs/uikit/Card/index.js +10 -0
  78. package/dist/cjs/uikit/CheckBox/index.js +10 -0
  79. package/dist/cjs/uikit/Chip/index.js +11 -0
  80. package/dist/cjs/uikit/DivInput/index.js +7 -0
  81. package/dist/cjs/uikit/DocIcon/index.js +9 -0
  82. package/dist/cjs/uikit/Dot/index.js +6 -0
  83. package/dist/cjs/uikit/DraggablePanel/index.js +10 -0
  84. package/dist/cjs/uikit/DropDown/index.js +10 -0
  85. package/dist/cjs/uikit/ErrorSummary/index.js +6 -0
  86. package/dist/cjs/uikit/FileIcon/index.js +15 -0
  87. package/dist/cjs/uikit/FileList/index.js +11 -0
  88. package/dist/cjs/uikit/FlexDiv/index.js +6 -0
  89. package/dist/cjs/uikit/Grouper/index.js +11 -0
  90. package/dist/cjs/uikit/Icon/index.js +14 -0
  91. package/dist/cjs/uikit/IconButton/index.js +12 -0
  92. package/dist/cjs/uikit/Label/index.js +10 -0
  93. package/dist/cjs/uikit/Logos/index.js +9 -0
  94. package/dist/cjs/uikit/Overlay/index.js +6 -0
  95. package/dist/cjs/uikit/Pager/index.js +7 -0
  96. package/dist/cjs/uikit/Progress/index.js +10 -0
  97. package/dist/cjs/uikit/PromptInput/index.js +14 -0
  98. package/dist/cjs/uikit/RadioButton/index.js +12 -0
  99. package/dist/cjs/uikit/RadioButtonList/index.js +13 -0
  100. package/dist/cjs/uikit/Slider/index.js +7 -0
  101. package/dist/cjs/uikit/Spacer/index.js +6 -0
  102. package/dist/cjs/uikit/Switch/index.js +6 -0
  103. package/dist/cjs/uikit/TabBar/index.js +12 -0
  104. package/dist/cjs/uikit/TextArea/index.js +13 -0
  105. package/dist/cjs/uikit/Textfield/index.js +13 -0
  106. package/dist/cjs/uikit/Tip/index.js +7 -0
  107. package/dist/cjs/uikit/Toast/index.js +16 -0
  108. package/dist/cjs/uikit/UploadArea/index.js +15 -0
  109. package/dist/cjs/workers/uploads/uploads.js +5 -0
  110. package/dist/esm/chunks/Avatar-D_W5zErj.mjs +60 -0
  111. package/dist/esm/chunks/AvatarGroup-Dbfmz0Yz.mjs +45 -0
  112. package/dist/esm/chunks/Badge-BISGWj5-.mjs +29 -0
  113. package/dist/esm/chunks/Button-B_aIY6wE.mjs +264 -0
  114. package/dist/esm/chunks/ButtonBar-Cr6TFvvD.mjs +66 -0
  115. package/dist/esm/chunks/Card-BzKBF0ny.mjs +45 -0
  116. package/dist/esm/chunks/CheckBox-CYggPKaT.mjs +68 -0
  117. package/dist/esm/chunks/Chip-B3wb9g1U.mjs +96 -0
  118. package/dist/esm/chunks/DivInput-_VL6PAqT.mjs +114 -0
  119. package/dist/esm/chunks/DocIcons-BxtcXsWI.mjs +114 -0
  120. package/dist/esm/chunks/Dot-C-Xu24wF.mjs +81 -0
  121. package/dist/esm/chunks/DrggablePanel-Bg3UKK1k.mjs +214 -0
  122. package/dist/esm/chunks/DropDown-D7KyGLkM.mjs +114 -0
  123. package/dist/esm/chunks/ErrorSummary-CZw06dSh.mjs +68 -0
  124. package/dist/esm/chunks/FileIcon-BcIJzIwA.mjs +233 -0
  125. package/dist/esm/chunks/FileList-DUzgHfE-.mjs +229 -0
  126. package/dist/esm/chunks/FlexDiv-BLYDgWu2.mjs +73 -0
  127. package/dist/esm/chunks/Grouper-CRldBHSw.mjs +75 -0
  128. package/dist/esm/chunks/IconButton-BBiZrXlS.mjs +93 -0
  129. package/dist/esm/chunks/Label-DPIAVkn1.mjs +124 -0
  130. package/dist/esm/chunks/Logos-CpcaarOG.mjs +493 -0
  131. package/dist/esm/chunks/Overlay-Bh0enFIe.mjs +44 -0
  132. package/dist/esm/chunks/Pager-B-1ZRUzU.mjs +45 -0
  133. package/dist/esm/chunks/ProgressIndicator-CNOBQ_Fv.mjs +167 -0
  134. package/dist/esm/chunks/PromptInput-DdsIgZ3T.mjs +160 -0
  135. package/dist/esm/chunks/RadioButton-D-TdQu3a.mjs +66 -0
  136. package/dist/esm/chunks/RadioButtonList-CEScWkbT.mjs +67 -0
  137. package/dist/esm/chunks/Slider-C3A8GCfH.mjs +142 -0
  138. package/dist/esm/chunks/Spacer-BlgEdKEM.mjs +20 -0
  139. package/dist/esm/chunks/Switch-obpmvCGd.mjs +45 -0
  140. package/dist/esm/chunks/TabBar-DFj021UP.mjs +141 -0
  141. package/dist/esm/chunks/TextArea-D_hq6VF3.mjs +90 -0
  142. package/dist/esm/chunks/TextField-Co0u-xdd.mjs +222 -0
  143. package/dist/esm/chunks/Tip-CHQh-Yq0.mjs +98 -0
  144. package/dist/esm/chunks/Toast-BiXzVFtM.mjs +179 -0
  145. package/dist/esm/chunks/UploadArea-B9685Z06.mjs +133 -0
  146. package/dist/esm/chunks/_types-KZDzhaiK.mjs +1395 -0
  147. package/dist/esm/chunks/sharedTypes-tn9-uJvb.mjs +8 -0
  148. package/dist/esm/chunks/style-inject.es-D0BjEaN8.mjs +11 -0
  149. package/dist/esm/chunks/tipStore-CL5a95Bl.mjs +15 -0
  150. package/dist/esm/chunks/toastStore-D2PEIqCo.mjs +15 -0
  151. package/dist/esm/chunks/tslib.es6-c-7TIv71.mjs +53 -0
  152. package/dist/esm/chunks/uploads-worker-Dv-4zGnC.mjs +224 -0
  153. package/dist/esm/chunks/uploadsStore-D69fEXMY.mjs +72 -0
  154. package/dist/esm/chunks/utils-BQ1v7VE4.mjs +74 -0
  155. package/dist/esm/chunks/windowStore-CwW0i_le.mjs +71 -0
  156. package/dist/esm/hooks/useDoubleClick.mjs +14 -0
  157. package/dist/esm/hooks/useKeyboardShortcuts.mjs +27 -0
  158. package/dist/esm/hooks/useLastUpdated.mjs +31 -0
  159. package/dist/esm/hooks/useLocalStore.mjs +36 -0
  160. package/dist/esm/hooks/useObserveResize.mjs +38 -0
  161. package/dist/esm/hooks/useObserveTheme.mjs +34 -0
  162. package/dist/esm/hooks/useTheme.mjs +73 -0
  163. package/dist/esm/hooks/useToolTip.mjs +23 -0
  164. package/dist/esm/hooks/useTrackRenders.mjs +23 -0
  165. package/dist/esm/hooks/useWindow.mjs +52 -0
  166. package/dist/esm/hooks.mjs +29 -0
  167. package/dist/esm/index.mjs +117 -0
  168. package/dist/esm/providers/ThemeProvider.mjs +49 -0
  169. package/dist/esm/providers.mjs +15 -0
  170. package/dist/esm/stores/tip.mjs +3 -0
  171. package/dist/esm/stores/toast.mjs +3 -0
  172. package/dist/esm/stores/uploads.mjs +7 -0
  173. package/dist/esm/stores/window.mjs +3 -0
  174. package/dist/esm/stores.mjs +13 -0
  175. package/dist/esm/theme/colors.mjs +373 -0
  176. package/dist/esm/theme/corners.mjs +12 -0
  177. package/dist/esm/theme/elevations.mjs +15 -0
  178. package/dist/esm/theme/themes.mjs +25 -0
  179. package/dist/esm/theme/type.mjs +236 -0
  180. package/dist/esm/theme.mjs +9 -0
  181. package/dist/esm/uikit/Avatar/index.mjs +9 -0
  182. package/dist/esm/uikit/AvatarGroup/index.mjs +11 -0
  183. package/dist/esm/uikit/Badge/index.mjs +9 -0
  184. package/dist/esm/uikit/Button/index.mjs +39 -0
  185. package/dist/esm/uikit/ButtonBar/index.mjs +39 -0
  186. package/dist/esm/uikit/Card/index.mjs +29 -0
  187. package/dist/esm/uikit/CheckBox/index.mjs +31 -0
  188. package/dist/esm/uikit/Chip/index.mjs +31 -0
  189. package/dist/esm/uikit/DivInput/index.mjs +13 -0
  190. package/dist/esm/uikit/DocIcon/index.mjs +23 -0
  191. package/dist/esm/uikit/Dot/index.mjs +11 -0
  192. package/dist/esm/uikit/DraggablePanel/index.mjs +29 -0
  193. package/dist/esm/uikit/DropDown/index.mjs +29 -0
  194. package/dist/esm/uikit/ErrorSummary/index.mjs +11 -0
  195. package/dist/esm/uikit/FileIcon/index.mjs +25 -0
  196. package/dist/esm/uikit/FileList/index.mjs +35 -0
  197. package/dist/esm/uikit/FlexDiv/index.mjs +11 -0
  198. package/dist/esm/uikit/Grouper/index.mjs +33 -0
  199. package/dist/esm/uikit/Icon/index.mjs +25 -0
  200. package/dist/esm/uikit/IconButton/index.mjs +37 -0
  201. package/dist/esm/uikit/Label/index.mjs +27 -0
  202. package/dist/esm/uikit/Logos/index.mjs +23 -0
  203. package/dist/esm/uikit/Overlay/index.mjs +11 -0
  204. package/dist/esm/uikit/Pager/index.mjs +11 -0
  205. package/dist/esm/uikit/Progress/index.mjs +27 -0
  206. package/dist/esm/uikit/PromptInput/index.mjs +45 -0
  207. package/dist/esm/uikit/RadioButton/index.mjs +39 -0
  208. package/dist/esm/uikit/RadioButtonList/index.mjs +41 -0
  209. package/dist/esm/uikit/Slider/index.mjs +13 -0
  210. package/dist/esm/uikit/Spacer/index.mjs +7 -0
  211. package/dist/esm/uikit/Switch/index.mjs +11 -0
  212. package/dist/esm/uikit/TabBar/index.mjs +39 -0
  213. package/dist/esm/uikit/TextArea/index.mjs +41 -0
  214. package/dist/esm/uikit/Textfield/index.mjs +43 -0
  215. package/dist/esm/uikit/Tip/index.mjs +13 -0
  216. package/dist/esm/uikit/Toast/index.mjs +31 -0
  217. package/dist/esm/uikit/UploadArea/index.mjs +37 -0
  218. package/dist/esm/workers/uploads/uploads.mjs +5 -0
  219. package/dist/types/stores/index.d.ts +1 -0
  220. package/dist/types/stores/uploads/_types.d.ts +16 -0
  221. package/dist/types/stores/uploads/index.d.ts +2 -0
  222. package/dist/types/stores/uploads/uploadsStore.d.ts +22 -0
  223. package/dist/types/workers/uploads/uploads-worker.d.ts +129 -0
  224. package/dist/types/workers/uploads/uploads.d.ts +1 -0
  225. package/dist/types/workers/uploads/uploads.runtime.d.ts +1 -0
  226. package/package.json +23 -17
  227. package/dist/cjs/chunks/Avatar-z2YcOAoP.js +0 -68
  228. package/dist/cjs/chunks/AvatarGroup-Cz8369zI.js +0 -39
  229. package/dist/cjs/chunks/Badge-COSg__VJ.js +0 -41
  230. package/dist/cjs/chunks/Button-BNXqiA13.js +0 -312
  231. package/dist/cjs/chunks/ButtonBar-CeDdAOlH.js +0 -58
  232. package/dist/cjs/chunks/Card-Cc_c-S7i.js +0 -36
  233. package/dist/cjs/chunks/CheckBox-hTWIPqV_.js +0 -76
  234. package/dist/cjs/chunks/Chip-CLKVldi4.js +0 -93
  235. package/dist/cjs/chunks/DivInput-DnY2emt-.js +0 -204
  236. package/dist/cjs/chunks/DocIcons-BRWOzK96.js +0 -41
  237. package/dist/cjs/chunks/Dot-B5dO8kSS.js +0 -80
  238. package/dist/cjs/chunks/DrggablePanel-BtsURL9o.js +0 -302
  239. package/dist/cjs/chunks/DropDown-COr9u96t.js +0 -154
  240. package/dist/cjs/chunks/ErrorSummary-BrSHbGpk.js +0 -42
  241. package/dist/cjs/chunks/FileIcon-CEMQK_Je.js +0 -132
  242. package/dist/cjs/chunks/FileList-BHMne9Mr.js +0 -163
  243. package/dist/cjs/chunks/FlexDiv-BHl29ywz.js +0 -103
  244. package/dist/cjs/chunks/Grouper-EyHoeA8w.js +0 -50
  245. package/dist/cjs/chunks/IconButton-9QZ4eKBZ.js +0 -84
  246. package/dist/cjs/chunks/Label-s1aCv2Y1.js +0 -134
  247. package/dist/cjs/chunks/Logos-DSlAUz8l.js +0 -119
  248. package/dist/cjs/chunks/Overlay-DV3C5NDO.js +0 -45
  249. package/dist/cjs/chunks/Pager-CRjpl1FZ.js +0 -42
  250. package/dist/cjs/chunks/ProgressIndicator-BAwAaw58.js +0 -121
  251. package/dist/cjs/chunks/PromptInput-CfzofBTJ.js +0 -212
  252. package/dist/cjs/chunks/RadioButton-DA9YUGEF.js +0 -65
  253. package/dist/cjs/chunks/RadioButtonList-BtsT7GJc.js +0 -116
  254. package/dist/cjs/chunks/Slider-CqrIwn-L.js +0 -285
  255. package/dist/cjs/chunks/Spacer-BEY2-_PB.js +0 -16
  256. package/dist/cjs/chunks/Switch-CtkFtogd.js +0 -43
  257. package/dist/cjs/chunks/TabBar-WsNlr-aZ.js +0 -176
  258. package/dist/cjs/chunks/TextArea-BMJWUH2H.js +0 -153
  259. package/dist/cjs/chunks/TextField-mfwz79cD.js +0 -248
  260. package/dist/cjs/chunks/Tip-Af6FMEDi.js +0 -91
  261. package/dist/cjs/chunks/Toast-CxAEOW4z.js +0 -158
  262. package/dist/cjs/chunks/UploadArea-DunGYE1_.js +0 -155
  263. package/dist/cjs/chunks/_types-BNlHsGMQ.js +0 -714
  264. package/dist/cjs/chunks/sharedTypes-BvTjh6M5.js +0 -9
  265. package/dist/cjs/chunks/style-inject.es-XZHJH68X.js +0 -30
  266. package/dist/cjs/chunks/tipStore-C9oV9SIh.js +0 -23
  267. package/dist/cjs/chunks/toastStore-C-ETP9H6.js +0 -23
  268. package/dist/cjs/chunks/tslib.es6-4H29ixHs.js +0 -48
  269. package/dist/cjs/chunks/utils-BwNacfBU.js +0 -128
  270. package/dist/cjs/chunks/windowStore-CPcVHJq6.js +0 -93
  271. package/dist/cjs/uikit/Avatar.js +0 -11
  272. package/dist/cjs/uikit/AvatarGroup.js +0 -12
  273. package/dist/cjs/uikit/Badge.js +0 -11
  274. package/dist/cjs/uikit/Button.js +0 -26
  275. package/dist/cjs/uikit/ButtonBar.js +0 -26
  276. package/dist/cjs/uikit/Card.js +0 -21
  277. package/dist/cjs/uikit/CheckBox.js +0 -22
  278. package/dist/cjs/uikit/Chip.js +0 -22
  279. package/dist/cjs/uikit/DivInput.js +0 -13
  280. package/dist/cjs/uikit/DocIcon.js +0 -18
  281. package/dist/cjs/uikit/Dot.js +0 -12
  282. package/dist/cjs/uikit/DraggablePanel.js +0 -21
  283. package/dist/cjs/uikit/DropDown.js +0 -21
  284. package/dist/cjs/uikit/ErrorSummary.js +0 -12
  285. package/dist/cjs/uikit/FileIcon.js +0 -23
  286. package/dist/cjs/uikit/FileList.js +0 -24
  287. package/dist/cjs/uikit/FlexDiv.js +0 -12
  288. package/dist/cjs/uikit/Grouper.js +0 -23
  289. package/dist/cjs/uikit/Icon.js +0 -23
  290. package/dist/cjs/uikit/IconButton.js +0 -25
  291. package/dist/cjs/uikit/Label.js +0 -20
  292. package/dist/cjs/uikit/Logos.js +0 -18
  293. package/dist/cjs/uikit/Overlay.js +0 -12
  294. package/dist/cjs/uikit/Pager.js +0 -12
  295. package/dist/cjs/uikit/Progress.js +0 -21
  296. package/dist/cjs/uikit/PromptInput.js +0 -29
  297. package/dist/cjs/uikit/RadioButton.js +0 -26
  298. package/dist/cjs/uikit/RadioButtonList.js +0 -27
  299. package/dist/cjs/uikit/Slider.js +0 -13
  300. package/dist/cjs/uikit/Spacer.js +0 -10
  301. package/dist/cjs/uikit/Switch.js +0 -12
  302. package/dist/cjs/uikit/TabBar.js +0 -26
  303. package/dist/cjs/uikit/TextArea.js +0 -27
  304. package/dist/cjs/uikit/Textfield.js +0 -28
  305. package/dist/cjs/uikit/Tip.js +0 -13
  306. package/dist/cjs/uikit/Toast.js +0 -26
  307. package/dist/cjs/uikit/UploadArea.js +0 -31
  308. package/dist/esm/chunks/Avatar-BtkvMV1v.js +0 -66
  309. package/dist/esm/chunks/AvatarGroup-pbqdS56o.js +0 -37
  310. package/dist/esm/chunks/Badge-DtxDLSO0.js +0 -39
  311. package/dist/esm/chunks/Button-BUJkJqdO.js +0 -310
  312. package/dist/esm/chunks/ButtonBar-Bl0oCxd8.js +0 -56
  313. package/dist/esm/chunks/Card-Bjk0kgQh.js +0 -34
  314. package/dist/esm/chunks/CheckBox-CvkZuSeB.js +0 -74
  315. package/dist/esm/chunks/Chip-o-YG_HAf.js +0 -91
  316. package/dist/esm/chunks/DivInput-D6ORPrkT.js +0 -202
  317. package/dist/esm/chunks/DocIcons-CbOX4n8Y.js +0 -39
  318. package/dist/esm/chunks/Dot-BZcEZbnm.js +0 -78
  319. package/dist/esm/chunks/DrggablePanel-DWrTjXvf.js +0 -300
  320. package/dist/esm/chunks/DropDown-BDIvYWI-.js +0 -152
  321. package/dist/esm/chunks/ErrorSummary-DzDnacH0.js +0 -40
  322. package/dist/esm/chunks/FileIcon-Cxh-QsYb.js +0 -130
  323. package/dist/esm/chunks/FileList-CdUgbpYF.js +0 -161
  324. package/dist/esm/chunks/FlexDiv-CFyndG99.js +0 -101
  325. package/dist/esm/chunks/Grouper-NJbpaaQG.js +0 -48
  326. package/dist/esm/chunks/IconButton-3m9ugITV.js +0 -82
  327. package/dist/esm/chunks/Label-BRon-ejm.js +0 -132
  328. package/dist/esm/chunks/Logos-DwZP-TR2.js +0 -117
  329. package/dist/esm/chunks/Overlay-BolsHW9S.js +0 -43
  330. package/dist/esm/chunks/Pager-BHLyXq9p.js +0 -40
  331. package/dist/esm/chunks/ProgressIndicator-uI9BZwBB.js +0 -118
  332. package/dist/esm/chunks/PromptInput-DodTBG82.js +0 -210
  333. package/dist/esm/chunks/RadioButton-D8otD_Jj.js +0 -63
  334. package/dist/esm/chunks/RadioButtonList-CtX1j7rO.js +0 -114
  335. package/dist/esm/chunks/Slider-O6UelMjh.js +0 -283
  336. package/dist/esm/chunks/Spacer-DbZSG5x3.js +0 -14
  337. package/dist/esm/chunks/Switch-DjfrSiQz.js +0 -41
  338. package/dist/esm/chunks/TabBar-C0NgwRa2.js +0 -174
  339. package/dist/esm/chunks/TextArea-DK0giDGR.js +0 -151
  340. package/dist/esm/chunks/TextField-CQ4XYYNm.js +0 -246
  341. package/dist/esm/chunks/Tip-iFECDhwN.js +0 -89
  342. package/dist/esm/chunks/Toast-ZxMZtbd0.js +0 -156
  343. package/dist/esm/chunks/UploadArea-C0YHy4Z9.js +0 -147
  344. package/dist/esm/chunks/_types-RJ7q8S0B.js +0 -712
  345. package/dist/esm/chunks/sharedTypes-BfZzG1KX.js +0 -9
  346. package/dist/esm/chunks/style-inject.es-tgCJW-Cu.js +0 -28
  347. package/dist/esm/chunks/tipStore-nBYJ6tmE.js +0 -17
  348. package/dist/esm/chunks/toastStore-r3pvNa28.js +0 -17
  349. package/dist/esm/chunks/tslib.es6-0pkUdtrF.js +0 -45
  350. package/dist/esm/chunks/utils-CZ1LWeN6.js +0 -121
  351. package/dist/esm/chunks/windowStore-Cu4W4zJM.js +0 -91
  352. package/dist/esm/hooks/useDoubleClick.js +0 -24
  353. package/dist/esm/hooks/useKeyboardShortcuts.js +0 -42
  354. package/dist/esm/hooks/useLastUpdated.js +0 -51
  355. package/dist/esm/hooks/useLocalStore.js +0 -50
  356. package/dist/esm/hooks/useObserveResize.js +0 -54
  357. package/dist/esm/hooks/useObserveTheme.js +0 -41
  358. package/dist/esm/hooks/useTheme.js +0 -84
  359. package/dist/esm/hooks/useToolTip.js +0 -34
  360. package/dist/esm/hooks/useTrackRenders.js +0 -37
  361. package/dist/esm/hooks/useWindow.js +0 -84
  362. package/dist/esm/hooks.js +0 -15
  363. package/dist/esm/index.js +0 -59
  364. package/dist/esm/providers/ThemeProvider.js +0 -56
  365. package/dist/esm/providers.js +0 -8
  366. package/dist/esm/stores/tip.js +0 -2
  367. package/dist/esm/stores/toast.js +0 -2
  368. package/dist/esm/stores/window.js +0 -2
  369. package/dist/esm/stores.js +0 -4
  370. package/dist/esm/theme/colors.js +0 -377
  371. package/dist/esm/theme/corners.js +0 -12
  372. package/dist/esm/theme/elevations.js +0 -15
  373. package/dist/esm/theme/themes.js +0 -23
  374. package/dist/esm/theme/type.js +0 -393
  375. package/dist/esm/theme.js +0 -5
  376. package/dist/esm/uikit/Avatar.js +0 -5
  377. package/dist/esm/uikit/AvatarGroup.js +0 -6
  378. package/dist/esm/uikit/Badge.js +0 -5
  379. package/dist/esm/uikit/Button.js +0 -20
  380. package/dist/esm/uikit/ButtonBar.js +0 -20
  381. package/dist/esm/uikit/Card.js +0 -15
  382. package/dist/esm/uikit/CheckBox.js +0 -16
  383. package/dist/esm/uikit/Chip.js +0 -16
  384. package/dist/esm/uikit/DivInput.js +0 -7
  385. package/dist/esm/uikit/DocIcon.js +0 -12
  386. package/dist/esm/uikit/Dot.js +0 -6
  387. package/dist/esm/uikit/DraggablePanel.js +0 -15
  388. package/dist/esm/uikit/DropDown.js +0 -15
  389. package/dist/esm/uikit/ErrorSummary.js +0 -6
  390. package/dist/esm/uikit/FileIcon.js +0 -13
  391. package/dist/esm/uikit/FileList.js +0 -18
  392. package/dist/esm/uikit/FlexDiv.js +0 -6
  393. package/dist/esm/uikit/Grouper.js +0 -17
  394. package/dist/esm/uikit/Icon.js +0 -13
  395. package/dist/esm/uikit/IconButton.js +0 -19
  396. package/dist/esm/uikit/Label.js +0 -14
  397. package/dist/esm/uikit/Logos.js +0 -12
  398. package/dist/esm/uikit/Overlay.js +0 -6
  399. package/dist/esm/uikit/Pager.js +0 -6
  400. package/dist/esm/uikit/Progress.js +0 -14
  401. package/dist/esm/uikit/PromptInput.js +0 -23
  402. package/dist/esm/uikit/RadioButton.js +0 -20
  403. package/dist/esm/uikit/RadioButtonList.js +0 -21
  404. package/dist/esm/uikit/Slider.js +0 -7
  405. package/dist/esm/uikit/Spacer.js +0 -4
  406. package/dist/esm/uikit/Switch.js +0 -6
  407. package/dist/esm/uikit/TabBar.js +0 -20
  408. package/dist/esm/uikit/TextArea.js +0 -21
  409. package/dist/esm/uikit/Textfield.js +0 -22
  410. package/dist/esm/uikit/Tip.js +0 -7
  411. package/dist/esm/uikit/Toast.js +0 -16
  412. package/dist/esm/uikit/UploadArea.js +0 -19
@@ -1,53 +1,31 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- var React = require('react');
3
+ var React = require("react");
4
4
 
5
5
  function getTimeDifference(date, labelPrefix) {
6
6
  const compareDate = date instanceof Date ? date : new Date(date);
7
- if (Number.isNaN(compareDate.getTime()))
8
- return `${labelPrefix}Invalid date`;
9
- // getTime = milliseconds since Jan 1 1970 UTC
10
- const secondsDiff = Math.max(0, Math.floor((Date.now() - compareDate.getTime()) / 1000));
11
- const minutes = Math.floor(secondsDiff / 60);
12
- const hours = Math.floor(minutes / 60);
13
- const days = Math.floor(hours / 24);
14
- if (minutes < 1)
15
- return `${labelPrefix}Just now`;
16
- if (minutes === 1)
17
- return `${labelPrefix}1 min. ago`;
18
- if (minutes < 60)
19
- return `${labelPrefix}${minutes} mins. ago`;
20
- if (hours === 1)
21
- return `${labelPrefix}1 hour ago`;
22
- if (hours < 24)
23
- return `${labelPrefix}${hours} hours ago`;
24
- if (days === 1)
25
- return `${labelPrefix}1 day ago`;
26
- if (days < 15)
27
- return `${labelPrefix}${days} days ago`;
28
- return compareDate.toLocaleDateString('en-US', {
29
- day: '2-digit',
30
- month: 'short',
31
- year: 'numeric',
7
+ if (Number.isNaN(compareDate.getTime())) return `${labelPrefix}Invalid date`;
8
+ const secondsDiff = Math.max(0, Math.floor((Date.now() - compareDate.getTime()) / 1e3)), minutes = Math.floor(secondsDiff / 60), hours = Math.floor(minutes / 60), days = Math.floor(hours / 24);
9
+ return minutes < 1 ? `${labelPrefix}Just now` : 1 === minutes ? `${labelPrefix}1 min. ago` : minutes < 60 ? `${labelPrefix}${minutes} mins. ago` : 1 === hours ? `${labelPrefix}1 hour ago` : hours < 24 ? `${labelPrefix}${hours} hours ago` : 1 === days ? `${labelPrefix}1 day ago` : days < 15 ? `${labelPrefix}${days} days ago` : compareDate.toLocaleDateString("en-US", {
10
+ day: "2-digit",
11
+ month: "short",
12
+ year: "numeric"
32
13
  });
33
14
  }
34
- function useLastUpdated(timestamp, prefix = '', interval = 1) {
35
- const [lastUpdated, setLastUpdated] = React.useState(timestamp ? getTimeDifference(timestamp, prefix) : '');
36
- React.useEffect(() => {
37
- if (!timestamp) {
38
- setLastUpdated('');
39
- return;
40
- }
15
+
16
+ exports.useLastUpdated = function(timestamp, prefix = "", interval = 1) {
17
+ const [lastUpdated, setLastUpdated] = React.useState(timestamp ? getTimeDifference(timestamp, prefix) : "");
18
+ return React.useEffect(() => {
19
+ if (!timestamp) return void setLastUpdated("");
41
20
  setLastUpdated(getTimeDifference(timestamp, prefix));
42
- const refreshMinutes = Math.max(interval, 1);
43
- const intervalTimer = setInterval(() => {
21
+ const refreshMinutes = Math.max(interval, 1), intervalTimer = setInterval(() => {
44
22
  setLastUpdated(getTimeDifference(timestamp, prefix));
45
- }, refreshMinutes * 60 * 1000);
23
+ }, 60 * refreshMinutes * 1e3);
46
24
  return () => {
47
25
  clearInterval(intervalTimer);
48
26
  };
49
- }, [interval, prefix, timestamp]);
50
- return { lastUpdated, timer: interval };
51
- }
52
-
53
- exports.useLastUpdated = useLastUpdated;
27
+ }, [ interval, prefix, timestamp ]), {
28
+ lastUpdated: lastUpdated,
29
+ timer: interval
30
+ };
31
+ };
@@ -1,52 +1,36 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- var React = require('react');
3
+ var React = require("react");
4
4
 
5
5
  function canUseLocalStorage() {
6
- return (typeof globalThis !== 'undefined' &&
7
- 'localStorage' in globalThis &&
8
- globalThis.localStorage !== undefined &&
9
- globalThis.localStorage !== null);
6
+ return "undefined" != typeof globalThis && "localStorage" in globalThis && void 0 !== globalThis.localStorage && null !== globalThis.localStorage;
10
7
  }
8
+
11
9
  function readLocalStorageValue(key, fallback) {
12
- if (!canUseLocalStorage())
13
- return fallback;
10
+ if (!canUseLocalStorage()) return fallback;
14
11
  try {
15
12
  const raw = globalThis.localStorage.getItem(key);
16
- if (raw === null) {
17
- // If not set, initialize with fallback.
18
- globalThis.localStorage.setItem(key, JSON.stringify(fallback));
19
- return fallback;
20
- }
21
- return JSON.parse(raw);
22
- }
23
- catch (error) {
24
- console.error(`Error parsing local storage item for key ${key}:`, {
25
- error,
26
- });
27
- return fallback;
13
+ return null === raw ? (globalThis.localStorage.setItem(key, JSON.stringify(fallback)),
14
+ fallback) : JSON.parse(raw);
15
+ } catch (error) {
16
+ return console.error(`Error parsing local storage item for key ${key}:`, {
17
+ error: error
18
+ }), fallback;
28
19
  }
29
20
  }
30
- function useLocalStore(key, value) {
21
+
22
+ exports.useLocalStore = function(key, value) {
31
23
  const [item, setItem] = React.useState(() => readLocalStorageValue(key, value));
32
- // rehydrate on prop changes
33
- React.useEffect(() => {
24
+ return React.useEffect(() => {
34
25
  setItem(readLocalStorageValue(key, value));
35
- }, [key, value]);
36
- function updateItem(data) {
37
- if (canUseLocalStorage()) {
38
- try {
39
- globalThis.localStorage.setItem(key, JSON.stringify(data));
40
- }
41
- catch (error) {
42
- console.error(`Error setting local storage item for key ${key}:`, {
43
- error,
44
- });
45
- }
26
+ }, [ key, value ]), [ item, function(data) {
27
+ if (canUseLocalStorage()) try {
28
+ globalThis.localStorage.setItem(key, JSON.stringify(data));
29
+ } catch (error) {
30
+ console.error(`Error setting local storage item for key ${key}:`, {
31
+ error: error
32
+ });
46
33
  }
47
34
  setItem(data);
48
- }
49
- return [item, updateItem];
50
- }
51
-
52
- exports.useLocalStore = useLocalStore;
35
+ } ];
36
+ };
@@ -1,56 +1,38 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- var React = require('react');
3
+ var React = require("react");
4
4
 
5
- function useObserveResize(element, options) {
6
- const [size, setSize] = React.useState({ width: 0, height: 0 });
7
- const ignore = options === null || options === void 0 ? void 0 : options.ignore;
8
- const handleResize = React.useCallback((entries) => {
5
+ exports.useObserveResize = function(element, options) {
6
+ const [size, setSize] = React.useState({
7
+ width: 0,
8
+ height: 0
9
+ }), ignore = null == options ? void 0 : options.ignore, handleResize = React.useCallback(entries => {
9
10
  var _a, _b;
10
- if (!entries[0])
11
- return;
12
- const width = ((_a = element === null || element === void 0 ? void 0 : element.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) || 0;
13
- const height = ((_b = element === null || element === void 0 ? void 0 : element.current) === null || _b === void 0 ? void 0 : _b.offsetHeight) || 0;
14
- setSize((prev) => {
11
+ if (!entries[0]) return;
12
+ const width = (null === (_a = null == element ? void 0 : element.current) || void 0 === _a ? void 0 : _a.offsetWidth) || 0, height = (null === (_b = null == element ? void 0 : element.current) || void 0 === _b ? void 0 : _b.offsetHeight) || 0;
13
+ setSize(prev => {
15
14
  const next = {
16
- width: ignore === 'width' ? prev.width : width,
17
- height: ignore === 'height' ? prev.height : height,
15
+ width: "width" === ignore ? prev.width : width,
16
+ height: "height" === ignore ? prev.height : height
18
17
  };
19
- if (prev.width === next.width && prev.height === next.height) {
20
- return prev;
21
- }
22
- return next;
18
+ return prev.width === next.width && prev.height === next.height ? prev : next;
23
19
  });
24
- }, [element, ignore]);
25
- React.useEffect(() => {
26
- if (element === undefined)
27
- return;
20
+ }, [ element, ignore ]);
21
+ return React.useEffect(() => {
22
+ if (void 0 === element) return;
28
23
  const el = element.current;
29
- if (!el)
30
- return;
31
- // Get initial size
32
- const newWidth = el.offsetWidth || 0;
33
- const newHeight = el.offsetHeight || 0;
34
- // set the new size of different to previous
35
- setSize((prev) => {
24
+ if (!el) return;
25
+ const newWidth = el.offsetWidth || 0, newHeight = el.offsetHeight || 0;
26
+ setSize(prev => {
36
27
  const next = {
37
- width: ignore === 'width' ? prev.width : newWidth,
38
- height: ignore === 'height' ? prev.height : newHeight,
28
+ width: "width" === ignore ? prev.width : newWidth,
29
+ height: "height" === ignore ? prev.height : newHeight
39
30
  };
40
- if (prev.width === next.width && prev.height === next.height) {
41
- return prev; // same so no need to trigger re-renders
42
- }
43
- return next;
31
+ return prev.width === next.width && prev.height === next.height ? prev : next;
44
32
  });
45
- // Observe size changes
46
33
  const resizeObserver = new ResizeObserver(handleResize);
47
- resizeObserver.observe(el);
48
- return () => {
49
- resizeObserver.unobserve(el);
50
- resizeObserver.disconnect();
34
+ return resizeObserver.observe(el), () => {
35
+ resizeObserver.unobserve(el), resizeObserver.disconnect();
51
36
  };
52
- }, [element, handleResize, ignore]);
53
- return size;
54
- }
55
-
56
- exports.useObserveResize = useObserveResize;
37
+ }, [ element, handleResize, ignore ]), size;
38
+ };
@@ -1,43 +1,25 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- var React = require('react');
4
- var theme_themes = require('../theme/themes.js');
5
- require('../theme/colors.js');
6
- require('../theme/corners.js');
7
- require('../theme/elevations.js');
8
- require('../theme/type.js');
3
+ var React = require("react"), theme_themes = require("../theme/themes.js");
9
4
 
10
5
  function resolveTheme(themeName) {
11
- if (!themeName || themeName === '' || themeName.includes(theme_themes.lightTheme.name)) {
12
- return theme_themes.lightTheme;
13
- }
14
- return theme_themes.darkTheme;
6
+ return !themeName || "" === themeName || themeName.includes(theme_themes.lightTheme.name) ? theme_themes.lightTheme : theme_themes.darkTheme;
15
7
  }
16
- function useObserveTheme() {
17
- const [theme, setTheme] = React.useState(() => {
18
- if (typeof document === 'undefined')
19
- return theme_themes.lightTheme;
20
- return resolveTheme(document.documentElement.dataset.theme);
21
- });
22
- React.useEffect(() => {
23
- // Sync once on mount in case the theme was set before this hook subscribed.
8
+
9
+ require("../theme/colors.js"), require("../theme/corners.js"), require("../theme/elevations.js"),
10
+ require("../theme/type.js"), exports.useObserveTheme = function() {
11
+ const [theme, setTheme] = React.useState(() => "undefined" == typeof document ? theme_themes.lightTheme : resolveTheme(document.documentElement.dataset.theme));
12
+ return React.useEffect(() => {
24
13
  setTheme(resolveTheme(document.documentElement.dataset.theme));
25
- const observer = new MutationObserver((mutations) => {
26
- for (const mutation of mutations) {
27
- if (mutation.type === 'attributes' &&
28
- mutation.attributeName === 'data-theme') {
29
- const newTheme = document.documentElement.dataset.theme;
30
- setTheme(resolveTheme(newTheme));
31
- }
14
+ const observer = new MutationObserver(mutations => {
15
+ for (const mutation of mutations) if ("attributes" === mutation.type && "data-theme" === mutation.attributeName) {
16
+ const newTheme = document.documentElement.dataset.theme;
17
+ setTheme(resolveTheme(newTheme));
32
18
  }
33
19
  });
34
- observer.observe(document.documentElement, {
35
- attributes: true,
36
- attributeFilter: ['data-theme'],
37
- });
38
- return () => observer.disconnect();
39
- }, []);
40
- return theme;
41
- }
42
-
43
- exports.useObserveTheme = useObserveTheme;
20
+ return observer.observe(document.documentElement, {
21
+ attributes: !0,
22
+ attributeFilter: [ "data-theme" ]
23
+ }), () => observer.disconnect();
24
+ }, []), theme;
25
+ };
@@ -1,43 +1,19 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- var React = require('react');
4
- var theme_themes = require('../theme/themes.js');
5
- var theme_colors = require('../theme/colors.js');
6
- var theme_type = require('../theme/type.js');
7
- var hooks_useObserveTheme = require('./useObserveTheme.js');
8
- require('../theme/corners.js');
9
- require('../theme/elevations.js');
3
+ var React = require("react"), theme_themes = require("../theme/themes.js"), theme_colors = require("../theme/colors.js"), theme_type = require("../theme/type.js"), hooks_useObserveTheme = require("./useObserveTheme.js");
10
4
 
5
+ require("../theme/corners.js"), require("../theme/elevations.js"), exports.useTheme =
11
6
  /**
12
7
  * Hook to manage Slice theming
13
8
  */
14
- function useTheme() {
15
- const current = hooks_useObserveTheme.useObserveTheme();
16
- const set = React.useCallback((newTheme) => {
17
- console.log('set theme', newTheme);
9
+ function() {
10
+ const current = hooks_useObserveTheme.useObserveTheme(), set = React.useCallback(newTheme => {
18
11
  let theme;
19
- if (typeof newTheme === 'string') {
20
- if (newTheme === 'system') {
21
- const darkModeMediaQuery = globalThis.matchMedia('(prefers-color-scheme: dark)');
22
- const isDark = darkModeMediaQuery.matches;
23
- theme = isDark ? theme_themes.darkTheme : theme_themes.lightTheme;
24
- }
25
- else {
26
- theme = newTheme === theme_themes.darkTheme.name ? theme_themes.darkTheme : theme_themes.lightTheme;
27
- }
28
- }
29
- else
30
- theme = newTheme;
12
+ if ("string" == typeof newTheme) if ("system" === newTheme) {
13
+ theme = globalThis.matchMedia("(prefers-color-scheme: dark)").matches ? theme_themes.darkTheme : theme_themes.lightTheme;
14
+ } else theme = newTheme === theme_themes.darkTheme.name ? theme_themes.darkTheme : theme_themes.lightTheme; else theme = newTheme;
31
15
  document.documentElement.dataset.theme = theme.name;
32
- }, []);
33
- const toggle = () => {
34
- const lightMode = current.name === theme_themes.lightTheme.name;
35
- const newTheme = lightMode ? theme_themes.darkTheme : theme_themes.lightTheme;
36
- document.documentElement.dataset.theme = newTheme.name;
37
- };
38
- const isDark = React.useMemo(() => {
39
- return current.name === theme_themes.darkTheme.name;
40
- }, [current]);
16
+ }, []), isDark = React.useMemo(() => current.name === theme_themes.darkTheme.name, [ current ]);
41
17
  return {
42
18
  /**
43
19
  * Slice's default dark theme
@@ -50,7 +26,7 @@ function useTheme() {
50
26
  /**
51
27
  * The currently active SliceTheme
52
28
  */
53
- current,
29
+ current: current,
54
30
  /**
55
31
  * CSS variables for theme colors
56
32
  */
@@ -71,16 +47,17 @@ function useTheme() {
71
47
  * Set a new theme by name or passing in a SliceTheme object
72
48
  * @param newTheme
73
49
  */
74
- set,
50
+ set: set,
75
51
  /**
76
52
  * Toggle between light and dark themes
77
53
  */
78
- toggle,
54
+ toggle: () => {
55
+ const newTheme = current.name === theme_themes.lightTheme.name ? theme_themes.darkTheme : theme_themes.lightTheme;
56
+ document.documentElement.dataset.theme = newTheme.name;
57
+ },
79
58
  /**
80
59
  * If the currently active theme is the Slice's default dark theme'
81
60
  */
82
- isDark,
61
+ isDark: isDark
83
62
  };
84
- }
85
-
86
- exports.useTheme = useTheme;
63
+ };
@@ -1,36 +1,23 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- var React = require('react');
3
+ var React = require("react");
4
4
 
5
- const hiddenCoords = { x: 0, y: 0 };
6
- function useToolTip(toolTip, tipElement) {
5
+ const hiddenCoords = {
6
+ x: 0,
7
+ y: 0
8
+ };
9
+
10
+ exports.useToolTip = function(toolTip, tipElement) {
7
11
  const [coords, setCoords] = React.useState(hiddenCoords);
8
- React.useLayoutEffect(() => {
12
+ return React.useLayoutEffect(() => {
9
13
  var _a;
10
- // remove tooltip from view
11
- if (!toolTip || !(tipElement === null || tipElement === void 0 ? void 0 : tipElement.current)) {
12
- setCoords(hiddenCoords);
13
- return;
14
- }
15
- // get the target ref
16
- const target = (_a = toolTip.ref) === null || _a === void 0 ? void 0 : _a.current;
17
- if (!target) {
18
- setCoords(hiddenCoords);
19
- return;
20
- }
21
- // get rectangles for parent and tooltip
22
- const parentRect = target.getBoundingClientRect();
23
- const tipRect = tipElement.current.getBoundingClientRect();
24
- // get position and size details
25
- const { x: parentX, y: parentY, width: parentWidth, height: parentHeight, } = parentRect;
26
- const { width: tipWidth } = tipRect;
27
- // calculate the tool tip coords suc that it's placed beneath the parent
28
- const x = parentX + parentWidth / 2 - tipWidth / 2;
29
- const y = parentY + parentHeight + 10;
30
- // set the coords
31
- setCoords({ x, y });
32
- }, [toolTip, tipElement]);
33
- return coords;
34
- }
35
-
36
- exports.useToolTip = useToolTip;
14
+ if (!toolTip || !(null == tipElement ? void 0 : tipElement.current)) return void setCoords(hiddenCoords);
15
+ const target = null === (_a = toolTip.ref) || void 0 === _a ? void 0 : _a.current;
16
+ if (!target) return void setCoords(hiddenCoords);
17
+ const parentRect = target.getBoundingClientRect(), tipRect = tipElement.current.getBoundingClientRect(), {x: parentX, y: parentY, width: parentWidth, height: parentHeight} = parentRect, {width: tipWidth} = tipRect;
18
+ setCoords({
19
+ x: parentX + parentWidth / 2 - tipWidth / 2,
20
+ y: parentY + parentHeight + 10
21
+ });
22
+ }, [ toolTip, tipElement ]), coords;
23
+ };
@@ -1,39 +1,21 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- var React = require('react');
4
- var utils = require('../chunks/utils-BwNacfBU.js');
5
- require('../chunks/tslib.es6-4H29ixHs.js');
3
+ var React = require("react"), utils = require("../chunks/utils-BsBHecUI.js");
6
4
 
5
+ require("../chunks/tslib.es6-C8dZW5nY.js"), exports.useTrackRenders =
7
6
  /**
8
7
  * Hook to log component renders, mounts, and unmounts
9
8
  * Note: wrap in comments with START.DEBUG ... {hook} ... END.DEBUG to remove from build
10
9
  */
11
- function useTrackRenders(props, componentName = 'Component') {
10
+ function(props, componentName = "Component") {
12
11
  const prev = React.useRef({
13
- props,
14
- mount: true,
15
- unmount: false,
16
- });
17
- // 5 random letters (uppercase)
18
- const id = crypto
19
- .getRandomValues(new Uint8Array(5))
20
- .reduce((acc, val) => acc + String.fromCodePoint(65 + (val % 26)), '');
21
- // name the component
22
- const name = `${componentName} {${id}}`;
23
- // Track re-renders w/o dependency array
12
+ props: props,
13
+ mount: !0,
14
+ unmount: !1
15
+ }), name = `${componentName} {${crypto.getRandomValues(new Uint8Array(5)).reduce((acc, val) => acc + String.fromCodePoint(65 + val % 26), "")}}`;
24
16
  React.useEffect(() => {
25
17
  prev.current = utils.debug(prev, props, name);
26
- });
27
- // Track unmount with empty array on return
28
- // biome-ignore lint/correctness/useExhaustiveDependencies: track unmount only
29
- React.useEffect(() => {
30
- return () => {
31
- if (prev.current) {
32
- prev.current.unmount = true;
33
- utils.debug(prev, prev, name);
34
- }
35
- };
18
+ }), React.useEffect(() => () => {
19
+ prev.current && (prev.current.unmount = !0, utils.debug(prev, prev, name));
36
20
  }, []);
37
- }
38
-
39
- exports.useTrackRenders = useTrackRenders;
21
+ };
@@ -1,19 +1,14 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- var React = require('react');
3
+ var _a, FormFactor, React = require("react");
4
4
 
5
- var _a;
6
5
  /**
7
6
  * Form factor names
8
7
  */
9
- exports.FormFactor = void 0;
10
- (function (FormFactor) {
11
- FormFactor["Mobile"] = "mobile";
12
- FormFactor["Tablet"] = "tablet";
13
- FormFactor["Desktop"] = "desktop";
14
- FormFactor["DesktopL"] = "desktopL";
15
- FormFactor["DesktopXL"] = "desktopXL";
16
- })(exports.FormFactor || (exports.FormFactor = {}));
8
+ exports.FormFactor = void 0, (FormFactor = exports.FormFactor || (exports.FormFactor = {})).Mobile = "mobile",
9
+ FormFactor.Tablet = "tablet", FormFactor.Desktop = "desktop", FormFactor.DesktopL = "desktopL",
10
+ FormFactor.DesktopXL = "desktopXL";
11
+
17
12
  /**
18
13
  * Use bootstrap proxy breakpoints as defaults
19
14
  */
@@ -22,65 +17,34 @@ const bootstrapBreakPoints = {
22
17
  [exports.FormFactor.Tablet]: 768,
23
18
  [exports.FormFactor.Desktop]: 992,
24
19
  [exports.FormFactor.DesktopL]: 1200,
25
- [exports.FormFactor.DesktopXL]: 1400,
20
+ [exports.FormFactor.DesktopXL]: 1400
26
21
  };
27
- function checkElectron() {
28
- const userAgent = navigator.userAgent.toLowerCase();
29
- return userAgent.includes('electron/');
30
- }
31
- const isElectron = checkElectron();
32
- const isAppleDevice = navigator.platform.startsWith('Mac') || navigator.platform === 'iPhone';
33
- const dpr = (_a = Math.min(Math.ceil(window.devicePixelRatio), 3)) !== null && _a !== void 0 ? _a : 1;
34
- const isTouchDevice = 'ontouchstart' in globalThis || navigator.maxTouchPoints > 0;
35
- // pre-ordered break points from larget to smallest
36
- const orderedBps = Object.entries(bootstrapBreakPoints).sort((a, b) => -b[1] - a[1]);
37
- function useWindow(breakpoints = bootstrapBreakPoints, top = true) {
38
- const [viewportWidth, setViewportWidth] = React.useState(null);
39
- const [viewportHeight, setViewportHeight] = React.useState(null);
40
- const [height, setHeight] = React.useState('100vh');
41
- const [formFactor, setFormFactor] = React.useState(exports.FormFactor.Desktop);
42
- React.useEffect(() => {
43
- handleResize();
44
- window.addEventListener('resize', handleResize, false);
45
- return () => window.removeEventListener('resize', handleResize, false);
46
- }, []);
47
- // callback to set form factor based on break points
48
- const getFormFactor = React.useCallback((width) => {
49
- if (!width || width <= 0)
50
- return exports.FormFactor.Mobile;
51
- for (const [formFactor, breakpoint] of orderedBps) {
52
- if (width >= breakpoint)
53
- return formFactor;
54
- }
22
+
23
+ const isElectron = navigator.userAgent.toLowerCase().includes("electron/"), isAppleDevice = navigator.platform.startsWith("Mac") || "iPhone" === navigator.platform, dpr = null !== (_a = Math.min(Math.ceil(window.devicePixelRatio), 3)) && void 0 !== _a ? _a : 1, isTouchDevice = "ontouchstart" in globalThis || navigator.maxTouchPoints > 0, orderedBps = Object.entries(bootstrapBreakPoints).sort((a, b) => -b[1] - a[1]);
24
+
25
+ exports.useWindow = function(breakpoints = bootstrapBreakPoints, top = !0) {
26
+ const [viewportWidth, setViewportWidth] = React.useState(null), [viewportHeight, setViewportHeight] = React.useState(null), [height, setHeight] = React.useState("100vh"), [formFactor, setFormFactor] = React.useState(exports.FormFactor.Desktop);
27
+ React.useEffect(() => (handleResize(), window.addEventListener("resize", handleResize, !1),
28
+ () => window.removeEventListener("resize", handleResize, !1)), []);
29
+ const getFormFactor = React.useCallback(width => {
30
+ if (!width || width <= 0) return exports.FormFactor.Mobile;
31
+ for (const [formFactor, breakpoint] of orderedBps) if (width >= breakpoint) return formFactor;
55
32
  return exports.FormFactor.Mobile;
56
33
  }, []);
57
34
  function handleResize() {
58
35
  var _a, _b, _c, _d;
59
- const windowWidth = top
60
- ? ((_b = (_a = window.top) === null || _a === void 0 ? void 0 : _a.innerWidth) !== null && _b !== void 0 ? _b : window.innerWidth)
61
- : window.innerWidth;
62
- const windowHeight = top
63
- ? ((_d = (_c = window.top) === null || _c === void 0 ? void 0 : _c.innerHeight) !== null && _d !== void 0 ? _d : window.innerHeight)
64
- : window.innerHeight;
65
- setFormFactor(getFormFactor(windowWidth));
66
- setViewportHeight(windowHeight);
67
- setViewportWidth(windowWidth);
68
- // note: mobile devices can have task bars that are included inside the viewport.
69
- // for mobile devices, set root containers to the inner height pixel which removes
70
- // the height of any toolbars and provides the "true" view port height
71
- if (!isElectron)
72
- setHeight(isTouchDevice ? `${windowHeight}px` : '100vh');
36
+ const windowWidth = top && null !== (_b = null === (_a = window.top) || void 0 === _a ? void 0 : _a.innerWidth) && void 0 !== _b ? _b : window.innerWidth, windowHeight = top && null !== (_d = null === (_c = window.top) || void 0 === _c ? void 0 : _c.innerHeight) && void 0 !== _d ? _d : window.innerHeight;
37
+ setFormFactor(getFormFactor(windowWidth)), setViewportHeight(windowHeight), setViewportWidth(windowWidth),
38
+ isElectron || setHeight(isTouchDevice ? `${windowHeight}px` : "100vh");
73
39
  }
74
40
  return {
75
- viewportWidth,
76
- viewportHeight,
77
- height,
78
- isTouchDevice,
79
- isElectron,
80
- isAppleDevice,
81
- formFactor,
82
- dpr,
41
+ viewportWidth: viewportWidth,
42
+ viewportHeight: viewportHeight,
43
+ height: height,
44
+ isTouchDevice: isTouchDevice,
45
+ isElectron: isElectron,
46
+ isAppleDevice: isAppleDevice,
47
+ formFactor: formFactor,
48
+ dpr: dpr
83
49
  };
84
- }
85
-
86
- exports.useWindow = useWindow;
50
+ };