@openrails/billing-ui 0.241.0 → 0.243.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 (265) hide show
  1. package/CHANGELOG.md +27 -11
  2. package/README.md +41 -8
  3. package/dist/admin/billing-admin.d.ts +3 -0
  4. package/dist/admin/components/app-sidebar.d.ts +1 -0
  5. package/dist/admin/components/confirm.d.ts +4 -0
  6. package/dist/admin/components/cursor-pager.d.ts +8 -0
  7. package/dist/admin/components/data-table.d.ts +14 -0
  8. package/dist/admin/components/fact-card.d.ts +5 -0
  9. package/dist/admin/components/form-field-errors.d.ts +3 -0
  10. package/dist/admin/components/linked-table-row.d.ts +5 -0
  11. package/dist/admin/components/logo.d.ts +3 -0
  12. package/dist/admin/components/no-access.d.ts +3 -0
  13. package/dist/admin/components/no-merchants.d.ts +1 -0
  14. package/dist/admin/components/notification-bell.d.ts +2 -0
  15. package/dist/admin/components/route-error.d.ts +3 -0
  16. package/dist/admin/components/site-header.d.ts +9 -0
  17. package/dist/admin/components/status-badge.d.ts +3 -0
  18. package/dist/admin/components/typed-confirm-dialog.d.ts +11 -0
  19. package/dist/admin/components/ui/alert-dialog.d.ts +18 -0
  20. package/dist/admin/components/ui/avatar.d.ts +11 -0
  21. package/dist/admin/components/ui/badge.d.ts +7 -0
  22. package/dist/admin/components/ui/breadcrumb.d.ts +10 -0
  23. package/dist/admin/components/ui/button.d.ts +8 -0
  24. package/dist/admin/components/ui/card.d.ts +11 -0
  25. package/dist/admin/components/ui/chart.d.ts +44 -0
  26. package/dist/admin/components/ui/dialog.d.ts +17 -0
  27. package/dist/admin/components/ui/dropdown-menu.d.ts +29 -0
  28. package/dist/admin/components/ui/input.d.ts +3 -0
  29. package/dist/admin/components/ui/label.d.ts +3 -0
  30. package/dist/admin/components/ui/select.d.ts +15 -0
  31. package/dist/admin/components/ui/separator.d.ts +3 -0
  32. package/dist/admin/components/ui/sheet.d.ts +14 -0
  33. package/dist/admin/components/ui/sidebar.d.ts +63 -0
  34. package/dist/admin/components/ui/skeleton.d.ts +2 -0
  35. package/dist/admin/components/ui/sonner.d.ts +3 -0
  36. package/dist/admin/components/ui/switch.d.ts +5 -0
  37. package/dist/admin/components/ui/table.d.ts +10 -0
  38. package/dist/admin/components/ui/tabs.d.ts +10 -0
  39. package/dist/admin/components/ui/textarea.d.ts +3 -0
  40. package/dist/admin/components/ui/tooltip.d.ts +6 -0
  41. package/dist/admin/context.d.ts +1193 -0
  42. package/dist/admin/hooks/use-mobile.d.ts +1 -0
  43. package/dist/admin/index.d.ts +5 -0
  44. package/dist/admin/layouts/app-layout.d.ts +4 -0
  45. package/dist/admin/lib/api/client.d.ts +64 -0
  46. package/dist/admin/lib/api/copilot.d.ts +6 -0
  47. package/dist/admin/lib/api/credit-endpoints.d.ts +8 -0
  48. package/dist/admin/lib/api/credit-types.d.ts +9 -0
  49. package/dist/admin/lib/api/endpoints.d.ts +133 -0
  50. package/dist/admin/lib/api/index.d.ts +89 -0
  51. package/dist/admin/lib/api/invoice-profile-endpoints.d.ts +6 -0
  52. package/dist/admin/lib/api/metrics.d.ts +68 -0
  53. package/dist/admin/lib/api/order-endpoints.d.ts +21 -0
  54. package/dist/admin/lib/api/types.d.ts +122 -0
  55. package/dist/admin/lib/auth.d.ts +6 -0
  56. package/dist/admin/lib/capabilities.d.ts +13 -0
  57. package/dist/admin/lib/chunk-error.d.ts +1 -0
  58. package/dist/admin/lib/confirm.d.ts +11 -0
  59. package/dist/admin/lib/credit-queries.d.ts +23 -0
  60. package/dist/admin/lib/csv.d.ts +3 -0
  61. package/dist/admin/lib/cursor-pages.d.ts +13 -0
  62. package/dist/admin/lib/dialog-width.d.ts +6 -0
  63. package/dist/admin/lib/dom.d.ts +1 -0
  64. package/dist/admin/lib/duration.d.ts +3 -0
  65. package/dist/admin/lib/format.d.ts +23 -0
  66. package/dist/admin/lib/mount.d.ts +6 -0
  67. package/dist/admin/lib/mutations.d.ts +125 -0
  68. package/dist/admin/lib/order-queries.d.ts +29 -0
  69. package/dist/admin/lib/queries.d.ts +369 -0
  70. package/dist/admin/lib/query-client.d.ts +3 -0
  71. package/dist/admin/lib/toast.d.ts +10 -0
  72. package/dist/admin/lib/utils.d.ts +2 -0
  73. package/dist/admin/messages.d.ts +670 -0
  74. package/dist/admin/navigation.d.ts +14 -0
  75. package/dist/admin/pages/catalog/application-dialog.d.ts +2 -0
  76. package/dist/admin/pages/catalog/copilot-panel.d.ts +4 -0
  77. package/dist/admin/pages/catalog/index.d.ts +4 -0
  78. package/dist/admin/pages/catalog/meter-form.d.ts +6 -0
  79. package/dist/admin/pages/catalog/metering-model.d.ts +67 -0
  80. package/dist/admin/pages/catalog/metering.d.ts +3 -0
  81. package/dist/admin/pages/catalog/price-detail.d.ts +2 -0
  82. package/dist/admin/pages/catalog/price-format.d.ts +3 -0
  83. package/dist/admin/pages/catalog/price-wizard-logic.d.ts +20 -0
  84. package/dist/admin/pages/catalog/price-wizard.d.ts +10 -0
  85. package/dist/admin/pages/catalog/psp-links.d.ts +10 -0
  86. package/dist/admin/pages/catalog/rate-card-editor.d.ts +10 -0
  87. package/dist/admin/pages/customers/credit-form.d.ts +14 -0
  88. package/dist/admin/pages/customers/credits.d.ts +5 -0
  89. package/dist/admin/pages/customers/default-card-badges.d.ts +3 -0
  90. package/dist/admin/pages/customers/detail.d.ts +5 -0
  91. package/dist/admin/pages/customers/grant-duration.d.ts +32 -0
  92. package/dist/admin/pages/customers/index.d.ts +2 -0
  93. package/dist/admin/pages/customers/invoice-profile-model.d.ts +18 -0
  94. package/dist/admin/pages/customers/invoice-profile.d.ts +9 -0
  95. package/dist/admin/pages/dashboard/index.d.ts +2 -0
  96. package/dist/admin/pages/dashboard/lib.d.ts +48 -0
  97. package/dist/admin/pages/dashboard/range-picker.d.ts +1 -0
  98. package/dist/admin/pages/dashboard/range.d.ts +34 -0
  99. package/dist/admin/pages/dashboard/reports-model.d.ts +29 -0
  100. package/dist/admin/pages/dashboard/reports.d.ts +2 -0
  101. package/dist/admin/pages/dashboard/use-range.d.ts +5 -0
  102. package/dist/admin/pages/dashboard/widget-editor.d.ts +8 -0
  103. package/dist/admin/pages/dashboard/widget-tile.d.ts +9 -0
  104. package/dist/admin/pages/dashboard/widget-viz.d.ts +12 -0
  105. package/dist/admin/pages/ops/index.d.ts +2 -0
  106. package/dist/admin/pages/orders/detail.d.ts +5 -0
  107. package/dist/admin/pages/orders/index.d.ts +1 -0
  108. package/dist/admin/pages/orders/model.d.ts +7 -0
  109. package/dist/admin/pages/payments/attempts.d.ts +7 -0
  110. package/dist/admin/pages/payments/detail.d.ts +2 -0
  111. package/dist/admin/pages/payments/health-model.d.ts +149 -0
  112. package/dist/admin/pages/payments/health.d.ts +2 -0
  113. package/dist/admin/pages/payments/index.d.ts +2 -0
  114. package/dist/admin/pages/settings/configuration-edit.d.ts +9 -0
  115. package/dist/admin/pages/settings/index.d.ts +9 -0
  116. package/dist/admin/pages/settings/notifications.d.ts +2 -0
  117. package/dist/admin/pages/settings/setting-fields.d.ts +20 -0
  118. package/dist/admin/pages/subscriptions/change-subscription-dialog.d.ts +16 -0
  119. package/dist/admin/pages/subscriptions/detail.d.ts +2 -0
  120. package/dist/admin/pages/subscriptions/dunning.d.ts +2 -0
  121. package/dist/admin/pages/subscriptions/index.d.ts +2 -0
  122. package/dist/admin/pages/subscriptions/subscription-change-options.d.ts +23 -0
  123. package/dist/admin/pages/subscriptions/views.d.ts +15 -0
  124. package/dist/admin/router.d.ts +32 -0
  125. package/dist/admin/routes.d.ts +5 -0
  126. package/dist/admin/summary.d.ts +27 -0
  127. package/dist/admin/theme.d.ts +2 -0
  128. package/dist/admin/types.d.ts +56 -0
  129. package/dist/admin/ui-context.d.ts +14 -0
  130. package/dist/admin-attempts-lAoW-Urd.js +419 -0
  131. package/dist/admin-attempts-lAoW-Urd.js.map +1 -0
  132. package/dist/admin-auth-DQGHtt0j.js +14 -0
  133. package/dist/admin-auth-DQGHtt0j.js.map +1 -0
  134. package/dist/admin-badge-DR5-1qd8.js +31 -0
  135. package/dist/admin-badge-DR5-1qd8.js.map +1 -0
  136. package/dist/admin-button-CTL3DgOt.js +46 -0
  137. package/dist/admin-button-CTL3DgOt.js.map +1 -0
  138. package/dist/admin-capabilities-BuigAgtm.js +59 -0
  139. package/dist/admin-capabilities-BuigAgtm.js.map +1 -0
  140. package/dist/admin-card-bzAks3-3.js +51 -0
  141. package/dist/admin-card-bzAks3-3.js.map +1 -0
  142. package/dist/admin-catalog-CC7I4n0_.js +1189 -0
  143. package/dist/admin-catalog-CC7I4n0_.js.map +1 -0
  144. package/dist/admin-confirm-katGq0Qo.js +12 -0
  145. package/dist/admin-confirm-katGq0Qo.js.map +1 -0
  146. package/dist/admin-csv-CPoNZj2D.js +16 -0
  147. package/dist/admin-csv-CPoNZj2D.js.map +1 -0
  148. package/dist/admin-customers-D8u5gq3M.js +160 -0
  149. package/dist/admin-customers-D8u5gq3M.js.map +1 -0
  150. package/dist/admin-dashboard-DqqFjOzq.js +420 -0
  151. package/dist/admin-dashboard-DqqFjOzq.js.map +1 -0
  152. package/dist/admin-data-table-qfXLOFmN.js +96 -0
  153. package/dist/admin-data-table-qfXLOFmN.js.map +1 -0
  154. package/dist/admin-detail-5aNNvrc0.js +324 -0
  155. package/dist/admin-detail-5aNNvrc0.js.map +1 -0
  156. package/dist/admin-detail-7p684Uyc.js +342 -0
  157. package/dist/admin-detail-7p684Uyc.js.map +1 -0
  158. package/dist/admin-detail-CGOyqs7s.js +1312 -0
  159. package/dist/admin-detail-CGOyqs7s.js.map +1 -0
  160. package/dist/admin-detail-DUAJQg8G.js +710 -0
  161. package/dist/admin-detail-DUAJQg8G.js.map +1 -0
  162. package/dist/admin-dialog-BjuKI5Hp.js +88 -0
  163. package/dist/admin-dialog-BjuKI5Hp.js.map +1 -0
  164. package/dist/admin-dialog-width-BPrgdYlj.js +6 -0
  165. package/dist/admin-dialog-width-BPrgdYlj.js.map +1 -0
  166. package/dist/admin-dom-uMmZzRvU.js +149 -0
  167. package/dist/admin-dom-uMmZzRvU.js.map +1 -0
  168. package/dist/admin-dropdown-menu-BW1D_h6s.js +69 -0
  169. package/dist/admin-dropdown-menu-BW1D_h6s.js.map +1 -0
  170. package/dist/admin-dunning-B2zgtrOo.js +10 -0
  171. package/dist/admin-dunning-B2zgtrOo.js.map +1 -0
  172. package/dist/admin-fact-card-DO_fHosg.js +20 -0
  173. package/dist/admin-fact-card-DO_fHosg.js.map +1 -0
  174. package/dist/admin-form-field-errors-hbUMIriS.js +14 -0
  175. package/dist/admin-form-field-errors-hbUMIriS.js.map +1 -0
  176. package/dist/admin-format-DoohJ7Fg.js +136 -0
  177. package/dist/admin-format-DoohJ7Fg.js.map +1 -0
  178. package/dist/admin-health-B4jN2LwR.js +983 -0
  179. package/dist/admin-health-B4jN2LwR.js.map +1 -0
  180. package/dist/admin-input-CcfQfJFN.js +17 -0
  181. package/dist/admin-input-CcfQfJFN.js.map +1 -0
  182. package/dist/admin-invoice-profile-model-Cgjy3zV8.js +53 -0
  183. package/dist/admin-invoice-profile-model-Cgjy3zV8.js.map +1 -0
  184. package/dist/admin-label-BiEN5cjb.js +15 -0
  185. package/dist/admin-label-BiEN5cjb.js.map +1 -0
  186. package/dist/admin-linked-table-row-BsaUruCN.js +26 -0
  187. package/dist/admin-linked-table-row-BsaUruCN.js.map +1 -0
  188. package/dist/admin-metering-BGAXbT23.js +1702 -0
  189. package/dist/admin-metering-BGAXbT23.js.map +1 -0
  190. package/dist/admin-ops-B3mcr76u.js +217 -0
  191. package/dist/admin-ops-B3mcr76u.js.map +1 -0
  192. package/dist/admin-orders-dxC99Idl.js +192 -0
  193. package/dist/admin-orders-dxC99Idl.js.map +1 -0
  194. package/dist/admin-payments-Bs7HSfP0.js +246 -0
  195. package/dist/admin-payments-Bs7HSfP0.js.map +1 -0
  196. package/dist/admin-price-detail-DRquxpA9.js +482 -0
  197. package/dist/admin-price-detail-DRquxpA9.js.map +1 -0
  198. package/dist/admin-price-format-DM1qORWI.js +44 -0
  199. package/dist/admin-price-format-DM1qORWI.js.map +1 -0
  200. package/dist/admin-price-wizard-CI7K-2Nz.js +357 -0
  201. package/dist/admin-price-wizard-CI7K-2Nz.js.map +1 -0
  202. package/dist/admin-range-picker-Dr2M1EZr.js +192 -0
  203. package/dist/admin-range-picker-Dr2M1EZr.js.map +1 -0
  204. package/dist/admin-reports-CywKLiSA.js +320 -0
  205. package/dist/admin-reports-CywKLiSA.js.map +1 -0
  206. package/dist/admin-select-DBgprVW6.js +81 -0
  207. package/dist/admin-select-DBgprVW6.js.map +1 -0
  208. package/dist/admin-settings-Bmoy95uO.js +1434 -0
  209. package/dist/admin-settings-Bmoy95uO.js.map +1 -0
  210. package/dist/admin-skeleton-DsM7crYi.js +14 -0
  211. package/dist/admin-skeleton-DsM7crYi.js.map +1 -0
  212. package/dist/admin-status-badge-BFPgo71d.js +38 -0
  213. package/dist/admin-status-badge-BFPgo71d.js.map +1 -0
  214. package/dist/admin-subscriptions-CLYc_HEV.js +301 -0
  215. package/dist/admin-subscriptions-CLYc_HEV.js.map +1 -0
  216. package/dist/admin-switch-BJUxLCsa.js +20 -0
  217. package/dist/admin-switch-BJUxLCsa.js.map +1 -0
  218. package/dist/admin-table-CH9TrXJf.js +61 -0
  219. package/dist/admin-table-CH9TrXJf.js.map +1 -0
  220. package/dist/admin-tabs-528FJMjt.js +46 -0
  221. package/dist/admin-tabs-528FJMjt.js.map +1 -0
  222. package/dist/admin-textarea-DEz38RaI.js +15 -0
  223. package/dist/admin-textarea-DEz38RaI.js.map +1 -0
  224. package/dist/admin-typed-confirm-dialog-DU7m9-O7.js +66 -0
  225. package/dist/admin-typed-confirm-dialog-DU7m9-O7.js.map +1 -0
  226. package/dist/admin-utils-BK4Vh1o_.js +1809 -0
  227. package/dist/admin-utils-BK4Vh1o_.js.map +1 -0
  228. package/dist/admin-widget-viz-Da48c-Zf.js +581 -0
  229. package/dist/admin-widget-viz-Da48c-Zf.js.map +1 -0
  230. package/dist/admin.css +3 -0
  231. package/dist/admin.js +2164 -0
  232. package/dist/admin.js.map +1 -0
  233. package/dist/appearance.d.ts +1 -1
  234. package/dist/client/generated/error-codes.d.ts +1 -1
  235. package/dist/client/generated/routes.d.ts +2156 -189
  236. package/dist/client/generated/wire.d.ts +1265 -50
  237. package/dist/client/types.d.ts +0 -1
  238. package/dist/{client-Cxz_miQj.js → client-PjivPHmE.js} +2 -3
  239. package/dist/client-PjivPHmE.js.map +1 -0
  240. package/dist/client.js +1 -1
  241. package/dist/{hooks-aKefXeMO.js → hooks-Ckd8F2JF.js} +8 -8
  242. package/dist/hooks-Ckd8F2JF.js.map +1 -0
  243. package/dist/index.d.ts +1 -1
  244. package/dist/index.js +12 -12
  245. package/dist/index.js.map +1 -1
  246. package/dist/lib/{offer-label.d.ts → price-label.d.ts} +1 -1
  247. package/dist/locales/de.js +1 -1
  248. package/dist/locales/de.js.map +1 -1
  249. package/dist/locales/en.d.ts +1 -1
  250. package/dist/locales/en.js +1 -1
  251. package/dist/locales/en.js.map +1 -1
  252. package/dist/locales/es.js +1 -1
  253. package/dist/locales/es.js.map +1 -1
  254. package/dist/locales/ja.js +1 -1
  255. package/dist/locales/ja.js.map +1 -1
  256. package/dist/locales/ko.js +1 -1
  257. package/dist/locales/ko.js.map +1 -1
  258. package/dist/locales/zh.js +1 -1
  259. package/dist/locales/zh.js.map +1 -1
  260. package/dist/{offers.d.ts → product-list.d.ts} +5 -5
  261. package/dist/react.js +1 -1
  262. package/dist/styles.css +1 -1
  263. package/package.json +28 -6
  264. package/dist/client-Cxz_miQj.js.map +0 -1
  265. package/dist/hooks-aKefXeMO.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## Embeddable billing administration
