@photon-ai/pho-ui 0.1.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 (281) hide show
  1. package/README.md +49 -0
  2. package/dist/chunks/button-9pp4g7en.js +334 -0
  3. package/dist/chunks/button-9pp4g7en.js.map +1 -0
  4. package/dist/chunks/close-button-CbQNfpxU.js +30 -0
  5. package/dist/chunks/close-button-CbQNfpxU.js.map +1 -0
  6. package/dist/chunks/cn-D6jQqeRj.js +1762 -0
  7. package/dist/chunks/cn-D6jQqeRj.js.map +1 -0
  8. package/dist/chunks/dialog-BSBF1Wyq.js +63 -0
  9. package/dist/chunks/dialog-BSBF1Wyq.js.map +1 -0
  10. package/dist/chunks/input-aZqjjV_m.js +75 -0
  11. package/dist/chunks/input-aZqjjV_m.js.map +1 -0
  12. package/dist/chunks/link-provider-9TFNyDqO.js +28 -0
  13. package/dist/chunks/link-provider-9TFNyDqO.js.map +1 -0
  14. package/dist/chunks/menu-BkzDbNuX.js +101 -0
  15. package/dist/chunks/menu-BkzDbNuX.js.map +1 -0
  16. package/dist/chunks/resolve-variant-CcD8iG5l.js +9 -0
  17. package/dist/chunks/resolve-variant-CcD8iG5l.js.map +1 -0
  18. package/dist/chunks/rolldown-runtime-wKSmTnsc.js +22 -0
  19. package/dist/components/accordion.js +42 -0
  20. package/dist/components/accordion.js.map +1 -0
  21. package/dist/components/alert-dialog.js +59 -0
  22. package/dist/components/alert-dialog.js.map +1 -0
  23. package/dist/components/autocomplete.js +82 -0
  24. package/dist/components/autocomplete.js.map +1 -0
  25. package/dist/components/avatar.js +49 -0
  26. package/dist/components/avatar.js.map +1 -0
  27. package/dist/components/badge.js +59 -0
  28. package/dist/components/badge.js.map +1 -0
  29. package/dist/components/button.js +17 -0
  30. package/dist/components/checkbox.js +51 -0
  31. package/dist/components/checkbox.js.map +1 -0
  32. package/dist/components/collapsible.js +28 -0
  33. package/dist/components/collapsible.js.map +1 -0
  34. package/dist/components/combobox.js +117 -0
  35. package/dist/components/combobox.js.map +1 -0
  36. package/dist/components/context-menu.js +63 -0
  37. package/dist/components/context-menu.js.map +1 -0
  38. package/dist/components/dialog.js +5 -0
  39. package/dist/components/drawer.js +59 -0
  40. package/dist/components/drawer.js.map +1 -0
  41. package/dist/components/field.js +49 -0
  42. package/dist/components/field.js.map +1 -0
  43. package/dist/components/fieldset.js +26 -0
  44. package/dist/components/fieldset.js.map +1 -0
  45. package/dist/components/form.js +17 -0
  46. package/dist/components/form.js.map +1 -0
  47. package/dist/components/input.js +5 -0
  48. package/dist/components/kbd.js +18 -0
  49. package/dist/components/kbd.js.map +1 -0
  50. package/dist/components/menu.js +7 -0
  51. package/dist/components/menubar.js +17 -0
  52. package/dist/components/menubar.js.map +1 -0
  53. package/dist/components/meter.js +47 -0
  54. package/dist/components/meter.js.map +1 -0
  55. package/dist/components/navigation-menu.js +74 -0
  56. package/dist/components/navigation-menu.js.map +1 -0
  57. package/dist/components/notification.js +91 -0
  58. package/dist/components/notification.js.map +1 -0
  59. package/dist/components/number-field.js +56 -0
  60. package/dist/components/number-field.js.map +1 -0
  61. package/dist/components/otp-field.js +19 -0
  62. package/dist/components/otp-field.js.map +1 -0
  63. package/dist/components/popover.js +46 -0
  64. package/dist/components/popover.js.map +1 -0
  65. package/dist/components/preview-card.js +31 -0
  66. package/dist/components/preview-card.js.map +1 -0
  67. package/dist/components/progress.js +47 -0
  68. package/dist/components/progress.js.map +1 -0
  69. package/dist/components/radio-group.js +34 -0
  70. package/dist/components/radio-group.js.map +1 -0
  71. package/dist/components/scroll-area.js +43 -0
  72. package/dist/components/scroll-area.js.map +1 -0
  73. package/dist/components/select.js +69 -0
  74. package/dist/components/select.js.map +1 -0
  75. package/dist/components/separator.js +17 -0
  76. package/dist/components/separator.js.map +1 -0
  77. package/dist/components/slider.js +61 -0
  78. package/dist/components/slider.js.map +1 -0
  79. package/dist/components/switch.js +28 -0
  80. package/dist/components/switch.js.map +1 -0
  81. package/dist/components/tabs.js +42 -0
  82. package/dist/components/tabs.js.map +1 -0
  83. package/dist/components/toast.js +60 -0
  84. package/dist/components/toast.js.map +1 -0
  85. package/dist/components/toggle-group.js +17 -0
  86. package/dist/components/toggle-group.js.map +1 -0
  87. package/dist/components/toggle.js +33 -0
  88. package/dist/components/toggle.js.map +1 -0
  89. package/dist/components/toolbar.js +55 -0
  90. package/dist/components/toolbar.js.map +1 -0
  91. package/dist/components/tooltip.js +32 -0
  92. package/dist/components/tooltip.js.map +1 -0
  93. package/dist/icons.js +192 -0
  94. package/dist/icons.js.map +1 -0
  95. package/dist/index.js +30 -0
  96. package/dist/primitives/accordion.js +3 -0
  97. package/dist/primitives/alert-dialog.js +3 -0
  98. package/dist/primitives/autocomplete.js +3 -0
  99. package/dist/primitives/avatar.js +3 -0
  100. package/dist/primitives/button.js +3 -0
  101. package/dist/primitives/checkbox-group.js +3 -0
  102. package/dist/primitives/checkbox.js +3 -0
  103. package/dist/primitives/collapsible.js +3 -0
  104. package/dist/primitives/combobox.js +3 -0
  105. package/dist/primitives/context-menu.js +3 -0
  106. package/dist/primitives/csp-provider.js +3 -0
  107. package/dist/primitives/dialog.js +3 -0
  108. package/dist/primitives/direction-provider.js +3 -0
  109. package/dist/primitives/drawer.js +3 -0
  110. package/dist/primitives/field.js +3 -0
  111. package/dist/primitives/fieldset.js +3 -0
  112. package/dist/primitives/form.js +3 -0
  113. package/dist/primitives/input.js +3 -0
  114. package/dist/primitives/menu.js +3 -0
  115. package/dist/primitives/menubar.js +3 -0
  116. package/dist/primitives/meter.js +3 -0
  117. package/dist/primitives/navigation-menu.js +3 -0
  118. package/dist/primitives/number-field.js +3 -0
  119. package/dist/primitives/otp-field.js +3 -0
  120. package/dist/primitives/popover.js +3 -0
  121. package/dist/primitives/preview-card.js +3 -0
  122. package/dist/primitives/progress.js +3 -0
  123. package/dist/primitives/radio-group.js +3 -0
  124. package/dist/primitives/radio.js +3 -0
  125. package/dist/primitives/scroll-area.js +3 -0
  126. package/dist/primitives/select.js +3 -0
  127. package/dist/primitives/separator.js +3 -0
  128. package/dist/primitives/slider.js +3 -0
  129. package/dist/primitives/switch.js +3 -0
  130. package/dist/primitives/tabs.js +3 -0
  131. package/dist/primitives/toast.js +3 -0
  132. package/dist/primitives/toggle-group.js +3 -0
  133. package/dist/primitives/toggle.js +3 -0
  134. package/dist/primitives/toolbar.js +3 -0
  135. package/dist/primitives/tooltip.js +3 -0
  136. package/dist/primitives.js +84 -0
  137. package/dist/primitives.js.map +1 -0
  138. package/dist/src/components/accordion/accordion.d.ts +24 -0
  139. package/dist/src/components/accordion/index.d.ts +1 -0
  140. package/dist/src/components/alert-dialog/alert-dialog.d.ts +41 -0
  141. package/dist/src/components/alert-dialog/index.d.ts +1 -0
  142. package/dist/src/components/autocomplete/autocomplete.d.ts +38 -0
  143. package/dist/src/components/autocomplete/index.d.ts +1 -0
  144. package/dist/src/components/avatar/avatar.d.ts +40 -0
  145. package/dist/src/components/avatar/index.d.ts +1 -0
  146. package/dist/src/components/badge/badge.d.ts +63 -0
  147. package/dist/src/components/badge/index.d.ts +1 -0
  148. package/dist/src/components/button/button.d.ts +196 -0
  149. package/dist/src/components/button/close-button.d.ts +28 -0
  150. package/dist/src/components/button/index.d.ts +2 -0
  151. package/dist/src/components/checkbox/checkbox-group.d.ts +15 -0
  152. package/dist/src/components/checkbox/checkbox.d.ts +20 -0
  153. package/dist/src/components/checkbox/index.d.ts +2 -0
  154. package/dist/src/components/collapsible/collapsible.d.ts +20 -0
  155. package/dist/src/components/collapsible/index.d.ts +1 -0
  156. package/dist/src/components/combobox/combobox.d.ts +49 -0
  157. package/dist/src/components/combobox/index.d.ts +1 -0
  158. package/dist/src/components/context-menu/context-menu.d.ts +34 -0
  159. package/dist/src/components/context-menu/index.d.ts +1 -0
  160. package/dist/src/components/dialog/dialog.d.ts +41 -0
  161. package/dist/src/components/dialog/index.d.ts +1 -0
  162. package/dist/src/components/drawer/drawer.d.ts +32 -0
  163. package/dist/src/components/drawer/index.d.ts +1 -0
  164. package/dist/src/components/field/field.d.ts +27 -0
  165. package/dist/src/components/field/index.d.ts +1 -0
  166. package/dist/src/components/fieldset/fieldset.d.ts +18 -0
  167. package/dist/src/components/fieldset/index.d.ts +1 -0
  168. package/dist/src/components/form/form.d.ts +14 -0
  169. package/dist/src/components/form/index.d.ts +1 -0
  170. package/dist/src/components/input/index.d.ts +1 -0
  171. package/dist/src/components/input/input.d.ts +30 -0
  172. package/dist/src/components/kbd/index.d.ts +1 -0
  173. package/dist/src/components/kbd/kbd.d.ts +18 -0
  174. package/dist/src/components/menu/index.d.ts +1 -0
  175. package/dist/src/components/menu/menu.d.ts +47 -0
  176. package/dist/src/components/menubar/index.d.ts +1 -0
  177. package/dist/src/components/menubar/menubar.d.ts +14 -0
  178. package/dist/src/components/meter/index.d.ts +1 -0
  179. package/dist/src/components/meter/meter.d.ts +24 -0
  180. package/dist/src/components/navigation-menu/index.d.ts +1 -0
  181. package/dist/src/components/navigation-menu/navigation-menu.d.ts +35 -0
  182. package/dist/src/components/notification/index.d.ts +1 -0
  183. package/dist/src/components/notification/notification.d.ts +73 -0
  184. package/dist/src/components/number-field/index.d.ts +1 -0
  185. package/dist/src/components/number-field/number-field.d.ts +28 -0
  186. package/dist/src/components/otp-field/index.d.ts +1 -0
  187. package/dist/src/components/otp-field/otp-field.d.ts +17 -0
  188. package/dist/src/components/popover/index.d.ts +1 -0
  189. package/dist/src/components/popover/popover.d.ts +27 -0
  190. package/dist/src/components/preview-card/index.d.ts +1 -0
  191. package/dist/src/components/preview-card/preview-card.d.ts +22 -0
  192. package/dist/src/components/progress/index.d.ts +1 -0
  193. package/dist/src/components/progress/progress.d.ts +24 -0
  194. package/dist/src/components/radio-group/index.d.ts +1 -0
  195. package/dist/src/components/radio-group/radio-group.d.ts +28 -0
  196. package/dist/src/components/scroll-area/index.d.ts +1 -0
  197. package/dist/src/components/scroll-area/scroll-area.d.ts +25 -0
  198. package/dist/src/components/select/index.d.ts +1 -0
  199. package/dist/src/components/select/select.d.ts +36 -0
  200. package/dist/src/components/separator/index.d.ts +1 -0
  201. package/dist/src/components/separator/separator.d.ts +14 -0
  202. package/dist/src/components/slider/index.d.ts +1 -0
  203. package/dist/src/components/slider/slider.d.ts +30 -0
  204. package/dist/src/components/switch/index.d.ts +1 -0
  205. package/dist/src/components/switch/switch.d.ts +18 -0
  206. package/dist/src/components/tabs/index.d.ts +1 -0
  207. package/dist/src/components/tabs/tabs.d.ts +24 -0
  208. package/dist/src/components/toast/index.d.ts +1 -0
  209. package/dist/src/components/toast/toast.d.ts +34 -0
  210. package/dist/src/components/toggle/index.d.ts +1 -0
  211. package/dist/src/components/toggle/toggle.d.ts +33 -0
  212. package/dist/src/components/toggle-group/index.d.ts +1 -0
  213. package/dist/src/components/toggle-group/toggle-group.d.ts +15 -0
  214. package/dist/src/components/toolbar/index.d.ts +1 -0
  215. package/dist/src/components/toolbar/toolbar.d.ts +28 -0
  216. package/dist/src/components/tooltip/index.d.ts +1 -0
  217. package/dist/src/components/tooltip/tooltip.d.ts +23 -0
  218. package/dist/src/icons/discord.d.ts +3 -0
  219. package/dist/src/icons/github.d.ts +3 -0
  220. package/dist/src/icons/google.d.ts +3 -0
  221. package/dist/src/icons/imessage.d.ts +3 -0
  222. package/dist/src/icons/index.d.ts +18 -0
  223. package/dist/src/icons/photon-mark.d.ts +3 -0
  224. package/dist/src/icons/reddit.d.ts +3 -0
  225. package/dist/src/icons/slack.d.ts +3 -0
  226. package/dist/src/icons/telegram.d.ts +3 -0
  227. package/dist/src/icons/whatsapp.d.ts +3 -0
  228. package/dist/src/icons/x.d.ts +3 -0
  229. package/dist/src/icons/youtube.d.ts +3 -0
  230. package/dist/src/index.d.ts +11 -0
  231. package/dist/src/primitives/accordion.d.ts +5 -0
  232. package/dist/src/primitives/alert-dialog.d.ts +5 -0
  233. package/dist/src/primitives/autocomplete.d.ts +5 -0
  234. package/dist/src/primitives/avatar.d.ts +5 -0
  235. package/dist/src/primitives/button.d.ts +5 -0
  236. package/dist/src/primitives/checkbox-group.d.ts +5 -0
  237. package/dist/src/primitives/checkbox.d.ts +5 -0
  238. package/dist/src/primitives/collapsible.d.ts +5 -0
  239. package/dist/src/primitives/combobox.d.ts +5 -0
  240. package/dist/src/primitives/context-menu.d.ts +5 -0
  241. package/dist/src/primitives/csp-provider.d.ts +5 -0
  242. package/dist/src/primitives/dialog.d.ts +5 -0
  243. package/dist/src/primitives/direction-provider.d.ts +5 -0
  244. package/dist/src/primitives/drawer.d.ts +5 -0
  245. package/dist/src/primitives/field.d.ts +5 -0
  246. package/dist/src/primitives/fieldset.d.ts +5 -0
  247. package/dist/src/primitives/form.d.ts +5 -0
  248. package/dist/src/primitives/index.d.ts +44 -0
  249. package/dist/src/primitives/input.d.ts +5 -0
  250. package/dist/src/primitives/menu.d.ts +5 -0
  251. package/dist/src/primitives/menubar.d.ts +5 -0
  252. package/dist/src/primitives/meter.d.ts +5 -0
  253. package/dist/src/primitives/navigation-menu.d.ts +5 -0
  254. package/dist/src/primitives/number-field.d.ts +5 -0
  255. package/dist/src/primitives/otp-field.d.ts +5 -0
  256. package/dist/src/primitives/popover.d.ts +5 -0
  257. package/dist/src/primitives/preview-card.d.ts +5 -0
  258. package/dist/src/primitives/progress.d.ts +5 -0
  259. package/dist/src/primitives/radio-group.d.ts +5 -0
  260. package/dist/src/primitives/radio.d.ts +5 -0
  261. package/dist/src/primitives/scroll-area.d.ts +5 -0
  262. package/dist/src/primitives/select.d.ts +5 -0
  263. package/dist/src/primitives/separator.d.ts +5 -0
  264. package/dist/src/primitives/slider.d.ts +5 -0
  265. package/dist/src/primitives/switch.d.ts +5 -0
  266. package/dist/src/primitives/tabs.d.ts +5 -0
  267. package/dist/src/primitives/toast.d.ts +5 -0
  268. package/dist/src/primitives/toggle-group.d.ts +5 -0
  269. package/dist/src/primitives/toggle.d.ts +5 -0
  270. package/dist/src/primitives/toolbar.d.ts +5 -0
  271. package/dist/src/primitives/tooltip.d.ts +5 -0
  272. package/dist/src/utils/cn.d.ts +3 -0
  273. package/dist/src/utils/index.d.ts +4 -0
  274. package/dist/src/utils/is-react-component.d.ts +9 -0
  275. package/dist/src/utils/link-provider.d.ts +17 -0
  276. package/dist/src/utils/resolve-variant.d.ts +19 -0
  277. package/dist/utils.js +11 -0
  278. package/package.json +406 -0
  279. package/src/styles/fonts.css +20 -0
  280. package/src/styles/pho.css +50 -0
  281. package/src/styles/theme.css +289 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation-menu.js","names":[],"sources":["../../src/components/navigation-menu/navigation-menu.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { NavigationMenu as BaseNav } from \"@base-ui/react/navigation-menu\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nfunction Root({ className, ...props }: StyledProps<typeof BaseNav.Root>) {\n return (\n <BaseNav.Root className={cn(\"relative min-w-max\", className)} {...props} />\n );\n}\n\nfunction List({ className, ...props }: StyledProps<typeof BaseNav.List>) {\n return (\n <BaseNav.List\n className={cn(\"relative flex items-center gap-1\", className)}\n {...props}\n />\n );\n}\n\nconst Item = BaseNav.Item;\nconst Icon = BaseNav.Icon;\n\nfunction Trigger({ className, ...props }: StyledProps<typeof BaseNav.Trigger>) {\n return (\n <BaseNav.Trigger\n className={cn(\n \"outline-pho-brand text-pho-secondary hover:bg-pho-secondary data-[popup-open]:bg-pho-secondary inline-flex cursor-pointer items-center gap-1 rounded-md px-3 py-2 text-sm font-medium transition focus-visible:outline-2 focus-visible:-outline-offset-1\",\n \"[&>svg]:size-4 [&>svg]:transition-transform [&>svg]:duration-150 data-[popup-open]:[&>svg]:rotate-180\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Content({ className, ...props }: StyledProps<typeof BaseNav.Content>) {\n return <BaseNav.Content className={cn(\"w-full p-2\", className)} {...props} />;\n}\n\nfunction Link({ className, ...props }: StyledProps<typeof BaseNav.Link>) {\n return (\n <BaseNav.Link\n className={cn(\n \"outline-pho-brand text-pho-secondary hover:bg-pho-secondary hover:text-pho-primary block rounded-lg px-3 py-2 text-sm transition focus-visible:outline-2 focus-visible:-outline-offset-1\",\n className,\n )}\n {...props}\n />\n );\n}\n\nconst Portal = BaseNav.Portal;\n\nfunction Positioner({\n className,\n sideOffset = 8,\n ...props\n}: StyledProps<typeof BaseNav.Positioner>) {\n return (\n <BaseNav.Positioner\n sideOffset={sideOffset}\n className={cn(\"z-50\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseNav.Popup>) {\n return (\n <BaseNav.Popup\n className={cn(\n \"squircle bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-interactive relative h-[var(--popup-height)] w-[var(--popup-width)] origin-[var(--transform-origin)] rounded-xl ring-1 transition-[opacity,transform,width,height] duration-150 ease-out outline-none ring-inset\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Viewport({\n className,\n ...props\n}: StyledProps<typeof BaseNav.Viewport>) {\n return (\n <BaseNav.Viewport\n className={cn(\"relative h-full w-full overflow-hidden\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Site navigation menu built on Base UI `NavigationMenu` — a horizontal bar\n * whose items open animated dropdown panels that resize to their content. Each\n * `Item` pairs a `Trigger` with `Content` (rendered into the shared\n * `Viewport`). Use it for primary site nav with grouped links; for app action\n * menus use `Menu`.\n */\nexport const NavigationMenu = {\n Root,\n List,\n Item,\n Trigger,\n Content,\n Link,\n Icon,\n Portal,\n Positioner,\n Popup,\n Viewport,\n};\n"],"mappings":";;;;;AAYA,SAAS,EAAK,EAAE,WAAA,GAAW,GAAG,EAAA,GAA2C;AACvE,SACE,gBAAA,EAAC,EAAQ,MAAT;AAAA,IAAc,WAAW,EAAG,sBAAsB,CAAS;AAAA,IAAG,GAAI;AAAA,EAAQ,CAAA;AAE9E;AAEA,SAAS,EAAK,EAAE,WAAA,GAAW,GAAG,EAAA,GAA2C;AACvE,SACE,gBAAA,EAAC,EAAQ,MAAT;AAAA,IACE,WAAW,EAAG,oCAAoC,CAAS;AAAA,IAC3D,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,IAAM,IAAO,EAAQ,MACf,IAAO,EAAQ;AAErB,SAAS,EAAQ,EAAE,WAAA,GAAW,GAAG,EAAA,GAA8C;AAC7E,SACE,gBAAA,EAAC,EAAQ,SAAT;AAAA,IACE,WAAW,EACT,4PACA,yGACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAQ,EAAE,WAAA,GAAW,GAAG,EAAA,GAA8C;AAC7E,SAAO,gBAAA,EAAC,EAAQ,SAAT;AAAA,IAAiB,WAAW,EAAG,cAAc,CAAS;AAAA,IAAG,GAAI;AAAA,EAAQ,CAAA;AAC9E;AAEA,SAAS,EAAK,EAAE,WAAA,GAAW,GAAG,EAAA,GAA2C;AACvE,SACE,gBAAA,EAAC,EAAQ,MAAT;AAAA,IACE,WAAW,EACT,4LACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,IAAM,IAAS,EAAQ;AAEvB,SAAS,EAAW,EAClB,WAAA,GACA,YAAA,IAAa,GACb,GAAG,EAAA,GACsC;AACzC,SACE,gBAAA,EAAC,EAAQ,YAAT;AAAA,IACc,YAAA;AAAA,IACZ,WAAW,EAAG,QAAQ,CAAS;AAAA,IAC/B,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EAAE,WAAA,GAAW,GAAG,EAAA,GAA4C;AACzE,SACE,gBAAA,EAAC,EAAQ,OAAT;AAAA,IACE,WAAW,EACT,oRACA,kEACA,8DACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAS,EAChB,WAAA,GACA,GAAG,EAAA,GACoC;AACvC,SACE,gBAAA,EAAC,EAAQ,UAAT;AAAA,IACE,WAAW,EAAG,0CAA0C,CAAS;AAAA,IACjE,GAAI;AAAA,EACL,CAAA;AAEL;AASA,IAAa,IAAiB;AAAA,EAC5B,MAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,YAAA;AAAA,EACA,OAAA;AAAA,EACA,UAAA;AACF"}
