@passui/react 0.1.17 → 0.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (366) hide show
  1. package/README.md +102 -1
  2. package/dist/types/src/appearance/index.d.ts +2 -0
  3. package/dist/types/src/appearance/platform.d.ts +9 -0
  4. package/dist/types/src/appearance/theme.d.ts +71 -0
  5. package/dist/types/src/components/ambient/ambient.d.ts +12 -0
  6. package/dist/types/src/components/ambient/index.d.ts +1 -0
  7. package/dist/types/src/components/button/button-styles.d.ts +12 -0
  8. package/dist/types/src/components/button/button.d.ts +30 -0
  9. package/dist/types/src/components/button/icon-button.d.ts +10 -0
  10. package/dist/types/src/components/button/pending-spinner.d.ts +5 -0
  11. package/dist/types/src/components/button/use-pending-indicator.d.ts +2 -0
  12. package/dist/types/src/components/chip/chip.d.ts +7 -0
  13. package/dist/types/src/components/compact-date-picker/calendar-month.d.ts +25 -0
  14. package/dist/types/src/components/compact-date-picker/compact-date-picker.d.ts +27 -0
  15. package/dist/types/src/components/compact-time-picker/compact-time-picker.d.ts +26 -0
  16. package/dist/types/src/components/compact-time-picker/time-value.d.ts +18 -0
  17. package/dist/types/src/components/content-view/content-view.d.ts +48 -0
  18. package/dist/types/src/components/content-view/index.d.ts +1 -0
  19. package/dist/types/src/components/context-menu/conceal-menu-source.d.ts +2 -0
  20. package/dist/types/src/components/context-menu/context-menu-host.d.ts +2 -0
  21. package/dist/types/src/components/context-menu/context-menu-store.d.ts +57 -0
  22. package/dist/types/src/components/context-menu/menu-navigation.d.ts +6 -0
  23. package/dist/types/src/components/context-menu/menu-position.d.ts +21 -0
  24. package/dist/types/src/components/context-menu/menu-reveal.d.ts +22 -0
  25. package/dist/types/src/components/context-menu/use-context-menu.d.ts +14 -0
  26. package/dist/types/src/components/conversation/conversation.d.ts +43 -0
  27. package/dist/types/src/components/conversation/index.d.ts +1 -0
  28. package/dist/types/src/components/date-picker/date-picker.d.ts +16 -0
  29. package/dist/types/src/components/date-picker/date-value.d.ts +2 -0
  30. package/dist/types/src/components/dialog/dialog-host.d.ts +6 -0
  31. package/dist/types/src/components/dialog/dialog-store.d.ts +21 -0
  32. package/dist/types/src/components/dialog/dialog.d.ts +30 -0
  33. package/dist/types/src/components/dialog/index.d.ts +1 -0
  34. package/dist/types/src/components/disclosure-group/disclosure-group.d.ts +13 -0
  35. package/dist/types/src/components/divider/divider.d.ts +9 -0
  36. package/dist/types/src/components/inline-disclosure/inline-disclosure.d.ts +15 -0
  37. package/dist/types/src/components/labeled-content/labeled-content.d.ts +19 -0
  38. package/dist/types/src/components/locale-switcher/index.d.ts +1 -0
  39. package/dist/types/src/components/locale-switcher/locale-switcher.d.ts +10 -0
  40. package/dist/types/src/components/menu/menu.d.ts +16 -0
  41. package/dist/types/src/components/picker/picker-trigger.d.ts +2 -0
  42. package/dist/types/src/components/picker/picker.d.ts +37 -0
  43. package/dist/types/src/components/popover/popover-fit.d.ts +21 -0
  44. package/dist/types/src/components/popover/popover.d.ts +14 -0
  45. package/dist/types/src/components/profile-image/profile-image.d.ts +4 -0
  46. package/dist/types/src/components/progress-view/progress-view.d.ts +13 -0
  47. package/dist/types/src/components/search-field/search-field.d.ts +2 -0
  48. package/dist/types/src/components/search-list/search-list.d.ts +19 -0
  49. package/dist/types/src/components/section/section.d.ts +15 -0
  50. package/dist/types/src/components/secure-field/secure-field.d.ts +4 -0
  51. package/dist/types/src/components/segmented-control/segmented-control.d.ts +20 -0
  52. package/dist/types/src/components/sheet/modal-environment.d.ts +2 -0
  53. package/dist/types/src/components/sheet/sheet-portal.d.ts +5 -0
  54. package/dist/types/src/components/sheet/sheet.d.ts +21 -0
  55. package/dist/types/src/components/sheet/use-sheet-focus.d.ts +3 -0
  56. package/dist/types/src/components/sidebar/sidebar.d.ts +18 -0
  57. package/dist/types/src/components/slider/slider.d.ts +14 -0
  58. package/dist/types/src/components/stat-tile/index.d.ts +1 -0
  59. package/dist/types/src/components/stat-tile/stat-tile.d.ts +15 -0
  60. package/dist/types/src/components/status-indicator/status-indicator.d.ts +14 -0
  61. package/dist/types/src/components/stepper/stepper.d.ts +19 -0
  62. package/dist/types/src/components/swatch-picker/swatch-picker.d.ts +17 -0
  63. package/dist/types/src/components/tab-bar/tab-bar.d.ts +40 -0
  64. package/dist/types/src/components/tab-view/tab-view.d.ts +24 -0
  65. package/dist/types/src/components/table/table.d.ts +10 -0
  66. package/dist/types/src/components/text-editor/text-editor.d.ts +2 -0
  67. package/dist/types/src/components/text-field/text-field.d.ts +18 -0
  68. package/dist/types/src/components/toast/toast-store.d.ts +47 -0
  69. package/dist/types/src/components/toast/toaster.d.ts +10 -0
  70. package/dist/types/src/components/toggle/toggle.d.ts +17 -0
  71. package/dist/types/src/components/tooltip/tooltip-host.d.ts +6 -0
  72. package/dist/types/src/components/view-controller/index.d.ts +1 -0
  73. package/dist/types/src/components/view-controller/view-controller.d.ts +21 -0
  74. package/dist/types/src/hooks/scroll/minimize-decision.d.ts +2 -0
  75. package/dist/types/src/hooks/use-anchored-placement.d.ts +7 -0
  76. package/dist/types/src/hooks/use-dismiss.d.ts +9 -0
  77. package/dist/types/src/hooks/use-floating-dismiss.d.ts +3 -0
  78. package/dist/types/src/hooks/use-media-query.d.ts +21 -0
  79. package/dist/types/src/hooks/use-minimize-on-scroll.d.ts +6 -0
  80. package/dist/types/src/hooks/use-visual-viewport.d.ts +4 -0
  81. package/dist/types/src/hooks/viewport/types.d.ts +19 -0
  82. package/dist/types/src/hooks/viewport/viewport-metrics.d.ts +3 -0
  83. package/dist/types/src/icons/icons.d.ts +612 -0
  84. package/dist/types/src/index.d.ts +58 -0
  85. package/dist/types/src/lib/anchored-placement.d.ts +39 -0
  86. package/dist/types/src/lib/class-names.d.ts +2 -0
  87. package/dist/types/src/lib/clipboard.d.ts +6 -0
  88. package/dist/types/src/lib/date.d.ts +50 -0
  89. package/dist/types/src/lib/floating-layers.d.ts +8 -0
  90. package/dist/types/src/lib/haptics.d.ts +8 -0
  91. package/dist/types/src/lib/language.d.ts +4 -0
  92. package/dist/types/src/lib/range-value.d.ts +4 -0
  93. package/dist/types/src/lib/screen-edges.d.ts +12 -0
  94. package/dist/types/src/lib/shapes.d.ts +17 -0
  95. package/dist/types/src/motion/transitions.d.ts +97 -0
  96. package/dist/types/src/tokens.d.ts +1 -0
  97. package/package.json +192 -40
  98. package/src/appearance/platform.tsx +10 -47
  99. package/src/appearance/theme.tsx +42 -142
  100. package/src/components/ambient/ambient.tsx +2 -10
  101. package/src/components/button/button-styles.ts +13 -31
  102. package/src/components/button/button.tsx +19 -14
  103. package/src/components/button/icon-button.tsx +14 -56
  104. package/src/components/button/use-pending-indicator.ts +2 -7
  105. package/src/components/chip/chip.tsx +8 -13
  106. package/src/components/compact-date-picker/calendar-month.ts +13 -57
  107. package/src/components/compact-date-picker/compact-date-picker.tsx +44 -123
  108. package/src/components/compact-time-picker/compact-time-picker.tsx +46 -130
  109. package/src/components/compact-time-picker/time-value.ts +4 -16
  110. package/src/components/content-view/content-view.tsx +13 -56
  111. package/src/components/context-menu/conceal-menu-source.ts +1 -4
  112. package/src/components/context-menu/context-menu-host.tsx +125 -195
  113. package/src/components/context-menu/context-menu-store.ts +3 -11
  114. package/src/components/context-menu/menu-navigation.ts +29 -0
  115. package/src/components/context-menu/menu-position.ts +6 -27
  116. package/src/components/context-menu/menu-reveal.ts +13 -54
  117. package/src/components/context-menu/use-context-menu.ts +6 -30
  118. package/src/components/conversation/conversation.tsx +26 -72
  119. package/src/components/date-picker/date-picker.tsx +8 -37
  120. package/src/components/date-picker/date-value.ts +5 -30
  121. package/src/components/dialog/dialog-host.tsx +31 -76
  122. package/src/components/dialog/dialog-store.ts +1 -3
  123. package/src/components/dialog/dialog.tsx +23 -80
  124. package/src/components/disclosure-group/disclosure-group.tsx +70 -0
  125. package/src/components/divider/divider.tsx +31 -0
  126. package/src/components/inline-disclosure/inline-disclosure.tsx +49 -0
  127. package/src/components/labeled-content/labeled-content.tsx +24 -18
  128. package/src/components/locale-switcher/locale-switcher.tsx +20 -70
  129. package/src/components/menu/menu.tsx +68 -0
  130. package/src/components/picker/picker-trigger.ts +10 -0
  131. package/src/components/picker/picker.tsx +72 -203
  132. package/src/components/popover/popover-fit.ts +69 -0
  133. package/src/components/popover/popover.tsx +94 -77
  134. package/src/components/profile-image/profile-image.tsx +6 -28
  135. package/src/components/progress-view/progress-view.tsx +65 -0
  136. package/src/components/search-field/search-field.tsx +27 -25
  137. package/src/components/search-list/search-list.tsx +43 -69
  138. package/src/components/section/section.tsx +18 -17
  139. package/src/components/secure-field/secure-field.tsx +5 -7
  140. package/src/components/segmented-control/segmented-control.tsx +20 -29
  141. package/src/components/sheet/modal-environment.ts +16 -54
  142. package/src/components/sheet/sheet-portal.tsx +10 -42
  143. package/src/components/sheet/sheet.tsx +17 -25
  144. package/src/components/sheet/use-sheet-focus.ts +15 -51
  145. package/src/components/sidebar/sidebar.tsx +27 -30
  146. package/src/components/slider/slider.tsx +76 -0
  147. package/src/components/stat-tile/stat-tile.tsx +9 -30
  148. package/src/components/status-indicator/status-indicator.tsx +12 -19
  149. package/src/components/stepper/stepper.tsx +80 -0
  150. package/src/components/swatch-picker/swatch-picker.tsx +19 -15
  151. package/src/components/tab-bar/tab-bar.tsx +59 -59
  152. package/src/components/tab-view/tab-view.tsx +52 -57
  153. package/src/components/table/table.tsx +14 -62
  154. package/src/components/text-editor/text-editor.tsx +2 -12
  155. package/src/components/text-field/text-field.tsx +11 -40
  156. package/src/components/toast/toast-store.ts +9 -30
  157. package/src/components/toast/toaster.tsx +90 -104
  158. package/src/components/toggle/toggle.tsx +28 -24
  159. package/src/components/tooltip/tooltip-host.tsx +70 -67
  160. package/src/components/view-controller/view-controller.tsx +4 -21
  161. package/src/hooks/scroll/minimize-decision.ts +1 -5
  162. package/src/hooks/use-anchored-placement.ts +4 -14
  163. package/src/hooks/use-dismiss.ts +5 -23
  164. package/src/hooks/use-floating-dismiss.ts +28 -0
  165. package/src/hooks/use-media-query.ts +12 -31
  166. package/src/hooks/use-minimize-on-scroll.ts +10 -34
  167. package/src/hooks/use-visual-viewport.ts +5 -14
  168. package/src/hooks/viewport/viewport-metrics.ts +4 -16
  169. package/src/icons/icons.tsx +167 -121
  170. package/src/index.ts +9 -1
  171. package/src/lib/anchored-placement.ts +5 -15
  172. package/src/lib/class-names.ts +1 -2
  173. package/src/lib/clipboard.ts +14 -0
  174. package/src/lib/date.ts +4 -15
  175. package/src/lib/floating-layers.ts +18 -8
  176. package/src/lib/haptics.ts +1 -3
  177. package/src/lib/language.ts +2 -7
  178. package/src/lib/range-value.ts +32 -0
  179. package/src/lib/screen-edges.ts +2 -6
  180. package/src/lib/shapes.ts +5 -20
  181. package/src/motion/transitions.ts +18 -12
  182. package/src/components/ambient/ambient.docs.tsx +0 -68
  183. package/src/components/ambient/examples/ambient-images.tsx +0 -30
  184. package/src/components/ambient/examples/ambient-now-playing.tsx +0 -55
  185. package/src/components/ambient/examples/ambient-showcase.tsx +0 -33
  186. package/src/components/ambient/examples/ambient-usage.tsx +0 -19
  187. package/src/components/button/button.docs.tsx +0 -116
  188. package/src/components/button/examples/button-disabled.tsx +0 -19
  189. package/src/components/button/examples/button-icon.tsx +0 -39
  190. package/src/components/button/examples/button-link.tsx +0 -12
  191. package/src/components/button/examples/button-pending.tsx +0 -27
  192. package/src/components/button/examples/button-showcase.tsx +0 -115
  193. package/src/components/button/examples/button-sizes.tsx +0 -12
  194. package/src/components/button/examples/button-usage.tsx +0 -12
  195. package/src/components/button/examples/button-variants.tsx +0 -15
  196. package/src/components/button/examples/button-with-icon.tsx +0 -32
  197. package/src/components/button/examples/icon-button-player.tsx +0 -38
  198. package/src/components/button/examples/icon-button-showcase.tsx +0 -83
  199. package/src/components/button/examples/icon-button-usage.tsx +0 -11
  200. package/src/components/button/examples/icon-button-variants.tsx +0 -39
  201. package/src/components/button/icon-button.docs.tsx +0 -68
  202. package/src/components/chip/chip.docs.tsx +0 -37
  203. package/src/components/chip/examples/chip-in-rows.tsx +0 -19
  204. package/src/components/chip/examples/chip-showcase.tsx +0 -51
  205. package/src/components/chip/examples/chip-tones.tsx +0 -13
  206. package/src/components/chip/examples/chip-usage.tsx +0 -5
  207. package/src/components/compact-date-picker/compact-date-picker.docs.tsx +0 -81
  208. package/src/components/compact-date-picker/examples/compact-date-picker-showcase.tsx +0 -35
  209. package/src/components/compact-date-picker/examples/compact-date-picker-usage.tsx +0 -22
  210. package/src/components/compact-time-picker/compact-time-picker.docs.tsx +0 -80
  211. package/src/components/compact-time-picker/examples/compact-time-picker-showcase.tsx +0 -31
  212. package/src/components/compact-time-picker/examples/compact-time-picker-usage.tsx +0 -21
  213. package/src/components/content-view/content-view.docs.tsx +0 -61
  214. package/src/components/content-view/examples/content-view-header-action.tsx +0 -33
  215. package/src/components/content-view/examples/content-view-showcase.tsx +0 -65
  216. package/src/components/content-view/examples/content-view-stats.tsx +0 -35
  217. package/src/components/content-view/examples/content-view-usage.tsx +0 -14
  218. package/src/components/context-menu/context-menu.docs.tsx +0 -92
  219. package/src/components/context-menu/examples/context-menu-checked.tsx +0 -37
  220. package/src/components/context-menu/examples/context-menu-list.tsx +0 -85
  221. package/src/components/context-menu/examples/context-menu-showcase.tsx +0 -56
  222. package/src/components/context-menu/examples/context-menu-toolbar.tsx +0 -63
  223. package/src/components/context-menu/examples/context-menu-usage.tsx +0 -24
  224. package/src/components/conversation/conversation.docs.tsx +0 -88
  225. package/src/components/conversation/examples/conversation-composer.tsx +0 -36
  226. package/src/components/conversation/examples/conversation-days.tsx +0 -48
  227. package/src/components/conversation/examples/conversation-showcase.tsx +0 -71
  228. package/src/components/conversation/examples/conversation-usage.tsx +0 -28
  229. package/src/components/date-picker/date-picker.docs.tsx +0 -88
  230. package/src/components/date-picker/examples/date-picker-locales.tsx +0 -41
  231. package/src/components/date-picker/examples/date-picker-past-only.tsx +0 -29
  232. package/src/components/date-picker/examples/date-picker-showcase.tsx +0 -49
  233. package/src/components/date-picker/examples/date-picker-usage.tsx +0 -22
  234. package/src/components/dialog/dialog.docs.tsx +0 -114
  235. package/src/components/dialog/examples/dialog-confirm.tsx +0 -24
  236. package/src/components/dialog/examples/dialog-form.tsx +0 -46
  237. package/src/components/dialog/examples/dialog-inline.tsx +0 -48
  238. package/src/components/dialog/examples/dialog-showcase.tsx +0 -53
  239. package/src/components/dialog/examples/dialog-usage.tsx +0 -31
  240. package/src/components/labeled-content/examples/labeled-content-descriptions.tsx +0 -37
  241. package/src/components/labeled-content/examples/labeled-content-showcase.tsx +0 -54
  242. package/src/components/labeled-content/examples/labeled-content-usage.tsx +0 -22
  243. package/src/components/labeled-content/examples/labeled-content-values.tsx +0 -26
  244. package/src/components/labeled-content/examples/labeled-content-wide.tsx +0 -46
  245. package/src/components/labeled-content/labeled-content.docs.tsx +0 -69
  246. package/src/components/locale-switcher/examples/locale-switcher-native-names.tsx +0 -30
  247. package/src/components/locale-switcher/examples/locale-switcher-showcase.tsx +0 -46
  248. package/src/components/locale-switcher/examples/locale-switcher-translated-page.tsx +0 -35
  249. package/src/components/locale-switcher/examples/locale-switcher-usage.tsx +0 -20
  250. package/src/components/locale-switcher/locale-switcher.docs.tsx +0 -91
  251. package/src/components/picker/examples/picker-details.tsx +0 -44
  252. package/src/components/picker/examples/picker-searchable.tsx +0 -48
  253. package/src/components/picker/examples/picker-showcase.tsx +0 -66
  254. package/src/components/picker/examples/picker-usage.tsx +0 -20
  255. package/src/components/picker/picker.docs.tsx +0 -68
  256. package/src/components/popover/examples/popover-help.tsx +0 -57
  257. package/src/components/popover/examples/popover-menu.tsx +0 -51
  258. package/src/components/popover/examples/popover-showcase.tsx +0 -61
  259. package/src/components/popover/examples/popover-usage.tsx +0 -31
  260. package/src/components/popover/popover.docs.tsx +0 -84
  261. package/src/components/profile-image/examples/profile-image-fallbacks.tsx +0 -29
  262. package/src/components/profile-image/examples/profile-image-group.tsx +0 -34
  263. package/src/components/profile-image/examples/profile-image-showcase.tsx +0 -30
  264. package/src/components/profile-image/examples/profile-image-usage.tsx +0 -14
  265. package/src/components/profile-image/profile-image.docs.tsx +0 -81
  266. package/src/components/search-field/examples/search-field-filter.tsx +0 -53
  267. package/src/components/search-field/examples/search-field-showcase.tsx +0 -56
  268. package/src/components/search-field/examples/search-field-toolbar.tsx +0 -27
  269. package/src/components/search-field/examples/search-field-usage.tsx +0 -18
  270. package/src/components/search-field/search-field.docs.tsx +0 -58
  271. package/src/components/search-list/examples/search-list-dropdown.tsx +0 -53
  272. package/src/components/search-list/examples/search-list-groups.tsx +0 -64
  273. package/src/components/search-list/examples/search-list-showcase.tsx +0 -67
  274. package/src/components/search-list/examples/search-list-usage.tsx +0 -27
  275. package/src/components/search-list/search-list.docs.tsx +0 -87
  276. package/src/components/section/examples/section-actions.tsx +0 -35
  277. package/src/components/section/examples/section-groups.tsx +0 -41
  278. package/src/components/section/examples/section-showcase.tsx +0 -63
  279. package/src/components/section/examples/section-usage.tsx +0 -19
  280. package/src/components/section/section.docs.tsx +0 -51
  281. package/src/components/secure-field/examples/secure-field-new-password.tsx +0 -56
  282. package/src/components/secure-field/examples/secure-field-reveal.tsx +0 -20
  283. package/src/components/secure-field/examples/secure-field-showcase.tsx +0 -62
  284. package/src/components/secure-field/examples/secure-field-usage.tsx +0 -19
  285. package/src/components/secure-field/secure-field.docs.tsx +0 -72
  286. package/src/components/segmented-control/examples/segmented-control-overflow.tsx +0 -28
  287. package/src/components/segmented-control/examples/segmented-control-showcase.tsx +0 -59
  288. package/src/components/segmented-control/examples/segmented-control-usage.tsx +0 -20
  289. package/src/components/segmented-control/examples/segmented-control-views.tsx +0 -32
  290. package/src/components/segmented-control/segmented-control.docs.tsx +0 -61
  291. package/src/components/sheet/examples/sheet-choices.tsx +0 -58
  292. package/src/components/sheet/examples/sheet-share.tsx +0 -51
  293. package/src/components/sheet/examples/sheet-showcase.tsx +0 -74
  294. package/src/components/sheet/examples/sheet-usage.tsx +0 -32
  295. package/src/components/sheet/sheet.docs.tsx +0 -75
  296. package/src/components/sidebar/examples/sidebar-groups.tsx +0 -133
  297. package/src/components/sidebar/examples/sidebar-showcase.tsx +0 -123
  298. package/src/components/sidebar/examples/sidebar-unread.tsx +0 -66
  299. package/src/components/sidebar/examples/sidebar-usage.tsx +0 -52
  300. package/src/components/sidebar/sidebar.docs.tsx +0 -135
  301. package/src/components/stat-tile/examples/stat-tile-filters.tsx +0 -32
  302. package/src/components/stat-tile/examples/stat-tile-grid.tsx +0 -21
  303. package/src/components/stat-tile/examples/stat-tile-showcase.tsx +0 -52
  304. package/src/components/stat-tile/examples/stat-tile-usage.tsx +0 -13
  305. package/src/components/stat-tile/stat-tile.docs.tsx +0 -60
  306. package/src/components/status-indicator/examples/status-indicator-live.tsx +0 -34
  307. package/src/components/status-indicator/examples/status-indicator-showcase.tsx +0 -39
  308. package/src/components/status-indicator/examples/status-indicator-states.tsx +0 -17
  309. package/src/components/status-indicator/examples/status-indicator-usage.tsx +0 -9
  310. package/src/components/status-indicator/status-indicator.docs.tsx +0 -43
  311. package/src/components/swatch-picker/examples/swatch-picker-accents.tsx +0 -42
  312. package/src/components/swatch-picker/examples/swatch-picker-labels.tsx +0 -45
  313. package/src/components/swatch-picker/examples/swatch-picker-showcase.tsx +0 -70
  314. package/src/components/swatch-picker/examples/swatch-picker-usage.tsx +0 -39
  315. package/src/components/swatch-picker/swatch-picker.docs.tsx +0 -60
  316. package/src/components/tab-bar/examples/tab-bar-five-tabs.tsx +0 -66
  317. package/src/components/tab-bar/examples/tab-bar-minimize.tsx +0 -71
  318. package/src/components/tab-bar/examples/tab-bar-showcase.tsx +0 -82
  319. package/src/components/tab-bar/examples/tab-bar-usage.tsx +0 -54
  320. package/src/components/tab-bar/tab-bar.docs.tsx +0 -136
  321. package/src/components/tab-view/examples/tab-view-keyboard.tsx +0 -39
  322. package/src/components/tab-view/examples/tab-view-settings.tsx +0 -56
  323. package/src/components/tab-view/examples/tab-view-showcase.tsx +0 -53
  324. package/src/components/tab-view/examples/tab-view-usage.tsx +0 -23
  325. package/src/components/tab-view/tab-view.docs.tsx +0 -77
  326. package/src/components/table/examples/table-empty.tsx +0 -53
  327. package/src/components/table/examples/table-invoices.tsx +0 -102
  328. package/src/components/table/examples/table-selection.tsx +0 -150
  329. package/src/components/table/examples/table-showcase.tsx +0 -115
  330. package/src/components/table/examples/table-usage.tsx +0 -67
  331. package/src/components/table/examples/table-wide.tsx +0 -75
  332. package/src/components/table/table.docs.tsx +0 -131
  333. package/src/components/text-editor/examples/text-editor-comment.tsx +0 -48
  334. package/src/components/text-editor/examples/text-editor-count.tsx +0 -38
  335. package/src/components/text-editor/examples/text-editor-showcase.tsx +0 -58
  336. package/src/components/text-editor/examples/text-editor-usage.tsx +0 -25
  337. package/src/components/text-editor/text-editor.docs.tsx +0 -61
  338. package/src/components/text-field/examples/text-field-icons.tsx +0 -72
  339. package/src/components/text-field/examples/text-field-showcase.tsx +0 -50
  340. package/src/components/text-field/examples/text-field-usage.tsx +0 -18
  341. package/src/components/text-field/examples/text-field-validation.tsx +0 -27
  342. package/src/components/text-field/text-field.docs.tsx +0 -118
  343. package/src/components/toast/examples/toast-action.tsx +0 -32
  344. package/src/components/toast/examples/toast-promise.tsx +0 -45
  345. package/src/components/toast/examples/toast-showcase.tsx +0 -49
  346. package/src/components/toast/examples/toast-usage.tsx +0 -13
  347. package/src/components/toast/toast.docs.tsx +0 -79
  348. package/src/components/toggle/examples/toggle-checkboxes.tsx +0 -43
  349. package/src/components/toggle/examples/toggle-settings.tsx +0 -31
  350. package/src/components/toggle/examples/toggle-showcase.tsx +0 -59
  351. package/src/components/toggle/examples/toggle-usage.tsx +0 -13
  352. package/src/components/toggle/toggle.docs.tsx +0 -69
  353. package/src/components/tooltip/examples/tooltip-icon-buttons.tsx +0 -27
  354. package/src/components/tooltip/examples/tooltip-shortcuts.tsx +0 -38
  355. package/src/components/tooltip/examples/tooltip-showcase.tsx +0 -44
  356. package/src/components/tooltip/examples/tooltip-usage.tsx +0 -13
  357. package/src/components/tooltip/tooltip.docs.tsx +0 -56
  358. package/src/components/view-controller/examples/view-controller-action.tsx +0 -27
  359. package/src/components/view-controller/examples/view-controller-settings.tsx +0 -31
  360. package/src/components/view-controller/examples/view-controller-showcase.tsx +0 -45
  361. package/src/components/view-controller/examples/view-controller-usage.tsx +0 -19
  362. package/src/components/view-controller/view-controller.docs.tsx +0 -71
  363. package/src/docs/index.ts +0 -3
  364. package/src/docs/registry.ts +0 -113
  365. package/src/docs/snippet.ts +0 -17
  366. package/src/docs/types.ts +0 -180
