@shipfox/react-ui 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (641) hide show
  1. package/dist/components/button-group/button-group.stories.js +4 -4
  2. package/dist/components/card/card.d.ts +24 -0
  3. package/dist/components/card/card.js +56 -0
  4. package/dist/components/card/card.stories.js +216 -0
  5. package/dist/components/card/index.d.ts +2 -0
  6. package/dist/components/card/index.js +3 -0
  7. package/dist/components/dashboard/components/charts/bar-chart.d.ts +30 -0
  8. package/dist/components/dashboard/components/charts/bar-chart.js +150 -0
  9. package/dist/components/dashboard/components/charts/bar-chart.stories.js +287 -0
  10. package/dist/components/dashboard/components/charts/chart-tooltip.d.ts +14 -0
  11. package/dist/components/dashboard/components/charts/chart-tooltip.js +46 -0
  12. package/dist/components/dashboard/components/charts/colors.d.ts +12 -0
  13. package/dist/components/dashboard/components/charts/colors.js +20 -0
  14. package/dist/components/dashboard/components/charts/index.d.ts +6 -0
  15. package/dist/components/dashboard/components/charts/index.js +7 -0
  16. package/dist/components/dashboard/components/charts/line-chart.d.ts +28 -0
  17. package/dist/components/dashboard/components/charts/line-chart.js +152 -0
  18. package/dist/components/dashboard/components/charts/line-chart.stories.js +257 -0
  19. package/dist/components/dashboard/components/charts/utils.d.ts +13 -0
  20. package/dist/components/dashboard/components/charts/utils.js +18 -0
  21. package/dist/components/dashboard/components/dashboard-alert.d.ts +8 -0
  22. package/dist/components/dashboard/components/dashboard-alert.js +24 -0
  23. package/dist/components/dashboard/components/kpi-card.d.ts +15 -0
  24. package/dist/components/dashboard/components/kpi-card.js +77 -0
  25. package/dist/components/dashboard/components/mobile-sidebar.d.ts +19 -0
  26. package/dist/components/dashboard/components/mobile-sidebar.js +50 -0
  27. package/dist/components/dashboard/components/organization-selector.d.ts +24 -1
  28. package/dist/components/dashboard/components/organization-selector.js +93 -70
  29. package/dist/components/dashboard/components/sidebar.d.ts +24 -0
  30. package/dist/components/dashboard/components/sidebar.js +218 -0
  31. package/dist/components/dashboard/context/dashboard-context.d.ts +70 -0
  32. package/dist/components/dashboard/context/dashboard-context.js +175 -0
  33. package/dist/components/dashboard/context/index.d.ts +8 -0
  34. package/dist/components/dashboard/context/index.js +6 -0
  35. package/dist/components/dashboard/context/types.d.ts +50 -0
  36. package/dist/components/dashboard/context/types.js +7 -0
  37. package/dist/components/dashboard/context/utils.d.ts +28 -0
  38. package/dist/components/dashboard/context/utils.js +53 -0
  39. package/dist/components/dashboard/dashboard.d.ts +27 -1
  40. package/dist/components/dashboard/dashboard.js +76 -36
  41. package/dist/components/dashboard/filters/expression-filter-bar.d.ts +42 -0
  42. package/dist/components/dashboard/filters/expression-filter-bar.js +80 -0
  43. package/dist/components/dashboard/filters/index.d.ts +6 -0
  44. package/dist/components/dashboard/filters/index.js +5 -0
  45. package/dist/components/dashboard/index.d.ts +25 -1
  46. package/dist/components/dashboard/index.js +22 -1
  47. package/dist/components/dashboard/pages/analytics-page.d.ts +20 -0
  48. package/dist/components/dashboard/pages/analytics-page.js +258 -0
  49. package/dist/components/dashboard/pages/index.d.ts +6 -0
  50. package/dist/components/dashboard/pages/index.js +6 -0
  51. package/dist/components/dashboard/pages/jobs-page.d.ts +20 -0
  52. package/dist/components/dashboard/pages/jobs-page.js +56 -0
  53. package/dist/components/dashboard/table/index.d.ts +6 -0
  54. package/dist/components/dashboard/table/index.js +5 -0
  55. package/dist/components/dashboard/table/table-wrapper.d.ts +104 -0
  56. package/dist/components/dashboard/table/table-wrapper.js +93 -0
  57. package/dist/components/dashboard/toolbar/filter-button.d.ts +12 -0
  58. package/dist/components/dashboard/toolbar/filter-button.js +124 -0
  59. package/dist/components/dashboard/toolbar/index.d.ts +13 -0
  60. package/dist/components/dashboard/toolbar/index.js +10 -0
  61. package/dist/components/dashboard/toolbar/page-toolbar.d.ts +75 -0
  62. package/dist/components/dashboard/toolbar/page-toolbar.js +208 -0
  63. package/dist/components/dashboard/toolbar/toolbar-actions.d.ts +52 -0
  64. package/dist/components/dashboard/toolbar/toolbar-actions.js +51 -0
  65. package/dist/components/dashboard/toolbar/toolbar-search.d.ts +21 -0
  66. package/dist/components/dashboard/toolbar/toolbar-search.js +123 -0
  67. package/dist/components/dashboard/toolbar/view-dropdown.d.ts +11 -0
  68. package/dist/components/dashboard/toolbar/view-dropdown.js +113 -0
  69. package/dist/components/empty-state/empty-state.d.ts +10 -0
  70. package/dist/components/empty-state/empty-state.js +40 -0
  71. package/dist/components/empty-state/empty-state.stories.js +74 -0
  72. package/dist/components/empty-state/index.d.ts +2 -0
  73. package/dist/components/empty-state/index.js +3 -0
  74. package/dist/components/index.d.ts +4 -0
  75. package/dist/components/index.js +4 -0
  76. package/dist/components/modal/modal.js +3 -3
  77. package/dist/components/search/search-inline.js +1 -1
  78. package/dist/components/search/search-modal.js +13 -7
  79. package/dist/components/select/select.d.ts +3 -1
  80. package/dist/components/select/select.js +2 -1
  81. package/dist/components/sheet/index.d.ts +2 -0
  82. package/dist/components/sheet/index.js +3 -0
  83. package/dist/components/sheet/sheet.d.ts +33 -0
  84. package/dist/components/sheet/sheet.js +163 -0
  85. package/dist/components/sheet/sheet.stories.js +368 -0
  86. package/dist/components/table/data-table.d.ts +19 -2
  87. package/dist/components/table/data-table.js +89 -72
  88. package/dist/components/table/table.js +1 -1
  89. package/dist/components/table/table.stories.components.js +6 -28
  90. package/dist/styles.css +1 -1
  91. package/package.json +12 -4
  92. package/.storybook/main.ts +0 -35
  93. package/.storybook/preview.tsx +0 -66
  94. package/.storybook/vitest.setup.ts +0 -4
  95. package/.turbo/turbo-build.log +0 -19
  96. package/.turbo/turbo-check.log +0 -6
  97. package/.turbo/turbo-type.log +0 -5
  98. package/CHANGELOG.md +0 -114
  99. package/argos.config.ts +0 -33
  100. package/dist/build-css-entry.js.map +0 -1
  101. package/dist/colors.stories.conts.d.ts.map +0 -1
  102. package/dist/colors.stories.conts.js.map +0 -1
  103. package/dist/colors.stories.js.map +0 -1
  104. package/dist/components/alert/alert.d.ts.map +0 -1
  105. package/dist/components/alert/alert.js.map +0 -1
  106. package/dist/components/alert/alert.stories.js.map +0 -1
  107. package/dist/components/alert/index.d.ts.map +0 -1
  108. package/dist/components/alert/index.js.map +0 -1
  109. package/dist/components/avatar/avatar-group.d.ts.map +0 -1
  110. package/dist/components/avatar/avatar-group.js.map +0 -1
  111. package/dist/components/avatar/avatar.d.ts.map +0 -1
  112. package/dist/components/avatar/avatar.js.map +0 -1
  113. package/dist/components/avatar/avatar.stories.js.map +0 -1
  114. package/dist/components/avatar/index.d.ts.map +0 -1
  115. package/dist/components/avatar/index.js.map +0 -1
  116. package/dist/components/badge/badge.d.ts.map +0 -1
  117. package/dist/components/badge/badge.js.map +0 -1
  118. package/dist/components/badge/badge.stories.js.map +0 -1
  119. package/dist/components/badge/icon-badge.d.ts.map +0 -1
  120. package/dist/components/badge/icon-badge.js.map +0 -1
  121. package/dist/components/badge/index.d.ts.map +0 -1
  122. package/dist/components/badge/index.js.map +0 -1
  123. package/dist/components/badge/status-badge.d.ts.map +0 -1
  124. package/dist/components/badge/status-badge.js.map +0 -1
  125. package/dist/components/badge/user-badge.d.ts.map +0 -1
  126. package/dist/components/badge/user-badge.js.map +0 -1
  127. package/dist/components/button/button-link.d.ts.map +0 -1
  128. package/dist/components/button/button-link.js.map +0 -1
  129. package/dist/components/button/button-link.stories.js.map +0 -1
  130. package/dist/components/button/button.d.ts.map +0 -1
  131. package/dist/components/button/button.js.map +0 -1
  132. package/dist/components/button/button.stories.js.map +0 -1
  133. package/dist/components/button/icon-button.d.ts.map +0 -1
  134. package/dist/components/button/icon-button.js.map +0 -1
  135. package/dist/components/button/icon-button.stories.js.map +0 -1
  136. package/dist/components/button/index.d.ts.map +0 -1
  137. package/dist/components/button/index.js.map +0 -1
  138. package/dist/components/button-group/button-group.d.ts.map +0 -1
  139. package/dist/components/button-group/button-group.js.map +0 -1
  140. package/dist/components/button-group/button-group.stories.js.map +0 -1
  141. package/dist/components/button-group/index.d.ts.map +0 -1
  142. package/dist/components/button-group/index.js.map +0 -1
  143. package/dist/components/calendar/calendar.d.ts.map +0 -1
  144. package/dist/components/calendar/calendar.js.map +0 -1
  145. package/dist/components/calendar/index.d.ts.map +0 -1
  146. package/dist/components/calendar/index.js.map +0 -1
  147. package/dist/components/checkbox/checkbox-label.d.ts.map +0 -1
  148. package/dist/components/checkbox/checkbox-label.js.map +0 -1
  149. package/dist/components/checkbox/checkbox-links.d.ts.map +0 -1
  150. package/dist/components/checkbox/checkbox-links.js.map +0 -1
  151. package/dist/components/checkbox/checkbox.d.ts.map +0 -1
  152. package/dist/components/checkbox/checkbox.js.map +0 -1
  153. package/dist/components/checkbox/checkbox.stories.js.map +0 -1
  154. package/dist/components/checkbox/index.d.ts.map +0 -1
  155. package/dist/components/checkbox/index.js.map +0 -1
  156. package/dist/components/code-block/code-block-footer.d.ts.map +0 -1
  157. package/dist/components/code-block/code-block-footer.js.map +0 -1
  158. package/dist/components/code-block/code-block.d.ts.map +0 -1
  159. package/dist/components/code-block/code-block.js.map +0 -1
  160. package/dist/components/code-block/code-block.stories.js.map +0 -1
  161. package/dist/components/code-block/code-content.d.ts.map +0 -1
  162. package/dist/components/code-block/code-content.js.map +0 -1
  163. package/dist/components/code-block/code-copy-button.d.ts.map +0 -1
  164. package/dist/components/code-block/code-copy-button.js.map +0 -1
  165. package/dist/components/code-block/code-tabs.d.ts.map +0 -1
  166. package/dist/components/code-block/code-tabs.js.map +0 -1
  167. package/dist/components/code-block/index.d.ts.map +0 -1
  168. package/dist/components/code-block/index.js.map +0 -1
  169. package/dist/components/command/command.d.ts.map +0 -1
  170. package/dist/components/command/command.js.map +0 -1
  171. package/dist/components/command/command.stories.js.map +0 -1
  172. package/dist/components/command/index.d.ts.map +0 -1
  173. package/dist/components/command/index.js.map +0 -1
  174. package/dist/components/confetti/confetti.d.ts.map +0 -1
  175. package/dist/components/confetti/confetti.js.map +0 -1
  176. package/dist/components/confetti/confetti.stories.js.map +0 -1
  177. package/dist/components/confetti/index.d.ts.map +0 -1
  178. package/dist/components/confetti/index.js.map +0 -1
  179. package/dist/components/dashboard/components/analytics-content.d.ts +0 -2
  180. package/dist/components/dashboard/components/analytics-content.d.ts.map +0 -1
  181. package/dist/components/dashboard/components/analytics-content.js +0 -180
  182. package/dist/components/dashboard/components/analytics-content.js.map +0 -1
  183. package/dist/components/dashboard/components/animated-logo.d.ts.map +0 -1
  184. package/dist/components/dashboard/components/animated-logo.js.map +0 -1
  185. package/dist/components/dashboard/components/complete-setup-button.d.ts.map +0 -1
  186. package/dist/components/dashboard/components/complete-setup-button.js.map +0 -1
  187. package/dist/components/dashboard/components/jobs-content.d.ts +0 -2
  188. package/dist/components/dashboard/components/jobs-content.d.ts.map +0 -1
  189. package/dist/components/dashboard/components/jobs-content.js +0 -69
  190. package/dist/components/dashboard/components/jobs-content.js.map +0 -1
  191. package/dist/components/dashboard/components/mobile-menu.d.ts.map +0 -1
  192. package/dist/components/dashboard/components/mobile-menu.js.map +0 -1
  193. package/dist/components/dashboard/components/organization-selector.d.ts.map +0 -1
  194. package/dist/components/dashboard/components/organization-selector.js.map +0 -1
  195. package/dist/components/dashboard/components/top-menu.d.ts.map +0 -1
  196. package/dist/components/dashboard/components/top-menu.js.map +0 -1
  197. package/dist/components/dashboard/components/topbar-button.d.ts.map +0 -1
  198. package/dist/components/dashboard/components/topbar-button.js.map +0 -1
  199. package/dist/components/dashboard/components/topbar.d.ts.map +0 -1
  200. package/dist/components/dashboard/components/topbar.js.map +0 -1
  201. package/dist/components/dashboard/components/user-profile.d.ts.map +0 -1
  202. package/dist/components/dashboard/components/user-profile.js.map +0 -1
  203. package/dist/components/dashboard/dashboard.d.ts.map +0 -1
  204. package/dist/components/dashboard/dashboard.js.map +0 -1
  205. package/dist/components/dashboard/dashboard.stories.js.map +0 -1
  206. package/dist/components/dashboard/index.d.ts.map +0 -1
  207. package/dist/components/dashboard/index.js.map +0 -1
  208. package/dist/components/date-picker/date-picker.d.ts.map +0 -1
  209. package/dist/components/date-picker/date-picker.js.map +0 -1
  210. package/dist/components/date-picker/date-picker.stories.js.map +0 -1
  211. package/dist/components/date-picker/index.d.ts.map +0 -1
  212. package/dist/components/date-picker/index.js.map +0 -1
  213. package/dist/components/date-time-range-picker/date-time-range-picker.d.ts.map +0 -1
  214. package/dist/components/date-time-range-picker/date-time-range-picker.js.map +0 -1
  215. package/dist/components/date-time-range-picker/index.d.ts.map +0 -1
  216. package/dist/components/date-time-range-picker/index.js.map +0 -1
  217. package/dist/components/dot-grid/dot-grid.d.ts.map +0 -1
  218. package/dist/components/dot-grid/dot-grid.js.map +0 -1
  219. package/dist/components/dot-grid/index.d.ts.map +0 -1
  220. package/dist/components/dot-grid/index.js.map +0 -1
  221. package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +0 -1
  222. package/dist/components/dropdown-menu/dropdown-menu.js.map +0 -1
  223. package/dist/components/dropdown-menu/dropdown-menu.stories.js.map +0 -1
  224. package/dist/components/dropdown-menu/index.d.ts.map +0 -1
  225. package/dist/components/dropdown-menu/index.js.map +0 -1
  226. package/dist/components/dynamic-item/dynamic-item.d.ts.map +0 -1
  227. package/dist/components/dynamic-item/dynamic-item.js.map +0 -1
  228. package/dist/components/dynamic-item/dynamic-item.stories.js.map +0 -1
  229. package/dist/components/dynamic-item/index.d.ts.map +0 -1
  230. package/dist/components/dynamic-item/index.js.map +0 -1
  231. package/dist/components/form/form.d.ts.map +0 -1
  232. package/dist/components/form/form.js.map +0 -1
  233. package/dist/components/form/form.stories.js.map +0 -1
  234. package/dist/components/form/index.d.ts.map +0 -1
  235. package/dist/components/form/index.js.map +0 -1
  236. package/dist/components/icon/custom/badge.d.ts.map +0 -1
  237. package/dist/components/icon/custom/badge.js.map +0 -1
  238. package/dist/components/icon/custom/check-circle-solid.d.ts.map +0 -1
  239. package/dist/components/icon/custom/check-circle-solid.js.map +0 -1
  240. package/dist/components/icon/custom/circle-dotted-line.d.ts.map +0 -1
  241. package/dist/components/icon/custom/circle-dotted-line.js.map +0 -1
  242. package/dist/components/icon/custom/component-fill.d.ts.map +0 -1
  243. package/dist/components/icon/custom/component-fill.js.map +0 -1
  244. package/dist/components/icon/custom/component-line.d.ts.map +0 -1
  245. package/dist/components/icon/custom/component-line.js.map +0 -1
  246. package/dist/components/icon/custom/ellipse-mini-solid.d.ts.map +0 -1
  247. package/dist/components/icon/custom/ellipse-mini-solid.js.map +0 -1
  248. package/dist/components/icon/custom/index.d.ts.map +0 -1
  249. package/dist/components/icon/custom/index.js.map +0 -1
  250. package/dist/components/icon/custom/info-tooltip-fill.d.ts.map +0 -1
  251. package/dist/components/icon/custom/info-tooltip-fill.js.map +0 -1
  252. package/dist/components/icon/custom/resize.d.ts.map +0 -1
  253. package/dist/components/icon/custom/resize.js.map +0 -1
  254. package/dist/components/icon/custom/shipfox-logo.d.ts.map +0 -1
  255. package/dist/components/icon/custom/shipfox-logo.js.map +0 -1
  256. package/dist/components/icon/custom/slack-logo.d.ts.map +0 -1
  257. package/dist/components/icon/custom/slack-logo.js.map +0 -1
  258. package/dist/components/icon/custom/spinner.d.ts.map +0 -1
  259. package/dist/components/icon/custom/spinner.js.map +0 -1
  260. package/dist/components/icon/custom/stripe-logo.d.ts.map +0 -1
  261. package/dist/components/icon/custom/stripe-logo.js.map +0 -1
  262. package/dist/components/icon/custom/thunder.d.ts.map +0 -1
  263. package/dist/components/icon/custom/thunder.js.map +0 -1
  264. package/dist/components/icon/custom/x-circle-solid.d.ts.map +0 -1
  265. package/dist/components/icon/custom/x-circle-solid.js.map +0 -1
  266. package/dist/components/icon/icon.d.ts.map +0 -1
  267. package/dist/components/icon/icon.js.map +0 -1
  268. package/dist/components/icon/icon.stories.js.map +0 -1
  269. package/dist/components/icon/index.d.ts.map +0 -1
  270. package/dist/components/icon/index.js.map +0 -1
  271. package/dist/components/icon/remixicon-registry.d.ts.map +0 -1
  272. package/dist/components/icon/remixicon-registry.js.map +0 -1
  273. package/dist/components/index.d.ts.map +0 -1
  274. package/dist/components/index.js.map +0 -1
  275. package/dist/components/inline-tips/index.d.ts.map +0 -1
  276. package/dist/components/inline-tips/index.js.map +0 -1
  277. package/dist/components/inline-tips/inline-tips.d.ts.map +0 -1
  278. package/dist/components/inline-tips/inline-tips.js.map +0 -1
  279. package/dist/components/inline-tips/inline-tips.stories.js.map +0 -1
  280. package/dist/components/input/index.d.ts.map +0 -1
  281. package/dist/components/input/index.js.map +0 -1
  282. package/dist/components/input/input.d.ts.map +0 -1
  283. package/dist/components/input/input.js.map +0 -1
  284. package/dist/components/input/input.stories.js.map +0 -1
  285. package/dist/components/item/index.d.ts.map +0 -1
  286. package/dist/components/item/index.js.map +0 -1
  287. package/dist/components/item/item.d.ts.map +0 -1
  288. package/dist/components/item/item.js.map +0 -1
  289. package/dist/components/item/item.stories.js.map +0 -1
  290. package/dist/components/kbd/index.d.ts.map +0 -1
  291. package/dist/components/kbd/index.js.map +0 -1
  292. package/dist/components/kbd/kbd.d.ts.map +0 -1
  293. package/dist/components/kbd/kbd.js.map +0 -1
  294. package/dist/components/kbd/kbd.stories.js.map +0 -1
  295. package/dist/components/label/index.d.ts.map +0 -1
  296. package/dist/components/label/index.js.map +0 -1
  297. package/dist/components/label/label.d.ts.map +0 -1
  298. package/dist/components/label/label.js.map +0 -1
  299. package/dist/components/label/label.stories.js.map +0 -1
  300. package/dist/components/modal/index.d.ts.map +0 -1
  301. package/dist/components/modal/index.js.map +0 -1
  302. package/dist/components/modal/modal.d.ts.map +0 -1
  303. package/dist/components/modal/modal.js.map +0 -1
  304. package/dist/components/modal/modal.stories.js.map +0 -1
  305. package/dist/components/moving-border/index.d.ts.map +0 -1
  306. package/dist/components/moving-border/index.js.map +0 -1
  307. package/dist/components/moving-border/moving-border.d.ts.map +0 -1
  308. package/dist/components/moving-border/moving-border.js.map +0 -1
  309. package/dist/components/popover/index.d.ts.map +0 -1
  310. package/dist/components/popover/index.js.map +0 -1
  311. package/dist/components/popover/popover.d.ts.map +0 -1
  312. package/dist/components/popover/popover.js.map +0 -1
  313. package/dist/components/search/index.d.ts.map +0 -1
  314. package/dist/components/search/index.js.map +0 -1
  315. package/dist/components/search/search-context.d.ts.map +0 -1
  316. package/dist/components/search/search-context.js.map +0 -1
  317. package/dist/components/search/search-inline.d.ts.map +0 -1
  318. package/dist/components/search/search-inline.js.map +0 -1
  319. package/dist/components/search/search-modal.d.ts.map +0 -1
  320. package/dist/components/search/search-modal.js.map +0 -1
  321. package/dist/components/search/search-trigger.d.ts.map +0 -1
  322. package/dist/components/search/search-trigger.js.map +0 -1
  323. package/dist/components/search/search-variants.d.ts.map +0 -1
  324. package/dist/components/search/search-variants.js.map +0 -1
  325. package/dist/components/search/search.d.ts.map +0 -1
  326. package/dist/components/search/search.js.map +0 -1
  327. package/dist/components/search/search.stories.js.map +0 -1
  328. package/dist/components/select/index.d.ts.map +0 -1
  329. package/dist/components/select/index.js.map +0 -1
  330. package/dist/components/select/select.d.ts.map +0 -1
  331. package/dist/components/select/select.js.map +0 -1
  332. package/dist/components/select/select.stories.js.map +0 -1
  333. package/dist/components/shiny-text/index.d.ts.map +0 -1
  334. package/dist/components/shiny-text/index.js.map +0 -1
  335. package/dist/components/shiny-text/shiny-text.d.ts.map +0 -1
  336. package/dist/components/shiny-text/shiny-text.js.map +0 -1
  337. package/dist/components/skeleton/index.d.ts.map +0 -1
  338. package/dist/components/skeleton/index.js.map +0 -1
  339. package/dist/components/skeleton/skeleton.d.ts.map +0 -1
  340. package/dist/components/skeleton/skeleton.js.map +0 -1
  341. package/dist/components/skeleton/skeleton.stories.js.map +0 -1
  342. package/dist/components/table/data-table.d.ts.map +0 -1
  343. package/dist/components/table/data-table.js.map +0 -1
  344. package/dist/components/table/index.d.ts.map +0 -1
  345. package/dist/components/table/index.js.map +0 -1
  346. package/dist/components/table/table-column-header.d.ts.map +0 -1
  347. package/dist/components/table/table-column-header.js.map +0 -1
  348. package/dist/components/table/table-pagination.d.ts.map +0 -1
  349. package/dist/components/table/table-pagination.js.map +0 -1
  350. package/dist/components/table/table.d.ts.map +0 -1
  351. package/dist/components/table/table.js.map +0 -1
  352. package/dist/components/table/table.stories.columns.d.ts.map +0 -1
  353. package/dist/components/table/table.stories.columns.js.map +0 -1
  354. package/dist/components/table/table.stories.components.d.ts.map +0 -1
  355. package/dist/components/table/table.stories.components.js.map +0 -1
  356. package/dist/components/table/table.stories.data.d.ts.map +0 -1
  357. package/dist/components/table/table.stories.data.js.map +0 -1
  358. package/dist/components/table/table.stories.js.map +0 -1
  359. package/dist/components/tabs/index.d.ts.map +0 -1
  360. package/dist/components/tabs/index.js.map +0 -1
  361. package/dist/components/tabs/tabs.d.ts.map +0 -1
  362. package/dist/components/tabs/tabs.js.map +0 -1
  363. package/dist/components/tabs/tabs.stories.js.map +0 -1
  364. package/dist/components/textarea/index.d.ts.map +0 -1
  365. package/dist/components/textarea/index.js.map +0 -1
  366. package/dist/components/textarea/textarea.d.ts.map +0 -1
  367. package/dist/components/textarea/textarea.js.map +0 -1
  368. package/dist/components/textarea/textarea.stories.js.map +0 -1
  369. package/dist/components/theme/index.d.ts.map +0 -1
  370. package/dist/components/theme/index.js.map +0 -1
  371. package/dist/components/theme/theme-provider.d.ts.map +0 -1
  372. package/dist/components/theme/theme-provider.js.map +0 -1
  373. package/dist/components/toast/index.d.ts.map +0 -1
  374. package/dist/components/toast/index.js.map +0 -1
  375. package/dist/components/toast/toast-custom.d.ts.map +0 -1
  376. package/dist/components/toast/toast-custom.js.map +0 -1
  377. package/dist/components/toast/toast.d.ts.map +0 -1
  378. package/dist/components/toast/toast.js.map +0 -1
  379. package/dist/components/toast/toast.stories.js.map +0 -1
  380. package/dist/components/tooltip/index.d.ts.map +0 -1
  381. package/dist/components/tooltip/index.js.map +0 -1
  382. package/dist/components/tooltip/tooltip.d.ts.map +0 -1
  383. package/dist/components/tooltip/tooltip.js.map +0 -1
  384. package/dist/components/tooltip/tooltip.stories.js.map +0 -1
  385. package/dist/components/typography/code.d.ts.map +0 -1
  386. package/dist/components/typography/code.js.map +0 -1
  387. package/dist/components/typography/code.stories.js.map +0 -1
  388. package/dist/components/typography/header.d.ts.map +0 -1
  389. package/dist/components/typography/header.js.map +0 -1
  390. package/dist/components/typography/header.stories.js.map +0 -1
  391. package/dist/components/typography/index.d.ts.map +0 -1
  392. package/dist/components/typography/index.js.map +0 -1
  393. package/dist/components/typography/text.d.ts.map +0 -1
  394. package/dist/components/typography/text.js.map +0 -1
  395. package/dist/components/typography/text.stories.js.map +0 -1
  396. package/dist/hooks/index.d.ts.map +0 -1
  397. package/dist/hooks/index.js.map +0 -1
  398. package/dist/hooks/useCopy.d.ts.map +0 -1
  399. package/dist/hooks/useCopy.js.map +0 -1
  400. package/dist/hooks/useCopyToClipboard.d.ts.map +0 -1
  401. package/dist/hooks/useCopyToClipboard.js.map +0 -1
  402. package/dist/hooks/useMediaQuery.d.ts.map +0 -1
  403. package/dist/hooks/useMediaQuery.js.map +0 -1
  404. package/dist/hooks/useResolvedTheme.d.ts.map +0 -1
  405. package/dist/hooks/useResolvedTheme.js.map +0 -1
  406. package/dist/hooks/useShikiHighlight.d.ts.map +0 -1
  407. package/dist/hooks/useShikiHighlight.js.map +0 -1
  408. package/dist/hooks/useShikiStyleInjection.d.ts.map +0 -1
  409. package/dist/hooks/useShikiStyleInjection.js.map +0 -1
  410. package/dist/hooks/useTheme.d.ts.map +0 -1
  411. package/dist/hooks/useTheme.js.map +0 -1
  412. package/dist/index.d.ts.map +0 -1
  413. package/dist/index.js.map +0 -1
  414. package/dist/onboarding/sign-in.stories.js.map +0 -1
  415. package/dist/state/theme.d.ts.map +0 -1
  416. package/dist/state/theme.js.map +0 -1
  417. package/dist/utils/avatar.d.ts.map +0 -1
  418. package/dist/utils/avatar.js.map +0 -1
  419. package/dist/utils/clipboard.d.ts.map +0 -1
  420. package/dist/utils/clipboard.js.map +0 -1
  421. package/dist/utils/cn.d.ts.map +0 -1
  422. package/dist/utils/cn.js.map +0 -1
  423. package/dist/utils/date.d.ts.map +0 -1
  424. package/dist/utils/date.js.map +0 -1
  425. package/dist/utils/debounce.d.ts.map +0 -1
  426. package/dist/utils/debounce.js.map +0 -1
  427. package/dist/utils/format/chart.d.ts.map +0 -1
  428. package/dist/utils/format/chart.js.map +0 -1
  429. package/dist/utils/format/date.d.ts.map +0 -1
  430. package/dist/utils/format/date.js.map +0 -1
  431. package/dist/utils/format/duration.d.ts.map +0 -1
  432. package/dist/utils/format/duration.js.map +0 -1
  433. package/dist/utils/format/index.d.ts.map +0 -1
  434. package/dist/utils/format/index.js.map +0 -1
  435. package/dist/utils/format/number.d.ts.map +0 -1
  436. package/dist/utils/format/number.js.map +0 -1
  437. package/dist/utils/index.d.ts.map +0 -1
  438. package/dist/utils/index.js.map +0 -1
  439. package/index.css +0 -1018
  440. package/src/assets/illustration-1.svg +0 -92
  441. package/src/assets/illustration-2.svg +0 -14
  442. package/src/assets/illustration-gradient.svg +0 -7049
  443. package/src/build-css-entry.ts +0 -3
  444. package/src/colors.stories.conts.ts +0 -164
  445. package/src/colors.stories.tsx +0 -66
  446. package/src/components/alert/alert.stories.tsx +0 -178
  447. package/src/components/alert/alert.tsx +0 -291
  448. package/src/components/alert/index.ts +0 -1
  449. package/src/components/avatar/avatar-group.tsx +0 -186
  450. package/src/components/avatar/avatar.stories.tsx +0 -179
  451. package/src/components/avatar/avatar.tsx +0 -219
  452. package/src/components/avatar/index.ts +0 -2
  453. package/src/components/badge/badge.stories.tsx +0 -468
  454. package/src/components/badge/badge.tsx +0 -147
  455. package/src/components/badge/icon-badge.tsx +0 -43
  456. package/src/components/badge/index.ts +0 -4
  457. package/src/components/badge/status-badge.tsx +0 -43
  458. package/src/components/badge/user-badge.tsx +0 -34
  459. package/src/components/button/button-link.stories.tsx +0 -86
  460. package/src/components/button/button-link.tsx +0 -76
  461. package/src/components/button/button.stories.tsx +0 -138
  462. package/src/components/button/button.tsx +0 -91
  463. package/src/components/button/icon-button.stories.tsx +0 -228
  464. package/src/components/button/icon-button.tsx +0 -95
  465. package/src/components/button/index.ts +0 -3
  466. package/src/components/button-group/button-group.stories.tsx +0 -361
  467. package/src/components/button-group/button-group.tsx +0 -111
  468. package/src/components/button-group/index.ts +0 -1
  469. package/src/components/calendar/calendar.tsx +0 -90
  470. package/src/components/calendar/index.ts +0 -1
  471. package/src/components/checkbox/checkbox-label.tsx +0 -125
  472. package/src/components/checkbox/checkbox-links.tsx +0 -92
  473. package/src/components/checkbox/checkbox.stories.tsx +0 -391
  474. package/src/components/checkbox/checkbox.tsx +0 -71
  475. package/src/components/checkbox/index.ts +0 -3
  476. package/src/components/code-block/code-block-footer.tsx +0 -197
  477. package/src/components/code-block/code-block.stories.tsx +0 -323
  478. package/src/components/code-block/code-block.tsx +0 -283
  479. package/src/components/code-block/code-content.tsx +0 -63
  480. package/src/components/code-block/code-copy-button.tsx +0 -73
  481. package/src/components/code-block/code-tabs.tsx +0 -170
  482. package/src/components/code-block/index.ts +0 -3
  483. package/src/components/command/command.stories.tsx +0 -133
  484. package/src/components/command/command.tsx +0 -265
  485. package/src/components/command/index.ts +0 -1
  486. package/src/components/confetti/confetti.stories.tsx +0 -38
  487. package/src/components/confetti/confetti.tsx +0 -140
  488. package/src/components/confetti/index.ts +0 -1
  489. package/src/components/dashboard/components/analytics-content.tsx +0 -102
  490. package/src/components/dashboard/components/animated-logo.tsx +0 -25
  491. package/src/components/dashboard/components/complete-setup-button.tsx +0 -30
  492. package/src/components/dashboard/components/jobs-content.tsx +0 -51
  493. package/src/components/dashboard/components/mobile-menu.tsx +0 -50
  494. package/src/components/dashboard/components/organization-selector.tsx +0 -51
  495. package/src/components/dashboard/components/top-menu.tsx +0 -26
  496. package/src/components/dashboard/components/topbar-button.tsx +0 -27
  497. package/src/components/dashboard/components/topbar.tsx +0 -40
  498. package/src/components/dashboard/components/user-profile.tsx +0 -90
  499. package/src/components/dashboard/dashboard.stories.tsx +0 -25
  500. package/src/components/dashboard/dashboard.tsx +0 -61
  501. package/src/components/dashboard/index.ts +0 -1
  502. package/src/components/date-picker/date-picker.stories.tsx +0 -230
  503. package/src/components/date-picker/date-picker.tsx +0 -179
  504. package/src/components/date-picker/index.ts +0 -1
  505. package/src/components/date-time-range-picker/date-time-range-picker.tsx +0 -211
  506. package/src/components/date-time-range-picker/index.ts +0 -1
  507. package/src/components/dot-grid/dot-grid.tsx +0 -325
  508. package/src/components/dot-grid/index.ts +0 -1
  509. package/src/components/dropdown-menu/dropdown-menu.stories.tsx +0 -384
  510. package/src/components/dropdown-menu/dropdown-menu.tsx +0 -416
  511. package/src/components/dropdown-menu/index.ts +0 -1
  512. package/src/components/dynamic-item/dynamic-item.stories.tsx +0 -266
  513. package/src/components/dynamic-item/dynamic-item.tsx +0 -74
  514. package/src/components/dynamic-item/index.ts +0 -1
  515. package/src/components/form/form.stories.tsx +0 -505
  516. package/src/components/form/form.tsx +0 -154
  517. package/src/components/form/index.ts +0 -1
  518. package/src/components/icon/custom/badge.tsx +0 -17
  519. package/src/components/icon/custom/check-circle-solid.tsx +0 -24
  520. package/src/components/icon/custom/circle-dotted-line.tsx +0 -17
  521. package/src/components/icon/custom/component-fill.tsx +0 -17
  522. package/src/components/icon/custom/component-line.tsx +0 -17
  523. package/src/components/icon/custom/ellipse-mini-solid.tsx +0 -17
  524. package/src/components/icon/custom/index.ts +0 -14
  525. package/src/components/icon/custom/info-tooltip-fill.tsx +0 -21
  526. package/src/components/icon/custom/resize.tsx +0 -17
  527. package/src/components/icon/custom/shipfox-logo.tsx +0 -20
  528. package/src/components/icon/custom/slack-logo.tsx +0 -35
  529. package/src/components/icon/custom/spinner.tsx +0 -144
  530. package/src/components/icon/custom/stripe-logo.tsx +0 -27
  531. package/src/components/icon/custom/thunder.tsx +0 -17
  532. package/src/components/icon/custom/x-circle-solid.tsx +0 -24
  533. package/src/components/icon/icon.stories.tsx +0 -31
  534. package/src/components/icon/icon.tsx +0 -90
  535. package/src/components/icon/index.ts +0 -1
  536. package/src/components/icon/remixicon-registry.ts +0 -24
  537. package/src/components/index.ts +0 -36
  538. package/src/components/inline-tips/index.ts +0 -1
  539. package/src/components/inline-tips/inline-tips.stories.tsx +0 -131
  540. package/src/components/inline-tips/inline-tips.tsx +0 -132
  541. package/src/components/input/index.ts +0 -1
  542. package/src/components/input/input.stories.tsx +0 -138
  543. package/src/components/input/input.tsx +0 -43
  544. package/src/components/item/index.ts +0 -1
  545. package/src/components/item/item.stories.tsx +0 -159
  546. package/src/components/item/item.tsx +0 -182
  547. package/src/components/kbd/index.ts +0 -1
  548. package/src/components/kbd/kbd.stories.tsx +0 -64
  549. package/src/components/kbd/kbd.tsx +0 -32
  550. package/src/components/label/index.ts +0 -1
  551. package/src/components/label/label.stories.tsx +0 -67
  552. package/src/components/label/label.tsx +0 -15
  553. package/src/components/modal/index.ts +0 -1
  554. package/src/components/modal/modal.stories.tsx +0 -448
  555. package/src/components/modal/modal.tsx +0 -311
  556. package/src/components/moving-border/index.ts +0 -1
  557. package/src/components/moving-border/moving-border.tsx +0 -67
  558. package/src/components/popover/index.ts +0 -1
  559. package/src/components/popover/popover.tsx +0 -60
  560. package/src/components/renovate.json +0 -23
  561. package/src/components/search/index.ts +0 -28
  562. package/src/components/search/search-context.tsx +0 -78
  563. package/src/components/search/search-inline.tsx +0 -107
  564. package/src/components/search/search-modal.tsx +0 -198
  565. package/src/components/search/search-trigger.tsx +0 -47
  566. package/src/components/search/search-variants.ts +0 -88
  567. package/src/components/search/search.stories.tsx +0 -392
  568. package/src/components/search/search.tsx +0 -47
  569. package/src/components/select/index.ts +0 -1
  570. package/src/components/select/select.stories.tsx +0 -207
  571. package/src/components/select/select.tsx +0 -220
  572. package/src/components/shiny-text/index.ts +0 -1
  573. package/src/components/shiny-text/shiny-text.tsx +0 -21
  574. package/src/components/skeleton/index.ts +0 -1
  575. package/src/components/skeleton/skeleton.stories.tsx +0 -178
  576. package/src/components/skeleton/skeleton.tsx +0 -14
  577. package/src/components/table/data-table.tsx +0 -254
  578. package/src/components/table/index.ts +0 -5
  579. package/src/components/table/table-column-header.tsx +0 -141
  580. package/src/components/table/table-pagination.tsx +0 -161
  581. package/src/components/table/table.stories.columns.tsx +0 -198
  582. package/src/components/table/table.stories.components.tsx +0 -104
  583. package/src/components/table/table.stories.data.ts +0 -117
  584. package/src/components/table/table.stories.tsx +0 -256
  585. package/src/components/table/table.tsx +0 -95
  586. package/src/components/tabs/index.ts +0 -1
  587. package/src/components/tabs/tabs.stories.tsx +0 -100
  588. package/src/components/tabs/tabs.tsx +0 -380
  589. package/src/components/textarea/index.ts +0 -1
  590. package/src/components/textarea/textarea.stories.tsx +0 -196
  591. package/src/components/textarea/textarea.tsx +0 -42
  592. package/src/components/theme/index.ts +0 -1
  593. package/src/components/theme/theme-provider.tsx +0 -50
  594. package/src/components/toast/index.ts +0 -2
  595. package/src/components/toast/toast-custom.tsx +0 -154
  596. package/src/components/toast/toast.stories.tsx +0 -369
  597. package/src/components/toast/toast.tsx +0 -41
  598. package/src/components/tooltip/index.ts +0 -1
  599. package/src/components/tooltip/tooltip.stories.tsx +0 -284
  600. package/src/components/tooltip/tooltip.tsx +0 -121
  601. package/src/components/typography/code.stories.tsx +0 -36
  602. package/src/components/typography/code.tsx +0 -38
  603. package/src/components/typography/header.stories.tsx +0 -27
  604. package/src/components/typography/header.tsx +0 -41
  605. package/src/components/typography/index.ts +0 -3
  606. package/src/components/typography/text.stories.tsx +0 -67
  607. package/src/components/typography/text.tsx +0 -50
  608. package/src/hooks/index.ts +0 -6
  609. package/src/hooks/useCopy.ts +0 -0
  610. package/src/hooks/useCopyToClipboard.ts +0 -20
  611. package/src/hooks/useMediaQuery.ts +0 -87
  612. package/src/hooks/useResolvedTheme.ts +0 -34
  613. package/src/hooks/useShikiHighlight.ts +0 -140
  614. package/src/hooks/useShikiStyleInjection.ts +0 -34
  615. package/src/hooks/useTheme.ts +0 -10
  616. package/src/index.ts +0 -4
  617. package/src/onboarding/sign-in.stories.tsx +0 -85
  618. package/src/state/theme.ts +0 -15
  619. package/src/utils/avatar.ts +0 -27
  620. package/src/utils/clipboard.ts +0 -4
  621. package/src/utils/cn.ts +0 -6
  622. package/src/utils/date.test.ts +0 -119
  623. package/src/utils/date.ts +0 -99
  624. package/src/utils/debounce.ts +0 -15
  625. package/src/utils/format/chart.ts +0 -16
  626. package/src/utils/format/date.test.ts +0 -65
  627. package/src/utils/format/date.ts +0 -75
  628. package/src/utils/format/duration.test.ts +0 -58
  629. package/src/utils/format/duration.ts +0 -82
  630. package/src/utils/format/index.ts +0 -4
  631. package/src/utils/format/number.test.ts +0 -38
  632. package/src/utils/format/number.ts +0 -33
  633. package/src/utils/index.ts +0 -6
  634. package/test/global.ts +0 -3
  635. package/test/setup.ts +0 -9
  636. package/tsconfig.build.json +0 -19
  637. package/tsconfig.json +0 -11
  638. package/tsconfig.test.json +0 -12
  639. package/vercel.json +0 -8
  640. package/vite.css.config.ts +0 -30
  641. package/vitest.config.ts +0 -44