4
+
5
+ - `@openrails/billing-ui/admin` exports `BillingAdmin`, `BillingCustomerSummary`,
6
+ `useBillingAdminAccess`, `billingConfirmWarnings`, and `billingPermissionHelp`.
7
+ The host supplies authentication, routing, merchant selection, and optional
8
+ settings tabs and customer panels. Instances isolate their requests and cache.
9
+ - Import `@openrails/billing-ui/admin.css` for scoped administration styles.
10
+ The customer entry remains separate; the admin entry uses TanStack Query 5
11
+ as an optional peer.
12
+
3
13
  ## Usage priced when recorded
4
14
 
5
15
  - `getUsage({ groupBy: "meter" })` groups what each meter, and matrix cell,
@@ -11,6 +21,12 @@
11
21
  management uses `/catalog`, merchant configuration `/merchant`, and metrics
12
22
  `/metrics`; customer support stays under `/admin`.
13
23
 
24
+ ## Product and price lookup
25
+
26
+ - Product lookup uses `ListProducts` and `GetProduct`, with current prices populated.
27
+ - The product purchase list is exported as `<ProductList>` and `ProductListProps`.
28
+ - Price records remain independently addressable through `GetPrice` and `ListPrices`.
29
+
14
30
  ## Provider operations removed
15
31
 
