@passui/react 0.1.46 → 0.2.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 (429) hide show
  1. package/README.md +29 -109
  2. package/THIRD_PARTY_NOTICES.md +29 -0
  3. package/dist/accordion.d.ts +15 -0
  4. package/dist/accordion.js +93 -0
  5. package/dist/alert-dialog.d.ts +26 -0
  6. package/dist/alert-dialog.js +142 -0
  7. package/dist/alert.d.ts +10 -0
  8. package/dist/alert.js +28 -0
  9. package/dist/{types/src/components/ambient/ambient.d.ts → ambient.d.ts} +4 -4
  10. package/dist/ambient.js +22 -0
  11. package/dist/{types/src/appearance → appearance}/platform.d.ts +3 -3
  12. package/dist/appearance/platform.js +43 -0
  13. package/dist/appearance/theme.d.ts +71 -0
  14. package/dist/appearance/theme.js +236 -0
  15. package/dist/appearance.d.ts +3 -0
  16. package/dist/appearance.js +3 -0
  17. package/dist/{types/src/components/aspect-ratio/aspect-ratio.d.ts → aspect-ratio.d.ts} +4 -4
  18. package/dist/aspect-ratio.js +17 -0
  19. package/dist/avatar.d.ts +5 -0
  20. package/dist/avatar.js +43 -0
  21. package/dist/badge.d.ts +8 -0
  22. package/dist/badge.js +21 -0
  23. package/dist/breadcrumb.d.ts +13 -0
  24. package/dist/breadcrumb.js +63 -0
  25. package/dist/button-group.d.ts +5 -0
  26. package/dist/button-group.js +14 -0
  27. package/dist/button.d.ts +21 -0
  28. package/dist/button.js +58 -0
  29. package/dist/calendar.d.ts +35 -0
  30. package/dist/calendar.js +225 -0
  31. package/dist/card.d.ts +9 -0
  32. package/dist/card.js +54 -0
  33. package/dist/chart.d.ts +30 -0
  34. package/dist/chart.js +226 -0
  35. package/dist/checkbox.d.ts +13 -0
  36. package/dist/checkbox.js +53 -0
  37. package/dist/{types/src/lib/clipboard.d.ts → clipboard.d.ts} +1 -1
  38. package/dist/clipboard.js +16 -0
  39. package/dist/cn.d.ts +2 -0
  40. package/dist/cn.js +10 -0
  41. package/dist/code-block.d.ts +34 -0
  42. package/dist/code-block.js +87 -0
  43. package/dist/collapsible.d.ts +13 -0
  44. package/dist/collapsible.js +49 -0
  45. package/dist/combobox.d.ts +25 -0
  46. package/dist/combobox.js +112 -0
  47. package/dist/command.d.ts +22 -0
  48. package/dist/command.js +129 -0
  49. package/dist/components/toast/toast-store.d.ts +60 -0
  50. package/dist/components/toast/toast-store.js +96 -0
  51. package/dist/{types/src/components → components}/toast/toaster.d.ts +4 -4
  52. package/dist/components/toast/toaster.js +345 -0
  53. package/dist/context-menu.d.ts +2 -0
  54. package/dist/context-menu.js +2 -0
  55. package/dist/conversation.d.ts +48 -0
  56. package/dist/conversation.js +202 -0
  57. package/dist/date-time-picker.d.ts +50 -0
  58. package/dist/date-time-picker.js +235 -0
  59. package/dist/date.d.ts +50 -0
  60. package/dist/date.js +77 -0
  61. package/dist/dialog.d.ts +21 -0
  62. package/dist/dialog.js +113 -0
  63. package/dist/drawer.d.ts +30 -0
  64. package/dist/drawer.js +140 -0
  65. package/dist/dropdown-menu.d.ts +56 -0
  66. package/dist/dropdown-menu.js +295 -0
  67. package/dist/empty.d.ts +11 -0
  68. package/dist/empty.js +51 -0
  69. package/dist/field.d.ts +16 -0
  70. package/dist/field.js +47 -0
  71. package/{src/hooks/scroll/minimize-decision.ts → dist/hooks/scroll/minimize-decision.js} +3 -5
  72. package/dist/{types/src/hooks → hooks}/use-anchored-placement.d.ts +2 -2
  73. package/dist/hooks/use-anchored-placement.js +33 -0
  74. package/dist/{types/src/hooks → hooks}/use-minimize-on-scroll.d.ts +1 -1
  75. package/dist/hooks/use-minimize-on-scroll.js +59 -0
  76. package/dist/{types/src/hooks → hooks}/use-visual-viewport.d.ts +2 -2
  77. package/{src/hooks/use-visual-viewport.ts → dist/hooks/use-visual-viewport.js} +20 -35
  78. package/dist/hooks/viewport/types.d.ts +7 -0
  79. package/dist/hooks/viewport/viewport-metrics.js +13 -0
  80. package/dist/index.d.ts +84 -0
  81. package/dist/index.js +80 -0
  82. package/dist/input-group.d.ts +17 -0
  83. package/dist/input-group.js +55 -0
  84. package/dist/input-otp.d.ts +13 -0
  85. package/dist/input-otp.js +36 -0
  86. package/dist/input.d.ts +4 -0
  87. package/dist/input.js +14 -0
  88. package/dist/item.d.ts +49 -0
  89. package/dist/item.js +142 -0
  90. package/dist/kbd.d.ts +4 -0
  91. package/dist/kbd.js +86 -0
  92. package/dist/label.d.ts +3 -0
  93. package/dist/label.js +12 -0
  94. package/dist/labeled-content.d.ts +24 -0
  95. package/dist/labeled-content.js +41 -0
  96. package/dist/{types/src/lib/language.d.ts → language.d.ts} +1 -1
  97. package/dist/language.js +11 -0
  98. package/dist/layout.d.ts +24 -0
  99. package/dist/layout.js +36 -0
  100. package/dist/{types/src/lib → lib}/anchored-placement.d.ts +27 -27
  101. package/dist/lib/anchored-placement.js +42 -0
  102. package/dist/lib/calendar-month.js +90 -0
  103. package/dist/lib/cx.js +6 -0
  104. package/dist/lib/drawer.math.js +29 -0
  105. package/dist/lib/floating-layers.d.ts +3 -0
  106. package/dist/lib/floating-layers.js +25 -0
  107. package/dist/{types/src/lib → lib}/haptics.d.ts +1 -1
  108. package/dist/lib/haptics.js +13 -0
  109. package/dist/lib/liquid-step.js +33 -0
  110. package/dist/lib/page-scale.js +58 -0
  111. package/dist/lib/portal.js +12 -0
  112. package/dist/lib/presence.js +53 -0
  113. package/dist/lib/range-value.js +25 -0
  114. package/dist/lib/render.d.ts +8 -0
  115. package/dist/lib/render.js +42 -0
  116. package/dist/lib/rolling-digit.js +83 -0
  117. package/dist/{types/src/lib → lib}/screen-edges.d.ts +5 -5
  118. package/dist/lib/screen-edges.js +30 -0
  119. package/dist/lib/swipe-touch-action.js +34 -0
  120. package/dist/lib/visual-viewport.js +27 -0
  121. package/dist/lib/water-drop.js +412 -0
  122. package/dist/lib/wheel.js +125 -0
  123. package/dist/list.d.ts +26 -0
  124. package/dist/list.js +80 -0
  125. package/dist/locales.d.ts +18 -0
  126. package/dist/locales.js +36 -0
  127. package/dist/marker.d.ts +13 -0
  128. package/dist/marker.js +33 -0
  129. package/dist/motion/transitions.d.ts +170 -0
  130. package/dist/motion/transitions.js +156 -0
  131. package/dist/pagination.d.ts +30 -0
  132. package/dist/pagination.js +117 -0
  133. package/dist/popover.d.ts +26 -0
  134. package/dist/popover.js +101 -0
  135. package/dist/progress.d.ts +9 -0
  136. package/dist/progress.js +24 -0
  137. package/dist/questionnaire.d.ts +46 -0
  138. package/dist/questionnaire.js +133 -0
  139. package/dist/radio-group.d.ts +21 -0
  140. package/dist/radio-group.js +67 -0
  141. package/dist/search-field.d.ts +18 -0
  142. package/dist/search-field.js +45 -0
  143. package/dist/segmented-control.d.ts +16 -0
  144. package/dist/segmented-control.js +25 -0
  145. package/dist/select.d.ts +24 -0
  146. package/dist/select.js +107 -0
  147. package/dist/separator.d.ts +9 -0
  148. package/dist/separator.js +17 -0
  149. package/dist/{types/src/lib/shapes.d.ts → shapes.d.ts} +2 -2
  150. package/dist/shapes.js +65 -0
  151. package/dist/sheet.d.ts +24 -0
  152. package/dist/sheet.js +141 -0
  153. package/dist/sidebar.d.ts +32 -0
  154. package/dist/sidebar.js +85 -0
  155. package/dist/skeleton.d.ts +3 -0
  156. package/dist/skeleton.js +13 -0
  157. package/dist/slider.d.ts +9 -0
  158. package/dist/slider.js +42 -0
  159. package/dist/slosh-slider.d.ts +21 -0
  160. package/dist/slosh-slider.js +205 -0
  161. package/dist/spinner.d.ts +3 -0
  162. package/dist/spinner.js +20 -0
  163. package/dist/stat-tile.d.ts +20 -0
  164. package/dist/stat-tile.js +53 -0
  165. package/dist/stepper.d.ts +22 -0
  166. package/dist/stepper.js +98 -0
  167. package/dist/swatch-picker.d.ts +22 -0
  168. package/dist/swatch-picker.js +70 -0
  169. package/dist/switch.d.ts +10 -0
  170. package/dist/switch.js +44 -0
  171. package/dist/tab-bar.d.ts +15 -0
  172. package/dist/tab-bar.js +34 -0
  173. package/dist/{types/src/components/table/table.d.ts → table.d.ts} +3 -3
  174. package/dist/table.js +93 -0
  175. package/dist/tabs.d.ts +32 -0
  176. package/dist/tabs.js +131 -0
  177. package/dist/text.d.ts +25 -0
  178. package/dist/text.js +44 -0
  179. package/dist/textarea.d.ts +3 -0
  180. package/dist/textarea.js +13 -0
  181. package/dist/toast.d.ts +3 -0
  182. package/dist/toast.js +3 -0
  183. package/dist/toggle-group.d.ts +20 -0
  184. package/dist/toggle-group.js +68 -0
  185. package/dist/toggle.d.ts +24 -0
  186. package/dist/toggle.js +37 -0
  187. package/dist/tokens.d.ts +1 -0
  188. package/dist/tooltip.d.ts +21 -0
  189. package/dist/tooltip.js +61 -0
  190. package/dist/trace.d.ts +14 -0
  191. package/dist/trace.js +54 -0
  192. package/dist/{types/src/hooks/use-dismiss.d.ts → use-dismiss.d.ts} +3 -3
  193. package/dist/use-dismiss.js +38 -0
  194. package/dist/{types/src/hooks/use-media-query.d.ts → use-media-query.d.ts} +12 -12
  195. package/dist/use-media-query.js +56 -0
  196. package/dist/use-os.d.ts +12 -0
  197. package/dist/use-os.js +17 -0
  198. package/dist/wake-slider.d.ts +15 -0
  199. package/dist/wake-slider.js +174 -0
  200. package/package.json +122 -253
  201. package/src/styles/code-block.css +4 -0
  202. package/src/styles/globals.css +5 -0
  203. package/src/styles/motion-controls.css +10 -0
  204. package/src/styles/page-scale.css +27 -0
  205. package/src/styles/styles.css +4 -2
  206. package/dist/types/src/appearance/index.d.ts +0 -2
  207. package/dist/types/src/appearance/theme.d.ts +0 -71
  208. package/dist/types/src/components/accordion/accordion.d.ts +0 -23
  209. package/dist/types/src/components/ambient/index.d.ts +0 -1
  210. package/dist/types/src/components/breadcrumb/breadcrumb.d.ts +0 -19
  211. package/dist/types/src/components/button/button-styles.d.ts +0 -12
  212. package/dist/types/src/components/button/button.d.ts +0 -32
  213. package/dist/types/src/components/button/icon-button.d.ts +0 -10
  214. package/dist/types/src/components/button/pending-spinner.d.ts +0 -5
  215. package/dist/types/src/components/button/use-pending-indicator.d.ts +0 -2
  216. package/dist/types/src/components/chip/chip.d.ts +0 -10
  217. package/dist/types/src/components/code-block/code-block.d.ts +0 -13
  218. package/dist/types/src/components/combo-box/combo-box.d.ts +0 -9
  219. package/dist/types/src/components/command/command.d.ts +0 -18
  220. package/dist/types/src/components/compact-date-picker/calendar-month.d.ts +0 -25
  221. package/dist/types/src/components/compact-date-picker/compact-date-picker.d.ts +0 -30
  222. package/dist/types/src/components/compact-time-picker/compact-time-picker.d.ts +0 -29
  223. package/dist/types/src/components/compact-time-picker/time-value.d.ts +0 -18
  224. package/dist/types/src/components/content-unavailable-view/content-unavailable-view.d.ts +0 -12
  225. package/dist/types/src/components/content-view/content-view.d.ts +0 -51
  226. package/dist/types/src/components/content-view/index.d.ts +0 -1
  227. package/dist/types/src/components/context-menu/conceal-menu-source.d.ts +0 -2
  228. package/dist/types/src/components/context-menu/context-menu-host.d.ts +0 -2
  229. package/dist/types/src/components/context-menu/context-menu-store.d.ts +0 -62
  230. package/dist/types/src/components/context-menu/menu-navigation.d.ts +0 -6
  231. package/dist/types/src/components/context-menu/menu-position.d.ts +0 -21
  232. package/dist/types/src/components/context-menu/menu-reveal.d.ts +0 -26
  233. package/dist/types/src/components/context-menu/use-context-menu.d.ts +0 -14
  234. package/dist/types/src/components/conversation/conversation.d.ts +0 -48
  235. package/dist/types/src/components/conversation/index.d.ts +0 -1
  236. package/dist/types/src/components/date-picker/date-picker.d.ts +0 -19
  237. package/dist/types/src/components/date-picker/date-value.d.ts +0 -2
  238. package/dist/types/src/components/dialog/dialog-host.d.ts +0 -6
  239. package/dist/types/src/components/dialog/dialog-store.d.ts +0 -23
  240. package/dist/types/src/components/dialog/dialog.d.ts +0 -33
  241. package/dist/types/src/components/dialog/index.d.ts +0 -1
  242. package/dist/types/src/components/disclosure-group/disclosure-group.d.ts +0 -18
  243. package/dist/types/src/components/divider/divider.d.ts +0 -9
  244. package/dist/types/src/components/inline-disclosure/inline-disclosure.d.ts +0 -15
  245. package/dist/types/src/components/keyboard-shortcut/keyboard-shortcut.d.ts +0 -8
  246. package/dist/types/src/components/labeled-content/labeled-content.d.ts +0 -22
  247. package/dist/types/src/components/locale-switcher/index.d.ts +0 -1
  248. package/dist/types/src/components/locale-switcher/locale-switcher.d.ts +0 -13
  249. package/dist/types/src/components/menu/menu.d.ts +0 -16
  250. package/dist/types/src/components/morph/index.d.ts +0 -2
  251. package/dist/types/src/components/morph/morph.d.ts +0 -32
  252. package/dist/types/src/components/morph/use-morph-disclosure.d.ts +0 -13
  253. package/dist/types/src/components/one-time-code/one-time-code.d.ts +0 -26
  254. package/dist/types/src/components/picker/picker-trigger.d.ts +0 -3
  255. package/dist/types/src/components/picker/picker.d.ts +0 -46
  256. package/dist/types/src/components/popover/anchored-surface.d.ts +0 -17
  257. package/dist/types/src/components/popover/index.d.ts +0 -41
  258. package/dist/types/src/components/popover/popover-content.d.ts +0 -32
  259. package/dist/types/src/components/popover/popover-fit.d.ts +0 -21
  260. package/dist/types/src/components/popover/popover-root.d.ts +0 -22
  261. package/dist/types/src/components/popover/popover-trigger.d.ts +0 -23
  262. package/dist/types/src/components/profile-image/profile-image.d.ts +0 -9
  263. package/dist/types/src/components/progress-view/progress-view.d.ts +0 -13
  264. package/dist/types/src/components/progress-view/use-liquid-progress.d.ts +0 -3
  265. package/dist/types/src/components/radio-group/radio-group.d.ts +0 -20
  266. package/dist/types/src/components/search-field/expanding-search-field.d.ts +0 -5
  267. package/dist/types/src/components/search-field/search-field.d.ts +0 -9
  268. package/dist/types/src/components/search-list/search-list.d.ts +0 -22
  269. package/dist/types/src/components/section/section.d.ts +0 -18
  270. package/dist/types/src/components/secure-field/secure-field.d.ts +0 -4
  271. package/dist/types/src/components/segmented-control/segmented-control.d.ts +0 -25
  272. package/dist/types/src/components/sheet/modal-environment.d.ts +0 -2
  273. package/dist/types/src/components/sheet/sheet-portal.d.ts +0 -5
  274. package/dist/types/src/components/sheet/sheet.d.ts +0 -26
  275. package/dist/types/src/components/sheet/use-sheet-focus.d.ts +0 -3
  276. package/dist/types/src/components/sidebar/sidebar.d.ts +0 -24
  277. package/dist/types/src/components/skeleton/skeleton.d.ts +0 -9
  278. package/dist/types/src/components/slider/slider.d.ts +0 -17
  279. package/dist/types/src/components/slosh-slider/liquid-step.d.ts +0 -6
  280. package/dist/types/src/components/slosh-slider/slosh-slider.d.ts +0 -21
  281. package/dist/types/src/components/stat-tile/index.d.ts +0 -1
  282. package/dist/types/src/components/stat-tile/stat-tile.d.ts +0 -20
  283. package/dist/types/src/components/status-indicator/status-indicator.d.ts +0 -17
  284. package/dist/types/src/components/stepper/rolling-digit.d.ts +0 -11
  285. package/dist/types/src/components/stepper/stepper.d.ts +0 -22
  286. package/dist/types/src/components/swatch-picker/swatch-picker.d.ts +0 -22
  287. package/dist/types/src/components/tab-bar/tab-bar.d.ts +0 -43
  288. package/dist/types/src/components/tab-view/tab-view.d.ts +0 -27
  289. package/dist/types/src/components/text-editor/text-editor.d.ts +0 -9
  290. package/dist/types/src/components/text-field/text-field.d.ts +0 -33
  291. package/dist/types/src/components/toast/toast-store.d.ts +0 -52
  292. package/dist/types/src/components/toggle/toggle.d.ts +0 -22
  293. package/dist/types/src/components/tooltip/tooltip-host.d.ts +0 -7
  294. package/dist/types/src/components/view-controller/index.d.ts +0 -1
  295. package/dist/types/src/components/view-controller/view-controller.d.ts +0 -21
  296. package/dist/types/src/components/wake-slider/wake-slider.d.ts +0 -15
  297. package/dist/types/src/hooks/scroll/minimize-decision.d.ts +0 -2
  298. package/dist/types/src/hooks/use-anchored-disclosure.d.ts +0 -9
  299. package/dist/types/src/hooks/use-floating-dismiss.d.ts +0 -3
  300. package/dist/types/src/hooks/viewport/types.d.ts +0 -19
  301. package/dist/types/src/hooks/viewport/viewport-metrics.d.ts +0 -3
  302. package/dist/types/src/icons/icons.d.ts +0 -616
  303. package/dist/types/src/index.d.ts +0 -73
  304. package/dist/types/src/lib/class-names.d.ts +0 -2
  305. package/dist/types/src/lib/date.d.ts +0 -50
  306. package/dist/types/src/lib/floating-layers.d.ts +0 -8
  307. package/dist/types/src/lib/range-value.d.ts +0 -4
  308. package/dist/types/src/machines/popover.machine.d.ts +0 -30
  309. package/dist/types/src/motion/transitions.d.ts +0 -170
  310. package/src/appearance/index.ts +0 -2
  311. package/src/appearance/platform.tsx +0 -102
  312. package/src/appearance/theme.tsx +0 -467
  313. package/src/components/accordion/accordion.tsx +0 -70
  314. package/src/components/ambient/ambient.tsx +0 -35
  315. package/src/components/ambient/index.ts +0 -1
  316. package/src/components/aspect-ratio/aspect-ratio.tsx +0 -27
  317. package/src/components/breadcrumb/breadcrumb.tsx +0 -73
  318. package/src/components/button/button-styles.ts +0 -49
  319. package/src/components/button/button.tsx +0 -107
  320. package/src/components/button/icon-button.tsx +0 -33
  321. package/src/components/button/pending-spinner.tsx +0 -14
  322. package/src/components/button/use-pending-indicator.ts +0 -22
  323. package/src/components/chip/chip.tsx +0 -45
  324. package/src/components/code-block/code-block.tsx +0 -48
  325. package/src/components/combo-box/combo-box.tsx +0 -13
  326. package/src/components/command/command.tsx +0 -149
  327. package/src/components/compact-date-picker/calendar-month.ts +0 -109
  328. package/src/components/compact-date-picker/compact-date-picker.tsx +0 -337
  329. package/src/components/compact-time-picker/compact-time-picker.tsx +0 -321
  330. package/src/components/compact-time-picker/time-value.ts +0 -58
  331. package/src/components/content-unavailable-view/content-unavailable-view.tsx +0 -78
  332. package/src/components/content-view/content-view.tsx +0 -215
  333. package/src/components/content-view/index.ts +0 -1
  334. package/src/components/context-menu/conceal-menu-source.ts +0 -30
  335. package/src/components/context-menu/context-menu-host.tsx +0 -459
  336. package/src/components/context-menu/context-menu-store.ts +0 -167
  337. package/src/components/context-menu/menu-navigation.ts +0 -36
  338. package/src/components/context-menu/menu-position.ts +0 -38
  339. package/src/components/context-menu/menu-reveal.ts +0 -42
  340. package/src/components/context-menu/use-context-menu.ts +0 -73
  341. package/src/components/conversation/conversation.tsx +0 -309
  342. package/src/components/conversation/index.ts +0 -1
  343. package/src/components/date-picker/date-picker.tsx +0 -106
  344. package/src/components/date-picker/date-value.ts +0 -22
  345. package/src/components/dialog/dialog-host.tsx +0 -119
  346. package/src/components/dialog/dialog-store.ts +0 -66
  347. package/src/components/dialog/dialog.tsx +0 -211
  348. package/src/components/dialog/index.ts +0 -1
  349. package/src/components/disclosure-group/disclosure-group.tsx +0 -108
  350. package/src/components/divider/divider.tsx +0 -33
  351. package/src/components/inline-disclosure/inline-disclosure.tsx +0 -53
  352. package/src/components/keyboard-shortcut/keyboard-shortcut.tsx +0 -32
  353. package/src/components/labeled-content/labeled-content.tsx +0 -84
  354. package/src/components/locale-switcher/index.ts +0 -1
  355. package/src/components/locale-switcher/locale-switcher.tsx +0 -311
  356. package/src/components/menu/menu.tsx +0 -85
  357. package/src/components/morph/index.ts +0 -2
  358. package/src/components/morph/morph.tsx +0 -258
  359. package/src/components/morph/use-morph-disclosure.ts +0 -27
  360. package/src/components/one-time-code/one-time-code.tsx +0 -234
  361. package/src/components/picker/picker-trigger.ts +0 -22
  362. package/src/components/picker/picker.tsx +0 -404
  363. package/src/components/popover/anchored-surface.tsx +0 -264
  364. package/src/components/popover/index.ts +0 -50
  365. package/src/components/popover/popover-content.tsx +0 -334
  366. package/src/components/popover/popover-fit.ts +0 -74
  367. package/src/components/popover/popover-root.tsx +0 -97
  368. package/src/components/popover/popover-trigger.tsx +0 -71
  369. package/src/components/profile-image/profile-image.tsx +0 -96
  370. package/src/components/progress-view/progress-view.tsx +0 -72
  371. package/src/components/progress-view/use-liquid-progress.ts +0 -43
  372. package/src/components/radio-group/radio-group.tsx +0 -86
  373. package/src/components/search-field/expanding-search-field.tsx +0 -197
  374. package/src/components/search-field/search-field.tsx +0 -66
  375. package/src/components/search-list/search-list.tsx +0 -276
  376. package/src/components/section/section.tsx +0 -75
  377. package/src/components/secure-field/secure-field.tsx +0 -8
  378. package/src/components/segmented-control/segmented-control.tsx +0 -157
  379. package/src/components/sheet/modal-environment.ts +0 -82
  380. package/src/components/sheet/sheet-portal.tsx +0 -62
  381. package/src/components/sheet/sheet.tsx +0 -165
  382. package/src/components/sheet/use-sheet-focus.ts +0 -109
  383. package/src/components/sidebar/sidebar.tsx +0 -102
  384. package/src/components/skeleton/skeleton.tsx +0 -38
  385. package/src/components/slider/slider.tsx +0 -134
  386. package/src/components/slosh-slider/liquid-step.ts +0 -43
  387. package/src/components/slosh-slider/slosh-slider.tsx +0 -294
  388. package/src/components/stat-tile/index.ts +0 -1
  389. package/src/components/stat-tile/stat-tile.tsx +0 -90
  390. package/src/components/status-indicator/status-indicator.tsx +0 -54
  391. package/src/components/stepper/rolling-digit.tsx +0 -91
  392. package/src/components/stepper/stepper.tsx +0 -136
  393. package/src/components/swatch-picker/swatch-picker.tsx +0 -138
  394. package/src/components/tab-bar/tab-bar.tsx +0 -182
  395. package/src/components/tab-view/tab-view.tsx +0 -155
  396. package/src/components/table/table.tsx +0 -151
  397. package/src/components/text-editor/text-editor.tsx +0 -42
  398. package/src/components/text-field/text-field.tsx +0 -200
  399. package/src/components/toast/toast-store.ts +0 -164
  400. package/src/components/toast/toaster.tsx +0 -407
  401. package/src/components/toggle/toggle.tsx +0 -320
  402. package/src/components/tooltip/tooltip-host.tsx +0 -178
  403. package/src/components/view-controller/index.ts +0 -1
  404. package/src/components/view-controller/view-controller.tsx +0 -75
  405. package/src/components/wake-slider/wake-slider.tsx +0 -260
  406. package/src/hooks/use-anchored-disclosure.ts +0 -23
  407. package/src/hooks/use-anchored-placement.ts +0 -40
  408. package/src/hooks/use-dismiss.ts +0 -44
  409. package/src/hooks/use-floating-dismiss.ts +0 -30
  410. package/src/hooks/use-media-query.ts +0 -94
  411. package/src/hooks/use-minimize-on-scroll.ts +0 -77
  412. package/src/hooks/viewport/types.ts +0 -19
  413. package/src/hooks/viewport/viewport-metrics.ts +0 -19
  414. package/src/icons/icons.tsx +0 -458
  415. package/src/index.ts +0 -107
  416. package/src/lib/anchored-placement.ts +0 -91
  417. package/src/lib/class-names.ts +0 -21
  418. package/src/lib/clipboard.ts +0 -15
  419. package/src/lib/date.ts +0 -86
  420. package/src/lib/floating-layers.ts +0 -53
  421. package/src/lib/haptics.ts +0 -23
  422. package/src/lib/language.ts +0 -16
  423. package/src/lib/range-value.ts +0 -38
  424. package/src/lib/screen-edges.ts +0 -44
  425. package/src/lib/shapes.ts +0 -59
  426. package/src/machines/popover.machine.ts +0 -51
  427. package/src/motion/transitions.ts +0 -97
  428. package/src/tokens.ts +0 -1
  429. /package/dist/{types/src/tokens.d.ts → tokens.js} +0 -0
