@g4rcez/components 5.0.0 → 5.0.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 (366) hide show
  1. package/dist/{MotionConfig-BLwtdAWy.js → MotionConfig-DKKYqBH2.js} +2 -2
  2. package/dist/{MotionConfig-BLwtdAWy.js.map → MotionConfig-DKKYqBH2.js.map} +1 -1
  3. package/dist/{autocomplete-DVKTP0Il.js → autocomplete-D3VOTihi.js} +2 -2
  4. package/dist/{autocomplete-DVKTP0Il.js.map → autocomplete-D3VOTihi.js.map} +1 -1
  5. package/dist/{calendar-_DZjphH8.js → calendar-PCCZDUIL.js} +4 -4
  6. package/dist/{calendar-_DZjphH8.js.map → calendar-PCCZDUIL.js.map} +1 -1
  7. package/dist/components/display/alert.js +1 -1
  8. package/dist/components/display/calendar.js +1 -1
  9. package/dist/components/display/list.js +2 -2
  10. package/dist/components/display/notifications.js +1 -1
  11. package/dist/components/floating/expand.js +1 -1
  12. package/dist/components/floating/modal.js +1 -1
  13. package/dist/components/form/autocomplete.js +1 -1
  14. package/dist/components/form/date-picker.js +1 -1
  15. package/dist/components/form/file-upload.js +1 -1
  16. package/dist/components/table/table.js +1 -1
  17. package/dist/{date-picker-9q_Ki5Vu.js → date-picker-BhKEFZew.js} +2 -2
  18. package/dist/{date-picker-9q_Ki5Vu.js.map → date-picker-BhKEFZew.js.map} +1 -1
  19. package/dist/{dist-Buc00Zls.js → dist-BrGpYRaj.js} +56 -55
  20. package/dist/{dist-Buc00Zls.js.map → dist-BrGpYRaj.js.map} +1 -1
  21. package/dist/{file-upload-COk6_Bs5.js → file-upload-DWbZfeG5.js} +15 -15
  22. package/dist/{file-upload-COk6_Bs5.js.map → file-upload-DWbZfeG5.js.map} +1 -1
  23. package/dist/index.js +646 -647
  24. package/dist/index.js.map +1 -1
  25. package/dist/{modal-Cn-OaKRp.js → modal-Bz-61ays.js} +3 -3
  26. package/dist/{modal-Cn-OaKRp.js.map → modal-Bz-61ays.js.map} +1 -1
  27. package/dist/{notifications-l_B9J4Gx.js → notifications-MT4XkLov.js} +270 -269
  28. package/dist/{notifications-l_B9J4Gx.js.map → notifications-MT4XkLov.js.map} +1 -1
  29. package/dist/{proxy-Drpz0Avo.js → proxy-BcJ_5Dwq.js} +465 -468
  30. package/dist/{proxy-Drpz0Avo.js.map → proxy-BcJ_5Dwq.js.map} +1 -1
  31. package/dist/{table-Dql6Yzag.js → table-CUFbAI2k.js} +3 -3
  32. package/dist/{table-Dql6Yzag.js.map → table-CUFbAI2k.js.map} +1 -1
  33. package/package.json +1 -1
  34. package/dist/src/components/core/button.d.ts +0 -77
  35. package/dist/src/components/core/button.d.ts.map +0 -1
  36. package/dist/src/components/core/button.jsx +0 -79
  37. package/dist/src/components/core/heading.d.ts +0 -3
  38. package/dist/src/components/core/heading.d.ts.map +0 -1
  39. package/dist/src/components/core/heading.jsx +0 -4
  40. package/dist/src/components/core/polymorph.d.ts +0 -10
  41. package/dist/src/components/core/polymorph.d.ts.map +0 -1
  42. package/dist/src/components/core/polymorph.jsx +0 -5
  43. package/dist/src/components/core/render-on-view.d.ts +0 -7
  44. package/dist/src/components/core/render-on-view.d.ts.map +0 -1
  45. package/dist/src/components/core/render-on-view.jsx +0 -31
  46. package/dist/src/components/core/resizable.d.ts +0 -3
  47. package/dist/src/components/core/resizable.d.ts.map +0 -1
  48. package/dist/src/components/core/resizable.jsx +0 -51
  49. package/dist/src/components/core/slot.d.ts +0 -16
  50. package/dist/src/components/core/slot.d.ts.map +0 -1
  51. package/dist/src/components/core/slot.jsx +0 -156
  52. package/dist/src/components/core/tag.d.ts +0 -35
  53. package/dist/src/components/core/tag.d.ts.map +0 -1
  54. package/dist/src/components/core/tag.jsx +0 -53
  55. package/dist/src/components/core/typography.d.ts +0 -25
  56. package/dist/src/components/core/typography.d.ts.map +0 -1
  57. package/dist/src/components/core/typography.jsx +0 -20
  58. package/dist/src/components/display/alert.d.ts +0 -28
  59. package/dist/src/components/display/alert.d.ts.map +0 -1
  60. package/dist/src/components/display/alert.jsx +0 -61
  61. package/dist/src/components/display/calendar.d.ts +0 -42
  62. package/dist/src/components/display/calendar.d.ts.map +0 -1
  63. package/dist/src/components/display/calendar.jsx +0 -318
  64. package/dist/src/components/display/card.d.ts +0 -29
  65. package/dist/src/components/display/card.d.ts.map +0 -1
  66. package/dist/src/components/display/card.jsx +0 -43
  67. package/dist/src/components/display/empty.d.ts +0 -8
  68. package/dist/src/components/display/empty.d.ts.map +0 -1
  69. package/dist/src/components/display/empty.jsx +0 -11
  70. package/dist/src/components/display/list.d.ts +0 -16
  71. package/dist/src/components/display/list.d.ts.map +0 -1
  72. package/dist/src/components/display/list.jsx +0 -85
  73. package/dist/src/components/display/notifications.d.ts +0 -27
  74. package/dist/src/components/display/notifications.d.ts.map +0 -1
  75. package/dist/src/components/display/notifications.jsx +0 -130
  76. package/dist/src/components/display/progress.d.ts +0 -16
  77. package/dist/src/components/display/progress.d.ts.map +0 -1
  78. package/dist/src/components/display/progress.jsx +0 -21
  79. package/dist/src/components/display/shortcut.d.ts +0 -4
  80. package/dist/src/components/display/shortcut.d.ts.map +0 -1
  81. package/dist/src/components/display/shortcut.jsx +0 -23
  82. package/dist/src/components/display/skeleton.d.ts +0 -12
  83. package/dist/src/components/display/skeleton.d.ts.map +0 -1
  84. package/dist/src/components/display/skeleton.jsx +0 -19
  85. package/dist/src/components/display/spinner.d.ts +0 -5
  86. package/dist/src/components/display/spinner.d.ts.map +0 -1
  87. package/dist/src/components/display/spinner.jsx +0 -11
  88. package/dist/src/components/display/stats.d.ts +0 -12
  89. package/dist/src/components/display/stats.d.ts.map +0 -1
  90. package/dist/src/components/display/stats.jsx +0 -16
  91. package/dist/src/components/display/step.d.ts +0 -24
  92. package/dist/src/components/display/step.d.ts.map +0 -1
  93. package/dist/src/components/display/step.jsx +0 -145
  94. package/dist/src/components/display/tabs.d.ts +0 -24
  95. package/dist/src/components/display/tabs.d.ts.map +0 -1
  96. package/dist/src/components/display/tabs.jsx +0 -125
  97. package/dist/src/components/display/timeline.d.ts +0 -10
  98. package/dist/src/components/display/timeline.d.ts.map +0 -1
  99. package/dist/src/components/display/timeline.jsx +0 -25
  100. package/dist/src/components/floating/command-palette.d.ts +0 -49
  101. package/dist/src/components/floating/command-palette.d.ts.map +0 -1
  102. package/dist/src/components/floating/command-palette.jsx +0 -223
  103. package/dist/src/components/floating/dropdown.d.ts +0 -15
  104. package/dist/src/components/floating/dropdown.d.ts.map +0 -1
  105. package/dist/src/components/floating/dropdown.jsx +0 -56
  106. package/dist/src/components/floating/expand.d.ts +0 -11
  107. package/dist/src/components/floating/expand.d.ts.map +0 -1
  108. package/dist/src/components/floating/expand.jsx +0 -44
  109. package/dist/src/components/floating/menu.d.ts +0 -52
  110. package/dist/src/components/floating/menu.d.ts.map +0 -1
  111. package/dist/src/components/floating/menu.jsx +0 -165
  112. package/dist/src/components/floating/modal.d.ts +0 -60
  113. package/dist/src/components/floating/modal.d.ts.map +0 -1
  114. package/dist/src/components/floating/modal.jsx +0 -336
  115. package/dist/src/components/floating/toolbar.d.ts +0 -6
  116. package/dist/src/components/floating/toolbar.d.ts.map +0 -1
  117. package/dist/src/components/floating/toolbar.jsx +0 -5
  118. package/dist/src/components/floating/tooltip.d.ts +0 -17
  119. package/dist/src/components/floating/tooltip.d.ts.map +0 -1
  120. package/dist/src/components/floating/tooltip.jsx +0 -67
  121. package/dist/src/components/floating/wizard.d.ts +0 -26
  122. package/dist/src/components/floating/wizard.d.ts.map +0 -1
  123. package/dist/src/components/floating/wizard.jsx +0 -165
  124. package/dist/src/components/form/autocomplete.d.ts +0 -16
  125. package/dist/src/components/form/autocomplete.d.ts.map +0 -1
  126. package/dist/src/components/form/autocomplete.jsx +0 -290
  127. package/dist/src/components/form/checkbox.d.ts +0 -12
  128. package/dist/src/components/form/checkbox.d.ts.map +0 -1
  129. package/dist/src/components/form/checkbox.jsx +0 -12
  130. package/dist/src/components/form/date-picker.d.ts +0 -10
  131. package/dist/src/components/form/date-picker.d.ts.map +0 -1
  132. package/dist/src/components/form/date-picker.jsx +0 -115
  133. package/dist/src/components/form/file-upload.d.ts +0 -15
  134. package/dist/src/components/form/file-upload.d.ts.map +0 -1
  135. package/dist/src/components/form/file-upload.jsx +0 -138
  136. package/dist/src/components/form/form.d.ts +0 -3
  137. package/dist/src/components/form/form.d.ts.map +0 -1
  138. package/dist/src/components/form/form.jsx +0 -10
  139. package/dist/src/components/form/formReset.d.ts +0 -2
  140. package/dist/src/components/form/formReset.d.ts.map +0 -1
  141. package/dist/src/components/form/formReset.jsx +0 -17
  142. package/dist/src/components/form/free-text.d.ts +0 -11
  143. package/dist/src/components/form/free-text.d.ts.map +0 -1
  144. package/dist/src/components/form/free-text.jsx +0 -41
  145. package/dist/src/components/form/input-field.d.ts +0 -34
  146. package/dist/src/components/form/input-field.d.ts.map +0 -1
  147. package/dist/src/components/form/input-field.jsx +0 -58
  148. package/dist/src/components/form/input.d.ts +0 -52
  149. package/dist/src/components/form/input.d.ts.map +0 -1
  150. package/dist/src/components/form/input.jsx +0 -36
  151. package/dist/src/components/form/multi-select.d.ts +0 -19
  152. package/dist/src/components/form/multi-select.d.ts.map +0 -1
  153. package/dist/src/components/form/multi-select.jsx +0 -344
  154. package/dist/src/components/form/radiobox.d.ts +0 -7
  155. package/dist/src/components/form/radiobox.d.ts.map +0 -1
  156. package/dist/src/components/form/radiobox.jsx +0 -6
  157. package/dist/src/components/form/select.d.ts +0 -13
  158. package/dist/src/components/form/select.d.ts.map +0 -1
  159. package/dist/src/components/form/select.jsx +0 -44
  160. package/dist/src/components/form/slider.d.ts +0 -7
  161. package/dist/src/components/form/slider.d.ts.map +0 -1
  162. package/dist/src/components/form/slider.jsx +0 -45
  163. package/dist/src/components/form/switch.d.ts +0 -9
  164. package/dist/src/components/form/switch.d.ts.map +0 -1
  165. package/dist/src/components/form/switch.jsx +0 -46
  166. package/dist/src/components/form/task-list.d.ts +0 -3
  167. package/dist/src/components/form/task-list.d.ts.map +0 -1
  168. package/dist/src/components/form/task-list.jsx +0 -26
  169. package/dist/src/components/form/textarea.d.ts +0 -5
  170. package/dist/src/components/form/textarea.d.ts.map +0 -1
  171. package/dist/src/components/form/textarea.jsx +0 -26
  172. package/dist/src/components/index.d.ts +0 -45
  173. package/dist/src/components/index.d.ts.map +0 -1
  174. package/dist/src/components/index.js +0 -44
  175. package/dist/src/components/page-calendar/calendar-header.d.ts +0 -16
  176. package/dist/src/components/page-calendar/calendar-header.d.ts.map +0 -1
  177. package/dist/src/components/page-calendar/calendar-header.jsx +0 -83
  178. package/dist/src/components/page-calendar/day-view.d.ts +0 -12
  179. package/dist/src/components/page-calendar/day-view.d.ts.map +0 -1
  180. package/dist/src/components/page-calendar/day-view.jsx +0 -89
  181. package/dist/src/components/page-calendar/event-pill.d.ts +0 -9
  182. package/dist/src/components/page-calendar/event-pill.d.ts.map +0 -1
  183. package/dist/src/components/page-calendar/event-pill.jsx +0 -25
  184. package/dist/src/components/page-calendar/index.d.ts +0 -4
  185. package/dist/src/components/page-calendar/index.d.ts.map +0 -1
  186. package/dist/src/components/page-calendar/index.js +0 -2
  187. package/dist/src/components/page-calendar/month-view.d.ts +0 -11
  188. package/dist/src/components/page-calendar/month-view.d.ts.map +0 -1
  189. package/dist/src/components/page-calendar/month-view.jsx +0 -46
  190. package/dist/src/components/page-calendar/page-calendar.d.ts +0 -18
  191. package/dist/src/components/page-calendar/page-calendar.d.ts.map +0 -1
  192. package/dist/src/components/page-calendar/page-calendar.jsx +0 -41
  193. package/dist/src/components/page-calendar/page-calendar.types.d.ts +0 -18
  194. package/dist/src/components/page-calendar/page-calendar.types.d.ts.map +0 -1
  195. package/dist/src/components/page-calendar/page-calendar.types.js +0 -1
  196. package/dist/src/components/page-calendar/page-calendar.utils.d.ts +0 -24
  197. package/dist/src/components/page-calendar/page-calendar.utils.d.ts.map +0 -1
  198. package/dist/src/components/page-calendar/page-calendar.utils.js +0 -93
  199. package/dist/src/components/page-calendar/week-view.d.ts +0 -11
  200. package/dist/src/components/page-calendar/week-view.d.ts.map +0 -1
  201. package/dist/src/components/page-calendar/week-view.jsx +0 -66
  202. package/dist/src/components/table/filter.d.ts +0 -42
  203. package/dist/src/components/table/filter.d.ts.map +0 -1
  204. package/dist/src/components/table/filter.jsx +0 -169
  205. package/dist/src/components/table/group.d.ts +0 -17
  206. package/dist/src/components/table/group.d.ts.map +0 -1
  207. package/dist/src/components/table/group.jsx +0 -75
  208. package/dist/src/components/table/index.d.ts +0 -19
  209. package/dist/src/components/table/index.d.ts.map +0 -1
  210. package/dist/src/components/table/index.jsx +0 -63
  211. package/dist/src/components/table/inner-table.d.ts +0 -29
  212. package/dist/src/components/table/inner-table.d.ts.map +0 -1
  213. package/dist/src/components/table/inner-table.jsx +0 -102
  214. package/dist/src/components/table/metadata.d.ts +0 -4
  215. package/dist/src/components/table/metadata.d.ts.map +0 -1
  216. package/dist/src/components/table/metadata.jsx +0 -36
  217. package/dist/src/components/table/pagination.d.ts +0 -5
  218. package/dist/src/components/table/pagination.d.ts.map +0 -1
  219. package/dist/src/components/table/pagination.jsx +0 -74
  220. package/dist/src/components/table/row.d.ts +0 -11
  221. package/dist/src/components/table/row.d.ts.map +0 -1
  222. package/dist/src/components/table/row.jsx +0 -49
  223. package/dist/src/components/table/sort.d.ts +0 -28
  224. package/dist/src/components/table/sort.d.ts.map +0 -1
  225. package/dist/src/components/table/sort.jsx +0 -109
  226. package/dist/src/components/table/table-lib.d.ts +0 -135
  227. package/dist/src/components/table/table-lib.d.ts.map +0 -1
  228. package/dist/src/components/table/table-lib.js +0 -83
  229. package/dist/src/components/table/table.context.d.ts +0 -10
  230. package/dist/src/components/table/table.context.d.ts.map +0 -1
  231. package/dist/src/components/table/table.context.jsx +0 -5
  232. package/dist/src/components/table/thead.d.ts +0 -9
  233. package/dist/src/components/table/thead.d.ts.map +0 -1
  234. package/dist/src/components/table/thead.jsx +0 -103
  235. package/dist/src/config/context.d.ts +0 -21
  236. package/dist/src/config/context.d.ts.map +0 -1
  237. package/dist/src/config/context.js +0 -12
  238. package/dist/src/config/default-translations.d.ts +0 -94
  239. package/dist/src/config/default-translations.d.ts.map +0 -1
  240. package/dist/src/config/default-translations.jsx +0 -87
  241. package/dist/src/config/default-tweaks.d.ts +0 -13
  242. package/dist/src/config/default-tweaks.d.ts.map +0 -1
  243. package/dist/src/config/default-tweaks.js +0 -4
  244. package/dist/src/constants.d.ts +0 -3
  245. package/dist/src/constants.d.ts.map +0 -1
  246. package/dist/src/constants.js +0 -2
  247. package/dist/src/hooks/use-click-outside.d.ts +0 -3
  248. package/dist/src/hooks/use-click-outside.d.ts.map +0 -1
  249. package/dist/src/hooks/use-click-outside.js +0 -17
  250. package/dist/src/hooks/use-color-parser.d.ts +0 -2
  251. package/dist/src/hooks/use-color-parser.d.ts.map +0 -1
  252. package/dist/src/hooks/use-color-parser.js +0 -9
  253. package/dist/src/hooks/use-components-provider.d.ts +0 -15
  254. package/dist/src/hooks/use-components-provider.d.ts.map +0 -1
  255. package/dist/src/hooks/use-components-provider.jsx +0 -22
  256. package/dist/src/hooks/use-debounce.d.ts +0 -5
  257. package/dist/src/hooks/use-debounce.d.ts.map +0 -1
  258. package/dist/src/hooks/use-debounce.js +0 -12
  259. package/dist/src/hooks/use-floating-ref.d.ts +0 -2
  260. package/dist/src/hooks/use-floating-ref.d.ts.map +0 -1
  261. package/dist/src/hooks/use-floating-ref.js +0 -6
  262. package/dist/src/hooks/use-form.d.ts +0 -394
  263. package/dist/src/hooks/use-form.d.ts.map +0 -1
  264. package/dist/src/hooks/use-form.js +0 -563
  265. package/dist/src/hooks/use-hover.d.ts +0 -3
  266. package/dist/src/hooks/use-hover.d.ts.map +0 -1
  267. package/dist/src/hooks/use-hover.js +0 -18
  268. package/dist/src/hooks/use-input-id.d.ts +0 -4
  269. package/dist/src/hooks/use-input-id.d.ts.map +0 -1
  270. package/dist/src/hooks/use-input-id.js +0 -5
  271. package/dist/src/hooks/use-is-coarse-device.d.ts +0 -2
  272. package/dist/src/hooks/use-is-coarse-device.d.ts.map +0 -1
  273. package/dist/src/hooks/use-is-coarse-device.js +0 -12
  274. package/dist/src/hooks/use-locale.d.ts +0 -3
  275. package/dist/src/hooks/use-locale.d.ts.map +0 -1
  276. package/dist/src/hooks/use-locale.js +0 -10
  277. package/dist/src/hooks/use-media-query.d.ts +0 -2
  278. package/dist/src/hooks/use-media-query.d.ts.map +0 -1
  279. package/dist/src/hooks/use-media-query.js +0 -25
  280. package/dist/src/hooks/use-on-event.d.ts +0 -4
  281. package/dist/src/hooks/use-on-event.d.ts.map +0 -1
  282. package/dist/src/hooks/use-on-event.js +0 -10
  283. package/dist/src/hooks/use-parent.d.ts +0 -3
  284. package/dist/src/hooks/use-parent.d.ts.map +0 -1
  285. package/dist/src/hooks/use-parent.js +0 -21
  286. package/dist/src/hooks/use-preferences.d.ts +0 -2
  287. package/dist/src/hooks/use-preferences.d.ts.map +0 -1
  288. package/dist/src/hooks/use-preferences.js +0 -23
  289. package/dist/src/hooks/use-previous.d.ts +0 -2
  290. package/dist/src/hooks/use-previous.d.ts.map +0 -1
  291. package/dist/src/hooks/use-previous.js +0 -9
  292. package/dist/src/hooks/use-reactive.d.ts +0 -2
  293. package/dist/src/hooks/use-reactive.d.ts.map +0 -1
  294. package/dist/src/hooks/use-reactive.js +0 -9
  295. package/dist/src/hooks/use-remove-scroll.d.ts +0 -4
  296. package/dist/src/hooks/use-remove-scroll.d.ts.map +0 -1
  297. package/dist/src/hooks/use-remove-scroll.js +0 -48
  298. package/dist/src/hooks/use-resize-observer.d.ts +0 -2
  299. package/dist/src/hooks/use-resize-observer.d.ts.map +0 -1
  300. package/dist/src/hooks/use-resize-observer.js +0 -17
  301. package/dist/src/hooks/use-stable-ref.d.ts +0 -2
  302. package/dist/src/hooks/use-stable-ref.d.ts.map +0 -1
  303. package/dist/src/hooks/use-stable-ref.js +0 -9
  304. package/dist/src/hooks/use-swipe.d.ts +0 -8
  305. package/dist/src/hooks/use-swipe.d.ts.map +0 -1
  306. package/dist/src/hooks/use-swipe.js +0 -17
  307. package/dist/src/hooks/use-translations.d.ts +0 -92
  308. package/dist/src/hooks/use-translations.d.ts.map +0 -1
  309. package/dist/src/hooks/use-translations.js +0 -9
  310. package/dist/src/hooks/use-tweaks.d.ts +0 -3
  311. package/dist/src/hooks/use-tweaks.d.ts.map +0 -1
  312. package/dist/src/hooks/use-tweaks.js +0 -9
  313. package/dist/src/hooks/use-window-size.d.ts +0 -5
  314. package/dist/src/hooks/use-window-size.d.ts.map +0 -1
  315. package/dist/src/hooks/use-window-size.js +0 -14
  316. package/dist/src/index.d.ts +0 -22
  317. package/dist/src/index.d.ts.map +0 -1
  318. package/dist/src/index.js +0 -20
  319. package/dist/src/lib/combi-keys.d.ts +0 -15
  320. package/dist/src/lib/combi-keys.d.ts.map +0 -1
  321. package/dist/src/lib/combi-keys.js +0 -60
  322. package/dist/src/lib/dict.d.ts +0 -9
  323. package/dist/src/lib/dict.d.ts.map +0 -1
  324. package/dist/src/lib/dict.js +0 -28
  325. package/dist/src/lib/dom.d.ts +0 -20
  326. package/dist/src/lib/dom.d.ts.map +0 -1
  327. package/dist/src/lib/dom.js +0 -185
  328. package/dist/src/lib/fns.d.ts +0 -11
  329. package/dist/src/lib/fns.d.ts.map +0 -1
  330. package/dist/src/lib/fns.js +0 -46
  331. package/dist/src/lib/fzf.d.ts +0 -16
  332. package/dist/src/lib/fzf.d.ts.map +0 -1
  333. package/dist/src/lib/fzf.js +0 -115
  334. package/dist/src/lib/keyboard-area.d.ts +0 -16
  335. package/dist/src/lib/keyboard-area.d.ts.map +0 -1
  336. package/dist/src/lib/keyboard-area.js +0 -14
  337. package/dist/src/styles/common.d.ts +0 -8
  338. package/dist/src/styles/common.d.ts.map +0 -1
  339. package/dist/src/styles/common.js +0 -20
  340. package/dist/src/styles/components.d.ts +0 -3
  341. package/dist/src/styles/components.d.ts.map +0 -1
  342. package/dist/src/styles/components.js +0 -397
  343. package/dist/src/styles/dark.d.ts +0 -3
  344. package/dist/src/styles/dark.d.ts.map +0 -1
  345. package/dist/src/styles/dark.js +0 -217
  346. package/dist/src/styles/default-tokens.d.ts +0 -74
  347. package/dist/src/styles/default-tokens.d.ts.map +0 -1
  348. package/dist/src/styles/default-tokens.js +0 -41
  349. package/dist/src/styles/design-tokens.d.ts +0 -29
  350. package/dist/src/styles/design-tokens.d.ts.map +0 -1
  351. package/dist/src/styles/design-tokens.js +0 -73
  352. package/dist/src/styles/light.d.ts +0 -3
  353. package/dist/src/styles/light.d.ts.map +0 -1
  354. package/dist/src/styles/light.js +0 -217
  355. package/dist/src/styles/theme.d.ts +0 -3
  356. package/dist/src/styles/theme.d.ts.map +0 -1
  357. package/dist/src/styles/theme.js +0 -4
  358. package/dist/src/styles/theme.types.d.ts +0 -540
  359. package/dist/src/styles/theme.types.d.ts.map +0 -1
  360. package/dist/src/styles/theme.types.js +0 -1
  361. package/dist/src/types.d.ts +0 -26
  362. package/dist/src/types.d.ts.map +0 -1
  363. package/dist/src/types.js +0 -1
  364. package/dist/tsconfig.lib.tsbuildinfo +0 -1
  365. package/dist/with-selector-BAUQ-vKK.js +0 -187
  366. package/dist/with-selector-BAUQ-vKK.js.map +0 -1