@@ -0,0 +1,91 @@
1
+ "use client";
2
+ import { t } from "../chunks/cn-D6jQqeRj.js";
3
+ import { t as v } from "../chunks/resolve-variant-CcD8iG5l.js";
4
+ import "react";
5
+ import { jsx as e, jsxs as r } from "react/jsx-runtime";
6
+ import { CheckCircle as N, Info as n, WarningCircle as l, X as y } from "@phosphor-icons/react";
7
+ var w = {
8
+ brand: {
9
+ classes: "text-fg-pho-brand",
10
+ description: "Informational / product update (default)"
11
+ },
12
+ gray: {
13
+ classes: "text-fg-pho-secondary",
14
+ description: "Neutral, low-stakes note"
15
+ },
16
+ success: {
17
+ classes: "text-pho-success",
18
+ description: "An action completed"
19
+ },
20
+ warning: {
21
+ classes: "text-pho-warning",
22
+ description: "Needs attention, not yet failed"
23
+ },
24
+ error: {
25
+ classes: "text-fg-pho-error",
26
+ description: "Something went wrong"
27
+ }
28
+ }, C = {
29
+ brand: n,
30
+ gray: n,
31
+ success: N,
32
+ warning: l,
33
+ error: l
34
+ }, c = "cursor-pointer text-sm font-semibold outline-pho-brand transition duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2";
35
+ function I({ color: i = "brand", title: d, description: o, confirmLabel: a, onConfirm: p, dismissLabel: h = "Dismiss", onClose: s, icon: u, className: m, ref: f, ...x }) {
36
+ const g = u ?? C[i], b = !!a;
37
+ return /* @__PURE__ */ r("div", {
38
+ ref: f,
39
+ ...x,
40
+ className: t("squircle ring-pho-interactive bg-pho-primary shadow-pho-lg relative flex w-full max-w-sm gap-4 rounded-xl p-4 ring-1 ring-inset", m),
41
+ children: [
42
+ /* @__PURE__ */ e(g, {
43
+ "aria-hidden": "true",
44
+ className: t("mt-0.5 size-5 shrink-0", v(w, i))
45
+ }),
46
+ /* @__PURE__ */ r("div", {
47
+ className: "flex flex-1 flex-col gap-3 pr-6",
48
+ children: [/* @__PURE__ */ r("div", {
49
+ className: "flex flex-col gap-1",
50
+ children: [/* @__PURE__ */ e("p", {
51
+ className: "text-pho-primary text-sm font-semibold",
52
+ children: d
53
+ }), o != null && o !== !1 && /* @__PURE__ */ e("p", {
54
+ className: "text-pho-tertiary text-sm",
55
+ children: o
56
+ })]
57
+ }), b && /* @__PURE__ */ r("div", {
58
+ className: "flex gap-4",
59
+ children: [/* @__PURE__ */ e("button", {
60
+ type: "button",
61
+ onClick: p,
62
+ className: t(c, "text-pho-brand hover:text-pho-brand-hover"),
63
+ children: a
64
+ }), /* @__PURE__ */ e("button", {
65
+ type: "button",
66
+ onClick: s,
67
+ className: t(c, "text-pho-secondary hover:text-pho-secondary-hover"),
68
+ children: h
69
+ })]
70
+ })]
71
+ }),
72
+ s && /* @__PURE__ */ e("button", {
73
+ type: "button",
74
+ onClick: s,
75
+ "aria-label": "Dismiss",
76
+ className: "text-fg-pho-quaternary hover:text-fg-pho-quaternary-hover hover:bg-pho-secondary outline-pho-brand absolute top-2.5 right-2.5 flex size-6 cursor-pointer items-center justify-center rounded-md transition focus-visible:outline-2 [&>svg]:size-4",
77
+ children: /* @__PURE__ */ e(y, {
78
+ "aria-hidden": "true",
79
+ weight: "bold"
80
+ })
81
+ })
82
+ ]
83
+ });
84
+ }
85
+ I.displayName = "Notification";
86
+ export {
87
+ w as NOTIFICATION_COLORS,
88
+ I as Notification
89
+ };
90
+
91
+ //# sourceMappingURL=notification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.js","names":[],"sources":["../../src/components/notification/notification.tsx"],"sourcesContent":["import { type HTMLAttributes, type ReactNode, type Ref } from \"react\";\nimport {\n CheckCircle,\n Info,\n WarningCircle,\n X,\n type Icon,\n} from \"@phosphor-icons/react\";\nimport { cn } from \"../../utils/cn\";\nimport { resolveVariant, type VariantMap } from \"../../utils/resolve-variant\";\n\n/**\n * Design notes (Geist-aligned):\n * - ONE closed, semantic axis: `color`. It selects a status glyph *and* its\n * tint together — you never pick an icon and a color separately. This is the\n * `IconNotification` flavor from the app; the unused avatar/image variants of\n * the source family are intentionally dropped.\n * - The action row is a single reduced pair: a brand `confirmLabel` link beside\n * a gray dismiss link. It appears only when there's something to confirm.\n * - `onClose` is the only thing that renders the top-right close button — no\n * separate boolean flag to keep in sync.\n */\n\n/** Status color → icon tint. A bare status-tinted glyph, no badge surface. */\nexport const NOTIFICATION_COLORS = {\n brand: {\n classes: \"text-fg-pho-brand\",\n description: \"Informational / product update (default)\",\n },\n gray: {\n classes: \"text-fg-pho-secondary\",\n description: \"Neutral, low-stakes note\",\n },\n success: {\n classes: \"text-pho-success\",\n description: \"An action completed\",\n },\n warning: {\n classes: \"text-pho-warning\",\n description: \"Needs attention, not yet failed\",\n },\n error: {\n classes: \"text-fg-pho-error\",\n description: \"Something went wrong\",\n },\n} satisfies VariantMap;\n\nexport type NotificationColor = keyof typeof NOTIFICATION_COLORS;\n\n/** Status color → glyph. Mirrors the source's `iconMap` semantics. */\nconst ICON_MAP = {\n brand: Info,\n gray: Info,\n success: CheckCircle,\n warning: WarningCircle,\n error: WarningCircle,\n} satisfies Record<NotificationColor, Icon>;\n\nexport interface NotificationProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n \"title\" | \"color\"\n> {\n /** Status color — selects the glyph and its tint. @default \"brand\" */\n color?: NotificationColor;\n /** Bold heading line. */\n title: ReactNode;\n /** Supporting line under the title. */\n description?: ReactNode;\n /** Confirm action label — renders a brand link paired with a dismiss link. */\n confirmLabel?: string;\n /** Called when the confirm link is clicked. */\n onConfirm?: () => void;\n /** Dismiss link label, shown beside the confirm link. @default \"Dismiss\" */\n dismissLabel?: string;\n /** Called on dismiss. Its presence also renders the top-right close button. */\n onClose?: () => void;\n /** Override the status glyph while keeping the color's tint. */\n icon?: Icon;\n className?: string;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst LINK_CLASS =\n \"cursor-pointer text-sm font-semibold outline-pho-brand transition duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2\";\n\n/**\n * Notification — the standalone status card ported from the app's\n * `IconNotification`: a status glyph, a title/description, an optional\n * confirm+dismiss link pair, and an optional close button. It is a *card*, not a\n * lifecycle: it owns its surface but nothing about timing or stacking.\n *\n * For a transient, auto-stacking toast, drop it inside pho-ui's Base UI\n * {@link Toast} — render it as the child of a `Toast.Root` whose own surface you\n * neutralize (`className=\"bg-transparent p-0 shadow-none ring-0\"`) so the\n * manager owns motion and swipe while this card owns the look. For a choice the\n * user must make, use `AlertDialog` instead.\n */\nexport function Notification({\n color = \"brand\",\n title,\n description,\n confirmLabel,\n onConfirm,\n dismissLabel = \"Dismiss\",\n onClose,\n icon,\n className,\n ref,\n ...props\n}: NotificationProps) {\n const Glyph = icon ?? ICON_MAP[color];\n const showActions = Boolean(confirmLabel);\n\n return (\n <div\n ref={ref}\n {...props}\n className={cn(\n \"squircle ring-pho-interactive bg-pho-primary shadow-pho-lg relative flex w-full max-w-sm gap-4 rounded-xl p-4 ring-1 ring-inset\",\n className,\n )}\n >\n <Glyph\n aria-hidden=\"true\"\n className={cn(\n \"mt-0.5 size-5 shrink-0\",\n resolveVariant(NOTIFICATION_COLORS, color),\n )}\n />\n\n <div className=\"flex flex-1 flex-col gap-3 pr-6\">\n <div className=\"flex flex-col gap-1\">\n <p className=\"text-pho-primary text-sm font-semibold\">{title}</p>\n {description != null && description !== false && (\n <p className=\"text-pho-tertiary text-sm\">{description}</p>\n )}\n </div>\n\n {showActions && (\n <div className=\"flex gap-4\">\n <button\n type=\"button\"\n onClick={onConfirm}\n className={cn(\n LINK_CLASS,\n \"text-pho-brand hover:text-pho-brand-hover\",\n )}\n >\n {confirmLabel}\n </button>\n <button\n type=\"button\"\n onClick={onClose}\n className={cn(\n LINK_CLASS,\n \"text-pho-secondary hover:text-pho-secondary-hover\",\n )}\n >\n {dismissLabel}\n </button>\n </div>\n )}\n </div>\n\n {onClose && (\n <button\n type=\"button\"\n onClick={onClose}\n aria-label=\"Dismiss\"\n className=\"text-fg-pho-quaternary hover:text-fg-pho-quaternary-hover hover:bg-pho-secondary outline-pho-brand absolute top-2.5 right-2.5 flex size-6 cursor-pointer items-center justify-center rounded-md transition focus-visible:outline-2 [&>svg]:size-4\"\n >\n <X aria-hidden=\"true\" weight=\"bold\" />\n </button>\n )}\n </div>\n );\n}\n\nNotification.displayName = \"Notification\";\n"],"mappings":";;;;;;AAwBA,IAAa,IAAsB;AAAA,EACjC,OAAO;AAAA,IACL,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,OAAO;AAAA,IACL,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AACF,GAKM,IAAW;AAAA,EACf,OAAO;AAAA,EACP,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACT,GA0BM,IACJ;AAcF,SAAgB,EAAa,EAC3B,OAAA,IAAQ,SACR,OAAA,GACA,aAAA,GACA,cAAA,GACA,WAAA,GACA,cAAA,IAAe,WACf,SAAA,GACA,MAAA,GACA,WAAA,GACA,KAAA,GACA,GAAG,EAAA,GACiB;AACpB,QAAM,IAAQ,KAAQ,EAAS,CAAA,GACzB,IAAc,EAAQ;AAE5B,SACE,gBAAA,EAAC,OAAD;AAAA,IACO,KAAA;AAAA,IACL,GAAI;AAAA,IACJ,WAAW,EACT,mIACA,CACF;AAAA,cANF;AAAA,MAQE,gBAAA,EAAC,GAAD;AAAA,QACE,eAAY;AAAA,QACZ,WAAW,EACT,0BACA,EAAe,GAAqB,CAAK,CAC3C;AAAA,MACD,CAAA;AAAA,MAED,gBAAA,EAAC,OAAD;AAAA,QAAK,WAAU;AAAA,kBAAf,CACE,gBAAA,EAAC,OAAD;AAAA,UAAK,WAAU;AAAA,oBAAf,CACE,gBAAA,EAAC,KAAD;AAAA,YAAG,WAAU;AAAA,sBAA0C;AAAA,UAAS,CAAA,GAC/D,KAAe,QAAQ,MAAgB,MACtC,gBAAA,EAAC,KAAD;AAAA,YAAG,WAAU;AAAA,sBAA6B;AAAA,UAAe,CAAA,CAExD;AAAA,YAEJ,KACC,gBAAA,EAAC,OAAD;AAAA,UAAK,WAAU;AAAA,oBAAf,CACE,gBAAA,EAAC,UAAD;AAAA,YACE,MAAK;AAAA,YACL,SAAS;AAAA,YACT,WAAW,EACT,GACA,2CACF;AAAA,sBAEC;AAAA,UACK,CAAA,GACR,gBAAA,EAAC,UAAD;AAAA,YACE,MAAK;AAAA,YACL,SAAS;AAAA,YACT,WAAW,EACT,GACA,mDACF;AAAA,sBAEC;AAAA,UACK,CAAA,CACL;AAAA,UAEJ;AAAA;MAEJ,KACC,gBAAA,EAAC,UAAD;AAAA,QACE,MAAK;AAAA,QACL,SAAS;AAAA,QACT,cAAW;AAAA,QACX,WAAU;AAAA,kBAEV,gBAAA,EAAC,GAAD;AAAA,UAAG,eAAY;AAAA,UAAO,QAAO;AAAA,QAAQ,CAAA;AAAA,MAC/B,CAAA;AAAA,IAEP;AAAA;AAET;AAEA,EAAa,cAAc"}
@@ -0,0 +1,56 @@
1
+ "use client";
2
+ import { t as n } from "../chunks/cn-D6jQqeRj.js";
3
+ import "react";
4
+ import { jsx as o } from "react/jsx-runtime";
5
+ import { NumberField as t } from "@base-ui/react/number-field";
6
+ function i({ className: r, ...e }) {
7
+ return /* @__PURE__ */ o(t.Root, {
8
+ className: n("flex flex-col gap-1.5", r),
9
+ ...e
10
+ });
11
+ }
12
+ function s({ className: r, ...e }) {
13
+ return /* @__PURE__ */ o(t.Group, {
14
+ className: n("bg-pho-primary shadow-pho-xs ring-pho-primary inline-flex items-stretch rounded-lg ring-1 transition-shadow duration-100 ease-linear ring-inset", "has-[input:focus-visible]:ring-pho-brand has-[input:focus-visible]:ring-2", r),
15
+ ...e
16
+ });
17
+ }
18
+ var a = n("text-fg-pho-quaternary hover:text-fg-pho-quaternary-hover hover:bg-pho-primary-hover flex w-9 cursor-pointer items-center justify-center transition duration-100 ease-linear select-none first:rounded-l-lg last:rounded-r-lg", "disabled:cursor-not-allowed disabled:opacity-50 [&>svg]:size-4");
19
+ function u({ className: r, ...e }) {
20
+ return /* @__PURE__ */ o(t.Decrement, {
21
+ className: n(a, r),
22
+ ...e
23
+ });
24
+ }
25
+ function c({ className: r, ...e }) {
26
+ return /* @__PURE__ */ o(t.Increment, {
27
+ className: n(a, r),
28
+ ...e
29
+ });
30
+ }
31
+ function l({ className: r, ...e }) {
32
+ return /* @__PURE__ */ o(t.Input, {
33
+ className: n("text-pho-primary text-md w-16 border-x border-[var(--border-color-pho-secondary)] bg-transparent px-2 py-2 text-center tabular-nums outline-none", r),
34
+ ...e
35
+ });
36
+ }
37
+ function p({ className: r, ...e }) {
38
+ return /* @__PURE__ */ o(t.ScrubArea, {
39
+ className: n("cursor-ew-resize select-none", r),
40
+ ...e
41
+ });
42
+ }
43
+ var h = {
44
+ Root: i,
45
+ Group: s,
46
+ Decrement: u,
47
+ Increment: c,
48
+ Input: l,
49
+ ScrubArea: p,
50
+ ScrubAreaCursor: t.ScrubAreaCursor
51
+ };
52
+ export {
53
+ h as NumberField
54
+ };
55
+
56
+ //# sourceMappingURL=number-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-field.js","names":[],"sources":["../../src/components/number-field/number-field.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { NumberField as BaseNumberField } from \"@base-ui/react/number-field\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nfunction Root({\n className,\n ...props\n}: StyledProps<typeof BaseNumberField.Root>) {\n return (\n <BaseNumberField.Root\n className={cn(\"flex flex-col gap-1.5\", className)}\n {...props}\n />\n );\n}\n\nfunction Group({\n className,\n ...props\n}: StyledProps<typeof BaseNumberField.Group>) {\n return (\n <BaseNumberField.Group\n className={cn(\n \"bg-pho-primary shadow-pho-xs ring-pho-primary inline-flex items-stretch rounded-lg ring-1 transition-shadow duration-100 ease-linear ring-inset\",\n \"has-[input:focus-visible]:ring-pho-brand has-[input:focus-visible]:ring-2\",\n className,\n )}\n {...props}\n />\n );\n}\n\nconst STEPPER = cn(\n \"text-fg-pho-quaternary hover:text-fg-pho-quaternary-hover hover:bg-pho-primary-hover flex w-9 cursor-pointer items-center justify-center transition duration-100 ease-linear select-none first:rounded-l-lg last:rounded-r-lg\",\n \"disabled:cursor-not-allowed disabled:opacity-50 [&>svg]:size-4\",\n);\n\nfunction Decrement({\n className,\n ...props\n}: StyledProps<typeof BaseNumberField.Decrement>) {\n return (\n <BaseNumberField.Decrement className={cn(STEPPER, className)} {...props} />\n );\n}\n\nfunction Increment({\n className,\n ...props\n}: StyledProps<typeof BaseNumberField.Increment>) {\n return (\n <BaseNumberField.Increment className={cn(STEPPER, className)} {...props} />\n );\n}\n\nfunction Input({\n className,\n ...props\n}: StyledProps<typeof BaseNumberField.Input>) {\n return (\n <BaseNumberField.Input\n className={cn(\n \"text-pho-primary text-md w-16 border-x border-[var(--border-color-pho-secondary)] bg-transparent px-2 py-2 text-center tabular-nums outline-none\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ScrubArea({\n className,\n ...props\n}: StyledProps<typeof BaseNumberField.ScrubArea>) {\n return (\n <BaseNumberField.ScrubArea\n className={cn(\"cursor-ew-resize select-none\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Numeric input with stepper buttons, built on Base UI `NumberField`. Compose\n * `NumberField.Group` with a `Decrement`, `Input`, and `Increment`; it handles\n * clamping, keyboard step, and pointer scrubbing. Use it over a plain text\n * input whenever the value is a number with a sensible range.\n */\nexport const NumberField = {\n Root,\n Group,\n Decrement,\n Increment,\n Input,\n ScrubArea,\n ScrubAreaCursor: BaseNumberField.ScrubAreaCursor,\n};\n"],"mappings":";;;;;AAYA,SAAS,EAAK,EACZ,WAAA,GACA,GAAG,EAAA,GACwC;AAC3C,SACE,gBAAA,EAAC,EAAgB,MAAjB;AAAA,IACE,WAAW,EAAG,yBAAyB,CAAS;AAAA,IAChD,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EACb,WAAA,GACA,GAAG,EAAA,GACyC;AAC5C,SACE,gBAAA,EAAC,EAAgB,OAAjB;AAAA,IACE,WAAW,EACT,mJACA,6EACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,IAAM,IAAU,EACd,iOACA,gEACF;AAEA,SAAS,EAAU,EACjB,WAAA,GACA,GAAG,EAAA,GAC6C;AAChD,SACE,gBAAA,EAAC,EAAgB,WAAjB;AAAA,IAA2B,WAAW,EAAG,GAAS,CAAS;AAAA,IAAG,GAAI;AAAA,EAAQ,CAAA;AAE9E;AAEA,SAAS,EAAU,EACjB,WAAA,GACA,GAAG,EAAA,GAC6C;AAChD,SACE,gBAAA,EAAC,EAAgB,WAAjB;AAAA,IAA2B,WAAW,EAAG,GAAS,CAAS;AAAA,IAAG,GAAI;AAAA,EAAQ,CAAA;AAE9E;AAEA,SAAS,EAAM,EACb,WAAA,GACA,GAAG,EAAA,GACyC;AAC5C,SACE,gBAAA,EAAC,EAAgB,OAAjB;AAAA,IACE,WAAW,EACT,oJACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAU,EACjB,WAAA,GACA,GAAG,EAAA,GAC6C;AAChD,SACE,gBAAA,EAAC,EAAgB,WAAjB;AAAA,IACE,WAAW,EAAG,gCAAgC,CAAS;AAAA,IACvD,GAAI;AAAA,EACL,CAAA;AAEL;AAQA,IAAa,IAAc;AAAA,EACzB,MAAA;AAAA,EACA,OAAA;AAAA,EACA,WAAA;AAAA,EACA,WAAA;AAAA,EACA,OAAA;AAAA,EACA,WAAA;AAAA,EACA,iBAAiB,EAAgB;AACnC"}
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { t as r } from "../chunks/cn-D6jQqeRj.js";
3
+ import "react";
4
+ import { jsx as e } from "react/jsx-runtime";
5
+ import { OTPField as o } from "@base-ui/react/otp-field";
6
+ function s({ className: t, length: i, ...a }) {
7
+ return /* @__PURE__ */ e(o.Root, {
8
+ length: i,
9
+ className: r("flex items-center gap-2", t),
10
+ ...a,
11
+ children: Array.from({ length: i }, (d, n) => /* @__PURE__ */ e(o.Input, { className: r("squircle bg-pho-primary shadow-pho-xs ring-pho-primary text-pho-primary size-11 rounded-lg text-center text-lg font-medium ring-1 transition-shadow duration-100 ease-linear outline-none ring-inset", "focus-visible:ring-pho-brand focus-visible:ring-2", "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50") }, n))
12
+ });
13
+ }
14
+ s.displayName = "OtpField";
15
+ export {
16
+ s as OtpField
17
+ };
18
+
19
+ //# sourceMappingURL=otp-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"otp-field.js","names":[],"sources":["../../src/components/otp-field/otp-field.tsx"],"sourcesContent":["import { type ComponentProps } from \"react\";\nimport { OTPField as BaseOTPField } from \"@base-ui/react/otp-field\";\nimport { cn } from \"../../utils/cn\";\n\nexport interface OtpFieldProps extends Omit<\n ComponentProps<typeof BaseOTPField.Root>,\n \"className\"\n> {\n /** Class applied to the cell row. */\n className?: string;\n /** Number of single-character cells. */\n length: number;\n}\n\n/**\n * One-time-code input built on Base UI `OTPField` — a row of single-character\n * cells with paste, arrow-key, and auto-advance handling. Control with `value`\n * / `onValueChange`, or read the completed code via `onValueChange`.\n */\nexport function OtpField({ className, length, ...props }: OtpFieldProps) {\n return (\n <BaseOTPField.Root\n length={length}\n className={cn(\"flex items-center gap-2\", className)}\n {...props}\n >\n {Array.from({ length }, (_, i) => (\n <BaseOTPField.Input\n key={i}\n className={cn(\n \"squircle bg-pho-primary shadow-pho-xs ring-pho-primary text-pho-primary size-11 rounded-lg text-center text-lg font-medium ring-1 transition-shadow duration-100 ease-linear outline-none ring-inset\",\n \"focus-visible:ring-pho-brand focus-visible:ring-2\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n )}\n />\n ))}\n </BaseOTPField.Root>\n );\n}\n\nOtpField.displayName = \"OtpField\";\n"],"mappings":";;;;;AAmBA,SAAgB,EAAS,EAAE,WAAA,GAAW,QAAA,GAAQ,GAAG,EAAA,GAAwB;AACvE,SACE,gBAAA,EAAC,EAAa,MAAd;AAAA,IACU,QAAA;AAAA,IACR,WAAW,EAAG,2BAA2B,CAAS;AAAA,IAClD,GAAI;AAAA,cAEH,MAAM,KAAK,EAAE,QAAA,EAAO,GAAA,CAAI,GAAG,MAC1B,gBAAA,EAAC,EAAa,OAAd,EAEE,WAAW,EACT,wMACA,qDACA,+DACF,EACD,GANM,CAMN,CACF;AAAA,EACgB,CAAA;AAEvB;AAEA,EAAS,cAAc"}
@@ -0,0 +1,46 @@
1
+ "use client";
2
+ import { t as e } from "../chunks/cn-D6jQqeRj.js";
3
+ import "react";
4
+ import { jsx as i } from "react/jsx-runtime";
5
+ import { Popover as t } from "@base-ui/react/popover";
6
+ var n = t.Root, s = t.Trigger, p = t.Portal, l = t.Close;
7
+ function m({ className: r, sideOffset: o = 8, ...a }) {
8
+ return /* @__PURE__ */ i(t.Positioner, {
9
+ sideOffset: o,
10
+ className: e("z-50", r),
11
+ ...a
12
+ });
13
+ }
14
+ function c({ className: r, ...o }) {
15
+ return /* @__PURE__ */ i(t.Popup, {
16
+ className: e("squircle bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-interactive max-w-[calc(100vw-2rem)] origin-[var(--transform-origin)] rounded-xl p-4 ring-1 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset", "data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "data-[ending-style]:scale-95 data-[ending-style]:opacity-0", r),
17
+ ...o
18
+ });
19
+ }
20
+ function u({ className: r, ...o }) {
21
+ return /* @__PURE__ */ i(t.Title, {
22
+ className: e("text-pho-primary text-sm font-semibold", r),
23
+ ...o
24
+ });
25
+ }
26
+ function g({ className: r, ...o }) {
27
+ return /* @__PURE__ */ i(t.Description, {
28
+ className: e("text-pho-tertiary mt-1 text-sm", r),
29
+ ...o
30
+ });
31
+ }
32
+ var x = {
33
+ Root: n,
34
+ Trigger: s,
35
+ Portal: p,
36
+ Positioner: m,
37
+ Popup: c,
38
+ Title: u,
39
+ Description: g,
40
+ Close: l
41
+ };
42
+ export {
43
+ x as Popover
44
+ };
45
+
46
+ //# sourceMappingURL=popover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover.js","names":[],"sources":["../../src/components/popover/popover.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Popover as BasePopover } from \"@base-ui/react/popover\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Root = BasePopover.Root;\nconst Trigger = BasePopover.Trigger;\nconst Portal = BasePopover.Portal;\nconst Close = BasePopover.Close;\n\nfunction Positioner({\n className,\n sideOffset = 8,\n ...props\n}: StyledProps<typeof BasePopover.Positioner>) {\n return (\n <BasePopover.Positioner\n sideOffset={sideOffset}\n className={cn(\"z-50\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BasePopover.Popup>) {\n return (\n <BasePopover.Popup\n className={cn(\n \"squircle bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-interactive max-w-[calc(100vw-2rem)] origin-[var(--transform-origin)] rounded-xl p-4 ring-1 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Title({ className, ...props }: StyledProps<typeof BasePopover.Title>) {\n return (\n <BasePopover.Title\n className={cn(\"text-pho-primary text-sm font-semibold\", className)}\n {...props}\n />\n );\n}\n\nfunction Description({\n className,\n ...props\n}: StyledProps<typeof BasePopover.Description>) {\n return (\n <BasePopover.Description\n className={cn(\"text-pho-tertiary mt-1 text-sm\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Popover built on Base UI `Popover` — a click-triggered floating panel\n * anchored to its trigger, for rich, interactive content (forms, menus of\n * actions, details). Unlike a `Tooltip`, it can hold focusable controls and is\n * dismissed by clicking away or pressing Escape.\n */\nexport const Popover = {\n Root,\n Trigger,\n Portal,\n Positioner,\n Popup,\n Title,\n Description,\n Close,\n};\n"],"mappings":";;;;;AAYA,IAAM,IAAO,EAAY,MACnB,IAAU,EAAY,SACtB,IAAS,EAAY,QACrB,IAAQ,EAAY;AAE1B,SAAS,EAAW,EAClB,WAAA,GACA,YAAA,IAAa,GACb,GAAG,EAAA,GAC0C;AAC7C,SACE,gBAAA,EAAC,EAAY,YAAb;AAAA,IACc,YAAA;AAAA,IACZ,WAAW,EAAG,QAAQ,CAAS;AAAA,IAC/B,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EAAE,WAAA,GAAW,GAAG,EAAA,GAAgD;AAC7E,SACE,gBAAA,EAAC,EAAY,OAAb;AAAA,IACE,WAAW,EACT,4OACA,kEACA,8DACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EAAE,WAAA,GAAW,GAAG,EAAA,GAAgD;AAC7E,SACE,gBAAA,EAAC,EAAY,OAAb;AAAA,IACE,WAAW,EAAG,0CAA0C,CAAS;AAAA,IACjE,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAY,EACnB,WAAA,GACA,GAAG,EAAA,GAC2C;AAC9C,SACE,gBAAA,EAAC,EAAY,aAAb;AAAA,IACE,WAAW,EAAG,kCAAkC,CAAS;AAAA,IACzD,GAAI;AAAA,EACL,CAAA;AAEL;AAQA,IAAa,IAAU;AAAA,EACrB,MAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;AAAA,EACA,YAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA,aAAA;AAAA,EACA,OAAA;AACF"}
@@ -0,0 +1,31 @@
1
+ "use client";
2
+ import { t as i } from "../chunks/cn-D6jQqeRj.js";
3
+ import "react";
4
+ import { jsx as o } from "react/jsx-runtime";
5
+ import { PreviewCard as r } from "@base-ui/react/preview-card";
6
+ var n = r.Root, s = r.Trigger, p = r.Portal;
7
+ function g({ className: t, sideOffset: a = 8, ...e }) {
8
+ return /* @__PURE__ */ o(r.Positioner, {
9
+ sideOffset: a,
10
+ className: i("z-50", t),
11
+ ...e
12
+ });
13
+ }
14
+ function l({ className: t, ...a }) {
15
+ return /* @__PURE__ */ o(r.Popup, {
16
+ className: i("squircle bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-interactive w-72 origin-[var(--transform-origin)] rounded-xl p-4 ring-1 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset", "data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "data-[ending-style]:scale-95 data-[ending-style]:opacity-0", t),
17
+ ...a
18
+ });
19
+ }
20
+ var v = {
21
+ Root: n,
22
+ Trigger: s,
23
+ Portal: p,
24
+ Positioner: g,
25
+ Popup: l
26
+ };
27
+ export {
28
+ v as PreviewCard
29
+ };
30
+
31
+ //# sourceMappingURL=preview-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview-card.js","names":[],"sources":["../../src/components/preview-card/preview-card.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { PreviewCard as BasePreviewCard } from \"@base-ui/react/preview-card\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Root = BasePreviewCard.Root;\nconst Trigger = BasePreviewCard.Trigger;\nconst Portal = BasePreviewCard.Portal;\n\nfunction Positioner({\n className,\n sideOffset = 8,\n ...props\n}: StyledProps<typeof BasePreviewCard.Positioner>) {\n return (\n <BasePreviewCard.Positioner\n sideOffset={sideOffset}\n className={cn(\"z-50\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({\n className,\n ...props\n}: StyledProps<typeof BasePreviewCard.Popup>) {\n return (\n <BasePreviewCard.Popup\n className={cn(\n \"squircle bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-interactive w-72 origin-[var(--transform-origin)] rounded-xl p-4 ring-1 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Preview card built on Base UI `PreviewCard` — a hover-triggered card that\n * previews what's behind a link (a profile, a repo, an article). Like a\n * `Tooltip` it opens on hover/focus, but it holds richer, non-essential\n * content. Keep the underlying link fully usable without opening the card.\n */\nexport const PreviewCard = { Root, Trigger, Portal, Positioner, Popup };\n"],"mappings":";;;;;AAYA,IAAM,IAAO,EAAgB,MACvB,IAAU,EAAgB,SAC1B,IAAS,EAAgB;AAE/B,SAAS,EAAW,EAClB,WAAA,GACA,YAAA,IAAa,GACb,GAAG,EAAA,GAC8C;AACjD,SACE,gBAAA,EAAC,EAAgB,YAAjB;AAAA,IACc,YAAA;AAAA,IACZ,WAAW,EAAG,QAAQ,CAAS;AAAA,IAC/B,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EACb,WAAA,GACA,GAAG,EAAA,GACyC;AAC5C,SACE,gBAAA,EAAC,EAAgB,OAAjB;AAAA,IACE,WAAW,EACT,wNACA,kEACA,8DACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAQA,IAAa,IAAc;AAAA,EAAE,MAAA;AAAA,EAAM,SAAA;AAAA,EAAS,QAAA;AAAA,EAAQ,YAAA;AAAA,EAAY,OAAA;AAAM"}
@@ -0,0 +1,47 @@
1
+ "use client";
2
+ import { t as e } from "../chunks/cn-D6jQqeRj.js";
3
+ import "react";
4
+ import { jsx as o } from "react/jsx-runtime";
5
+ import { Progress as a } from "@base-ui/react/progress";
6
+ function l({ className: r, ...t }) {
7
+ return /* @__PURE__ */ o(a.Root, {
8
+ className: e("flex w-full flex-col gap-2", r),
9
+ ...t
10
+ });
11
+ }
12
+ function n({ className: r, ...t }) {
13
+ return /* @__PURE__ */ o(a.Label, {
14
+ className: e("text-pho-secondary text-sm font-medium", r),
15
+ ...t
16
+ });
17
+ }
18
+ function s({ className: r, ...t }) {
19
+ return /* @__PURE__ */ o(a.Value, {
20
+ className: e("text-pho-tertiary text-sm tabular-nums", r),
21
+ ...t
22
+ });
23
+ }
24
+ function u({ className: r, ...t }) {
25
+ return /* @__PURE__ */ o(a.Track, {
26
+ className: e("bg-pho-tertiary relative h-2 w-full overflow-hidden rounded-full", r),
27
+ ...t
28
+ });
29
+ }
30
+ function i({ className: r, ...t }) {
31
+ return /* @__PURE__ */ o(a.Indicator, {
32
+ className: e("bg-pho-brand-solid h-full rounded-full transition-all duration-200 ease-out", r),
33
+ ...t
34
+ });
35
+ }
36
+ var p = {
37
+ Root: l,
38
+ Label: n,
39
+ Value: s,
40
+ Track: u,
41
+ Indicator: i
42
+ };
43
+ export {
44
+ p as Progress
45
+ };
46
+
47
+ //# sourceMappingURL=progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.js","names":[],"sources":["../../src/components/progress/progress.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Progress as BaseProgress } from \"@base-ui/react/progress\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nfunction Root({ className, ...props }: StyledProps<typeof BaseProgress.Root>) {\n return (\n <BaseProgress.Root\n className={cn(\"flex w-full flex-col gap-2\", className)}\n {...props}\n />\n );\n}\n\nfunction Label({\n className,\n ...props\n}: StyledProps<typeof BaseProgress.Label>) {\n return (\n <BaseProgress.Label\n className={cn(\"text-pho-secondary text-sm font-medium\", className)}\n {...props}\n />\n );\n}\n\nfunction Value({\n className,\n ...props\n}: StyledProps<typeof BaseProgress.Value>) {\n return (\n <BaseProgress.Value\n className={cn(\"text-pho-tertiary text-sm tabular-nums\", className)}\n {...props}\n />\n );\n}\n\nfunction Track({\n className,\n ...props\n}: StyledProps<typeof BaseProgress.Track>) {\n return (\n <BaseProgress.Track\n className={cn(\n \"bg-pho-tertiary relative h-2 w-full overflow-hidden rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Indicator({\n className,\n ...props\n}: StyledProps<typeof BaseProgress.Indicator>) {\n return (\n <BaseProgress.Indicator\n className={cn(\n \"bg-pho-brand-solid h-full rounded-full transition-all duration-200 ease-out\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Determinate progress bar built on Base UI `Progress`. Set `value` (0–100, or\n * `null` for indeterminate) on `Progress.Root`; Base UI sizes the indicator.\n * Compose a header row with `Progress.Label` + `Progress.Value`.\n */\nexport const Progress = { Root, Label, Value, Track, Indicator };\n"],"mappings":";;;;;AAYA,SAAS,EAAK,EAAE,WAAA,GAAW,GAAG,EAAA,GAAgD;AAC5E,SACE,gBAAA,EAAC,EAAa,MAAd;AAAA,IACE,WAAW,EAAG,8BAA8B,CAAS;AAAA,IACrD,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EACb,WAAA,GACA,GAAG,EAAA,GACsC;AACzC,SACE,gBAAA,EAAC,EAAa,OAAd;AAAA,IACE,WAAW,EAAG,0CAA0C,CAAS;AAAA,IACjE,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EACb,WAAA,GACA,GAAG,EAAA,GACsC;AACzC,SACE,gBAAA,EAAC,EAAa,OAAd;AAAA,IACE,WAAW,EAAG,0CAA0C,CAAS;AAAA,IACjE,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EACb,WAAA,GACA,GAAG,EAAA,GACsC;AACzC,SACE,gBAAA,EAAC,EAAa,OAAd;AAAA,IACE,WAAW,EACT,oEACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAU,EACjB,WAAA,GACA,GAAG,EAAA,GAC0C;AAC7C,SACE,gBAAA,EAAC,EAAa,WAAd;AAAA,IACE,WAAW,EACT,+EACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAOA,IAAa,IAAW;AAAA,EAAE,MAAA;AAAA,EAAM,OAAA;AAAA,EAAO,OAAA;AAAA,EAAO,OAAA;AAAA,EAAO,WAAA;AAAU"}
@@ -0,0 +1,34 @@
1
+ "use client";
2
+ import { t as s } from "../chunks/cn-D6jQqeRj.js";
3
+ import "react";
4
+ import { jsx as o, jsxs as n } from "react/jsx-runtime";
5
+ import { Radio as a } from "@base-ui/react/radio";
6
+ import { RadioGroup as d } from "@base-ui/react/radio-group";
7
+ function l({ className: i, ...e }) {
8
+ return /* @__PURE__ */ o(d, {
9
+ className: s("flex flex-col gap-3", i),
10
+ ...e
11
+ });
12
+ }
13
+ l.displayName = "RadioGroup";
14
+ function c({ className: i, label: e, ...t }) {
15
+ const r = /* @__PURE__ */ o(a.Root, {
16
+ className: s("squircle outline-pho-brand bg-pho-primary shadow-pho-xs ring-pho-primary flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-full ring-1 transition duration-100 ease-linear ring-inset focus-visible:outline-2 focus-visible:outline-offset-2", "data-[checked]:bg-pho-brand-solid data-[checked]:ring-transparent", "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", i),
17
+ ...t,
18
+ children: /* @__PURE__ */ o(a.Indicator, { className: "size-2 rounded-full bg-white" })
19
+ });
20
+ return e ? /* @__PURE__ */ n("label", {
21
+ className: "flex cursor-pointer items-center gap-2 select-none",
22
+ children: [r, /* @__PURE__ */ o("span", {
23
+ className: "text-pho-secondary text-sm",
24
+ children: e
25
+ })]
26
+ }) : r;
27
+ }
28
+ c.displayName = "Radio";
29
+ export {
30
+ c as Radio,
31
+ l as RadioGroup
32
+ };
33
+
34
+ //# sourceMappingURL=radio-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-group.js","names":[],"sources":["../../src/components/radio-group/radio-group.tsx"],"sourcesContent":["import { type ComponentProps, type ReactNode } from \"react\";\nimport { RadioGroup as BaseRadioGroup } from \"@base-ui/react/radio-group\";\nimport { Radio as BaseRadio } from \"@base-ui/react/radio\";\nimport { cn } from \"../../utils/cn\";\n\nexport interface RadioGroupProps extends Omit<\n ComponentProps<typeof BaseRadioGroup>,\n \"className\"\n> {\n className?: string;\n}\n\n/**\n * Single-choice group built on Base UI `RadioGroup`. Holds `Radio` items;\n * exactly one may be selected. Control with `value` / `onValueChange` or leave\n * uncontrolled with `defaultValue`.\n */\nexport function RadioGroup({ className, ...props }: RadioGroupProps) {\n return (\n <BaseRadioGroup\n className={cn(\"flex flex-col gap-3\", className)}\n {...props}\n />\n );\n}\n\nRadioGroup.displayName = \"RadioGroup\";\n\nexport interface RadioProps extends Omit<\n ComponentProps<typeof BaseRadio.Root>,\n \"className\"\n> {\n className?: string;\n /** Text rendered beside the dot; the whole row selects this option. */\n label?: ReactNode;\n}\n\n/**\n * A single option within a `RadioGroup`. Requires a `value`; pass `label` for a\n * clickable text row or provide an `aria-label`.\n */\nexport function Radio({ className, label, ...props }: RadioProps) {\n const dot = (\n <BaseRadio.Root\n className={cn(\n \"squircle outline-pho-brand bg-pho-primary shadow-pho-xs ring-pho-primary flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-full ring-1 transition duration-100 ease-linear ring-inset focus-visible:outline-2 focus-visible:outline-offset-2\",\n \"data-[checked]:bg-pho-brand-solid data-[checked]:ring-transparent\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <BaseRadio.Indicator className=\"size-2 rounded-full bg-white\" />\n </BaseRadio.Root>\n );\n\n if (!label) return dot;\n return (\n <label className=\"flex cursor-pointer items-center gap-2 select-none\">\n {dot}\n <span className=\"text-pho-secondary text-sm\">{label}</span>\n </label>\n );\n}\n\nRadio.displayName = \"Radio\";\n"],"mappings":";;;;;;AAiBA,SAAgB,EAAW,EAAE,WAAA,GAAW,GAAG,EAAA,GAA0B;AACnE,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,WAAW,EAAG,uBAAuB,CAAS;AAAA,IAC9C,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,EAAW,cAAc;AAezB,SAAgB,EAAM,EAAE,WAAA,GAAW,OAAA,GAAO,GAAG,EAAA,GAAqB;AAChE,QAAM,IACJ,gBAAA,EAAC,EAAU,MAAX;AAAA,IACE,WAAW,EACT,sQACA,qEACA,iEACA,CACF;AAAA,IACA,GAAI;AAAA,cAEJ,gBAAA,EAAC,EAAU,WAAX,EAAqB,WAAU,+BAAgC,CAAA;AAAA,EACjD,CAAA;AAGlB,SAAK,IAEH,gBAAA,EAAC,SAAD;AAAA,IAAO,WAAU;AAAA,cAAjB,CACG,GACD,gBAAA,EAAC,QAAD;AAAA,MAAM,WAAU;AAAA,gBAA8B;AAAA,IAAY,CAAA,CACrD;AAAA,OALU;AAOrB;AAEA,EAAM,cAAc"}
@@ -0,0 +1,43 @@
1
+ "use client";
2
+ import { t as a } from "../chunks/cn-D6jQqeRj.js";
3
+ import "react";
4
+ import { jsx as e } from "react/jsx-runtime";
5
+ import { ScrollArea as t } from "@base-ui/react/scroll-area";
6
+ var n = t.Content, l = t.Corner;
7
+ function i({ className: o, ...r }) {
8
+ return /* @__PURE__ */ e(t.Root, {
9
+ className: a("relative overflow-hidden", o),
10
+ ...r
11
+ });
12
+ }
13
+ function c({ className: o, ...r }) {
14
+ return /* @__PURE__ */ e(t.Viewport, {
15
+ className: a("outline-pho-brand h-full w-full overscroll-contain rounded-[inherit] focus-visible:outline-2 focus-visible:-outline-offset-1", o),
16
+ ...r
17
+ });
18
+ }
19
+ function s({ className: o, ...r }) {
20
+ return /* @__PURE__ */ e(t.Scrollbar, {
21
+ className: a("flex touch-none p-0.5 opacity-0 transition-opacity delay-300 select-none", "data-[hovering]:opacity-100 data-[hovering]:delay-0 data-[scrolling]:opacity-100 data-[scrolling]:delay-0 data-[scrolling]:duration-0", "data-[orientation=horizontal]:h-2.5 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:w-2.5", o),
22
+ ...r
23
+ });
24
+ }
25
+ function u({ className: o, ...r }) {
26
+ return /* @__PURE__ */ e(t.Thumb, {
27
+ className: a("flex-1 rounded-full bg-[var(--border-color-pho-primary)]", o),
28
+ ...r
29
+ });
30
+ }
31
+ var h = {
32
+ Root: i,
33
+ Viewport: c,
34
+ Content: n,
35
+ Scrollbar: s,
36
+ Thumb: u,
37
+ Corner: l
38
+ };
39
+ export {
40
+ h as ScrollArea
41
+ };
42
+
43
+ //# sourceMappingURL=scroll-area.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scroll-area.js","names":[],"sources":["../../src/components/scroll-area/scroll-area.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { ScrollArea as BaseScrollArea } from \"@base-ui/react/scroll-area\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Content = BaseScrollArea.Content;\nconst Corner = BaseScrollArea.Corner;\n\nfunction Root({\n className,\n ...props\n}: StyledProps<typeof BaseScrollArea.Root>) {\n return (\n <BaseScrollArea.Root\n className={cn(\"relative overflow-hidden\", className)}\n {...props}\n />\n );\n}\n\nfunction Viewport({\n className,\n ...props\n}: StyledProps<typeof BaseScrollArea.Viewport>) {\n return (\n <BaseScrollArea.Viewport\n className={cn(\n \"outline-pho-brand h-full w-full overscroll-contain rounded-[inherit] focus-visible:outline-2 focus-visible:-outline-offset-1\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Scrollbar({\n className,\n ...props\n}: StyledProps<typeof BaseScrollArea.Scrollbar>) {\n return (\n <BaseScrollArea.Scrollbar\n className={cn(\n \"flex touch-none p-0.5 opacity-0 transition-opacity delay-300 select-none\",\n \"data-[hovering]:opacity-100 data-[hovering]:delay-0 data-[scrolling]:opacity-100 data-[scrolling]:delay-0 data-[scrolling]:duration-0\",\n \"data-[orientation=horizontal]:h-2.5 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:w-2.5\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Thumb({\n className,\n ...props\n}: StyledProps<typeof BaseScrollArea.Thumb>) {\n return (\n <BaseScrollArea.Thumb\n className={cn(\n \"flex-1 rounded-full bg-[var(--border-color-pho-primary)]\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Scroll area built on Base UI `ScrollArea` — a region with custom, overlay\n * scrollbars that match the design system instead of the native ones. Give\n * `ScrollArea.Root` a fixed size; put scrollable content in `Viewport` →\n * `Content` and add a `Scrollbar` → `Thumb` per axis.\n */\nexport const ScrollArea = {\n Root,\n Viewport,\n Content,\n Scrollbar,\n Thumb,\n Corner,\n};\n"],"mappings":";;;;;AAYA,IAAM,IAAU,EAAe,SACzB,IAAS,EAAe;AAE9B,SAAS,EAAK,EACZ,WAAA,GACA,GAAG,EAAA,GACuC;AAC1C,SACE,gBAAA,EAAC,EAAe,MAAhB;AAAA,IACE,WAAW,EAAG,4BAA4B,CAAS;AAAA,IACnD,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAS,EAChB,WAAA,GACA,GAAG,EAAA,GAC2C;AAC9C,SACE,gBAAA,EAAC,EAAe,UAAhB;AAAA,IACE,WAAW,EACT,gIACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAU,EACjB,WAAA,GACA,GAAG,EAAA,GAC4C;AAC/C,SACE,gBAAA,EAAC,EAAe,WAAhB;AAAA,IACE,WAAW,EACT,4EACA,yIACA,gHACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EACb,WAAA,GACA,GAAG,EAAA,GACwC;AAC3C,SACE,gBAAA,EAAC,EAAe,OAAhB;AAAA,IACE,WAAW,EACT,4DACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAQA,IAAa,IAAa;AAAA,EACxB,MAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA;AAAA,EACA,WAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AACF"}
@@ -0,0 +1,69 @@
1
+ "use client";
2
+ import { t as o } from "../chunks/cn-D6jQqeRj.js";
3
+ import "react";
4
+ import { jsx as a } from "react/jsx-runtime";
5
+ import { Select as r } from "@base-ui/react/select";
6
+ var n = r.Root, s = r.Value, p = r.Portal, l = r.List, c = r.Group, u = r.ItemText;
7
+ function d({ className: t, ...e }) {
8
+ return /* @__PURE__ */ a(r.Trigger, {
9
+ className: o("squircle bg-pho-primary shadow-pho-xs ring-pho-primary text-pho-primary outline-pho-brand flex min-w-44 cursor-pointer items-center justify-between gap-2 rounded-lg px-3 py-2 text-sm ring-1 transition select-none ring-inset", "data-[popup-open]:ring-pho-brand focus-visible:outline-2 focus-visible:-outline-offset-1", "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", "[&_svg]:text-fg-pho-quaternary [&_svg]:size-4", t),
10
+ ...e
11
+ });
12
+ }
13
+ function m({ className: t, ...e }) {
14
+ return /* @__PURE__ */ a(r.Icon, {
15
+ className: o("flex shrink-0 items-center", t),
16
+ ...e
17
+ });
18
+ }
19
+ function g({ className: t, sideOffset: e = 6, ...i }) {
20
+ return /* @__PURE__ */ a(r.Positioner, {
21
+ sideOffset: e,
22
+ className: o("z-50 outline-none", t),
23
+ ...i
24
+ });
25
+ }
26
+ function h({ className: t, ...e }) {
27
+ return /* @__PURE__ */ a(r.Popup, {
28
+ className: o("squircle bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-interactive max-h-[var(--available-height)] min-w-[var(--anchor-width)] origin-[var(--transform-origin)] overflow-y-auto rounded-xl p-1 ring-1 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset", "data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "data-[ending-style]:scale-95 data-[ending-style]:opacity-0", t),
29
+ ...e
30
+ });
31
+ }
32
+ function f({ className: t, ...e }) {
33
+ return /* @__PURE__ */ a(r.Item, {
34
+ className: o("text-pho-secondary grid cursor-pointer grid-cols-[1rem_1fr] items-center gap-2 rounded-lg py-1.5 pr-2.5 pl-2 text-sm outline-none select-none", "data-[highlighted]:bg-pho-secondary data-[highlighted]:text-pho-primary data-[disabled]:opacity-50", t),
35
+ ...e
36
+ });
37
+ }
38
+ function y({ className: t, ...e }) {
39
+ return /* @__PURE__ */ a(r.ItemIndicator, {
40
+ className: o("text-pho-brand col-start-1 flex items-center [&>svg]:size-4", t),
41
+ ...e
42
+ });
43
+ }
44
+ function x({ className: t, ...e }) {
45
+ return /* @__PURE__ */ a(r.GroupLabel, {
46
+ className: o("text-pho-quaternary px-2.5 py-1.5 text-xs font-medium", t),
47
+ ...e
48
+ });
49
+ }
50
+ var N = {
51
+ Root: n,
52
+ Trigger: d,
53
+ Value: s,
54
+ Icon: m,
55
+ Portal: p,
56
+ Positioner: g,
57
+ Popup: h,
58
+ List: l,
59
+ Item: f,
60
+ ItemText: u,
61
+ ItemIndicator: y,
62
+ Group: c,
63
+ GroupLabel: x
64
+ };
65
+ export {
66
+ N as Select
67
+ };
68
+
69
+ //# sourceMappingURL=select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.js","names":[],"sources":["../../src/components/select/select.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Select as BaseSelect } from \"@base-ui/react/select\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Root = BaseSelect.Root;\nconst Value = BaseSelect.Value;\nconst Portal = BaseSelect.Portal;\nconst List = BaseSelect.List;\nconst Group = BaseSelect.Group;\nconst ItemText = BaseSelect.ItemText;\n\nfunction Trigger({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.Trigger>) {\n return (\n <BaseSelect.Trigger\n className={cn(\n \"squircle bg-pho-primary shadow-pho-xs ring-pho-primary text-pho-primary outline-pho-brand flex min-w-44 cursor-pointer items-center justify-between gap-2 rounded-lg px-3 py-2 text-sm ring-1 transition select-none ring-inset\",\n \"data-[popup-open]:ring-pho-brand focus-visible:outline-2 focus-visible:-outline-offset-1\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n \"[&_svg]:text-fg-pho-quaternary [&_svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Icon({ className, ...props }: StyledProps<typeof BaseSelect.Icon>) {\n return (\n <BaseSelect.Icon\n className={cn(\"flex shrink-0 items-center\", className)}\n {...props}\n />\n );\n}\n\nfunction Positioner({\n className,\n sideOffset = 6,\n ...props\n}: StyledProps<typeof BaseSelect.Positioner>) {\n return (\n <BaseSelect.Positioner\n sideOffset={sideOffset}\n className={cn(\"z-50 outline-none\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseSelect.Popup>) {\n return (\n <BaseSelect.Popup\n className={cn(\n \"squircle bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-interactive max-h-[var(--available-height)] min-w-[var(--anchor-width)] origin-[var(--transform-origin)] overflow-y-auto rounded-xl p-1 ring-1 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Item({ className, ...props }: StyledProps<typeof BaseSelect.Item>) {\n return (\n <BaseSelect.Item\n className={cn(\n \"text-pho-secondary grid cursor-pointer grid-cols-[1rem_1fr] items-center gap-2 rounded-lg py-1.5 pr-2.5 pl-2 text-sm outline-none select-none\",\n \"data-[highlighted]:bg-pho-secondary data-[highlighted]:text-pho-primary data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ItemIndicator({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.ItemIndicator>) {\n return (\n <BaseSelect.ItemIndicator\n className={cn(\n \"text-pho-brand col-start-1 flex items-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.GroupLabel>) {\n return (\n <BaseSelect.GroupLabel\n className={cn(\n \"text-pho-quaternary px-2.5 py-1.5 text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Select built on Base UI `Select` — pick one option (or several with\n * `multiple`) from a list that opens on click. Pass `items` to `Select.Root`,\n * render an `Item` per option, and show the selection with `Select.Value`. For\n * a short, always-visible set use `RadioGroup`; to filter a long list by typing\n * use `Combobox`.\n */\nexport const Select = {\n Root,\n Trigger,\n Value,\n Icon,\n Portal,\n Positioner,\n Popup,\n List,\n Item,\n ItemText,\n ItemIndicator,\n Group,\n GroupLabel,\n};\n"],"mappings":";;;;;AAYA,IAAM,IAAO,EAAW,MAClB,IAAQ,EAAW,OACnB,IAAS,EAAW,QACpB,IAAO,EAAW,MAClB,IAAQ,EAAW,OACnB,IAAW,EAAW;AAE5B,SAAS,EAAQ,EACf,WAAA,GACA,GAAG,EAAA,GACsC;AACzC,SACE,gBAAA,EAAC,EAAW,SAAZ;AAAA,IACE,WAAW,EACT,mOACA,4FACA,iEACA,iDACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAK,EAAE,WAAA,GAAW,GAAG,EAAA,GAA8C;AAC1E,SACE,gBAAA,EAAC,EAAW,MAAZ;AAAA,IACE,WAAW,EAAG,8BAA8B,CAAS;AAAA,IACrD,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAW,EAClB,WAAA,GACA,YAAA,IAAa,GACb,GAAG,EAAA,GACyC;AAC5C,SACE,gBAAA,EAAC,EAAW,YAAZ;AAAA,IACc,YAAA;AAAA,IACZ,WAAW,EAAG,qBAAqB,CAAS;AAAA,IAC5C,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EAAE,WAAA,GAAW,GAAG,EAAA,GAA+C;AAC5E,SACE,gBAAA,EAAC,EAAW,OAAZ;AAAA,IACE,WAAW,EACT,+RACA,kEACA,8DACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAK,EAAE,WAAA,GAAW,GAAG,EAAA,GAA8C;AAC1E,SACE,gBAAA,EAAC,EAAW,MAAZ;AAAA,IACE,WAAW,EACT,iJACA,sGACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAc,EACrB,WAAA,GACA,GAAG,EAAA,GAC4C;AAC/C,SACE,gBAAA,EAAC,EAAW,eAAZ;AAAA,IACE,WAAW,EACT,+DACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAW,EAClB,WAAA,GACA,GAAG,EAAA,GACyC;AAC5C,SACE,gBAAA,EAAC,EAAW,YAAZ;AAAA,IACE,WAAW,EACT,yDACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AASA,IAAa,IAAS;AAAA,EACpB,MAAA;AAAA,EACA,SAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,YAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AAAA,EACA,eAAA;AAAA,EACA,OAAA;AAAA,EACA,YAAA;AACF"}
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { t as o } from "../chunks/cn-D6jQqeRj.js";
3
+ import "react";
4
+ import { jsx as t } from "react/jsx-runtime";
5
+ import { Separator as i } from "@base-ui/react/separator";
6
+ function e({ className: a, ...r }) {
7
+ return /* @__PURE__ */ t(i, {
8
+ className: o("shrink-0 bg-[var(--border-color-pho-secondary)]", "data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full", "data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", a),
9
+ ...r
10
+ });
11
+ }
12
+ e.displayName = "Separator";
13
+ export {
14
+ e as Separator
15
+ };
16
+
17
+ //# sourceMappingURL=separator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separator.js","names":[],"sources":["../../src/components/separator/separator.tsx"],"sourcesContent":["import { type ComponentProps } from \"react\";\nimport { Separator as BaseSeparator } from \"@base-ui/react/separator\";\nimport { cn } from \"../../utils/cn\";\n\nexport interface SeparatorProps extends Omit<\n ComponentProps<typeof BaseSeparator>,\n \"className\"\n> {\n className?: string;\n}\n\n/**\n * A thin rule that divides content. Built on Base UI `Separator`. For a\n * vertical rule set `orientation=\"vertical\"` — the parent must give it height\n * (e.g. a flex row with `items-stretch`).\n */\nexport function Separator({ className, ...props }: SeparatorProps) {\n return (\n <BaseSeparator\n className={cn(\n \"shrink-0 bg-[var(--border-color-pho-secondary)]\",\n \"data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full\",\n \"data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px\",\n className,\n )}\n {...props}\n />\n );\n}\n\nSeparator.displayName = \"Separator\";\n"],"mappings":";;;;;AAgBA,SAAgB,EAAU,EAAE,WAAA,GAAW,GAAG,EAAA,GAAyB;AACjE,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,WAAW,EACT,mDACA,2EACA,uEACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,EAAU,cAAc"}
@@ -0,0 +1,61 @@
1
+ "use client";
2
+ import { t as o } from "../chunks/cn-D6jQqeRj.js";
3
+ import "react";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ import { Slider as n } from "@base-ui/react/slider";
6
+ function l({ className: e, ...t }) {
7
+ return /* @__PURE__ */ r(n.Root, {
8
+ className: o("flex w-full flex-col gap-3", e),
9
+ ...t
10
+ });
11
+ }
12
+ function a({ className: e, ...t }) {
13
+ return /* @__PURE__ */ r(n.Label, {
14
+ className: o("text-pho-secondary text-sm font-medium", e),
15
+ ...t
16
+ });
17
+ }
18
+ function i({ className: e, ...t }) {
19
+ return /* @__PURE__ */ r(n.Value, {
20
+ className: o("text-pho-tertiary text-sm tabular-nums", e),
21
+ ...t
22
+ });
23
+ }
24
+ function u({ className: e, ...t }) {
25
+ return /* @__PURE__ */ r(n.Control, {
26
+ className: o("relative flex w-full touch-none items-center py-2 select-none", e),
27
+ ...t
28
+ });
29
+ }
30
+ function s({ className: e, ...t }) {
31
+ return /* @__PURE__ */ r(n.Track, {
32
+ className: o("bg-pho-tertiary relative h-1.5 w-full rounded-full", e),
33
+ ...t
34
+ });
35
+ }
36
+ function c({ className: e, ...t }) {
37
+ return /* @__PURE__ */ r(n.Indicator, {
38
+ className: o("bg-pho-brand-solid rounded-full", e),
39
+ ...t
40
+ });
41
+ }
42
+ function f({ className: e, ...t }) {
43
+ return /* @__PURE__ */ r(n.Thumb, {
44
+ className: o("outline-pho-brand ring-pho-primary shadow-pho-sm size-4 rounded-full bg-white ring-1 transition focus-visible:outline-2 focus-visible:outline-offset-2 data-[disabled]:opacity-50", e),
45
+ ...t
46
+ });
47
+ }
48
+ var h = {
49
+ Root: l,
50
+ Label: a,
51
+ Value: i,
52
+ Control: u,
53
+ Track: s,
54
+ Indicator: c,
55
+ Thumb: f
56
+ };
57
+ export {
58
+ h as Slider
59
+ };
60
+
61
+ //# sourceMappingURL=slider.js.map