@@ -1,20 +0,0 @@
1
- import {useState} from 'react';
2
- import {copyTextToClipboard} from 'utils';
3
-
4
- interface UseCopyToClipboardParams {
5
- text: string;
6
- onCopy?: (text: string) => void;
7
- }
8
-
9
- export function useCopyToClipboard({text, onCopy}: UseCopyToClipboardParams) {
10
- const [copied, setCopied] = useState(false);
11
-
12
- const copy = async () => {
13
- await copyTextToClipboard(text);
14
-
15
- if (onCopy) onCopy(text);
16
- setCopied(true);
17
- };
18
-
19
- return {copy, copied};
20
- }
@@ -1,87 +0,0 @@
1
- import {useEffect, useState} from 'react';
2
-
3
- class MediaQueryManager {
4
- private queries = new Map<string, MediaQueryList>();
5
- private listeners = new Map<string, Set<() => void>>();
6
- private changeHandlers = new Map<string, () => void>();
7
-
8
- getMatches(query: string): boolean {
9
- if (typeof window === 'undefined') return false;
10
-
11
- if (!this.queries.has(query)) {
12
- this.queries.set(query, window.matchMedia(query));
13
- this.listeners.set(query, new Set());
14
- }
15
-
16
- const mediaQuery = this.queries.get(query);
17
- return mediaQuery ? mediaQuery.matches : false;
18
- }
19
-
20
- subscribe(query: string, callback: () => void): () => void {
21
- if (typeof window === 'undefined') {
22
- return () => {
23
- // Cleanup function for SSR - no-op
24
- };
25
- }
26
-
27
- if (!this.queries.has(query)) {
28
- this.queries.set(query, window.matchMedia(query));
29
- this.listeners.set(query, new Set());
30
- }
31
-
32
- const mediaQuery = this.queries.get(query);
33
- const listeners = this.listeners.get(query);
34
-
35
- if (!mediaQuery || !listeners) {
36
- return () => {
37
- // Cleanup function - no-op if query wasn't found
38
- };
39
- }
40
-
41
- listeners.add(callback);
42
-
43
- if (listeners.size === 1) {
44
- const changeHandler = () => {
45
- for (const cb of listeners) {
46
- cb();
47
- }
48
- };
49
- this.changeHandlers.set(query, changeHandler);
50
- mediaQuery.addEventListener('change', changeHandler);
51
- }
52
-
53
- return () => {
54
- listeners.delete(callback);
55
-
56
- if (listeners.size === 0) {
57
- const changeHandler = this.changeHandlers.get(query);
58
- if (changeHandler) {
59
- mediaQuery.removeEventListener('change', changeHandler);
60
- this.changeHandlers.delete(query);
61
- }
62
- this.queries.delete(query);
63
- this.listeners.delete(query);
64
- }
65
- };
66
- }
67
- }
68
-
69
- const mediaQueryManager = new MediaQueryManager();
70
-
71
- export function useMediaQuery(query: string): boolean {
72
- const [matches, setMatches] = useState(() => mediaQueryManager.getMatches(query));
73
-
74
- useEffect(() => {
75
- const updateMatches = () => {
76
- setMatches(mediaQueryManager.getMatches(query));
77
- };
78
-
79
- const unsubscribe = mediaQueryManager.subscribe(query, updateMatches);
80
-
81
- updateMatches();
82
-
83
- return unsubscribe;
84
- }, [query]);
85
-
86
- return matches;
87
- }
@@ -1,34 +0,0 @@
1
- import {useSyncExternalStore} from 'react';
2
- import {useTheme} from './useTheme';
3
-
4
- export function useResolvedTheme(): 'light' | 'dark' {
5
- const {theme} = useTheme();
6
-
7
- const systemTheme = useSyncExternalStore<'light' | 'dark'>(
8
- (callback) => {
9
- if (typeof window === 'undefined' || theme !== 'system') {
10
- return () => {
11
- // No-op unsubscribe
12
- };
13
- }
14
- const mql = window.matchMedia('(prefers-color-scheme: dark)');
15
- mql.addEventListener('change', callback);
16
- return () => {
17
- mql.removeEventListener('change', callback);
18
- };
19
- },
20
- (): 'light' | 'dark' =>
21
- typeof window !== 'undefined' && theme === 'system'
22
- ? window.matchMedia('(prefers-color-scheme: dark)').matches
23
- ? 'dark'
24
- : 'light'
25
- : 'light',
26
- (): 'light' | 'dark' => 'light', // Server snapshot
27
- );
28
-
29
- if (theme === 'system') {
30
- return systemTheme;
31
- }
32
- // TypeScript should narrow theme to 'light' | 'dark' here
33
- return theme as 'light' | 'dark';
34
- }
@@ -1,140 +0,0 @@
1
- import {useEffect, useState} from 'react';
2
-
3
- type ShikiThemes = {
4
- light: string;
5
- dark: string;
6
- };
7
-
8
- type UseShikiHighlightOptions = {
9
- code: string;
10
- lang: string;
11
- themes: ShikiThemes;
12
- resolvedTheme: 'light' | 'dark';
13
- syntaxHighlighting: boolean;
14
- };
15
-
16
- export function useShikiHighlight({
17
- code,
18
- lang,
19
- themes,
20
- resolvedTheme,
21
- syntaxHighlighting,
22
- }: UseShikiHighlightOptions): {highlightedCode: string; isLoading: boolean} {
23
- const [highlightedCode, setHighlightedCode] = useState<string>('');
24
- const [isLoading, setIsLoading] = useState(syntaxHighlighting);
25
-
26
- useEffect(() => {
27
- if (!syntaxHighlighting) {
28
- setIsLoading(false);
29
- return;
30
- }
31
-
32
- setIsLoading(true);
33
- let cancelled = false;
34
-
35
- const loadHighlightedCode = async () => {
36
- try {
37
- const {codeToHtml} = await import('shiki');
38
-
39
- const html = await codeToHtml(code, {
40
- lang,
41
- themes: {
42
- light: themes.light,
43
- dark: themes.dark,
44
- },
45
- defaultColor: resolvedTheme === 'dark' ? 'dark' : 'light',
46
- });
47
-
48
- if (!cancelled) {
49
- setHighlightedCode(html);
50
- setIsLoading(false);
51
- }
52
- } catch {
53
- if (!cancelled) {
54
- setIsLoading(false);
55
- }
56
- }
57
- };
58
-
59
- loadHighlightedCode();
60
-
61
- return () => {
62
- cancelled = true;
63
- };
64
- }, [code, lang, themes.light, themes.dark, resolvedTheme, syntaxHighlighting]);
65
-
66
- return {highlightedCode, isLoading};
67
- }
68
-
69
- type UseShikiHighlightMultipleOptions = {
70
- codes: Record<string, string>;
71
- lang: string;
72
- themes: ShikiThemes;
73
- resolvedTheme: 'light' | 'dark';
74
- syntaxHighlighting: boolean;
75
- };
76
-
77
- export function useShikiHighlightMultiple({
78
- codes,
79
- lang,
80
- themes,
81
- resolvedTheme,
82
- syntaxHighlighting,
83
- }: UseShikiHighlightMultipleOptions): {
84
- highlightedCodes: Record<string, string>;
85
- isLoading: boolean;
86
- } {
87
- const [highlightedCodes, setHighlightedCodes] = useState<Record<string, string>>({});
88
- const [isLoading, setIsLoading] = useState(syntaxHighlighting);
89
-
90
- useEffect(() => {
91
- if (!syntaxHighlighting) {
92
- setIsLoading(false);
93
- return;
94
- }
95
-
96
- setIsLoading(true);
97
- let cancelled = false;
98
-
99
- const loadHighlightedCode = async () => {
100
- try {
101
- const {codeToHtml} = await import('shiki');
102
- const newHighlightedCodes: Record<string, string> = {};
103
-
104
- for (const [command, val] of Object.entries(codes)) {
105
- if (cancelled) {
106
- return;
107
- }
108
-
109
- const highlighted = await codeToHtml(val, {
110
- lang,
111
- themes: {
112
- light: themes.light,
113
- dark: themes.dark,
114
- },
115
- defaultColor: resolvedTheme === 'dark' ? 'dark' : 'light',
116
- });
117
-
118
- newHighlightedCodes[command] = highlighted;
119
- }
120
-
121
- if (!cancelled) {
122
- setHighlightedCodes(newHighlightedCodes);
123
- setIsLoading(false);
124
- }
125
- } catch {
126
- if (!cancelled) {
127
- setIsLoading(false);
128
- }
129
- }
130
- };
131
-
132
- loadHighlightedCode();
133
-
134
- return () => {
135
- cancelled = true;
136
- };
137
- }, [resolvedTheme, lang, themes.light, themes.dark, codes, syntaxHighlighting]);
138
-
139
- return {highlightedCodes, isLoading};
140
- }
@@ -1,34 +0,0 @@
1
- import {useEffect} from 'react';
2
-
3
- export function useShikiStyleInjection(syntaxHighlighting: boolean): void {
4
- useEffect(() => {
5
- if (!syntaxHighlighting) {
6
- return;
7
- }
8
-
9
- const styleId = 'shiki-override-styles';
10
- if (document.getElementById(styleId)) {
11
- return;
12
- }
13
-
14
- const style = document.createElement('style');
15
- style.id = styleId;
16
- style.textContent = `
17
- .shiki-override pre,
18
- .shiki-override code,
19
- .shiki-override pre *,
20
- .shiki-override code * {
21
- background: transparent !important;
22
- font-family: "Commit Mono", monospace !important;
23
- }
24
- `;
25
- document.head.appendChild(style);
26
-
27
- return () => {
28
- const existingStyle = document.getElementById(styleId);
29
- if (existingStyle) {
30
- existingStyle.remove();
31
- }
32
- };
33
- }, [syntaxHighlighting]);
34
- }
@@ -1,10 +0,0 @@
1
- import {useContext} from 'react';
2
- import {ThemeProviderContext} from 'state/theme';
3
-
4
- export const useTheme = () => {
5
- const context = useContext(ThemeProviderContext);
6
-
7
- if (context === undefined) throw new Error('useTheme must be used within a ThemeProvider');
8
-
9
- return context;
10
- };
package/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
- export {ShipfoxLoader} from 'shipfox-loader-react';
2
- export * from './components';
3
- export * from './hooks';
4
- export * from './utils';
@@ -1,85 +0,0 @@
1
- import {argosScreenshot} from '@argos-ci/storybook/vitest';
2
- import type {Meta, StoryObj} from '@storybook/react';
3
- import {Avatar} from 'components/avatar';
4
- import {Button} from 'components/button';
5
- import {DotGrid} from 'components/dot-grid';
6
- import {Header, Text} from 'components/typography';
7
-
8
- const meta = {
9
- title: 'Onboarding/Signin',
10
- parameters: {
11
- layout: 'fullscreen',
12
- },
13
- } satisfies Meta;
14
-
15
- export default meta;
16
- type Story = StoryObj<typeof meta>;
17
-
18
- export const Default: Story = {
19
- play: async (ctx) => {
20
- await argosScreenshot(ctx, 'example-screenshot');
21
- },
22
- render: () => {
23
- return (
24
- <div className="flex min-h-screen items-center justify-center bg-background-subtle-base">
25
- {/* Background illustration - simplified decorative element */}
26
- <div
27
- className="absolute w-[800px] max-w-[800px] h-[400px] top-0 left-1/2 -translate-x-1/2 translate-y-[-145px]"
28
- style={{
29
- maskImage:
30
- 'radial-gradient(ellipse 100% 125% at 50% 0%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0) 100%)',
31
- WebkitMaskImage:
32
- 'radial-gradient(ellipse 100% 125% at 50% 0%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0) 100%)',
33
- }}
34
- >
35
- <DotGrid
36
- dotSize={2}
37
- gap={20}
38
- baseColor="#e63e00"
39
- activeColor="#FF0076"
40
- proximity={100}
41
- shockRadius={8}
42
- shockStrength={100}
43
- resistance={500}
44
- returnDuration={1.5}
45
- />
46
- </div>
47
-
48
- {/* Main content */}
49
- <div className="relative flex w-full max-w-[384px] flex-col items-center gap-32 px-24 pb-80 pt-24">
50
- {/* Logo and title section */}
51
- <div className="flex flex-col items-center gap-16">
52
- <Avatar content="logo" size="xl" radius="rounded" logoName="shipfox" />
53
- <div className="flex min-w-[128px] flex-col items-center gap-4 text-center">
54
- <Header
55
- variant="h1"
56
- className="text-[28px] font-medium leading-[44px] text-foreground-neutral-base"
57
- >
58
- Connect to Shipfox
59
- </Header>
60
- <Text
61
- size="sm"
62
- className="text-sm font-normal leading-[24px] text-foreground-neutral-subtle"
63
- >
64
- Log in to access Shipfox.
65
- </Text>
66
- </div>
67
- </div>
68
-
69
- {/* Action buttons */}
70
- <div className="flex w-full flex-col gap-20">
71
- <Button variant="primary" size="md" iconLeft="google" className="w-full">
72
- Continue with Google
73
- </Button>
74
- <Button variant="primary" size="md" iconLeft="microsoft" className="w-full">
75
- Continue with Microsoft
76
- </Button>
77
- <Button variant="transparent" size="md" className="w-full">
78
- Connect with Enterprise SSO
79
- </Button>
80
- </div>
81
- </div>
82
- </div>
83
- );
84
- },
85
- };
@@ -1,15 +0,0 @@
1
- import {createContext} from 'react';
2
-
3
- export type Theme = 'dark' | 'light' | 'system';
4
-
5
- export type ThemeProviderState = {
6
- theme: Theme;
7
- setTheme: (theme: Theme) => void;
8
- };
9
-
10
- const initialState: ThemeProviderState = {
11
- theme: 'system',
12
- setTheme: () => null,
13
- };
14
-
15
- export const ThemeProviderContext = createContext<ThemeProviderState>(initialState);
@@ -1,27 +0,0 @@
1
- const hashString = (str: string): number => {
2
- let hash = 0;
3
- for (let i = 0; i < str.length; i++) {
4
- const char = str.charCodeAt(i);
5
- hash = (hash << 5) - hash + char;
6
- hash = hash & hash;
7
- }
8
- return Math.abs(hash);
9
- };
10
-
11
- export const getPlaceholderImageUrl = (name?: string): string => {
12
- const backgroundColors = ['BFDFFF', 'BFEAFF', 'CFBFFF', 'FFBFC3', 'FFEABF', 'E3E6EA', 'EAEAEA'];
13
-
14
- const seed = name?.trim() || 'avatar';
15
-
16
- const colorIndex = hashString(seed) % backgroundColors.length;
17
- const backgroundColor = backgroundColors[colorIndex];
18
-
19
- return `https://api.dicebear.com/9.x/micah/svg?backgroundColor=${backgroundColor}&seed=${encodeURIComponent(seed)}`;
20
- };
21
-
22
- export const getInitial = (name?: string): string => {
23
- if (name) {
24
- return name.trim()[0]?.toUpperCase() ?? 'L';
25
- }
26
- return 'L';
27
- };
@@ -1,4 +0,0 @@
1
- export async function copyTextToClipboard(text: string) {
2
- if ('clipboard' in navigator) return await navigator.clipboard.writeText(text);
3
- return document.execCommand('copy', true, text);
4
- }
package/src/utils/cn.ts DELETED
@@ -1,6 +0,0 @@
1
- import {type ClassValue, clsx} from 'clsx';
2
- import {twMerge} from 'tailwind-merge';
3
-
4
- export function cn(...inputs: ClassValue[]) {
5
- return twMerge(clsx(inputs));
6
- }
@@ -1,119 +0,0 @@
1
- import {afterEach, beforeEach, describe, expect, it, vi} from '@shipfox/vitest/vi';
2
- import {
3
- generateDurationShortcut,
4
- intervalToNowFromDuration,
5
- parseTextDurationShortcut,
6
- } from './date';
7
-
8
- describe('date utils', () => {
9
- const now = new Date('2024-03-20T17:45:00Z');
10
-
11
- beforeEach(() => {
12
- vi.useFakeTimers({now});
13
- });
14
-
15
- afterEach(() => {
16
- vi.runOnlyPendingTimers();
17
- vi.useRealTimers();
18
- });
19
-
20
- describe('intervalToNowFromDuration', () => {
21
- it('should return the interval for days', () => {
22
- const result = intervalToNowFromDuration({days: 2});
23
- expect(result).toEqual({
24
- start: new Date('2024-03-18T17:45:00Z'),
25
- end: new Date('2024-03-20T17:45:00Z'),
26
- });
27
- });
28
-
29
- it('should return the interval for days rounded, when the options is given', () => {
30
- const result = intervalToNowFromDuration({days: 2}, {attemptRounding: true});
31
- expect(result).toEqual({
32
- start: new Date('2024-03-18T00:00:00Z'),
33
- end: new Date('2024-03-20T23:59:59.999Z'),
34
- });
35
- });
36
-
37
- it('should not round the hours intervals, even when the options is given', () => {
38
- const result = intervalToNowFromDuration({hours: 48}, {attemptRounding: true});
39
- expect(result).toEqual({
40
- start: new Date('2024-03-18T17:45:00Z'),
41
- end: new Date('2024-03-20T17:45:00Z'),
42
- });
43
- });
44
- });
45
-
46
- describe('parseTextDurationShortcut', () => {
47
- it('should parse a duration shortcut in seconds', () => {
48
- const result = parseTextDurationShortcut('100s');
49
- expect(result).toEqual({seconds: 100});
50
- });
51
-
52
- it('should parse a duration shortcut in minutes', () => {
53
- const result = parseTextDurationShortcut('100m');
54
- expect(result).toEqual({minutes: 100});
55
- });
56
-
57
- it('should parse a duration shortcut in hours', () => {
58
- const result = parseTextDurationShortcut('100h');
59
- expect(result).toEqual({hours: 100});
60
- });
61
-
62
- it('should parse a duration shortcut in days', () => {
63
- const result = parseTextDurationShortcut('100d');
64
- expect(result).toEqual({days: 100});
65
- });
66
-
67
- it('should parse a duration shortcut in weeks', () => {
68
- const result = parseTextDurationShortcut('100w');
69
- expect(result).toEqual({weeks: 100});
70
- });
71
-
72
- it('should parse a duration shortcut in months', () => {
73
- const result = parseTextDurationShortcut('100mo');
74
- expect(result).toEqual({months: 100});
75
- });
76
-
77
- it('should parse a duration shortcut in years', () => {
78
- const result = parseTextDurationShortcut('100y');
79
- expect(result).toEqual({years: 100});
80
- });
81
- });
82
-
83
- describe('generateDurationShortcut', () => {
84
- it('should generate a duration shortcut in seconds', () => {
85
- const result = generateDurationShortcut({seconds: 100});
86
- expect(result).toEqual('100s');
87
- });
88
-
89
- it('should generate a duration shortcut in minutes', () => {
90
- const result = generateDurationShortcut({minutes: 100});
91
- expect(result).toEqual('100m');
92
- });
93
-
94
- it('should generate a duration shortcut in hours', () => {
95
- const result = generateDurationShortcut({hours: 100});
96
- expect(result).toEqual('100h');
97
- });
98
-
99
- it('should generate a duration shortcut in days', () => {
100
- const result = generateDurationShortcut({days: 100});
101
- expect(result).toEqual('100d');
102
- });
103
-
104
- it('should generate a duration shortcut in weeks', () => {
105
- const result = generateDurationShortcut({weeks: 100});
106
- expect(result).toEqual('100w');
107
- });
108
-
109
- it('should generate a duration shortcut in months', () => {
110
- const result = generateDurationShortcut({months: 100});
111
- expect(result).toEqual('100mo');
112
- });
113
-
114
- it('should generate a duration shortcut in years', () => {
115
- const result = generateDurationShortcut({years: 100});
116
- expect(result).toEqual('100y');
117
- });
118
- });
119
- });
package/src/utils/date.ts DELETED
@@ -1,99 +0,0 @@
1
- import {
2
- type Duration,
3
- endOfDay,
4
- formatDuration,
5
- type NormalizedInterval,
6
- startOfDay,
7
- startOfMonth,
8
- sub,
9
- } from 'date-fns';
10
-
11
- export function isStartOfDay(date: Date): boolean {
12
- return date.getTime() === startOfDay(date).getTime();
13
- }
14
-
15
- export function isStartOfMonth(date: Date): boolean {
16
- return date.getTime() === startOfMonth(date).getTime();
17
- }
18
-
19
- export function isEndOfDay(date: Date): boolean {
20
- return date.getTime() === endOfDay(date).getTime();
21
- }
22
-
23
- export function humanizeDurationToNow(duration: Duration): string {
24
- return `Past ${formatDuration(duration)}`;
25
- }
26
-
27
- export interface IntervalToNowFromDurationOptions {
28
- /** When set, if an interval is given in a precise unit, it will be rounded to full days
29
- * (ex: 1 day, will generate intervals from midnight (d-1) to midnight (d))
30
- * Does not apply to units lower than day */
31
- attemptRounding?: boolean;
32
- }
33
-
34
- export function intervalToNowFromDuration(
35
- duration: Duration,
36
- options?: IntervalToNowFromDurationOptions,
37
- ): NormalizedInterval {
38
- const now = new Date();
39
- const interval = {
40
- start: sub(now, duration),
41
- end: now,
42
- };
43
- if (!options?.attemptRounding) return interval;
44
- const units = Object.keys(duration);
45
- if (units.length !== 1) return interval;
46
- if (['hours', 'minutes', 'seconds'].includes(units[0])) return interval;
47
- return {
48
- start: startOfDay(interval.start),
49
- end: endOfDay(interval.end),
50
- };
51
- }
52
-
53
- const DURATION_SHORTCUTS: Record<keyof Duration, string> = {
54
- years: 'y',
55
- months: 'mo',
56
- weeks: 'w',
57
- days: 'd',
58
- hours: 'h',
59
- minutes: 'm',
60
- seconds: 's',
61
- };
62
-
63
- const DURATION_SHORTCUTS_REVERSED: Record<string, keyof Duration> = Object.fromEntries(
64
- Object.entries(DURATION_SHORTCUTS).map(([key, value]) => [value, key as keyof Duration]),
65
- );
66
-
67
- const DURATION_SHORTCUT_REGEX = new RegExp(
68
- `^(\\d+)(${Object.keys(DURATION_SHORTCUTS_REVERSED).join('|')})$`,
69
- );
70
-
71
- export function generateDurationShortcut(duration: Duration): string {
72
- const keys = Object.keys(duration) as (keyof Duration)[];
73
- if (keys.length !== 1) return '';
74
- const key = keys[0];
75
- const value = duration[key];
76
- return `${value}${DURATION_SHORTCUTS[key]}`;
77
- }
78
-
79
- export function parseTextDurationShortcut(text: string): Duration | undefined {
80
- const match = text.match(DURATION_SHORTCUT_REGEX);
81
- if (!match) return;
82
- const [_, value, shortcut] = match;
83
- const unit = DURATION_SHORTCUTS_REVERSED[shortcut];
84
- return {[unit]: Number.parseInt(value, 10)};
85
- }
86
-
87
- const dateSplitterRefex = /[-\u2013]/;
88
-
89
- export function parseTextInterval(text: string): NormalizedInterval | undefined {
90
- const durationShortcut = parseTextDurationShortcut(text);
91
- if (durationShortcut) return intervalToNowFromDuration(durationShortcut);
92
- const textDates = text.split(dateSplitterRefex).map((token) => token.trim());
93
- if (textDates.length !== 2) return;
94
- const start = new Date(textDates[0]);
95
- const end = new Date(textDates[1]);
96
- if (Number.isNaN(start.getTime())) return;
97
- if (Number.isNaN(end.getTime())) return;
98
- return {start, end};
99
- }