@@ -1,125 +0,0 @@
1
- "use client";
2
- import React, { createContext, useContext, useEffect, useRef } from "react";
3
- import { Is } from "sidekicker";
4
- import { useReactive } from "../../hooks/use-reactive";
5
- import { useStableRef } from "../../hooks/use-stable-ref";
6
- import { css } from "../../lib/dom";
7
- import { keyboardKeys } from "../../lib/keyboard-area";
8
- import { Polymorph } from "../core/polymorph";
9
- import { Card } from "./card";
10
- const Context = createContext("");
11
- const isElementDisabled = (element) => element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true";
12
- const getNElement = (elements, currentIndex, direction) => {
13
- const step = direction === "forward" ? 1 : -1;
14
- const startIndex = currentIndex + step;
15
- for (let i = startIndex; i >= 0 && i < elements.length; i += step) {
16
- const element = elements[i];
17
- if (!isElementDisabled(element))
18
- return element;
19
- }
20
- return direction === "backward" ? getNElement(elements, elements.length - 1, "backward") : getNElement(elements, -1, "forward");
21
- };
22
- const moveOn = (ul, direction) => {
23
- const items = Array.from(ul.querySelectorAll("li"));
24
- const find = items.findIndex((x) => x.dataset.active === "true");
25
- if (find === -1)
26
- return null;
27
- const item = getNElement(items, find, direction);
28
- if (item === null)
29
- return null;
30
- item.querySelector("button")?.focus({ preventScroll: false });
31
- return item.getAttribute("data-id") || "";
32
- };
33
- const moveToEdge = (ul, edge) => {
34
- const items = Array.from(ul.querySelectorAll("li"));
35
- const ordered = edge === "first" ? items : [...items].reverse();
36
- for (const item of ordered) {
37
- if (!isElementDisabled(item)) {
38
- item.querySelector("button")?.focus({ preventScroll: false });
39
- return item.getAttribute("data-id") || "";
40
- }
41
- }
42
- return null;
43
- };
44
- const actionKeys = {
45
- [keyboardKeys.ArrowLeft]: (_, ul) => moveOn(ul, "backward"),
46
- [keyboardKeys.ArrowRight]: (_, ul) => moveOn(ul, "forward"),
47
- };
48
- export const Tabs = (props) => {
49
- const [active, setActive] = useReactive(props.active);
50
- const ref = useRef(null);
51
- const onChangeRef = useStableRef(props.onChange);
52
- useEffect(() => {
53
- const header = ref.current;
54
- if (header === null)
55
- return;
56
- let first = header.querySelector(`li[data-active=true]`);
57
- if (first === null) {
58
- first = header.querySelector(`li[data-id]`);
59
- const id = first.getAttribute("data-id") || "";
60
- setActive(id);
61
- }
62
- }, [props.active, setActive]);
63
- useEffect(() => {
64
- if (onChangeRef.current)
65
- onChangeRef.current(active);
66
- }, [onChangeRef, active]);
67
- const items = React.Children.toArray(props.children);
68
- const onClick = (e) => {
69
- const anchor = e.currentTarget;
70
- setActive(anchor.dataset.id || "");
71
- };
72
- const onKeyDown = (e) => {
73
- if (ref.current === null)
74
- return;
75
- const k = e.key;
76
- if (Is.keyof(actionKeys, k)) {
77
- const fn = actionKeys[k];
78
- const result = fn(e, ref.current);
79
- if (result === null)
80
- return;
81
- setActive(result);
82
- }
83
- else if (k === "Home") {
84
- e.preventDefault();
85
- const result = moveToEdge(ref.current, "first");
86
- if (result)
87
- setActive(result);
88
- }
89
- else if (k === "End") {
90
- e.preventDefault();
91
- const result = moveToEdge(ref.current, "last");
92
- if (result)
93
- setActive(result);
94
- }
95
- };
96
- return (<Context.Provider value={active}>
97
- <Card className={props.className} container={css("pt-0 max-w-full w-full min-w-0", props.container)} header={<header className="relative mb-tabs-header-mb overflow-x-auto">
98
- <div className="absolute bottom-0 h-tabs-divider-h w-full bg-card-border"/>
99
- <nav className="min-w-0">
100
- <ul role="tablist" onKeyDown={onKeyDown} ref={ref} className="flex w-0 min-w-full flex-1 justify-start overflow-x-auto">
101
- {items.map((x) => {
102
- const inner = x.props;
103
- const current = active === inner.id;
104
- return (<li data-id={inner.id} data-active={current} key={`tab-header-${inner.id}`} className={css("relative w-fit border-b border-transparent transition-all", current ? "border-primary font-medium text-primary" : "", inner.disabled ? "aria-disabled:text-disabled" : "")}>
105
- <Polymorph role="tab" as="button" type="button" data-id={inner.id} id={`${inner.id}-tab`} aria-selected={current} disabled={inner.disabled} tabIndex={current ? 0 : -1} aria-controls={`${inner.id}-panel`} onClick={inner.disabled ? undefined : onClick} className="block w-full whitespace-nowrap px-tabs-item-px py-tabs-item-py disabled:cursor-not-allowed">
106
- {inner.title}
107
- </Polymorph>
108
- </li>);
109
- })}
110
- </ul>
111
- </nav>
112
- </header>}>
113
- {props.children}
114
- </Card>
115
- </Context.Provider>);
116
- };
117
- const useTabs = () => useContext(Context);
118
- export const Tab = (props) => {
119
- const active = useTabs();
120
- if (props.id !== active)
121
- return null;
122
- return (<div role="tabpanel" tabIndex={0} id={`${props.id}-panel`} aria-labelledby={`${props.id}-tab`}>
123
- {props.children}
124
- </div>);
125
- };
@@ -1,10 +0,0 @@
1
- import React, { ComponentProps, ElementType, PropsWithChildren } from "react";
2
- import { PolymorphicProps } from "../core/polymorph";
3
- export declare const TimelineItem: {
4
- (props: PropsWithChildren): React.JSX.Element;
5
- Icon(props: PropsWithChildren<ComponentProps<"header">>): React.JSX.Element;
6
- Body<T extends ElementType = "section">(props: PropsWithChildren<PolymorphicProps<object, T>>): React.JSX.Element;
7
- Right<T extends ElementType = "button">(props: PolymorphicProps<object, T>): React.JSX.Element;
8
- };
9
- export declare const Timeline: (props: PropsWithChildren) => React.JSX.Element;
10
- //# sourceMappingURL=timeline.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../../../src/components/display/timeline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAa,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,eAAO,MAAM,YAAY;YAAW,iBAAiB;gBAUJ,iBAAiB,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;SAc9C,CAAC,SAAS,WAAW,qBAAqB,iBAAiB,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;UAQtF,CAAC,SAAS,WAAW,oBAAoB,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAC;CAxBnH,CAAC;AAgCF,eAAO,MAAM,QAAQ,GAAI,OAAO,iBAAiB,sBAIhD,CAAC"}
@@ -1,25 +0,0 @@
1
- import React from "react";
2
- import { css } from "../../lib/dom";
3
- import { Polymorph } from "../core/polymorph";
4
- export const TimelineItem = (props) => (<li data-component="timeline-item" className="relative pb-timeline-item-pb" role="listitem">
5
- <span aria-hidden="true" className="absolute left-timeline-connector-left top-timeline-connector-top -ml-px h-full w-timeline-connector-w bg-card-border"/>
6
- <div className="relative flex items-stretch justify-start space-x-3">{props.children}</div>
7
- </li>);
8
- TimelineItem.Icon = function TimelineIcon(props) {
9
- return (<header {...props} className={css("flex size-timeline-icon-size items-center justify-center rounded-full bg-primary p-timeline-icon-p text-warn-foreground", props.className)}>
10
- {props.children}
11
- </header>);
12
- };
13
- TimelineItem.Body = function TimelineItemBody(props) {
14
- return (<Polymorph {...props} className={css("min-w-0 flex-1", props.className)}>
15
- {props.children}
16
- </Polymorph>);
17
- };
18
- TimelineItem.Right = function TimelineItemRight(props) {
19
- return (<footer className="flex gap-timeline-right-gap self-stretch px-timeline-right-px align-baseline">
20
- <Polymorph {...props} type="button"/>
21
- </footer>);
22
- };
23
- export const Timeline = (props) => (<ul data-component="timeline" role="list" className="flow-root [&>li:last-child>span[aria-hidden=true]]:hidden">
24
- {props.children}
25
- </ul>);
@@ -1,49 +0,0 @@
1
- import { type Icon, type IconProps } from "@phosphor-icons/react";
2
- import React from "react";
3
- import { Label } from "../../types";
4
- type ViewProps = {
5
- text: string;
6
- };
7
- type CommandItem<T extends string, P extends object> = P & {
8
- type: T;
9
- hint?: string | string[];
10
- Icon?: React.ReactElement;
11
- enabled?: ((props: ViewProps) => boolean) | boolean;
12
- };
13
- type View = string | ((props: ViewProps) => string);
14
- type CommandShortcutItem = CommandItem<"shortcut", {
15
- title: View;
16
- shortcut?: string;
17
- action: (args: {
18
- text: string;
19
- setText: (state: string) => void;
20
- setOpen: (state: boolean) => void;
21
- event: KeyboardEvent | React.MouseEvent | React.KeyboardEvent;
22
- }) => void | Promise<void>;
23
- }>;
24
- type CommandGroupItem = CommandItem<"group", {
25
- title: View;
26
- items: CommandItemTypes[];
27
- }>;
28
- export type CommandItemTypes = CommandGroupItem | CommandShortcutItem;
29
- export type CommandPaletteProps = {
30
- bind?: string;
31
- open: boolean;
32
- loading?: boolean;
33
- emptyMessage?: Label;
34
- footer?: React.ReactElement;
35
- commands: CommandItemTypes[];
36
- onChangeText?: (text: string) => void;
37
- onChangeVisibility: (next: boolean) => void;
38
- Preview?: React.FC<{
39
- command: CommandItemTypes;
40
- text: string;
41
- }>;
42
- Icon?: React.FC<IconProps & {
43
- text: string;
44
- Default: Icon;
45
- }>;
46
- };
47
- export declare const CommandPalette: (props: CommandPaletteProps) => React.JSX.Element;
48
- export {};
49
- //# sourceMappingURL=command-palette.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-palette.d.ts","sourceRoot":"","sources":["../../../../src/components/floating/command-palette.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,KAAmE,MAAM,OAAO,CAAC;AAQxF,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKpC,KAAK,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAElC,KAAK,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,GAAG;IACvD,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,CAAC,GAAG,OAAO,CAAC;CACvD,CAAC;AAEF,KAAK,IAAI,GAAG,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,CAAC,CAAC;AAEpD,KAAK,mBAAmB,GAAG,WAAW,CAClC,UAAU,EACV;IACI,KAAK,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,CAAC,IAAI,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;QACjC,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;QAClC,KAAK,EAAE,aAAa,GAAG,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,aAAa,CAAC;KACjE,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B,CACJ,CAAC;AAEF,KAAK,gBAAgB,GAAG,WAAW,CAAC,OAAO,EAAE;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,gBAAgB,EAAE,CAAA;CAAE,CAAC,CAAC;AAEzF,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,mBAAmB,CAAC;AAiDtE,MAAM,MAAM,mBAAmB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC5B,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,OAAO,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;QAAE,OAAO,EAAE,gBAAgB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAChE,IAAI,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;CAChE,CAAC;AAmCF,eAAO,MAAM,cAAc,GAAI,OAAO,mBAAmB,sBAiNxD,CAAC"}
@@ -1,223 +0,0 @@
1
- "use client";
2
- import { autoUpdate, useFloating, useInteractions, useListNavigation, useRole } from "@floating-ui/react";
3
- import { FunnelIcon } from "@phosphor-icons/react";
4
- import React, { forwardRef, Fragment, useEffect, useId, useRef, useState } from "react";
5
- import { Is } from "sidekicker";
6
- import { useStableRef } from "../../hooks/use-stable-ref";
7
- import { useTranslations } from "../../hooks/use-translations";
8
- import { CombiKeys } from "../../lib/combi-keys";
9
- import { Dict } from "../../lib/dict";
10
- import { css, isChildVisible, isReactFC } from "../../lib/dom";
11
- import { fzf } from "../../lib/fzf";
12
- import { Shortcut } from "../display/shortcut";
13
- import { SkeletonCell } from "../display/skeleton";
14
- import { Modal } from "./modal";
15
- const Group = (props) => (<span className="text-typography-sm flex h-full items-center text-left font-medium text-secondary">
16
- {isReactFC(props.item.title) ? <props.item.title text={props.text}/> : props.item.title}
17
- </span>);
18
- const Item = forwardRef((props, ref) => {
19
- const id = useId();
20
- const active = props.active;
21
- const item = props.item;
22
- if (item.type === "group")
23
- return (<div id={id} className="h-command-row-h px-command-group-px pb-command-group-pb pt-command-group-pt">
24
- <Group text={props.text} item={item}/>
25
- </div>);
26
- if (item.type !== "shortcut")
27
- return <Fragment />;
28
- return (<button {...props} id={id} ref={ref} role="option" type="button" aria-selected={active} data-component="command-palette-item" className={css("flex h-command-row-h items-center justify-between rounded-command-radius p-command-item-p hover:bg-floating-hover", active ? "bg-floating-hover" : "")}>
29
- <span className="flex items-center gap-command-item-gap">
30
- {item.Icon ? item.Icon : null}
31
- <span>{isReactFC(item.title) ? <item.title text={props.text}/> : item.title}</span>
32
- </span>
33
- {item.shortcut ? <Shortcut value={item.shortcut}/> : null}
34
- </button>);
35
- });
36
- const getFuzzyData = (commands, value) => {
37
- if (value.length === 0)
38
- return commands;
39
- const rules = [
40
- { key: "title", value },
41
- { key: "shortcut", value },
42
- { key: "hint", value },
43
- ];
44
- const normalize = commands.map((x) => ({
45
- ...x,
46
- title: Is.function(x.title) ? x.title({ text: value }) : x.title,
47
- }));
48
- const target = normalize.reduce((acc, x) => {
49
- const enabled = Is.function(x.enabled) ? x.enabled({ text: value }) : (x.enabled ?? true);
50
- if (enabled)
51
- acc.push({ ...x, enabled: enabled });
52
- return acc;
53
- }, []);
54
- const filter = fzf(target, "title", rules);
55
- const withEnabled = normalize.filter((x) => (Is.function(x.enabled) ? x.enabled({ text: value }) : false));
56
- return Dict.unique(filter.concat(withEnabled), (x) => x.title);
57
- };
58
- const loadingSkeleton = [0, 0, 0, 0, 0];
59
- const findFirstClickable = (items) => {
60
- for (let index = 0; index < items.length; index++) {
61
- const element = items[index];
62
- if (element.type === "shortcut")
63
- return element;
64
- const recursive = findFirstClickable(element.items);
65
- if (recursive)
66
- return recursive;
67
- }
68
- return null;
69
- };
70
- export const CommandPalette = (props) => {
71
- const id = useId();
72
- const scrollContainerRef = useRef(null);
73
- const [text, setText] = useState("");
74
- const listRef = useRef([]);
75
- const translations = useTranslations();
76
- const valueRef = useStableRef(text);
77
- const [activeIndex, setActiveIndex] = useState(null);
78
- useEffect(() => {
79
- setActiveIndex(null);
80
- }, [text]);
81
- const bindKey = props.bind ?? "Mod + k";
82
- const root = useFloating({
83
- open: props.open,
84
- strategy: "absolute",
85
- whileElementsMounted: autoUpdate,
86
- onOpenChange: props.onChangeVisibility,
87
- });
88
- const commands = props.commands.flatMap((x) => (x.type === "group" ? [x, ...x.items] : [x]));
89
- const fuzzy = getFuzzyData(commands, text);
90
- const displayItems = text === ""
91
- ? commands
92
- : [
93
- {
94
- type: "group",
95
- title: "Results",
96
- items: [],
97
- },
98
- ...fuzzy.filter((x) => x.type !== "group"),
99
- ];
100
- const listNav = useListNavigation(root.context, {
101
- listRef,
102
- loop: true,
103
- activeIndex,
104
- virtual: true,
105
- allowEscape: false,
106
- focusItemOnOpen: true,
107
- focusItemOnHover: true,
108
- openOnArrowKeyDown: true,
109
- scrollItemIntoView: false,
110
- selectedIndex: activeIndex,
111
- disabledIndices: (n) => {
112
- const item = displayItems[n];
113
- if (item)
114
- return item.type === "group";
115
- return false;
116
- },
117
- onNavigate: (n) => {
118
- if (Is.number(n)) {
119
- if (!isChildVisible(scrollContainerRef.current, listRef.current[n]))
120
- listRef.current[n]?.scrollIntoView({
121
- block: "start",
122
- inline: "start",
123
- });
124
- }
125
- setActiveIndex((prev) => {
126
- if (Is.number(n))
127
- return n;
128
- return props.open ? (prev ?? 0) : null;
129
- });
130
- },
131
- });
132
- const listRole = useRole(root.context, { role: "listbox" });
133
- const { getItemProps, getReferenceProps, getFloatingProps } = useInteractions([listNav, listRole]);
134
- useEffect(() => {
135
- const combi = new CombiKeys();
136
- combi.add(bindKey, () => props.onChangeVisibility?.(true));
137
- commands.forEach((cmd) => {
138
- if (cmd.type === "group")
139
- return;
140
- if (cmd.type === "shortcut" && cmd.shortcut !== undefined)
141
- combi.add(cmd.shortcut, (event) => cmd.action({
142
- event,
143
- setText,
144
- text: valueRef.current,
145
- setOpen: props.onChangeVisibility,
146
- }));
147
- });
148
- return combi.register();
149
- }, [bindKey, commands, props, valueRef]);
150
- const Icon = props.Icon ?? FunnelIcon;
151
- return (<Fragment>
152
- <Modal {...getFloatingProps()} animated={false} closable={false} open={props.open} overlayClickClose ariaTitle="Command palette" bodyClassName="px-0 py-0 pt-0" data-component="command-palette" onChange={props.onChangeVisibility} className="container relative overflow-clip py-0 md:max-w-screen-sm lg:max-w-screen-md">
153
- <header className="sticky top-0 isolate z-floating flex h-command-header-h w-full items-center overflow-clip border-b border-floating-border bg-floating-background">
154
- <div className="flex size-command-icon-size items-center justify-center">
155
- {props.Icon ? <Icon Default={FunnelIcon} text={text} size={16}/> : <FunnelIcon size={16}/>}
156
- </div>
157
- <input {...getReferenceProps({
158
- ref: root.refs.setReference,
159
- onKeyDown: (e) => {
160
- const item = Is.number(activeIndex) ? displayItems[activeIndex] : null;
161
- const key = e.key;
162
- if (key === "Enter") {
163
- if (item) {
164
- if (item.type === "shortcut")
165
- item.action({
166
- event: e,
167
- text: text,
168
- setOpen: props.onChangeVisibility,
169
- setText,
170
- });
171
- }
172
- else {
173
- const item = findFirstClickable(fuzzy);
174
- if (item?.type === "shortcut")
175
- item.action({
176
- event: e,
177
- text: text,
178
- setOpen: props.onChangeVisibility,
179
- setText,
180
- });
181
- }
182
- }
183
- },
184
- })} value={text} data-combikeysbypass="true" placeholder="Search for..." onChange={(e) => setText(e.target.value)} className="text-typography-lg h-command-header-h w-full items-center bg-transparent px-command-input-px py-command-input-py pb-command-input-py text-left outline-none"/>
185
- </header>
186
- {props.loading ? (<div data-component="command-palette-list" className="my-command-list-my flex max-h-command-list-max-h w-full origin-[top_center] flex-col gap-command-list-gap overflow-y-auto px-command-group-px">
187
- <div className="h-command-row-h px-command-group-px pb-command-group-pb pt-command-group-pt">
188
- {translations.commandPaletteLoading}
189
- </div>
190
- {loadingSkeleton.map((_, i) => (<div key={`${id}-${i}-skeleton-index`} className={css("flex h-command-row-h items-center justify-between rounded-command-radius p-command-item-p hover:bg-primary hover:text-primary-foreground")}>
191
- {SkeletonCell}
192
- </div>))}
193
- </div>) : (<div className="flex min-w-full flex-row flex-nowrap" data-component="command-palette-container">
194
- <div ref={scrollContainerRef} data-component="command-palette-list" className="my-command-list-my flex h-fit max-h-command-list-max-h w-full origin-[top_center] flex-col gap-command-list-gap overflow-y-auto px-command-list-px">
195
- {displayItems.map((item, index) => (<Item {...getItemProps({
196
- onMouseEnter: () => setActiveIndex(index),
197
- ref(node) {
198
- listRef.current[index] = node;
199
- },
200
- onClick(e) {
201
- e.preventDefault();
202
- props.onChangeVisibility(false);
203
- if (item.type === "shortcut")
204
- item.action({
205
- event: e,
206
- text: text,
207
- setOpen: props.onChangeVisibility,
208
- setText,
209
- });
210
- },
211
- })} item={item} text={text} active={activeIndex === index} key={`${id}-${item.type}-${index}`}/>))}
212
- {displayItems.length === 1 ? (<div className={css("flex items-center justify-between rounded-command-radius p-command-item-p text-secondary")}>
213
- {translations.commandPaletteEmpty ?? props.emptyMessage}
214
- </div>) : null}
215
- </div>
216
- {props.Preview && Is.number(activeIndex) ? <props.Preview command={displayItems[activeIndex]} text={text}/> : null}
217
- </div>)}
218
- {props.footer ? (<footer className="flex h-command-footer-h items-center rounded-b-command-radius border-t border-floating-border p-command-footer-p">
219
- {props.footer}
220
- </footer>) : null}
221
- </Modal>
222
- </Fragment>);
223
- };
@@ -1,15 +0,0 @@
1
- import React, { PropsWithChildren } from "react";
2
- type DropdownProps = {
3
- open?: boolean;
4
- arrow?: boolean;
5
- hover?: boolean;
6
- returnFocus?: boolean;
7
- restoreFocus?: boolean;
8
- buttonProps?: React.HTMLProps<"button">;
9
- onChange?: (nextValue: boolean) => void;
10
- trigger: React.ReactElement | React.ReactNode;
11
- title?: React.ReactNode | React.ReactElement | string;
12
- };
13
- export declare const Dropdown: (props: PropsWithChildren<DropdownProps>) => React.JSX.Element;
14
- export {};
15
- //# sourceMappingURL=dropdown.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/floating/dropdown.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,EAAY,iBAAiB,EAA+C,MAAM,OAAO,CAAC;AAExG,KAAK,aAAa,GAAG;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,OAAO,EAAE,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,SAAS,CAAC;IAC9C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,YAAY,GAAG,MAAM,CAAC;CACzD,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,OAAO,iBAAiB,CAAC,aAAa,CAAC,sBA4E/D,CAAC"}
@@ -1,56 +0,0 @@
1
- "use client";
2
- import { arrow, autoUpdate, flip, FloatingArrow, FloatingFocusManager, FloatingPortal, offset, shift, useClick, useDismiss, useFloating, useHover, useInteractions, useRole, } from "@floating-ui/react";
3
- import React, { Fragment, useEffect, useId, useMemo, useRef, useState } from "react";
4
- export const Dropdown = (props) => {
5
- const headingId = useId();
6
- const [open, setOpen] = useState(props.open);
7
- useEffect(() => setOpen(props.open), [props.open]);
8
- const arrowRef = useRef(null);
9
- const middleware = useMemo(() => [
10
- offset(10),
11
- flip({ fallbackAxisSideDirection: "end" }),
12
- shift(),
13
- arrow({
14
- padding: 5,
15
- element: arrowRef,
16
- }),
17
- ], []);
18
- const { refs, floatingStyles, context } = useFloating({
19
- open,
20
- middleware,
21
- transform: true,
22
- whileElementsMounted: autoUpdate,
23
- onOpenChange: (nextValue, event) => {
24
- const element = event?.relatedTarget;
25
- if (element) {
26
- if (element.dataset.floating === "true" && !nextValue)
27
- return;
28
- }
29
- setOpen(nextValue);
30
- props.onChange?.(nextValue);
31
- },
32
- });
33
- const click = useClick(context);
34
- const hover = useHover(context, { enabled: props.hover ?? false });
35
- const dismiss = useDismiss(context);
36
- const role = useRole(context, { role: "dialog" });
37
- const { getReferenceProps, getFloatingProps } = useInteractions([click, dismiss, role, hover]);
38
- return (<Fragment>
39
- <button ref={refs.setReference} {...getReferenceProps(props.buttonProps)} type="button">
40
- {props.trigger}
41
- </button>
42
- {open && (<FloatingPortal preserveTabOrder id={`${headingId}-portal`}>
43
- <FloatingFocusManager guards restoreFocus={true} returnFocus={true} visuallyHiddenDismiss context={context} modal={false}>
44
- <div className="relative isolate z-floating rounded-dropdown-radius border border-floating-border bg-floating-background p-dropdown-p shadow-shadow-floating" ref={refs.setFloating} aria-labelledby={headingId} style={floatingStyles} {...getFloatingProps()}>
45
- <FloatingArrow ref={arrowRef} context={context} strokeWidth={0.1} className="fill-floating-background stroke-floating-border"/>
46
- <header className="mb-dropdown-header-mb">
47
- <h3 id={headingId} className="text-left text-typography-2xl font-medium leading-snug tracking-wide">
48
- {props.title}
49
- </h3>
50
- </header>
51
- {props.children}
52
- </div>
53
- </FloatingFocusManager>
54
- </FloatingPortal>)}
55
- </Fragment>);
56
- };
@@ -1,11 +0,0 @@
1
- import { motion } from "motion/react";
2
- import { PropsWithChildren } from "react";
3
- import { Label, Override } from "../../types";
4
- import { ButtonProps } from "../core/button";
5
- export type ExpandProps = Override<ButtonProps<typeof motion.button>, {
6
- trigger: Label;
7
- open?: boolean;
8
- disabled?: boolean;
9
- }>;
10
- export declare const Expand: (props: PropsWithChildren<ExpandProps>) => import("react").JSX.Element;
11
- //# sourceMappingURL=expand.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"expand.d.ts","sourceRoot":"","sources":["../../../../src/components/floating/expand.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAmB,MAAM,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAsC,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAU,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,QAAQ,CAC9B,WAAW,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,EACjC;IACI,OAAO,EAAE,KAAK,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CACJ,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,OAAO,iBAAiB,CAAC,WAAW,CAAC,gCAmD3D,CAAC"}
@@ -1,44 +0,0 @@
1
- "use client";
2
- import { FloatingFocusManager, FloatingPortal, useClick, useDismiss, useFloating, useInteractions, useRole } from "@floating-ui/react";
3
- import { AnimatePresence, motion } from "motion/react";
4
- import { useEffect, useId, useRef, useState } from "react";
5
- import { Button } from "../core/button";
6
- export const Expand = (props) => {
7
- const root = useRef(null);
8
- const id = useId();
9
- const wrapperId = `${id}:wrapper`;
10
- const titleId = `${id}:title`;
11
- const [open, setOpen] = useState(props.open ?? false);
12
- useEffect(() => {
13
- setOpen(props.open ?? false);
14
- }, [props.open]);
15
- const { context, refs } = useFloating({
16
- transform: true,
17
- open: open !== null,
18
- nodeId: id,
19
- onOpenChange: setOpen,
20
- strategy: "absolute",
21
- });
22
- const click = useClick(context, { enabled: !(props.disabled ?? false) });
23
- const role = useRole(context, { role: "dialog" });
24
- const dismiss = useDismiss(context, {
25
- escapeKey: true,
26
- referencePress: true,
27
- outsidePress: true,
28
- });
29
- const { getFloatingProps, getReferenceProps } = useInteractions([click, role, dismiss]);
30
- return (<div className="relative inline-flex items-center justify-center" ref={root}>
31
- <Button {...getReferenceProps(props)} as={motion.button} layoutId={wrapperId} ref={refs.setReference} size="small" onClick={() => setOpen(true)}>
32
- <motion.span layoutId={titleId}>{props.trigger}</motion.span>
33
- </Button>
34
- <AnimatePresence>
35
- {open ? (<FloatingPortal root={root}>
36
- <FloatingFocusManager visuallyHiddenDismiss modal closeOnFocusOut context={context}>
37
- <motion.div {...getFloatingProps()} ref={refs.setFloating} layoutId={wrapperId} className="absolute -left-1/4 -top-3/4">
38
- {props.children}
39
- </motion.div>
40
- </FloatingFocusManager>
41
- </FloatingPortal>) : null}
42
- </AnimatePresence>
43
- </div>);
44
- };
@@ -1,52 +0,0 @@
1
- import { type Icon } from "@phosphor-icons/react";
2
- import React from "react";
3
- export type MenuProps = Partial<{
4
- hover: boolean;
5
- open?: boolean;
6
- nested: boolean;
7
- asChild: boolean;
8
- isParent: boolean;
9
- restoreFocus: boolean;
10
- children: React.ReactNode;
11
- floatingClassName: string;
12
- FloatingComponent: React.ElementType;
13
- } & ({
14
- label: string;
15
- } | {
16
- label: React.ReactElement;
17
- title: string;
18
- })>;
19
- type MenuItemProps = {
20
- title: string;
21
- disabled?: boolean;
22
- Right?: Icon;
23
- };
24
- export declare const MenuItem: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, keyof MenuItemProps> & MenuItemProps & React.RefAttributes<HTMLButtonElement>>;
25
- export declare const Menu: React.ForwardRefExoticComponent<(Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "label" | "children" | "hover" | "open" | "asChild" | "restoreFocus" | "nested" | "isParent" | "floatingClassName" | "FloatingComponent"> & Partial<{
26
- hover: boolean;
27
- open?: boolean;
28
- nested: boolean;
29
- asChild: boolean;
30
- isParent: boolean;
31
- restoreFocus: boolean;
32
- children: React.ReactNode;
33
- floatingClassName: string;
34
- FloatingComponent: React.ElementType;
35
- } & {
36
- label: string;
37
- }>, "ref"> | Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "label" | "children" | "hover" | "open" | "asChild" | "restoreFocus" | "nested" | "isParent" | "floatingClassName" | "FloatingComponent"> & Partial<{
38
- hover: boolean;
39
- open?: boolean;
40
- nested: boolean;
41
- asChild: boolean;
42
- isParent: boolean;
43
- restoreFocus: boolean;
44
- children: React.ReactNode;
45
- floatingClassName: string;
46
- FloatingComponent: React.ElementType;
47
- } & {
48
- label: React.ReactElement;
49
- title: string;
50
- }>, "ref">) & React.RefAttributes<HTMLButtonElement>>;
51
- export {};
52
- //# sourceMappingURL=menu.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../src/components/floating/menu.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAA2E,MAAM,OAAO,CAAC;AA6BhG,MAAM,MAAM,SAAS,GAAG,OAAO,CAC3B;IACI,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,KAAK,CAAC,WAAW,CAAC;CACxC,GAAG,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CACzE,CAAC;AA6LF,KAAK,aAAa,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAEzE,eAAO,MAAM,QAAQ,oKAkCpB,CAAC;AAEF,eAAO,MAAM,IAAI;WA7OF,OAAO;WACP,OAAO;YACN,OAAO;aACN,OAAO;cACN,OAAO;kBACH,OAAO;cACX,KAAK,CAAC,SAAS;uBACN,MAAM;uBACN,KAAK,CAAC,WAAW;;WAC1B,MAAM;;WATT,OAAO;WACP,OAAO;YACN,OAAO;aACN,OAAO;cACN,OAAO;kBACH,OAAO;cACX,KAAK,CAAC,SAAS;uBACN,MAAM;uBACN,KAAK,CAAC,WAAW;;WACN,KAAK,CAAC,YAAY;WAAS,MAAM;qDA6OrE,CAAC"}