@@ -1,467 +0,0 @@
1
- import * as React from "react";
2
- import {
3
- createContext,
4
- memo,
5
- useCallback,
6
- useContext,
7
- useEffect,
8
- useMemo,
9
- useState,
10
- } from "react";
11
- import type {
12
- Dispatch,
13
- PropsWithChildren,
14
- ReactNode,
15
- SetStateAction,
16
- } from "react";
17
-
18
- type ValueObject = {
19
- [themeName: string]: string;
20
- };
21
-
22
- /**
23
- * Props for the useTheme hook
24
- * @author la niina
25
- */
26
- export type UseThemeProps = {
27
- /** List of all available theme names */
28
- themes: Array<string>;
29
- /** Forced theme name for the current page */
30
- forcedTheme?: string | undefined;
31
- /** Update the theme */
32
- setTheme: Dispatch<SetStateAction<string>>;
33
- /** Active theme name */
34
- theme?: string | undefined;
35
- /** If enableSystem is true, returns the System theme preference ("dark" or "light"), regardless what the active theme is */
36
- systemTheme?: SystemTheme | undefined;
37
- };
38
-
39
- export type SystemTheme = "dark" | "light";
40
-
41
- export type Attribute = `data-${string}` | "class";
42
-
43
- export interface ThemeProviderProps extends PropsWithChildren {
44
- /** List of all available theme names */
45
- themes?: Array<string> | undefined;
46
- /** Forced theme name for the current page */
47
- forcedTheme?: string | undefined;
48
- /** Whether to switch between dark and light themes based on prefers-color-scheme */
49
- enableSystem?: boolean | undefined;
50
- /** Disable all CSS transitions when switching themes */
51
- disableTransitionOnChange?: boolean | undefined;
52
- /** Whether to indicate to browsers which color scheme is used (dark or light) for built-in UI like inputs and buttons */
53
- enableColorScheme?: boolean | undefined;
54
- /** Key used to store theme setting in localStorage */
55
- storageKey?: string | undefined;
56
- /** Default theme name (for v0.0.12 and lower the default was light). If `enableSystem` is false, the default theme is light */
57
- defaultTheme?: string | undefined;
58
- /** HTML attribute modified based on the active theme. Accepts `class`, `data-*` (meaning any data attribute, `data-mode`, `data-color`, etc.), or an array which could include both */
59
- attribute?: Attribute | Array<Attribute> | undefined;
60
- /** Mapping of theme name to HTML attribute value. Object where key is the theme name and value is the attribute value */
61
- value?: ValueObject | undefined;
62
- /** Nonce string to pass to the inline script for CSP headers */
63
- nonce?: string | undefined;
64
- }
65
-
66
- const colorSchemes = ["light", "dark"];
67
- const MEDIA = "(prefers-color-scheme: dark)";
68
- const isServer = typeof window === "undefined";
69
- const ThemeContext = createContext<UseThemeProps | undefined>(undefined);
70
- const defaultContext: UseThemeProps = {
71
- setTheme: () => {
72
- /* no-op */
73
- },
74
- themes: [],
75
- };
76
-
77
- /**
78
- * Hook to access the theme context
79
- * @returns {UseThemeProps} theme context
80
- * @example
81
- * const { theme, setTheme } = useTheme()
82
- */
83
- export const useTheme = (): UseThemeProps =>
84
- useContext(ThemeContext) ?? defaultContext;
85
-
86
- /**
87
- * Theme provider component is used to wrap your app &
88
- * provide theme context to all components. It can be used to switch
89
- * between themes.
90
- * @author la niina
91
- * @param {ThemeProviderProps} props
92
- * @returns {ReactNode} children
93
- * @example
94
- * <ThemeProvider attribute="class" disableTransitionOnChange>
95
- * <App />
96
- * </ThemeProvider>
97
- *
98
- * @example
99
- * <ThemeProvider themes={["light", "queer", "dark", "system"]} defaultTheme="light">
100
- * <App />
101
- * </ThemeProvider>
102
- */
103
- export const ThemeProvider = (props: ThemeProviderProps): ReactNode => {
104
- const context = useContext(ThemeContext);
105
- // Ignore nested context providers, just passthrough children
106
- if (context) {
107
- return props.children;
108
- }
109
- return <Theme {...props} />;
110
- };
111
-
112
- const defaultThemes = ["light", "dark"];
113
- const Theme = ({
114
- forcedTheme,
115
- disableTransitionOnChange = false,
116
- enableSystem = true,
117
- enableColorScheme = true,
118
- storageKey = "theme",
119
- themes = defaultThemes,
120
- defaultTheme = enableSystem ? "system" : "light",
121
- attribute = "data-theme",
122
- value,
123
- children,
124
- nonce,
125
- }: ThemeProviderProps) => {
126
- const [theme, setThemeState] = useState(() =>
127
- getTheme(storageKey, defaultTheme),
128
- );
129
-
130
- const applyClassAttribute = useCallback(
131
- (name: string | undefined, attrValues: Array<string>) => {
132
- const d = document.documentElement;
133
- d.classList.remove(...attrValues);
134
- if (name) {
135
- d.classList.add(name);
136
- }
137
- },
138
- [],
139
- );
140
-
141
- const applyDataAttribute = useCallback(
142
- (attr: string, name: string | undefined) => {
143
- const d = document.documentElement;
144
- if (name) {
145
- d.setAttribute(attr, name);
146
- } else {
147
- d.removeAttribute(attr);
148
- }
149
- },
150
- [],
151
- );
152
-
153
- const applyAttributesToDOM = useCallback(
154
- (resolved: string) => {
155
- const attributeList = Array.isArray(attribute) ? attribute : [attribute];
156
- const attrValues = value ? Object.values(value) : themes;
157
- const name = value ? value[resolved] : resolved;
158
-
159
- for (const attr of attributeList) {
160
- if (attr === "class") {
161
- applyClassAttribute(name, attrValues);
162
- } else if (attr.startsWith("data-")) {
163
- applyDataAttribute(attr, name);
164
- }
165
- }
166
- },
167
- [attribute, themes, value, applyClassAttribute, applyDataAttribute],
168
- );
169
-
170
- const applyColorScheme = useCallback(
171
- (resolved: string) => {
172
- if (!enableColorScheme) {
173
- return;
174
- }
175
- const fallback = colorSchemes.includes(defaultTheme)
176
- ? defaultTheme
177
- : null;
178
- const colorScheme = colorSchemes.includes(resolved) ? resolved : fallback;
179
- document.documentElement.style.colorScheme = colorScheme || "";
180
- },
181
- [enableColorScheme, defaultTheme],
182
- );
183
-
184
- // apply selected theme function (light, dark, system)
185
- const applyTheme = useCallback(
186
- (nextTheme: string | undefined) => {
187
- if (!nextTheme) {
188
- return;
189
- }
190
- const resolved =
191
- nextTheme === "system" && enableSystem ? getSystemTheme() : nextTheme;
192
- const enable = disableTransitionOnChange ? disableAnimation() : null;
193
- applyAttributesToDOM(resolved);
194
- applyColorScheme(resolved);
195
- enable?.();
196
- },
197
- [
198
- enableSystem,
199
- disableTransitionOnChange,
200
- applyAttributesToDOM,
201
- applyColorScheme,
202
- ],
203
- );
204
-
205
- // Set theme state and save to local storage
206
- const setTheme = useCallback(
207
- (newValue: SetStateAction<string>) => {
208
- const newTheme =
209
- typeof newValue === "function" ? newValue(theme ?? "") : newValue;
210
- setThemeState(newTheme);
211
-
212
- // Save to storage
213
- try {
214
- localStorage.setItem(storageKey, newTheme);
215
- } catch {
216
- // localStorage might not be available
217
- console.error("Failed to save theme to localStorage");
218
- }
219
- },
220
- [theme, storageKey],
221
- );
222
-
223
- const handleMediaQuery = useCallback(
224
- (_event: MediaQueryListEvent | MediaQueryList) => {
225
- if (theme === "system" && enableSystem && !forcedTheme) {
226
- applyTheme("system");
227
- }
228
- },
229
- [applyTheme, enableSystem, forcedTheme, theme],
230
- );
231
-
232
- // Always listen to System preference
233
- React.useEffect(() => {
234
- if (isServer) {
235
- return;
236
- }
237
-
238
- const media = window.matchMedia(MEDIA);
239
- // Intentionally use deprecated listener methods to support iOS 13 and older browsers
240
- media.addEventListener("change", handleMediaQuery);
241
- handleMediaQuery(media);
242
- return () => media.removeEventListener("change", handleMediaQuery);
243
- }, [handleMediaQuery]);
244
-
245
- // localStorage event handling, allow to sync theme changes between tabs
246
- React.useEffect(() => {
247
- if (isServer) {
248
- return;
249
- }
250
-
251
- const handleStorage = (e: StorageEvent) => {
252
- if (e.key !== storageKey) {
253
- return;
254
- }
255
- // If default theme set, use it if localstorage === null (happens on local storage manual deletion)
256
- const newTheme = e.newValue || defaultTheme;
257
- setTheme(newTheme);
258
- };
259
-
260
- window.addEventListener("storage", handleStorage);
261
- return () => window.removeEventListener("storage", handleStorage);
262
- }, [defaultTheme, setTheme, storageKey]);
263
-
264
- // Whenever theme or forcedTheme changes, apply it
265
- useEffect(() => {
266
- applyTheme(forcedTheme ?? theme);
267
- }, [applyTheme, forcedTheme, theme]);
268
-
269
- const providerValue = useMemo(
270
- () => ({
271
- theme,
272
- setTheme,
273
- forcedTheme,
274
- themes: enableSystem ? [...themes, "system"] : themes,
275
- systemTheme: enableSystem
276
- ? (getSystemTheme() as "dark" | "light" | undefined)
277
- : undefined,
278
- }),
279
- [theme, forcedTheme, enableSystem, themes, setTheme],
280
- );
281
-
282
- return (
283
- <ThemeContext.Provider value={providerValue}>
284
- <ThemeScript
285
- {...{
286
- forcedTheme,
287
- storageKey,
288
- attribute,
289
- enableSystem,
290
- enableColorScheme,
291
- defaultTheme,
292
- value,
293
- themes,
294
- nonce,
295
- }}
296
- />
297
- {children}
298
- </ThemeContext.Provider>
299
- );
300
- };
301
-
302
- const ThemeScript = memo(
303
- ({
304
- forcedTheme,
305
- storageKey,
306
- attribute,
307
- enableSystem,
308
- enableColorScheme,
309
- defaultTheme,
310
- value,
311
- themes,
312
- nonce,
313
- }: Omit<ThemeProviderProps, "children"> & {
314
- defaultTheme: string;
315
- }) => {
316
- const scriptArgs = JSON.stringify([
317
- attribute,
318
- storageKey,
319
- defaultTheme,
320
- forcedTheme,
321
- themes,
322
- value,
323
- enableSystem,
324
- enableColorScheme,
325
- ]).slice(1, -1);
326
-
327
- return (
328
- <script
329
- // Run the theme bootstrap with serialized provider configuration before first paint.
330
- dangerouslySetInnerHTML={{
331
- __html: `(${script.toString()})(${scriptArgs})`,
332
- }}
333
- nonce={nonce}
334
- suppressHydrationWarning
335
- />
336
- );
337
- },
338
- );
339
-
340
- ThemeScript.displayName = "ThemeScript";
341
-
342
- // Helpers
343
- const getTheme = (key: string, fallback?: string) => {
344
- if (isServer) {
345
- return fallback;
346
- }
347
- let theme: string | undefined;
348
- try {
349
- theme = localStorage.getItem(key) || undefined;
350
- } catch {
351
- // localStorage might not be available
352
- }
353
- return theme || fallback;
354
- };
355
-
356
- const disableAnimation = () => {
357
- const css = document.createElement("style");
358
- css.appendChild(
359
- document.createTextNode(
360
- "*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}",
361
- ),
362
- );
363
- document.head.appendChild(css);
364
-
365
- return () => {
366
- // Force restyle
367
- window.getComputedStyle(document.body);
368
- // Wait for next tick before removing
369
- setTimeout(() => {
370
- document.head.removeChild(css);
371
- }, 1);
372
- };
373
- };
374
-
375
- const getSystemTheme = (e?: MediaQueryList | MediaQueryListEvent) => {
376
- if (isServer) {
377
- return "light";
378
- }
379
- const event = e ?? window.matchMedia(MEDIA);
380
- const isDark = event.matches;
381
- const systemTheme = isDark ? "dark" : "light";
382
- return systemTheme;
383
- };
384
-
385
- /*
386
- This file is adapted from next-themes to work with tanstack start.
387
- next-themes can be found at https://github.com/pacocoursey/next-themes under the MIT license.
388
- */
389
-
390
- export const script = (
391
- attribute: Attribute | Array<Attribute>,
392
- storageKey: string,
393
- defaultTheme: string,
394
- forcedTheme: string | undefined,
395
- themes: Array<string>,
396
- value: ValueObject | undefined,
397
- enableSystem: boolean,
398
- enableColorScheme: boolean,
399
- ) => {
400
- const el = document.documentElement;
401
- const systemThemes = ["light", "dark"];
402
- const attributes = Array.isArray(attribute) ? attribute : [attribute];
403
- const attrValues = value ? Object.values(value) : themes;
404
-
405
- function applyClassAttr(name: string | undefined) {
406
- el.classList.remove(...attrValues);
407
- if (name) {
408
- el.classList.add(name);
409
- }
410
- }
411
-
412
- function applyDataAttr(attr: string, name: string | undefined) {
413
- if (name) {
414
- el.setAttribute(attr, name);
415
- } else {
416
- el.removeAttribute(attr);
417
- }
418
- }
419
-
420
- function updateDOM(theme: string) {
421
- const name = value ? value[theme] : theme;
422
-
423
- for (const attr of attributes) {
424
- if (attr === "class") {
425
- applyClassAttr(name);
426
- } else if (attr.startsWith("data-")) {
427
- applyDataAttr(attr, name);
428
- }
429
- }
430
-
431
- setColorScheme(theme);
432
- }
433
-
434
- function setColorScheme(theme: string) {
435
- if (!enableColorScheme) {
436
- return;
437
- }
438
-
439
- const fallback = systemThemes.includes(defaultTheme) ? defaultTheme : null;
440
- const colorScheme = systemThemes.includes(theme) ? theme : fallback;
441
- el.style.colorScheme = colorScheme || "";
442
- }
443
-
444
- function resolveSystemTheme() {
445
- return window.matchMedia("(prefers-color-scheme: dark)").matches
446
- ? "dark"
447
- : "light";
448
- }
449
-
450
- if (forcedTheme) {
451
- const resolvedForcedTheme =
452
- forcedTheme === "system" && enableSystem
453
- ? resolveSystemTheme()
454
- : forcedTheme;
455
- updateDOM(resolvedForcedTheme);
456
- } else {
457
- try {
458
- const themeName = localStorage.getItem(storageKey) || defaultTheme;
459
- const isSystem = enableSystem && themeName === "system";
460
- const theme = isSystem ? resolveSystemTheme() : themeName;
461
- updateDOM(theme);
462
- } catch {
463
- // localStorage might not be available
464
- updateDOM(defaultTheme);
465
- }
466
- }
467
- };
@@ -1,70 +0,0 @@
1
- import type { ReactNode } from "react";
2
- import {
3
- DisclosureGroup,
4
- type DisclosureGroupSize,
5
- } from "../disclosure-group/disclosure-group";
6
- import { cn } from "../../lib/class-names";
7
-
8
- export type AccordionSize = DisclosureGroupSize;
9
-
10
- const containerRadius: Record<AccordionSize, string> = {
11
- sm: "rounded-xl",
12
- md: "rounded-2xl",
13
- lg: "rounded-3xl",
14
- };
15
-
16
- export interface AccordionItem {
17
- /** Stable value used to identify the expanded item. */
18
- value: string;
19
- title: string;
20
- content: ReactNode;
21
- description?: string;
22
- disabled?: boolean;
23
- }
24
-
25
- export interface AccordionProps {
26
- items: readonly AccordionItem[];
27
- /** The expanded item, or `null` when all items are closed. */
28
- value: string | null;
29
- /** Selecting the open item reports `null`, so every item can collapse. */
30
- onValueChange: (value: string | null) => void;
31
- /** Density passed through to each DisclosureGroup. @default "md" */
32
- size?: AccordionSize;
33
- className?: string;
34
- }
35
-
36
- /** A single-open, collapsible accordion with labelled animated content regions. */
37
- export function Accordion({
38
- items,
39
- value,
40
- onValueChange,
41
- size = "md",
42
- className,
43
- }: AccordionProps) {
44
- return (
45
- <div
46
- className={cn(
47
- "flex w-full min-w-0 flex-col overflow-hidden",
48
- containerRadius[size],
49
- "border-separator/60 bg-elevated border",
50
- className,
51
- )}
52
- >
53
- {items.map((item, index) => (
54
- <DisclosureGroup
55
- key={item.value}
56
- label={item.title}
57
- description={item.description}
58
- open={value === item.value}
59
- disabled={item.disabled}
60
- size={size}
61
- triggerClassName="rounded-none"
62
- onOpenChange={(open) => onValueChange(open ? item.value : null)}
63
- className={cn(index > 0 && "border-separator/60 border-t")}
64
- >
65
- {item.content}
66
- </DisclosureGroup>
67
- ))}
68
- </div>
69
- );
70
- }
@@ -1,35 +0,0 @@
1
- import type { ComponentPropsWithoutRef } from "react";
2
- import { cn } from "../../lib/class-names";
3
-
4
- type AmbientProps = ComponentPropsWithoutRef<"section"> & {
5
- /** The image whose colors glow behind the content. */
6
- src?: string | null;
7
- };
8
-
9
- /**
10
- * Content with its image's colors glowing softly behind it, no card or
11
- * edge: a blown-up, blurred copy of the image masked into a circle that
12
- * fades into the page, the way Apple lets a photo light its surroundings.
13
- */
14
- export function Ambient({ src, className, children, ...props }: AmbientProps) {
15
- return (
16
- <section className={cn("relative isolate", className)} {...props}>
17
- {src && (
18
- <img
19
- aria-hidden
20
- src={src}
21
- alt=""
22
- className={cn(
23
- "pointer-events-none absolute top-[38%] left-1/2 -z-10 size-[min(32rem,100vw)] -translate-x-1/2 -translate-y-1/2",
24
- "rounded-full object-cover opacity-20 blur-3xl",
25
- // on a dark page the same light blooms far wider, so it shrinks and dims
26
- "dark:size-[min(20rem,80vw)] dark:opacity-15 dark:blur-2xl",
27
- "mask-[radial-gradient(closest-side,black_35%,transparent)]",
28
- "animate-in fade-in-0 zoom-in-90 duration-1000",
29
- )}
30
- />
31
- )}
32
- {children}
33
- </section>
34
- );
35
- }
@@ -1 +0,0 @@
1
- export * from "./ambient";
@@ -1,27 +0,0 @@
1
- import type { HTMLAttributes } from "react";
2
- import { cn } from "../../lib/class-names";
3
-
4
- export interface AspectRatioProps extends HTMLAttributes<HTMLDivElement> {
5
- /** Width divided by height. @default 1.3333333333333333 */
6
- ratio?: number;
7
- }
8
-
9
- /** A crop frame: size its geometry, while images cover without distortion. */
10
- export function AspectRatio({
11
- ratio = 4 / 3,
12
- className,
13
- style,
14
- ...props
15
- }: AspectRatioProps) {
16
- const aspect = Number.isFinite(ratio) && ratio > 0 ? ratio : 4 / 3;
17
- return (
18
- <div
19
- {...props}
20
- className={cn(
21
- "relative w-full overflow-hidden [&>img]:size-full [&>img]:object-cover [&>video]:size-full [&>video]:object-cover",
22
- className,
23
- )}
24
- style={{ aspectRatio: aspect, ...style }}
25
- />
26
- );
27
- }
@@ -1,73 +0,0 @@
1
- import type { ReactNode } from "react";
2
- import { cn } from "../../lib/class-names";
3
-
4
- export type BreadcrumbSize = "sm" | "md";
5
-
6
- const sizes: Record<BreadcrumbSize, string> = {
7
- sm: "text-caption",
8
- md: "text-footnote",
9
- };
10
-
11
- export interface BreadcrumbItem {
12
- label: string;
13
- href?: string;
14
- }
15
- export interface BreadcrumbProps {
16
- label: string;
17
- items: readonly BreadcrumbItem[];
18
- className?: string;
19
- /** Integrate a client router without nesting interactive elements. */
20
- renderLink?: (item: BreadcrumbItem & { href: string }) => ReactNode;
21
- /** Text scale. @default "md" */
22
- size?: BreadcrumbSize;
23
- }
24
- /** Ancestors stay links; the final item identifies the current page. */
25
- export function Breadcrumb({
26
- label,
27
- items,
28
- className,
29
- renderLink,
30
- size = "md",
31
- }: BreadcrumbProps) {
32
- return (
33
- <nav aria-label={label} className={cn("not-typeset", className)}>
34
- <ol
35
- className={cn(
36
- "text-label-secondary m-0 flex list-none flex-wrap items-center gap-x-2 gap-y-1 p-0",
37
- sizes[size],
38
- )}
39
- >
40
- {items.map((item, index) => (
41
- <li
42
- key={item.label}
43
- className="m-0 flex min-w-0 items-center gap-2 p-0"
44
- >
45
- {index > 0 && (
46
- <span aria-hidden="true" className="text-label-tertiary">
47
- /
48
- </span>
49
- )}
50
- {index === items.length - 1 ? (
51
- <span aria-current="page" className="text-label font-medium">
52
- {item.label}
53
- </span>
54
- ) : item.href ? (
55
- (renderLink?.({ ...item, href: item.href }) ?? (
56
- <a
57
- href={item.href}
58
- className={cn(
59
- "hover:text-label focus-visible:outline-accent-text rounded-sm focus-visible:outline-2",
60
- )}
61
- >
62
- {item.label}
63
- </a>
64
- ))
65
- ) : (
66
- <span>{item.label}</span>
67
- )}
68
- </li>
69
- ))}
70
- </ol>
71
- </nav>
72
- );
73
- }