@@ -1,13 +1,30 @@
1
1
  import {
2
+ LanguagesIcon,
3
+ Logout01Icon,
4
+ MoreVertical,
5
+ SentIcon,
6
+ InboxIcon as InboxGlyph,
7
+ LaptopIcon as LaptopGlyph,
8
+ SmartPhone01Icon,
9
+ Tablet01Icon,
10
+ Home01Icon,
11
+ LibraryIcon as LibraryGlyph,
12
+ UserIcon,
13
+ Analytics01Icon,
14
+ CustomerSupportIcon,
15
+ Key01Icon,
16
+ LockPasswordIcon,
2
17
  Add01Icon,
3
18
  AiMagicIcon,
4
19
  AlarmClockIcon,
5
20
  Alert02Icon,
21
+ Archive01Icon,
6
22
  ArrowDown01Icon,
7
23
  ArrowLeft01Icon,
8
24
  ArrowRight01Icon,
9
25
  ArrowUp01Icon,
10
26
  BirthdayCakeIcon,
27
+ Bookmark02Icon,
11
28
  Book02Icon,
12
29
  BookOpen01Icon,
13
30
  BubbleChatIcon,
@@ -43,6 +60,7 @@ import {
43
60
  ThumbsUpIcon as HugeThumbsUpIcon,
44
61
  UndoIcon as HugeUndoIcon,
45
62
  Image01Icon,
63
+ InformationCircleIcon,
46
64
  Invoice03Icon,
47
65
  LayoutGridIcon,
48
66
  LeftToRightListBulletIcon,
@@ -50,6 +68,9 @@ import {
50
68
  Location01Icon,
51
69
  LockIcon as LockIconSvg,
52
70
  Mic01Icon,
71
+ Menu01Icon,
72
+ Mail01Icon,
73
+ MailReply01Icon,
53
74
  Moon02Icon,
54
75
  MoreHorizontalIcon,
55
76
  Mortarboard01Icon,
@@ -74,6 +95,11 @@ import {
74
95
  Share08Icon,
75
96
  Store01Icon,
76
97
  Task01Icon,
98
+ TextAlignCenterIcon,
99
+ TextAlignLeftIcon,
100
+ TextBoldIcon,
101
+ TextItalicIcon,
102
+ TextUnderlineIcon,
77
103
  Tick02Icon,
78
104
  Time04Icon,
79
105
  Touch01Icon,
@@ -84,28 +110,61 @@ import {
84
110
  ViewOffSlashIcon,
85
111
  Wallet01Icon,
86
112
  } from "@hugeicons/core-free-icons"
113
+ import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/react"
87
114
  import {
88
- HugeiconsIcon,
89
- type IconSvgElement,
90
- } from "@hugeicons/react"
115
+ Analytics01Icon as CatalogAnalyticsGlyph,
116
+ Calendar03Icon as CatalogCalendarGlyph,
117
+ Clock01Icon as CatalogClockGlyph,
118
+ ColorsIcon as CatalogColorsGlyph,
119
+ InputTextIcon as CatalogInputTextGlyph,
120
+ LabelIcon as CatalogLabelGlyph,
121
+ LayoutTwoColumnIcon as CatalogColumnsGlyph,
122
+ ListViewIcon as CatalogListGlyph,
123
+ LockPasswordIcon as CatalogPasswordGlyph,
124
+ Search01Icon as CatalogSearchGlyph,
125
+ SearchList01Icon as CatalogSearchListGlyph,
126
+ Settings02Icon as CatalogSettingsGlyph,
127
+ StatusIcon as CatalogStatusGlyph,
128
+ Tag01Icon as CatalogTagGlyph,
129
+ Tap01Icon as CatalogTapGlyph,
130
+ TextAlignLeftIcon as CatalogTextGlyph,
131
+ ToggleOnIcon as CatalogToggleGlyph,
132
+ UnfoldMoreIcon as CatalogUnfoldGlyph,
133
+ UserCircleIcon as CatalogUserGlyph,
134
+ LayoutTopIcon as CatalogLayoutTopGlyph,
135
+ LayoutBottomIcon as CatalogLayoutBottomGlyph,
136
+ SidebarLeftIcon as CatalogSidebarGlyph,
137
+ BrowserIcon as CatalogBrowserGlyph,
138
+ Table01Icon as CatalogTableGlyph,
139
+ CardsIcon as CatalogCardsGlyph,
140
+ Message01Icon as CatalogMessageGlyph,
141
+ Sun03Icon as CatalogSunGlyph,
142
+ AlertSquareIcon as CatalogAlertGlyph,
143
+ PanelBottomIcon as CatalogPanelGlyph,
144
+ BubbleChatIcon as CatalogBubbleGlyph,
145
+ Notification03Icon as CatalogNotificationGlyph,
146
+ MenuSquareIcon as CatalogMenuGlyph,
147
+ HelpCircleIcon as CatalogHelpGlyph,
148
+ TranslateIcon as CatalogTranslateGlyph,
149
+ PaintBoardIcon as GuidePaintGlyph,
150
+ TextIcon as GuideTextGlyph,
151
+ Layers01Icon as GuideLayersGlyph,
152
+ ArrowUp02Icon as UploadGlyph,
153
+ PlusSignIcon as AttachGlyph,
154
+ } from "@hugeicons/core-free-icons"
91
155
  import type { SVGProps } from "react"
92
156
  import { cn } from "../lib/class-names"
93
157
 
94
- export type IconProps = Omit<
95
- SVGProps<SVGSVGElement>,
96
- "ref"
97
- > & {
158
+ export type IconProps = Omit<SVGProps<SVGSVGElement>, "ref"> & {
159
+ /** Width and height in CSS pixels. @default 20 */
98
160
  size?: number
161
+ /** Stroke weight shared across Passui icons. @default 1.6 */
99
162
  strokeWidth?: number
100
163
  }
101
164
 
102
- /** Hugeicons (stroke rounded), sized and weighted for the Notables UI. */
165
+ /** Rounded stroke icons with Passui's default size, weight, and decorative semantics. */
103
166
  function icon(svg: IconSvgElement, displayName: string) {
104
- const Icon = ({
105
- size = 20,
106
- strokeWidth = 1.6,
107
- ...props
108
- }: IconProps) => (
167
+ const Icon = ({ size = 20, strokeWidth = 1.6, ...props }: IconProps) => (
109
168
  <HugeiconsIcon
110
169
  icon={svg}
111
170
  size={size}
@@ -119,80 +178,102 @@ function icon(svg: IconSvgElement, displayName: string) {
119
178
  }
120
179
 
121
180
  /** A filled variant for toggled states (hearted, starred). */
122
- function toggleIcon(
123
- svg: IconSvgElement,
124
- displayName: string
125
- ) {
181
+ function toggleIcon(svg: IconSvgElement, displayName: string) {
126
182
  const Base = icon(svg, displayName)
127
- const Icon = ({
128
- filled = false,
129
- className,
130
- ...props
131
- }: IconProps & { filled?: boolean }) => (
132
- <Base
133
- className={cn(
134
- filled && "[&_path]:fill-current",
135
- className
136
- )}
137
- {...props}
138
- />
183
+ const Icon = ({ filled = false, className, ...props }: IconProps & { filled?: boolean }) => (
184
+ <Base className={cn(filled && "[&_path]:fill-current", className)} {...props} />
139
185
  )
140
186
  Icon.displayName = displayName
141
187
  return Icon
142
188
  }
143
189
 
190
+ /** Existing catalog glyphs rendered through PassUI's common icon contract. */
191
+ export const catalogIcons = {
192
+ tap: icon(CatalogTapGlyph, "CatalogTapIcon"),
193
+ settings: icon(CatalogSettingsGlyph, "CatalogSettingsIcon"),
194
+ tag: icon(CatalogTagGlyph, "CatalogTagIcon"),
195
+ input: icon(CatalogInputTextGlyph, "CatalogInputIcon"),
196
+ password: icon(CatalogPasswordGlyph, "CatalogPasswordIcon"),
197
+ search: icon(CatalogSearchGlyph, "CatalogSearchIcon"),
198
+ toggle: icon(CatalogToggleGlyph, "CatalogToggleIcon"),
199
+ columns: icon(CatalogColumnsGlyph, "CatalogColumnsIcon"),
200
+ unfold: icon(CatalogUnfoldGlyph, "CatalogUnfoldIcon"),
201
+ colors: icon(CatalogColorsGlyph, "CatalogColorsIcon"),
202
+ calendar: icon(CatalogCalendarGlyph, "CatalogCalendarIcon"),
203
+ clock: icon(CatalogClockGlyph, "CatalogClockIcon"),
204
+ text: icon(CatalogTextGlyph, "CatalogTextIcon"),
205
+ searchList: icon(CatalogSearchListGlyph, "CatalogSearchListIcon"),
206
+ list: icon(CatalogListGlyph, "CatalogListIcon"),
207
+ label: icon(CatalogLabelGlyph, "CatalogLabelIcon"),
208
+ table: icon(CatalogTableGlyph, "CatalogTableIcon"),
209
+ cards: icon(CatalogCardsGlyph, "CatalogCardsIcon"),
210
+ message: icon(CatalogMessageGlyph, "CatalogMessageIcon"),
211
+ sun: icon(CatalogSunGlyph, "CatalogSunIcon"),
212
+ status: icon(CatalogStatusGlyph, "CatalogStatusIcon"),
213
+ analytics: icon(CatalogAnalyticsGlyph, "CatalogAnalyticsIcon"),
214
+ alert: icon(CatalogAlertGlyph, "CatalogAlertIcon"),
215
+ panel: icon(CatalogPanelGlyph, "CatalogPanelIcon"),
216
+ bubble: icon(CatalogBubbleGlyph, "CatalogBubbleIcon"),
217
+ notification: icon(CatalogNotificationGlyph, "CatalogNotificationIcon"),
218
+ menu: icon(CatalogMenuGlyph, "CatalogMenuIcon"),
219
+ help: icon(CatalogHelpGlyph, "CatalogHelpIcon"),
220
+ translate: icon(CatalogTranslateGlyph, "CatalogTranslateIcon"),
221
+ layoutTop: icon(CatalogLayoutTopGlyph, "CatalogLayoutTopIcon"),
222
+ layoutBottom: icon(CatalogLayoutBottomGlyph, "CatalogLayoutBottomIcon"),
223
+ sidebar: icon(CatalogSidebarGlyph, "CatalogSidebarIcon"),
224
+ browser: icon(CatalogBrowserGlyph, "CatalogBrowserIcon"),
225
+ user: icon(CatalogUserGlyph, "CatalogUserIcon"),
226
+ } as const
227
+
144
228
  export const NoteIcon = icon(Note01Icon, "NoteIcon")
229
+ export const LanguageIcon = icon(LanguagesIcon, "LanguageIcon")
230
+ export const SignOutIcon = icon(Logout01Icon, "SignOutIcon")
231
+ export const MoreVerticalIcon = icon(MoreVertical, "MoreVerticalIcon")
232
+ export const SendIcon = icon(SentIcon, "SendIcon")
233
+ export const InboxIcon = icon(InboxGlyph, "InboxIcon")
234
+ export const LaptopIcon = icon(LaptopGlyph, "LaptopIcon")
235
+ export const SmartphoneIcon = icon(SmartPhone01Icon, "SmartphoneIcon")
236
+ export const TabletIcon = icon(Tablet01Icon, "TabletIcon")
237
+ export const HomeIcon = icon(Home01Icon, "HomeIcon")
238
+ export const LibraryIcon = icon(LibraryGlyph, "LibraryIcon")
239
+ export const PersonIcon = icon(UserIcon, "PersonIcon")
240
+ export const ChartIcon = icon(Analytics01Icon, "ChartIcon")
241
+ export const SupportIcon = icon(CustomerSupportIcon, "SupportIcon")
242
+ export const KeyIcon = icon(Key01Icon, "KeyIcon")
243
+ export const PasswordIcon = icon(LockPasswordIcon, "PasswordIcon")
145
244
  export const JournalIcon = icon(NotebookIcon, "JournalIcon")
146
245
  export const PenIcon = icon(PencilEdit02Icon, "PenIcon")
147
246
  export const StoryIcon = icon(QuillWrite02Icon, "StoryIcon")
148
247
  export const BookIcon = icon(BookOpen01Icon, "BookIcon")
149
248
  export const ArticleIcon = icon(Book02Icon, "ArticleIcon")
150
249
  export const CanvasIcon = icon(HugeCanvasIcon, "CanvasIcon")
151
- export const LessonIcon = icon(
152
- Mortarboard01Icon,
153
- "LessonIcon"
154
- )
250
+ export const LessonIcon = icon(Mortarboard01Icon, "LessonIcon")
155
251
  export const PlanIcon = icon(CheckListIcon, "PlanIcon")
156
252
  export const MicIcon = icon(Mic01Icon, "MicIcon")
157
253
  export const GlobeIcon = icon(Globe02Icon, "GlobeIcon")
158
- export const ChecklistIcon = icon(
159
- CheckmarkCircle02Icon,
160
- "ChecklistIcon"
161
- )
254
+ export const ChecklistIcon = icon(CheckmarkCircle02Icon, "ChecklistIcon")
162
255
  export const DrawIcon = icon(PencilIcon, "DrawIcon")
163
256
  export const ShareIcon = icon(Share08Icon, "ShareIcon")
164
257
  export const SearchIcon = icon(Search01Icon, "SearchIcon")
165
- export const ChevronLeftIcon = icon(
166
- ArrowLeft01Icon,
167
- "ChevronLeftIcon"
168
- )
169
- export const ChevronRightIcon = icon(
170
- ArrowRight01Icon,
171
- "ChevronRightIcon"
172
- )
173
- export const ChevronUpIcon = icon(
174
- ArrowUp01Icon,
175
- "ChevronUpIcon"
176
- )
177
- export const ChevronDownIcon = icon(
178
- ArrowDown01Icon,
179
- "ChevronDownIcon"
180
- )
258
+ export const ChevronLeftIcon = icon(ArrowLeft01Icon, "ChevronLeftIcon")
259
+ export const ChevronRightIcon = icon(ArrowRight01Icon, "ChevronRightIcon")
260
+ export const ChevronUpIcon = icon(ArrowUp01Icon, "ChevronUpIcon")
261
+ export const ChevronDownIcon = icon(ArrowDown01Icon, "ChevronDownIcon")
181
262
  export const CloseIcon = icon(Cancel01Icon, "CloseIcon")
263
+ export const MenuIcon = icon(Menu01Icon, "MenuIcon")
264
+ export const ThemingIcon = icon(GuidePaintGlyph, "ThemingIcon")
265
+ export const TypesetIcon = icon(GuideTextGlyph, "TypesetIcon")
266
+ export const LayersIcon = icon(GuideLayersGlyph, "LayersIcon")
267
+ export const UploadIcon = icon(UploadGlyph, "UploadIcon")
268
+ export const AttachIcon = icon(AttachGlyph, "AttachIcon")
182
269
  export const PlusIcon = icon(Add01Icon, "PlusIcon")
183
270
  export const LinkIcon = icon(Link01Icon, "LinkIcon")
184
271
  export const CommentIcon = icon(Comment01Icon, "CommentIcon")
185
272
  export const TrashIcon = icon(Delete02Icon, "TrashIcon")
186
273
  export const PinIcon = icon(Pin02Icon, "PinIcon")
187
274
  export const SidebarIcon = icon(PanelLeftIcon, "SidebarIcon")
188
- export const SettingsIcon = icon(
189
- Settings02Icon,
190
- "SettingsIcon"
191
- )
192
- export const DragHandleIcon = icon(
193
- DragDropVerticalIcon,
194
- "DragHandleIcon"
195
- )
275
+ export const SettingsIcon = icon(Settings02Icon, "SettingsIcon")
276
+ export const DragHandleIcon = icon(DragDropVerticalIcon, "DragHandleIcon")
196
277
  export const VisibleIcon = icon(ViewIcon, "VisibleIcon")
197
278
  export const HiddenIcon = icon(ViewOffSlashIcon, "HiddenIcon")
198
279
  export const CheckIcon = icon(Tick02Icon, "CheckIcon")
@@ -200,57 +281,27 @@ export const InvoiceIcon = icon(Invoice03Icon, "InvoiceIcon")
200
281
  export const QrCodeGlyph = icon(QrCodeIcon, "QrCodeGlyph")
201
282
  export const WalletIcon = icon(Wallet01Icon, "WalletIcon")
202
283
  export const ScanCodeIcon = icon(ScanIcon, "ScanCodeIcon")
203
- export const VerifiedIcon = icon(
204
- CheckmarkBadge01Icon,
205
- "VerifiedIcon"
206
- )
284
+ export const VerifiedIcon = icon(CheckmarkBadge01Icon, "VerifiedIcon")
207
285
  export const WarningIcon = icon(Alert02Icon, "WarningIcon")
208
286
  export const PrintIcon = icon(PrinterIcon, "PrintIcon")
209
287
  export const ImportIcon = icon(FileImportIcon, "ImportIcon")
210
- export const DownloadIcon = icon(
211
- Download01Icon,
212
- "DownloadIcon"
213
- )
288
+ export const DownloadIcon = icon(Download01Icon, "DownloadIcon")
214
289
  export const PlayIcon = icon(HugePlayIcon, "PlayIcon")
215
290
  export const PauseIcon = icon(HugePauseIcon, "PauseIcon")
216
- export const SkipBackIcon = icon(
217
- GoBackward15SecIcon,
218
- "SkipBackIcon"
219
- )
220
- export const SkipForwardIcon = icon(
221
- GoForward30SecIcon,
222
- "SkipForwardIcon"
223
- )
224
- export const PreviousTrackIcon = icon(
225
- PreviousIcon,
226
- "PreviousTrackIcon"
227
- )
291
+ export const SkipBackIcon = icon(GoBackward15SecIcon, "SkipBackIcon")
292
+ export const SkipForwardIcon = icon(GoForward30SecIcon, "SkipForwardIcon")
293
+ export const PreviousTrackIcon = icon(PreviousIcon, "PreviousTrackIcon")
228
294
  export const NextTrackIcon = icon(NextIcon, "NextTrackIcon")
229
- export const HeadphonesIcon = icon(
230
- HugeHeadphonesIcon,
231
- "HeadphonesIcon"
232
- )
233
- export const HighlighterIcon = icon(
234
- HugeHighlighterIcon,
235
- "HighlighterIcon"
236
- )
237
- export const ChaptersIcon = icon(
238
- LeftToRightListBulletIcon,
239
- "ChaptersIcon"
240
- )
295
+ export const HeadphonesIcon = icon(HugeHeadphonesIcon, "HeadphonesIcon")
296
+ export const HighlighterIcon = icon(HugeHighlighterIcon, "HighlighterIcon")
297
+ export const ChaptersIcon = icon(LeftToRightListBulletIcon, "ChaptersIcon")
241
298
  export const SleepIcon = icon(Moon02Icon, "SleepIcon")
242
299
  export const ExpandIcon = icon(FullScreenIcon, "ExpandIcon")
243
300
  export const SparkleIcon = icon(AiMagicIcon, "SparkleIcon")
244
301
  export const BellIcon = icon(Notification03Icon, "BellIcon")
245
302
  export const BusinessIcon = icon(Store01Icon, "BusinessIcon")
246
- export const CalendarIcon = icon(
247
- Calendar03Icon,
248
- "CalendarIcon"
249
- )
250
- export const BirthdayIcon = icon(
251
- BirthdayCakeIcon,
252
- "BirthdayIcon"
253
- )
303
+ export const CalendarIcon = icon(Calendar03Icon, "CalendarIcon")
304
+ export const BirthdayIcon = icon(BirthdayCakeIcon, "BirthdayIcon")
254
305
  export const AlarmIcon = icon(AlarmClockIcon, "AlarmIcon")
255
306
  export const RepeatIcon = icon(HugeRepeatIcon, "RepeatIcon")
256
307
  export const UndoIcon = icon(HugeUndoIcon, "UndoIcon")
@@ -262,32 +313,17 @@ export const BubbleIcon = icon(BubbleChatIcon, "BubbleIcon")
262
313
  export const BrushIcon = icon(PaintBrush02Icon, "BrushIcon")
263
314
  export const LayoutIcon = icon(LayoutGridIcon, "LayoutIcon")
264
315
  export const ZoomIcon = icon(SearchAddIcon, "ZoomIcon")
265
- export const SelectorIcon = icon(
266
- UnfoldMoreIcon,
267
- "SelectorIcon"
268
- )
316
+ export const SelectorIcon = icon(UnfoldMoreIcon, "SelectorIcon")
269
317
  export const MoreIcon = icon(MoreHorizontalIcon, "MoreIcon")
270
318
  export const PeopleIcon = icon(UserMultipleIcon, "PeopleIcon")
271
- export const AddPersonIcon = icon(
272
- UserAdd01Icon,
273
- "AddPersonIcon"
274
- )
319
+ export const AddPersonIcon = icon(UserAdd01Icon, "AddPersonIcon")
275
320
  export const ClockIcon = icon(Clock01Icon, "ClockIcon")
276
- export const LocationIcon = icon(
277
- Location01Icon,
278
- "LocationIcon"
279
- )
321
+ export const LocationIcon = icon(Location01Icon, "LocationIcon")
280
322
  export const TaskIcon = icon(Task01Icon, "TaskIcon")
281
323
  export const FolderIcon = icon(Folder01Icon, "FolderIcon")
282
324
  export const RecentIcon = icon(Time04Icon, "RecentIcon")
283
- export const ThumbsUpIcon = toggleIcon(
284
- HugeThumbsUpIcon,
285
- "ThumbsUpIcon"
286
- )
287
- export const HeartIcon = toggleIcon(
288
- FavouriteIcon,
289
- "HeartIcon"
290
- )
325
+ export const ThumbsUpIcon = toggleIcon(HugeThumbsUpIcon, "ThumbsUpIcon")
326
+ export const HeartIcon = toggleIcon(FavouriteIcon, "HeartIcon")
291
327
  export const StarIcon = toggleIcon(HugeStarIcon, "StarIcon")
292
328
 
293
329
  // Wallet: adding, copying and protecting cards.
@@ -296,3 +332,13 @@ export const CopyIcon = icon(Copy01Icon, "CopyIcon")
296
332
  export const LockIcon = icon(LockIconSvg, "LockIcon")
297
333
  export const NfcReadIcon = icon(NfcIcon, "NfcReadIcon")
298
334
  export const PhotoIcon = icon(Image01Icon, "PhotoIcon")
335
+ export const BookmarkIcon = icon(Bookmark02Icon, "BookmarkIcon")
336
+ export const MailIcon = icon(Mail01Icon, "MailIcon")
337
+ export const ReplyIcon = icon(MailReply01Icon, "ReplyIcon")
338
+ export const ArchiveIcon = icon(Archive01Icon, "ArchiveIcon")
339
+ export const InfoIcon = icon(InformationCircleIcon, "InfoIcon")
340
+ export const AlignCenterIcon = icon(TextAlignCenterIcon, "AlignCenterIcon")
341
+ export const AlignLeftIcon = icon(TextAlignLeftIcon, "AlignLeftIcon")
342
+ export const BoldIcon = icon(TextBoldIcon, "BoldIcon")
343
+ export const ItalicIcon = icon(TextItalicIcon, "ItalicIcon")
344
+ export const UnderlineIcon = icon(TextUnderlineIcon, "UnderlineIcon")
package/src/index.ts CHANGED
@@ -30,6 +30,9 @@ export * from "./components/picker/picker"
30
30
  export * from "./components/popover/popover"
31
31
  export * from "./components/search-field/search-field"
32
32
  export * from "./components/section/section"
33
+ export * from "./components/inline-disclosure/inline-disclosure"
34
+ export * from "./components/disclosure-group/disclosure-group"
35
+ export * from "./components/menu/menu"
33
36
  export * from "./components/segmented-control/segmented-control"
34
37
  export * from "./components/sheet/sheet"
35
38
  export * from "./components/sidebar/sidebar"
@@ -43,15 +46,19 @@ export {
43
46
  } from "./components/toast/toast-store"
44
47
  export * from "./components/toast/toaster"
45
48
  export * from "./components/toggle/toggle"
49
+ export * from "./components/slider/slider"
50
+ export * from "./components/stepper/stepper"
51
+ export * from "./components/progress-view/progress-view"
52
+ export * from "./components/divider/divider"
46
53
  export * from "./components/tooltip/tooltip-host"
47
54
  export * from "./hooks/use-anchored-placement"
48
55
  export * from "./hooks/use-dismiss"
49
56
  export * from "./hooks/use-media-query"
50
- export * from "./hooks/use-minimize-on-scroll"
51
57
  export * from "./icons/icons"
52
58
  export * from "./lib/anchored-placement"
53
59
  export * from "./lib/class-names"
54
60
  export * from "./lib/haptics"
61
+ export * from "./lib/clipboard"
55
62
  export * from "./lib/screen-edges"
56
63
  export * from "./motion/transitions"
57
64
  export * from "./appearance"
@@ -62,6 +69,7 @@ export * from "./components/compact-time-picker/compact-time-picker"
62
69
 
63
70
  export { Dialog } from "./components/dialog"
64
71
  export type {
72
+ DialogProps,
65
73
  DialogPresentation,
66
74
  DialogTone,
67
75
  } from "./components/dialog/dialog"
@@ -37,16 +37,9 @@ export function placeInViewport(
37
37
  needed: number,
38
38
  gap = 6
39
39
  ): AnchoredPlacement {
40
- const fitted = Math.min(
41
- width,
42
- viewport.width - edges.left - edges.right
43
- )
44
- const left = Math.min(
45
- Math.max(edges.left, anchor.left),
46
- viewport.width - fitted - edges.right
47
- )
48
- const roomBelow =
49
- viewport.height - anchor.bottom - gap - edges.bottom
40
+ const fitted = Math.min(width, viewport.width - edges.left - edges.right)
41
+ const left = Math.min(Math.max(edges.left, anchor.left), viewport.width - fitted - edges.right)
42
+ const roomBelow = viewport.height - anchor.bottom - gap - edges.bottom
50
43
  const roomAbove = anchor.top - gap - edges.top
51
44
  const above = roomBelow < needed && roomAbove > roomBelow
52
45
  const room = above ? roomAbove : roomBelow
@@ -54,9 +47,7 @@ export function placeInViewport(
54
47
  left,
55
48
  width: fitted,
56
49
  above,
57
- ...(above
58
- ? { bottom: viewport.height - anchor.top + gap }
59
- : { top: anchor.bottom + gap }),
50
+ ...(above ? { bottom: viewport.height - anchor.top + gap } : { top: anchor.bottom + gap }),
60
51
  }
61
52
  if (room < needed) placement.maxHeight = room
62
53
  return placement
@@ -80,8 +71,7 @@ export function placeAnchored(
80
71
  },
81
72
  viewport: {
82
73
  width: viewport?.width ?? window.innerWidth,
83
- height:
84
- viewport?.height ?? window.innerHeight,
74
+ height: viewport?.height ?? window.innerHeight,
85
75
  },
86
76
  edges: screenEdges(),
87
77
  },
@@ -4,8 +4,7 @@ import { extendTailwindMerge } from "tailwind-merge"
4
4
  import { textStyles } from "@passui/tokens/typography"
5
5
 
6
6
  const textStyleClasses = Object.keys(textStyles).map(
7
- (name) =>
8
- `text-${name.replace(/[A-Z]/g, (character) => `-${character.toLowerCase()}`)}`
7
+ (name) => `text-${name.replace(/[A-Z]/g, (character) => `-${character.toLowerCase()}`)}`
9
8
  )
10
9
 
11
10
  const twMerge = extendTailwindMerge({
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Copies text after a user action. Returns true only after the browser confirms
3
+ * the write. Returns false when unavailable or denied, so the app can offer
4
+ * manual copying. This helper never reads the clipboard or adds feedback.
5
+ */
6
+ export async function copyText(text: string): Promise<boolean> {
7
+ try {
8
+ if (typeof navigator === "undefined" || !navigator.clipboard?.writeText) return false
9
+ await navigator.clipboard.writeText(text)
10
+ return true
11
+ } catch {
12
+ return false
13
+ }
14
+ }
package/src/lib/date.ts CHANGED
@@ -37,10 +37,7 @@ export type DatePreset = keyof typeof PRESETS
37
37
 
38
38
  const formatters = new Map<string, Intl.DateTimeFormat>()
39
39
 
40
- function formatter(
41
- key: string,
42
- options: Intl.DateTimeFormatOptions
43
- ) {
40
+ function formatter(key: string, options: Intl.DateTimeFormatOptions) {
44
41
  let cached = formatters.get(key)
45
42
  if (!cached) {
46
43
  cached = new Intl.DateTimeFormat(LOCALE, options)
@@ -50,10 +47,7 @@ function formatter(
50
47
  }
51
48
 
52
49
  /** A stored UTC timestamp shown as its UTC wall-clock time, whatever the viewer's timezone. */
53
- export function formatUtc(
54
- date: Date | string | number,
55
- preset: DatePreset
56
- ) {
50
+ export function formatUtc(date: Date | string | number, preset: DatePreset) {
57
51
  return formatter(`utc:${preset}`, {
58
52
  ...PRESETS[preset],
59
53
  timeZone: "UTC",
@@ -83,14 +77,9 @@ export function fromNow(date: Date | string | number) {
83
77
  relative ??= new Intl.RelativeTimeFormat(LOCALE, {
84
78
  numeric: "auto",
85
79
  })
86
- const seconds =
87
- (new Date(date).getTime() - Date.now()) / 1000
80
+ const seconds = (new Date(date).getTime() - Date.now()) / 1000
88
81
  for (const [unit, size] of UNITS) {
89
- if (Math.abs(seconds) >= size)
90
- return relative.format(
91
- Math.round(seconds / size),
92
- unit
93
- )
82
+ if (Math.abs(seconds) >= size) return relative.format(Math.round(seconds / size), unit)
94
83
  }
95
84
  return relative.format(0, "second")
96
85
  }
@@ -3,18 +3,12 @@ export const FLOATING_LAYER = "data-floating-layer"
3
3
  const anchors = new WeakMap<Element, Element>()
4
4
 
5
5
  /** Portals retain the ownership of the control that opened them. */
6
- export function registerFloatingLayer(
7
- layer: Element,
8
- anchor: Element
9
- ): () => void {
6
+ export function registerFloatingLayer(layer: Element, anchor: Element): () => void {
10
7
  anchors.set(layer, anchor)
11
8
  return () => anchors.delete(layer)
12
9
  }
13
10
 
14
- export function ownsFloatingLayer(
15
- container: Element,
16
- target: Element | null
17
- ): boolean {
11
+ export function ownsFloatingLayer(container: Element, target: Element | null): boolean {
18
12
  let layer = target?.closest(`[${FLOATING_LAYER}]`)
19
13
  const visited = new Set<Element>()
20
14
  while (layer && !visited.has(layer)) {
@@ -26,3 +20,19 @@ export function ownsFloatingLayer(
26
20
  }
27
21
  return false
28
22
  }
23
+
24
+ /** An element belongs to a surface either directly or through a portaled child layer. */
25
+ export function belongsToFloatingSurface(surface: Element, target: Element | null): boolean {
26
+ return Boolean(target && (surface.contains(target) || ownsFloatingLayer(surface, target)))
27
+ }
28
+
29
+ /** Whether a pointer target is outside both an anchored surface and its nested portals. */
30
+ export function isOutsideFloatingSurface(
31
+ surface: Element | null,
32
+ anchor: Element,
33
+ target: EventTarget | null
34
+ ): boolean {
35
+ if (!target || !("closest" in target) || !("contains" in target)) return false
36
+ const element = target as Element
37
+ return !anchor.contains(element) && (!surface || !belongsToFloatingSurface(surface, element))
38
+ }
@@ -14,9 +14,7 @@ let player: (kind: HapticKind) => void = () => {}
14
14
  * Components only ask for feedback; the app decides how it plays on this
15
15
  * device (system haptics, a vibration, or nothing) and whether it's on.
16
16
  */
17
- export function setHapticPlayer(
18
- next: (kind: HapticKind) => void
19
- ): void {
17
+ export function setHapticPlayer(next: (kind: HapticKind) => void): void {
20
18
  player = next
21
19
  }
22
20
 
@@ -3,16 +3,11 @@ export function getNativeLanguageName(tag: string) {
3
3
  const name = new Intl.DisplayNames([tag], {
4
4
  type: "language",
5
5
  }).of(tag)
6
- return name
7
- ? name.charAt(0).toUpperCase() + name.slice(1)
8
- : tag
6
+ return name ? name.charAt(0).toUpperCase() + name.slice(1) : tag
9
7
  }
10
8
 
11
9
  /** A language's name as read in `displayLocale`: "French" in English. */
12
- export function getLocalizedLanguageName(
13
- tag: string,
14
- displayLocale: string
15
- ) {
10
+ export function getLocalizedLanguageName(tag: string, displayLocale: string) {
16
11
  return (
17
12
  new Intl.DisplayNames([displayLocale], {
18
13
  type: "language",
@@ -0,0 +1,32 @@
1
+ /** Keep controlled numeric inputs within finite bounds without floating-point drift. */
2
+ export function clampRange(value: number, min: number, max: number): number {
3
+ if (!Number.isFinite(value)) return min
4
+ return Math.min(max, Math.max(min, value))
5
+ }
6
+
7
+ /** The nearest reachable step from min, optionally allowing an exact maximum. */
8
+ export function stepRange(
9
+ value: number,
10
+ direction: -1 | 1,
11
+ min: number,
12
+ max: number,
13
+ step: number
14
+ ): number {
15
+ const precision = Math.min(12, Math.max(0, ...[min, max, step].map(decimalPlaces)))
16
+ const factor = 10 ** precision
17
+ const low = Math.round(min * factor)
18
+ const high = Math.round(max * factor)
19
+ const increment = Math.max(1, Math.round(step * factor))
20
+ const current = Math.round(clampRange(value, min, max) * factor)
21
+ const next =
22
+ direction > 0
23
+ ? low + (Math.floor((current - low) / increment) + 1) * increment
24
+ : low + (Math.ceil((current - low) / increment) - 1) * increment
25
+ return clampRange(Math.min(high, Math.max(low, next)) / factor, min, max)
26
+ }
27
+
28
+ function decimalPlaces(value: number): number {
29
+ const text = String(value)
30
+ const [mantissa, exponent] = text.toLowerCase().split("e")
31
+ return Math.max(0, (mantissa?.split(".")[1]?.length ?? 0) - Number(exponent ?? 0))
32
+ }