16
32
  - Breaking: `OpenRailsErrorCode` and `OPENRAILS_ERROR_CODES` lose
@@ -30,7 +46,7 @@
30
46
  ## Public reads name their merchant; token source
31
47
 
32
48
  - Breaking: `listProducts({ merchant, keys })`, `useProducts({ merchant, keys
33
- })` and `<BuyButton merchant>` take the merchant's id, and `<Offers>` takes
49
+ })` and `<BuyButton merchant>` take the merchant's id, and `<ProductList>` takes
34
50
  it with `keys`: `GET /catalog/products?merchant=<id>&keys=…`. The read sends
35
51
  no bearer, signed in or out.
36
52
  - Breaking: `getConfig()` and `useConfig()` are the deployment's part alone
@@ -71,7 +87,7 @@
71
87
 
72
88
  ## Orders replace checkout sessions
73
89
 
74
- - Breaking: `<BuyButton>` and `<Offers>` create the customer's order and pay
90
+ - Breaking: `<BuyButton>` and `<ProductList>` create the customer's order and pay
75
91
  it in `<OrderCheckout>`; `onPaid` receives the completed `Order`.
76
92
  `returnUrl` replaces `successUrl`, and `autoRenew` is gone.
77
93
  - Breaking: `<CheckoutPage>`, `<CheckoutFrame>` and the shared payment page
@@ -173,22 +189,22 @@
173
189
  and the `returnURL` / `cardSetupReturnURL` props are gone: 3-D Secure runs in
174
190
  the page.
175
191
 
176
- ## Offers sell products by key
192
+ ## ProductList sells products by key
177
193
 
178
194
  - The public catalog is a lookup by product key: `listProducts({ keys })` and
179
195
  `useProducts({ keys })` take the keys alone (1 to 100) and read one page;
180
196
  `entitlements`, `limit` and `cursor` are gone, and so is
181
197
  `ProductsState.nextCursor`. No keys fetch nothing.
182
- - `<Offers keys>` replaces `<Offers entitlements>`: your server names the
183
- products, with the Go `Client.ListOffers` when it finds them by
198
+ - `<ProductList keys>` replaces `<ProductList entitlements>`: your server names the
199
+ products, with the Go `Client.ListProducts` when it finds them by
184
200
  entitlement.
185
201
 
186
- ## Apps buy through BuyButton and Offers
202
+ ## Apps buy through BuyButton and ProductList
187
203
 
188
204
  - `Checkout` and `CheckoutModal` (and their props), the fixture sources and
189
205
  the `CheckoutSource` type are no longer exported; the client no longer has
190
206
  `createCheckoutSession` or `checkoutSource`. Buy with `<BuyButton>` (it takes
191
- `amount`, `autoRenew` and `successUrl`) or `<Offers>`. `CheckoutPage` and
207
+ `amount`, `autoRenew` and `successUrl`) or `<ProductList>`. `CheckoutPage` and
192
208
  `CheckoutFrame` stay, for the shared payment page.
193
209
  - The main entry also exports `createBillingClient` (with `BillingClient`,
194
210
  `BillingClientOptions` and `ProductListOptions`) beside `formatAmount`, so a
@@ -205,12 +221,12 @@
205
221
  - Inside a provider with a client, the checkout saves a new card to the
206
222
  customer first and pays on the customer surface.
207
223
 
208
- ## Offers sell an entitlement
224
+ ## ProductList sell an entitlement
209
225
 
210
226
  - `<BuyButton product price onPaid onSignInRequired>` buys one price, labelled
211
227
  from the catalog unless given `label`. The app never touches a checkout
212
228
  session: when orders take a new card (#1168) it creates an order instead.
213
- - `<Offers entitlements onPaid onSignInRequired>` lists every product on sale
229
+ - `<ProductList entitlements onPaid onSignInRequired>` lists every product on sale
214
230
  granting any of the entitlements, a `BuyButton` per price; `products` feeds
215
231
  it from the host's server instead.
216
232
  - `listProducts({ entitlements, keys })` and `useProducts({ entitlements, keys })`
@@ -417,7 +433,7 @@ Client
417
433
 
418
434
  ## Advertised checkout rails
419
435
 
420
- - Breaking: `checkoutRails(offers)` takes OpenRails' checkout options alone.
436
+ - Breaking: `checkoutRails(options)` takes OpenRails' checkout options alone.
421
437
  Each option carries the `driver` and `public_config` OpenRails derived from
422
438
  the armed PSP (Solana: `token_symbol`, `token_name`, `network`); the package
423
439
  no longer derives drivers from `psps`. `CheckoutRailOffer` gains `selector`,
@@ -469,7 +485,7 @@ card PSP. Requires OpenRails v0.164.0.
469
485
  Provider-neutral hosts: a host passes OpenRails's browser PSP configs through
470
486
  and never branches on Stripe, NMI or any other provider.
471
487
 
472
- - `checkoutRails(offers, psps)` / `savedMethodsFor(methods, rails)` derive the
488
+ - `checkoutRails(options, psps)` / `savedMethodsFor(methods, rails)` derive the
473
489
  checkout rails and chargeable saved cards from each PSP's `flow` and public
474
490
  config.
475
491
  - `SavePaymentMethod`: consented in-page card saving with any PSP — Collect.js
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @openrails/billing-ui
2
2
 
3
- Embeddable OpenRails billing UI: the checkout flow and the customer's account
4
- billing (subscriptions, saved cards, payment history).
3
+ Embeddable OpenRails billing UI: checkout, customer account billing, and staff
4
+ administration inside the host's application.
5
5
 
6
6
  | Import | Contents |
7
7
  | --------------------------------- | ---------------------------------------------------------------------------------- |
@@ -9,8 +9,10 @@ billing (subscriptions, saved cards, payment history).
9
9
  | `@openrails/billing-ui/react` | `BillingProvider` and headless hooks, without styles |
10
10
  | `@openrails/billing-ui` | `BillingProvider`, styled checkout and account components, i18n |
11
11
  | `@openrails/billing-ui/locales/*` | `en de es ja ko zh` message bundles |
12
+ | `@openrails/billing-ui/admin` | `BillingAdmin`, `BillingCustomerSummary`, access and confirmation helpers |
13
+ | `@openrails/billing-ui/admin.css` | Scoped staff administration styles |
12
14
 
13
- The checkout owns the browser payment flow, behind `<BuyButton>`, `<Offers>`
15
+ The checkout owns the browser payment flow, behind `<BuyButton>`, `<ProductList>`
14
16
  and `<OrderCheckout>`: the signed-in customer's order, read and paid with
15
17
  their own credential. Card data is tokenized in the PSP's own fields
16
18
  (Collect.js, Stripe Elements) and never enters the host application.
@@ -31,7 +33,7 @@ pnpm add @openrails/billing-ui@X.Y.Z
31
33
  A React app imports from one place:
32
34
 
33
35
  ```tsx
34
- import { BillingProvider, BuyButton, Offers, createBillingClient, formatAmount } from "@openrails/billing-ui"
36
+ import { BillingProvider, BuyButton, ProductList, createBillingClient, formatAmount } from "@openrails/billing-ui"
35
37
 
36
38
  // auth-ui's authFetch attaches the bearer and retries once after a refresh;
37
39
  // `getToken: () => token` works for any other auth.
@@ -62,9 +64,9 @@ const billing = createBillingClient({
62
64
  })
63
65
  ```
64
66
 
65
- `<BuyButton>` buys one price, `<Offers>` the products your server names by
67
+ `<BuyButton>` buys one price, `<ProductList>` the products your server names by
66
68
  key (a course, its bundle and the membership that also unlocks it; the Go
67
- `Client.ListOffers` finds the products granting an entitlement): a
69
+ `Client.ListProducts` finds the products granting an entitlement): a
68
70
  `BuyButton` per price ("$4.99", "Rent for 3 days, $1.99",
69
71
  "$10.00 every 30 days"). Both look prices up in the public catalog of the
70
72
  merchant whose id you pass as `merchant`, signed in or out. The purchase is
@@ -86,9 +88,9 @@ granting anything.
86
88
  onPaid={() => navigate("/courses/css-101")} // your gate now admits them
87
89
  />
88
90
 
89
- <Offers
91
+ <ProductList
90
92
  merchant={merchantId}
91
- keys={["course-101", "course-bundle", "channel-membership"]} // from your server, or products={...} from its Client.ListOffers
93
+ keys={["course-101", "course-bundle", "channel-membership"]} // from your server, or products={...} from its Client.ListProducts
92
94
  signedIn={signedIn}
93
95
  onSignInRequired={() => openSignIn()}
94
96
  onPaid={() => navigate("/courses/css-101")}
@@ -172,6 +174,37 @@ deployment's (`GET /config`), whose currency registry amounts use over the
172
174
  pinned copy. `useCustomerConfig()`, `useConfig()` and `useCurrencyScales()`
173
175
  read the same copies for host components.
174
176
 
177
+ ## Staff administration
178
+
179
+ Install the admin entry's optional peer with `pnpm add @tanstack/react-query`.
180
+ The host owns sign-in and passes its authenticated transport and router:
181
+
182
+ ```tsx
183
+ import { BillingAdmin } from "@openrails/billing-ui/admin"
184
+ import "@openrails/billing-ui/admin.css"
185
+
186
+ <BillingAdmin
187
+ baseUrl="/billing/v1"
188
+ auth={auth}
189
+ basePath="/admin/billing"
190
+ navigation={{ pathname, search, navigate }}
191
+ appearance={{ theme: "inherit" }}
192
+ />
193
+ ```
194
+
195
+ `auth` implements `authFetch`; it can be an AuthKit client or a host transport.
196
+ Mount the component for the signed-in person and remount when that identity
197
+ changes. Omitting `navigation` uses browser history. Each instance owns its
198
+ transport, selected merchant, and query namespace, including when the host
199
+ supplies a shared `queryClient`.
200
+
201
+ `useBillingAdminAccess` reads the staff member's capabilities for the host's
202
+ navigation. `BillingCustomerSummary` supplies a bounded billing preview for a
203
+ host customer page. `settingsTabs`, `customerPanels`, and `userHref` compose
204
+ host content and links. The customer imports above do not load admin code or
205
+ styles. See the [BillingAdmin integration guide](https://github.com/open-rails/openrails/blob/master/docs/billing-admin.md)
206
+ for merchant selection, permissions, localization, and standalone console setup.
207
+
175
208
  ## Catalog and plan changes
176
209
 
177
210
  The client also reads the public catalog and changes a subscription's plan.
@@ -0,0 +1,3 @@
1
+ import { BillingAdminProps } from './types';
2
+ /** Staff billing pages inside the host's app, authentication, router, and theme. */
3
+ export declare function BillingAdmin(props: BillingAdminProps): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function AppSidebar(): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ export declare function ConfirmProvider({ children }: {
3
+ children: React.ReactNode;
4
+ }): React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { CursorPages } from '../lib/cursor-pages';
2
+ export declare function CursorPager({ pages, rows, nextCursor, busy, sizes, }: {
3
+ pages: CursorPages;
4
+ rows: number;
5
+ nextCursor: string | null | undefined;
6
+ busy?: boolean;
7
+ sizes?: number[];
8
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,14 @@
1
+ import { ColumnDef } from '@tanstack/react-table';
2
+ interface DataTableProps<TData> {
3
+ columns: ColumnDef<TData, unknown>[];
4
+ data: TData[];
5
+ loading?: boolean;
6
+ total?: number;
7
+ limit?: number;
8
+ offset?: number;
9
+ onPageChange?: (offset: number) => void;
10
+ onRowClick?: (row: TData) => void;
11
+ emptyMessage?: string;
12
+ }
13
+ export declare function DataTable<TData>({ columns, data, loading, total, limit, offset, onPageChange, onRowClick, emptyMessage, }: DataTableProps<TData>): import("react").JSX.Element;
14
+ export {};
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ export declare function Fact({ label, children, }: {
3
+ label: string;
4
+ children: React.ReactNode;
5
+ }): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare function FormFieldErrors({ errors }: {
2
+ errors: readonly unknown[];
3
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,5 @@
1
+ import { TableRow } from './ui/table';
2
+ import * as React from "react";
3
+ export declare function LinkedTableRow({ to, className, children, ...props }: React.ComponentProps<typeof TableRow> & {
4
+ to: string;
5
+ }): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare function LogoLockup({ className }: {
2
+ className?: string;
3
+ }): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare function NoAccess({ area }: {
2
+ area?: string;
3
+ }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function NoMerchants(): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import * as React from "react";
2
+ export declare function NotificationBell(): React.JSX.Element | null;
@@ -0,0 +1,3 @@
1
+ export declare function RouteError({ error }: {
2
+ error: unknown;
3
+ }): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ export interface Crumb {
3
+ label: string;
4
+ /** A link when the step is somewhere you can go; plain text otherwise. */
5
+ to?: string;
6
+ }
7
+ export declare function SiteHeader({ trail }: {
8
+ trail: Crumb[];
9
+ }): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare function StatusBadge({ status }: {
2
+ status?: string;
3
+ }): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ export declare function TypedConfirmDialog({ open, onOpenChange, title, description, confirmationWord, actionLabel, onConfirm, children, }: {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ title: string;
6
+ description: string;
7
+ confirmationWord: string;
8
+ actionLabel: string;
9
+ onConfirm: () => Promise<void> | void;
10
+ children?: React.ReactNode;
11
+ }): React.JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';
2
+ import { Button } from './button';
3
+ import * as React from "react";
4
+ declare function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props): React.JSX.Element;
5
+ declare function AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props): React.JSX.Element;
6
+ declare function AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props): React.JSX.Element;
7
+ declare function AlertDialogOverlay({ className, ...props }: AlertDialogPrimitive.Backdrop.Props): React.JSX.Element;
8
+ declare function AlertDialogContent({ className, size, ...props }: AlertDialogPrimitive.Popup.Props & {
9
+ size?: "default" | "sm";
10
+ }): React.JSX.Element;
11
+ declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
12
+ declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
13
+ declare function AlertDialogMedia({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
14
+ declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): React.JSX.Element;
15
+ declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): React.JSX.Element;
16
+ declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
17
+ declare function AlertDialogCancel({ className, variant, size, ...props }: AlertDialogPrimitive.Close.Props & Pick<React.ComponentProps<typeof Button>, "variant" | "size">): React.JSX.Element;
18
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
@@ -0,0 +1,11 @@
1
+ import { Avatar as AvatarPrimitive } from '@base-ui/react/avatar';
2
+ import * as React from "react";
3
+ declare function Avatar({ className, size, ...props }: AvatarPrimitive.Root.Props & {
4
+ size?: "default" | "sm" | "lg";
5
+ }): React.JSX.Element;
6
+ declare function AvatarImage({ className, ...props }: AvatarPrimitive.Image.Props): React.JSX.Element;
7
+ declare function AvatarFallback({ className, ...props }: AvatarPrimitive.Fallback.Props): React.JSX.Element;
8
+ declare function AvatarBadge({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
9
+ declare function AvatarGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
10
+ declare function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
+ export { Avatar, AvatarImage, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarBadge, };
@@ -0,0 +1,7 @@
1
+ import { useRender } from '@base-ui/react/use-render';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ declare function Badge({ className, variant, render, ...props }: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
7
+ export { Badge, badgeVariants };
@@ -0,0 +1,10 @@
1
+ import { useRender } from '@base-ui/react/use-render';
2
+ import * as React from "react";
3
+ declare function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
4
+ declare function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">): React.JSX.Element;
5
+ declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
6
+ declare function BreadcrumbLink({ className, render, ...props }: useRender.ComponentProps<"a">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
7
+ declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
8
+ declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
9
+ declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
10
+ export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
@@ -0,0 +1,8 @@
1
+ import { Button as ButtonPrimitive } from '@base-ui/react/button';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
+ size?: "default" | "icon" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ declare function Button({ className, variant, size, ...props }: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>): import("react").JSX.Element;
8
+ export { Button, buttonVariants };
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ declare function Card({ className, size, ...props }: React.ComponentProps<"div"> & {
3
+ size?: "default" | "sm";
4
+ }): React.JSX.Element;
5
+ declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
6
+ declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
7
+ declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
8
+ declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
9
+ declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
10
+ declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
@@ -0,0 +1,44 @@
1
+ import { TooltipValueType } from 'recharts';
2
+ import * as React from "react";
3
+ import * as RechartsPrimitive from "recharts";
4
+ declare const THEMES: {
5
+ readonly light: "";
6
+ readonly dark: ".dark";
7
+ };
8
+ type TooltipNameType = number | string;
9
+ export type ChartConfig = Record<string, {
10
+ label?: React.ReactNode;
11
+ icon?: React.ComponentType;
12
+ } & ({
13
+ color?: string;
14
+ theme?: never;
15
+ } | {
16
+ color?: never;
17
+ theme: Record<keyof typeof THEMES, string>;
18
+ })>;
19
+ declare function ChartContainer({ id, className, children, config, initialDimension, ...props }: React.ComponentProps<"div"> & {
20
+ config: ChartConfig;
21
+ children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
22
+ initialDimension?: {
23
+ width: number;
24
+ height: number;
25
+ };
26
+ }): React.JSX.Element;
27
+ declare const ChartStyle: ({ id, config }: {
28
+ id: string;
29
+ config: ChartConfig;
30
+ }) => React.JSX.Element | null;
31
+ declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
32
+ declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: React.ComponentProps<typeof RechartsPrimitive.Tooltip> & React.ComponentProps<"div"> & {
33
+ hideLabel?: boolean;
34
+ hideIndicator?: boolean;
35
+ indicator?: "line" | "dot" | "dashed";
36
+ nameKey?: string;
37
+ labelKey?: string;
38
+ } & Omit<RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>, "accessibilityLayer">): React.JSX.Element | null;
39
+ declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
40
+ declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<"div"> & {
41
+ hideIcon?: boolean;
42
+ nameKey?: string;
43
+ } & RechartsPrimitive.DefaultLegendContentProps): React.JSX.Element | null;
44
+ export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
@@ -0,0 +1,17 @@
1
+ import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';
2
+ import * as React from "react";
3
+ declare function Dialog({ ...props }: DialogPrimitive.Root.Props): React.JSX.Element;
4
+ declare function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props): React.JSX.Element;
5
+ declare function DialogPortal({ ...props }: DialogPrimitive.Portal.Props): React.JSX.Element;
6
+ declare function DialogClose({ ...props }: DialogPrimitive.Close.Props): React.JSX.Element;
7
+ declare function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props): React.JSX.Element;
8
+ declare function DialogContent({ className, children, showCloseButton, ...props }: DialogPrimitive.Popup.Props & {
9
+ showCloseButton?: boolean;
10
+ }): React.JSX.Element;
11
+ declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
12
+ declare function DialogFooter({ className, showCloseButton, children, ...props }: React.ComponentProps<"div"> & {
13
+ showCloseButton?: boolean;
14
+ }): React.JSX.Element;
15
+ declare function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props): React.JSX.Element;
16
+ declare function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props): React.JSX.Element;
17
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -0,0 +1,29 @@
1
+ import { Menu as MenuPrimitive } from '@base-ui/react/menu';
2
+ import * as React from "react";
3
+ declare function DropdownMenu({ ...props }: MenuPrimitive.Root.Props): React.JSX.Element;
4
+ declare function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props): React.JSX.Element;
5
+ declare function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props): React.JSX.Element;
6
+ declare function DropdownMenuContent({ align, alignOffset, side, sideOffset, className, ...props }: MenuPrimitive.Popup.Props & Pick<MenuPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React.JSX.Element;
7
+ declare function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props): React.JSX.Element;
8
+ declare function DropdownMenuLabel({ className, inset, ...props }: MenuPrimitive.GroupLabel.Props & {
9
+ inset?: boolean;
10
+ }): React.JSX.Element;
11
+ declare function DropdownMenuItem({ className, inset, variant, ...props }: MenuPrimitive.Item.Props & {
12
+ inset?: boolean;
13
+ variant?: "default" | "destructive";
14
+ }): React.JSX.Element;
15
+ declare function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props): React.JSX.Element;
16
+ declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: MenuPrimitive.SubmenuTrigger.Props & {
17
+ inset?: boolean;
18
+ }): React.JSX.Element;
19
+ declare function DropdownMenuSubContent({ align, alignOffset, side, sideOffset, className, ...props }: React.ComponentProps<typeof DropdownMenuContent>): React.JSX.Element;
20
+ declare function DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }: MenuPrimitive.CheckboxItem.Props & {
21
+ inset?: boolean;
22
+ }): React.JSX.Element;
23
+ declare function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props): React.JSX.Element;
24
+ declare function DropdownMenuRadioItem({ className, children, inset, ...props }: MenuPrimitive.RadioItem.Props & {
25
+ inset?: boolean;
26
+ }): React.JSX.Element;
27
+ declare function DropdownMenuSeparator({ className, ...props }: MenuPrimitive.Separator.Props): React.JSX.Element;
28
+ declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
29
+ export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ declare function Input({ className, type, ...props }: React.ComponentProps<"input">): React.JSX.Element;
3
+ export { Input };
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ declare function Label({ className, ...props }: React.ComponentProps<"label">): React.JSX.Element;
3
+ export { Label };
@@ -0,0 +1,15 @@
1
+ import { Select as SelectPrimitive } from '@base-ui/react/select';
2
+ import * as React from "react";
3
+ declare const Select: typeof SelectPrimitive.Root;
4
+ declare function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props): React.JSX.Element;
5
+ declare function SelectValue({ className, ...props }: SelectPrimitive.Value.Props): React.JSX.Element;
6
+ declare function SelectTrigger({ className, size, children, ...props }: SelectPrimitive.Trigger.Props & {
7
+ size?: "sm" | "default";
8
+ }): React.JSX.Element;
9
+ declare function SelectContent({ className, children, side, sideOffset, align, alignOffset, alignItemWithTrigger, ...props }: SelectPrimitive.Popup.Props & Pick<SelectPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger">): React.JSX.Element;
10
+ declare function SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props): React.JSX.Element;
11
+ declare function SelectItem({ className, children, ...props }: SelectPrimitive.Item.Props): React.JSX.Element;
12
+ declare function SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props): React.JSX.Element;
13
+ declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>): React.JSX.Element;
14
+ declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>): React.JSX.Element;
15
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
@@ -0,0 +1,3 @@
1
+ import { Separator as SeparatorPrimitive } from '@base-ui/react/separator';
2
+ declare function Separator({ className, orientation, ...props }: SeparatorPrimitive.Props): import("react").JSX.Element;
3
+ export { Separator };
@@ -0,0 +1,14 @@
1
+ import { Dialog as SheetPrimitive } from '@base-ui/react/dialog';
2
+ import * as React from "react";
3
+ declare function Sheet({ ...props }: SheetPrimitive.Root.Props): React.JSX.Element;
4
+ declare function SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props): React.JSX.Element;
5
+ declare function SheetClose({ ...props }: SheetPrimitive.Close.Props): React.JSX.Element;
6
+ declare function SheetContent({ className, children, side, showCloseButton, ...props }: SheetPrimitive.Popup.Props & {
7
+ side?: "top" | "right" | "bottom" | "left";
8
+ showCloseButton?: boolean;
9
+ }): React.JSX.Element;
10
+ declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
+ declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
12
+ declare function SheetTitle({ className, ...props }: SheetPrimitive.Title.Props): React.JSX.Element;
13
+ declare function SheetDescription({ className, ...props }: SheetPrimitive.Description.Props): React.JSX.Element;
14
+ export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
@@ -0,0 +1,63 @@
1
+ import { useRender } from '@base-ui/react/use-render';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { Button } from './button';
4
+ import { Input } from './input';
5
+ import { Separator } from './separator';
6
+ import { TooltipContent } from './tooltip';
7
+ import * as React from "react";
8
+ type SidebarContextProps = {
9
+ state: "expanded" | "collapsed";
10
+ open: boolean;
11
+ setOpen: (open: boolean) => void;
12
+ openMobile: boolean;
13
+ setOpenMobile: (open: boolean) => void;
14
+ isMobile: boolean;
15
+ toggleSidebar: () => void;
16
+ };
17
+ declare function useSidebar(): SidebarContextProps;
18
+ declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React.ComponentProps<"div"> & {
19
+ defaultOpen?: boolean;
20
+ open?: boolean;
21
+ onOpenChange?: (open: boolean) => void;
22
+ }): React.JSX.Element;
23
+ declare function Sidebar({ side, variant, collapsible, className, children, dir, ...props }: React.ComponentProps<"div"> & {
24
+ side?: "left" | "right";
25
+ variant?: "sidebar" | "floating" | "inset";
26
+ collapsible?: "offcanvas" | "icon" | "none";
27
+ }): React.JSX.Element;
28
+ declare function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
29
+ declare function SidebarRail({ className, ...props }: React.ComponentProps<"button">): React.JSX.Element;
30
+ declare function SidebarInset({ className, ...props }: React.ComponentProps<"main">): React.JSX.Element;
31
+ declare function SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>): React.JSX.Element;
32
+ declare function SidebarHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
33
+ declare function SidebarFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
34
+ declare function SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
35
+ declare function SidebarContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
36
+ declare function SidebarGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
37
+ declare function SidebarGroupLabel({ className, render, ...props }: useRender.ComponentProps<"div"> & React.ComponentProps<"div">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
38
+ declare function SidebarGroupAction({ className, render, ...props }: useRender.ComponentProps<"button"> & React.ComponentProps<"button">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
39
+ declare function SidebarGroupContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
40
+ declare function SidebarMenu({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
41
+ declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
42
+ declare const sidebarMenuButtonVariants: (props?: ({
43
+ variant?: "default" | "outline" | null | undefined;
44
+ size?: "default" | "sm" | "lg" | null | undefined;
45
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
46
+ declare function SidebarMenuButton({ render, isActive, variant, size, tooltip, className, ...props }: useRender.ComponentProps<"button"> & React.ComponentProps<"button"> & {
47
+ isActive?: boolean;
48
+ tooltip?: string | React.ComponentProps<typeof TooltipContent>;
49
+ } & VariantProps<typeof sidebarMenuButtonVariants>): React.JSX.Element;
50
+ declare function SidebarMenuAction({ className, render, showOnHover, ...props }: useRender.ComponentProps<"button"> & React.ComponentProps<"button"> & {
51
+ showOnHover?: boolean;
52
+ }): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
53
+ declare function SidebarMenuBadge({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
54
+ declare function SidebarMenuSkeleton({ className, showIcon, ...props }: React.ComponentProps<"div"> & {
55
+ showIcon?: boolean;
56
+ }): React.JSX.Element;
57
+ declare function SidebarMenuSub({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
58
+ declare function SidebarMenuSubItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
59
+ declare function SidebarMenuSubButton({ render, size, isActive, className, ...props }: useRender.ComponentProps<"a"> & React.ComponentProps<"a"> & {
60
+ size?: "sm" | "md";
61
+ isActive?: boolean;
62
+ }): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
63
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
@@ -0,0 +1,2 @@
1
+ declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
2
+ export { Skeleton };
@@ -0,0 +1,3 @@
1
+ import { ToasterProps } from 'sonner';
2
+ declare const Toaster: ({ ...props }: ToasterProps) => import("react").JSX.Element;
3
+ export { Toaster };
@@ -0,0 +1,5 @@
1
+ import { Switch as SwitchPrimitive } from '@base-ui/react/switch';
2
+ declare function Switch({ className, size, ...props }: SwitchPrimitive.Root.Props & {
3
+ size?: "sm" | "default";
4
+ }): import("react").JSX.Element;
5
+ export { Switch };
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ declare function Table({ className, ...props }: React.ComponentProps<"table">): React.JSX.Element;
3
+ declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): React.JSX.Element;
4
+ declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): React.JSX.Element;
5
+ declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): React.JSX.Element;
6
+ declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): React.JSX.Element;
7
+ declare function TableHead({ className, ...props }: React.ComponentProps<"th">): React.JSX.Element;
8
+ declare function TableCell({ className, ...props }: React.ComponentProps<"td">): React.JSX.Element;
9
+ declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): React.JSX.Element;
10
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };