@baack-software/baack-ts-crm 0.0.0-stage → 0.0.3

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 (234) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +74 -2
  3. package/dist/account.d.ts +36 -0
  4. package/dist/account.d.ts.map +1 -0
  5. package/dist/account.js +48 -0
  6. package/dist/account.js.map +1 -0
  7. package/dist/backend.d.ts +104 -0
  8. package/dist/backend.d.ts.map +1 -0
  9. package/dist/backend.js +328 -0
  10. package/dist/backend.js.map +1 -0
  11. package/dist/crm-client.d.ts +164 -0
  12. package/dist/crm-client.d.ts.map +1 -0
  13. package/dist/crm-client.js +252 -0
  14. package/dist/crm-client.js.map +1 -0
  15. package/dist/deal-order.d.ts +42 -0
  16. package/dist/deal-order.d.ts.map +1 -0
  17. package/dist/deal-order.js +80 -0
  18. package/dist/deal-order.js.map +1 -0
  19. package/dist/errors.d.ts +21 -0
  20. package/dist/errors.d.ts.map +1 -0
  21. package/dist/errors.js +33 -0
  22. package/dist/errors.js.map +1 -0
  23. package/dist/index.d.ts +14 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +14 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/invoices.d.ts +53 -0
  28. package/dist/invoices.d.ts.map +1 -0
  29. package/dist/invoices.js +155 -0
  30. package/dist/invoices.js.map +1 -0
  31. package/dist/leads.d.ts +29 -0
  32. package/dist/leads.d.ts.map +1 -0
  33. package/dist/leads.js +56 -0
  34. package/dist/leads.js.map +1 -0
  35. package/dist/mock/index.d.ts +43 -0
  36. package/dist/mock/index.d.ts.map +1 -0
  37. package/dist/mock/index.js +303 -0
  38. package/dist/mock/index.js.map +1 -0
  39. package/dist/money.d.ts +29 -0
  40. package/dist/money.d.ts.map +1 -0
  41. package/dist/money.js +82 -0
  42. package/dist/money.js.map +1 -0
  43. package/dist/period.d.ts +30 -0
  44. package/dist/period.d.ts.map +1 -0
  45. package/dist/period.js +49 -0
  46. package/dist/period.js.map +1 -0
  47. package/dist/pipeline.d.ts +36 -0
  48. package/dist/pipeline.d.ts.map +1 -0
  49. package/dist/pipeline.js +58 -0
  50. package/dist/pipeline.js.map +1 -0
  51. package/dist/react/Charts.d.ts +19 -0
  52. package/dist/react/Charts.d.ts.map +1 -0
  53. package/dist/react/Charts.js +38 -0
  54. package/dist/react/Charts.js.map +1 -0
  55. package/dist/react/ChoiceCombobox.d.ts +36 -0
  56. package/dist/react/ChoiceCombobox.d.ts.map +1 -0
  57. package/dist/react/ChoiceCombobox.js +105 -0
  58. package/dist/react/ChoiceCombobox.js.map +1 -0
  59. package/dist/react/CompanyAccountView.d.ts +21 -0
  60. package/dist/react/CompanyAccountView.d.ts.map +1 -0
  61. package/dist/react/CompanyAccountView.js +27 -0
  62. package/dist/react/CompanyAccountView.js.map +1 -0
  63. package/dist/react/DashboardCards.d.ts +32 -0
  64. package/dist/react/DashboardCards.d.ts.map +1 -0
  65. package/dist/react/DashboardCards.js +38 -0
  66. package/dist/react/DashboardCards.js.map +1 -0
  67. package/dist/react/DealsBoard.d.ts +49 -0
  68. package/dist/react/DealsBoard.d.ts.map +1 -0
  69. package/dist/react/DealsBoard.js +82 -0
  70. package/dist/react/DealsBoard.js.map +1 -0
  71. package/dist/react/Details.d.ts +85 -0
  72. package/dist/react/Details.d.ts.map +1 -0
  73. package/dist/react/Details.js +268 -0
  74. package/dist/react/Details.js.map +1 -0
  75. package/dist/react/Forms.d.ts +190 -0
  76. package/dist/react/Forms.d.ts.map +1 -0
  77. package/dist/react/Forms.js +494 -0
  78. package/dist/react/Forms.js.map +1 -0
  79. package/dist/react/LeadsTable.d.ts +22 -0
  80. package/dist/react/LeadsTable.d.ts.map +1 -0
  81. package/dist/react/LeadsTable.js +79 -0
  82. package/dist/react/LeadsTable.js.map +1 -0
  83. package/dist/react/Sales.d.ts +68 -0
  84. package/dist/react/Sales.d.ts.map +1 -0
  85. package/dist/react/Sales.js +270 -0
  86. package/dist/react/Sales.js.map +1 -0
  87. package/dist/react/SidePanel.d.ts +31 -0
  88. package/dist/react/SidePanel.d.ts.map +1 -0
  89. package/dist/react/SidePanel.js +49 -0
  90. package/dist/react/SidePanel.js.map +1 -0
  91. package/dist/react/format.d.ts +28 -0
  92. package/dist/react/format.d.ts.map +1 -0
  93. package/dist/react/format.js +30 -0
  94. package/dist/react/format.js.map +1 -0
  95. package/dist/react/index.d.ts +15 -0
  96. package/dist/react/index.d.ts.map +1 -0
  97. package/dist/react/index.js +15 -0
  98. package/dist/react/index.js.map +1 -0
  99. package/dist/react/parts.d.ts +55 -0
  100. package/dist/react/parts.d.ts.map +1 -0
  101. package/dist/react/parts.js +82 -0
  102. package/dist/react/parts.js.map +1 -0
  103. package/dist/react/pipeline-choice.d.ts +19 -0
  104. package/dist/react/pipeline-choice.d.ts.map +1 -0
  105. package/dist/react/pipeline-choice.js +39 -0
  106. package/dist/react/pipeline-choice.js.map +1 -0
  107. package/dist/react/text.d.ts +232 -0
  108. package/dist/react/text.d.ts.map +1 -0
  109. package/dist/react/text.js +229 -0
  110. package/dist/react/text.js.map +1 -0
  111. package/dist/react/ui/alert.d.ts +11 -0
  112. package/dist/react/ui/alert.d.ts.map +1 -0
  113. package/dist/react/ui/alert.js +29 -0
  114. package/dist/react/ui/alert.js.map +1 -0
  115. package/dist/react/ui/badge.d.ts +10 -0
  116. package/dist/react/ui/badge.d.ts.map +1 -0
  117. package/dist/react/ui/badge.js +26 -0
  118. package/dist/react/ui/badge.js.map +1 -0
  119. package/dist/react/ui/button.d.ts +11 -0
  120. package/dist/react/ui/button.d.ts.map +1 -0
  121. package/dist/react/ui/button.js +37 -0
  122. package/dist/react/ui/button.js.map +1 -0
  123. package/dist/react/ui/card.d.ts +12 -0
  124. package/dist/react/ui/card.d.ts.map +1 -0
  125. package/dist/react/ui/card.js +26 -0
  126. package/dist/react/ui/card.js.map +1 -0
  127. package/dist/react/ui/chart.d.ts +45 -0
  128. package/dist/react/ui/chart.d.ts.map +1 -0
  129. package/dist/react/ui/chart.js +116 -0
  130. package/dist/react/ui/chart.js.map +1 -0
  131. package/dist/react/ui/input.d.ts +4 -0
  132. package/dist/react/ui/input.d.ts.map +1 -0
  133. package/dist/react/ui/input.js +8 -0
  134. package/dist/react/ui/input.js.map +1 -0
  135. package/dist/react/ui/label.d.ts +5 -0
  136. package/dist/react/ui/label.d.ts.map +1 -0
  137. package/dist/react/ui/label.js +10 -0
  138. package/dist/react/ui/label.js.map +1 -0
  139. package/dist/react/ui/progress.d.ts +5 -0
  140. package/dist/react/ui/progress.d.ts.map +1 -0
  141. package/dist/react/ui/progress.js +10 -0
  142. package/dist/react/ui/progress.js.map +1 -0
  143. package/dist/react/ui/select.d.ts +16 -0
  144. package/dist/react/ui/select.d.ts.map +1 -0
  145. package/dist/react/ui/select.js +37 -0
  146. package/dist/react/ui/select.js.map +1 -0
  147. package/dist/react/ui/separator.d.ts +5 -0
  148. package/dist/react/ui/separator.d.ts.map +1 -0
  149. package/dist/react/ui/separator.js +10 -0
  150. package/dist/react/ui/separator.js.map +1 -0
  151. package/dist/react/ui/sheet.d.ts +15 -0
  152. package/dist/react/ui/sheet.d.ts.map +1 -0
  153. package/dist/react/ui/sheet.js +38 -0
  154. package/dist/react/ui/sheet.js.map +1 -0
  155. package/dist/react/ui/skeleton.d.ts +3 -0
  156. package/dist/react/ui/skeleton.d.ts.map +1 -0
  157. package/dist/react/ui/skeleton.js +7 -0
  158. package/dist/react/ui/skeleton.js.map +1 -0
  159. package/dist/react/ui/table.d.ts +11 -0
  160. package/dist/react/ui/table.d.ts.map +1 -0
  161. package/dist/react/ui/table.js +29 -0
  162. package/dist/react/ui/table.js.map +1 -0
  163. package/dist/react/ui/tabs.d.ts +12 -0
  164. package/dist/react/ui/tabs.d.ts.map +1 -0
  165. package/dist/react/ui/tabs.js +31 -0
  166. package/dist/react/ui/tabs.js.map +1 -0
  167. package/dist/react/views.d.ts +82 -0
  168. package/dist/react/views.d.ts.map +1 -0
  169. package/dist/react/views.js +241 -0
  170. package/dist/react/views.js.map +1 -0
  171. package/dist/sales.d.ts +82 -0
  172. package/dist/sales.d.ts.map +1 -0
  173. package/dist/sales.js +87 -0
  174. package/dist/sales.js.map +1 -0
  175. package/dist/store.d.ts +159 -0
  176. package/dist/store.d.ts.map +1 -0
  177. package/dist/store.js +305 -0
  178. package/dist/store.js.map +1 -0
  179. package/dist/target.d.ts +22 -0
  180. package/dist/target.d.ts.map +1 -0
  181. package/dist/target.js +40 -0
  182. package/dist/target.js.map +1 -0
  183. package/dist/types.d.ts +204 -0
  184. package/dist/types.d.ts.map +1 -0
  185. package/dist/types.js +2 -0
  186. package/dist/types.js.map +1 -0
  187. package/package.json +100 -4
  188. package/src/account.ts +79 -0
  189. package/src/backend.ts +501 -0
  190. package/src/crm-client.ts +393 -0
  191. package/src/deal-order.ts +116 -0
  192. package/src/errors.ts +34 -0
  193. package/src/index.ts +13 -0
  194. package/src/invoices.ts +177 -0
  195. package/src/leads.ts +78 -0
  196. package/src/mock/index.ts +398 -0
  197. package/src/money.ts +104 -0
  198. package/src/period.ts +71 -0
  199. package/src/pipeline.ts +82 -0
  200. package/src/react/Charts.tsx +143 -0
  201. package/src/react/ChoiceCombobox.tsx +227 -0
  202. package/src/react/CompanyAccountView.tsx +198 -0
  203. package/src/react/DashboardCards.tsx +171 -0
  204. package/src/react/DealsBoard.tsx +344 -0
  205. package/src/react/Details.tsx +870 -0
  206. package/src/react/Forms.tsx +1486 -0
  207. package/src/react/LeadsTable.tsx +234 -0
  208. package/src/react/Sales.tsx +827 -0
  209. package/src/react/SidePanel.tsx +104 -0
  210. package/src/react/format.ts +53 -0
  211. package/src/react/index.ts +14 -0
  212. package/src/react/parts.tsx +183 -0
  213. package/src/react/pipeline-choice.ts +54 -0
  214. package/src/react/text.ts +232 -0
  215. package/src/react/ui/README.md +6 -0
  216. package/src/react/ui/alert.tsx +75 -0
  217. package/src/react/ui/badge.tsx +48 -0
  218. package/src/react/ui/button.tsx +66 -0
  219. package/src/react/ui/card.tsx +102 -0
  220. package/src/react/ui/chart.tsx +304 -0
  221. package/src/react/ui/input.tsx +18 -0
  222. package/src/react/ui/label.tsx +23 -0
  223. package/src/react/ui/progress.tsx +30 -0
  224. package/src/react/ui/select.tsx +189 -0
  225. package/src/react/ui/separator.tsx +27 -0
  226. package/src/react/ui/sheet.tsx +145 -0
  227. package/src/react/ui/skeleton.tsx +13 -0
  228. package/src/react/ui/table.tsx +113 -0
  229. package/src/react/ui/tabs.tsx +89 -0
  230. package/src/react/views.tsx +633 -0
  231. package/src/sales.ts +167 -0
  232. package/src/store.ts +528 -0
  233. package/src/target.ts +54 -0
  234. package/src/types.ts +230 -0
@@ -0,0 +1,229 @@
1
+ /**
2
+ * The words the CRM components show, in en-GB. Each composition takes `text` to replace any of them, so a host can
3
+ * supply its own copy (later from Baack content).
4
+ */
5
+ export const CRM_TEXT = {
6
+ sampleData: 'Sample data',
7
+ sampleDataHint: 'Not yet in the Baack API: shown from sample data so the view can be reviewed.',
8
+ unavailable: 'Not available yet',
9
+ loading: 'Loading',
10
+ noChange: 'No earlier figures',
11
+ vsPrevious: 'vs previous period',
12
+ vsPrevious30: 'vs the 30 days before',
13
+ vsLastQuarter: 'vs the same time last quarter',
14
+ vsLastYear: 'vs the same time last year',
15
+ customers: 'Customers',
16
+ customersHint: 'Companies with a won deal',
17
+ openDeals: 'Open deals',
18
+ revenue: 'Revenue',
19
+ revenueHint: 'Payments received less refunds',
20
+ revenueOverTime: 'Revenue over time',
21
+ newLeads: 'New leads',
22
+ target: 'Sales target',
23
+ targetSummary: 'Payments received on deals against the value of leads and deals',
24
+ targetReceived: 'received of',
25
+ leadsBySource: 'Leads by source',
26
+ pipeline: 'Sales pipeline',
27
+ stage: 'Stage',
28
+ workflow: 'Workflow',
29
+ deals: 'Deals',
30
+ value: 'Value',
31
+ weighted: 'Weighted',
32
+ share: 'Share',
33
+ leads: 'Leads',
34
+ lead: 'Lead',
35
+ company: 'Company',
36
+ contact: 'Contact',
37
+ source: 'Source',
38
+ status: 'Status',
39
+ date: 'Date',
40
+ assignee: 'Assignee',
41
+ filterLeads: 'Filter leads',
42
+ allStatuses: 'All statuses',
43
+ allSources: 'All sources',
44
+ export: 'Export CSV',
45
+ previous: 'Previous',
46
+ next: 'Next',
47
+ noLeads: 'No leads match.',
48
+ of: 'of',
49
+ open: 'Open',
50
+ close: 'Close',
51
+ moveTo: 'Move to stage',
52
+ expectedClose: 'Expected close',
53
+ closed: 'Closed',
54
+ lostReason: 'Lost reason',
55
+ outcome: 'Outcome',
56
+ outcomeOpen: 'Open',
57
+ outcomeWon: 'Won',
58
+ outcomeLost: 'Lost',
59
+ markLost: 'Mark as lost',
60
+ markUnqualified: 'Mark unqualified',
61
+ unqualifiedReason: 'Why it was unqualified',
62
+ reopen: 'Reopen',
63
+ cancel: 'Cancel',
64
+ probability: 'Probability',
65
+ convert: 'Convert to deal',
66
+ converting: 'Converting',
67
+ convertSummary: 'Qualify the lead: it becomes a deal at the first stage of the pipeline.',
68
+ companyName: 'Company name',
69
+ companyNameHint: 'Creates the client company. Leave it empty for a person buying for themselves.',
70
+ convertedTo: 'Converted to',
71
+ created: 'Created',
72
+ noDeals: 'No deals here.',
73
+ account: 'Account',
74
+ openValue: 'Open deals',
75
+ wonValue: 'Won',
76
+ outstanding: 'Outstanding',
77
+ overdue: 'Overdue',
78
+ received: 'Received',
79
+ invoices: 'Invoices',
80
+ invoice: 'Invoice',
81
+ total: 'Total',
82
+ due: 'Due',
83
+ paid: 'Paid',
84
+ payments: 'Payments',
85
+ method: 'Method',
86
+ reference: 'Reference',
87
+ amount: 'Amount',
88
+ noInvoices: 'No invoices.',
89
+ noPayments: 'No payments.',
90
+ openLeads: 'Open leads',
91
+ people: 'People',
92
+ sales: 'Sales',
93
+ invoiced: 'Invoiced',
94
+ invoicedHint: 'Invoices issued in the period',
95
+ salesTax: 'Sales tax',
96
+ salesTaxHint: 'On invoices issued in the period',
97
+ outstandingHint: 'Still to pay on invoices sent',
98
+ outstandingByAge: 'Outstanding by age',
99
+ paymentMethods: 'Payments by method',
100
+ customer: 'Customer',
101
+ issued: 'Issued',
102
+ filterInvoices: 'Filter invoices',
103
+ allInvoices: 'All invoices',
104
+ awaitingPayment: 'Awaiting payment',
105
+ noMatchingInvoices: 'No invoices match.',
106
+ recordPayment: 'Record payment',
107
+ recording: 'Recording',
108
+ paymentRecorded: 'Payment recorded.',
109
+ invalidAmount: 'Enter an amount above zero, such as 120.00.',
110
+ tasks: 'Tasks',
111
+ none: 'None',
112
+ unnamed: 'Unnamed',
113
+ newLead: 'New lead',
114
+ newDeal: 'New deal',
115
+ newInvoice: 'New invoice',
116
+ title: 'Title',
117
+ titleRequired: 'Enter a title.',
118
+ noCompany: 'No company',
119
+ newCompany: 'New company',
120
+ newCompanyHint: 'Makes the client company, owned by yours, when the lead is saved.',
121
+ addCompany: 'Add a new company',
122
+ companyNameRequired: 'Enter the company name.',
123
+ noContact: 'No contact',
124
+ newContact: 'New contact',
125
+ newContactHint: "Makes a person owned by your company when the lead is saved, linked to the lead's company when it has one.",
126
+ addContact: 'Add a new person',
127
+ addPerson: 'Add a person',
128
+ givenName: 'Given name',
129
+ familyName: 'Family name',
130
+ email: 'Email',
131
+ givenNameRequired: 'Enter a given name.',
132
+ telephone: 'Telephone',
133
+ contactDetails: "Contact's details",
134
+ contactEmail: "Contact's email",
135
+ contactTelephone: "Contact's telephone",
136
+ contactDetailsUnavailable: "The contact's email and telephone couldn't be read.",
137
+ unassigned: 'Unassigned',
138
+ toBeCreated: 'new',
139
+ useThis: 'Use this',
140
+ saving: 'Saving',
141
+ back: 'Back',
142
+ saveFailed: "The change couldn't be saved.",
143
+ createLead: 'Create lead',
144
+ createDeal: 'Create deal',
145
+ createInvoice: 'Create invoice',
146
+ creating: 'Creating',
147
+ currency: 'Currency',
148
+ issuedOn: 'Issued on',
149
+ dueOn: 'Due on',
150
+ forDeal: 'For deal',
151
+ noDeal: 'No deal',
152
+ lines: 'Lines',
153
+ description: 'Description',
154
+ quantity: 'Quantity',
155
+ unitPrice: 'Unit price',
156
+ addLine: 'Add a line',
157
+ removeLine: 'Remove line',
158
+ taxRate: 'Tax rate (%)',
159
+ subTotal: 'Subtotal',
160
+ tax: 'Tax',
161
+ customerRequired: 'Choose the customer.',
162
+ amountAs: 'Amount as',
163
+ amountAsLines: 'Line items',
164
+ amountAsTotal: 'A total',
165
+ totalWithTax: 'Total, including tax',
166
+ totalHint: 'The subtotal and tax are worked out from it at the tax rate.',
167
+ totalRequired: 'Enter the total, above zero, such as 1,200.00.',
168
+ linesRequired: 'Give each line a description, a quantity and a unit price above zero.',
169
+ invalidRate: 'Enter a tax rate from 0 to 100.',
170
+ invalidProbability: 'Enter a probability from 0 to 100.',
171
+ companies: 'Companies',
172
+ contacts: 'Contacts',
173
+ searchCompanies: 'Search companies by name',
174
+ searchContacts: 'Search people by name, email or telephone',
175
+ chosen: 'Chosen',
176
+ remove: 'Remove',
177
+ noMatches: 'No matches.',
178
+ filterDeals: 'Filter deals',
179
+ allOutcomes: 'All outcomes',
180
+ anyone: 'Anyone',
181
+ allCompanies: 'All companies',
182
+ clearFilters: 'Clear filters',
183
+ sortBy: 'Sort by',
184
+ orderWeighted: 'Weighted',
185
+ orderSize: 'Deal size',
186
+ orderUrgency: 'Urgency',
187
+ dealsShown: 'deals shown',
188
+ remitter: 'Remitter: who pays',
189
+ remitterCompany: 'Company that pays',
190
+ remitterPerson: 'Person who pays',
191
+ recipient: 'Recipient: who is paid',
192
+ recipientCompany: 'Company paid',
193
+ recipientPerson: 'Person who is paid',
194
+ recipientHint: 'Usually your company, or one of its companies; another company for an invoice you pay.',
195
+ remitterRequired: 'Choose the company or person who pays.',
196
+ recipientRequired: 'Choose the company or person who is paid.',
197
+ searchPeople: 'Search people by name, email or telephone',
198
+ noPerson: 'No person',
199
+ line: 'Line',
200
+ lineDetails: 'All fields',
201
+ itemCode: 'Item code',
202
+ discountRate: 'Discount (%)',
203
+ taxability: 'Tax treatment',
204
+ taxName: 'Tax name',
205
+ price: 'Price',
206
+ done: 'Done',
207
+ invalidDiscount: 'Enter a discount from 0 to 100.',
208
+ costs: 'Costs',
209
+ costsHint: 'Invoices you pay, issued in the period',
210
+ toPay: 'To pay',
211
+ party: 'Customer or supplier',
212
+ paidBy: 'Paid by',
213
+ paidTo: 'Paid to',
214
+ allKinds: 'Sales and costs',
215
+ salesOnly: 'Sales',
216
+ costsOnly: 'Costs',
217
+ cost: 'Cost',
218
+ drafts: 'Drafts',
219
+ draftsHint: 'Not yet sent, so not counted above',
220
+ draftInvoice: 'draft invoice',
221
+ draftInvoices: 'draft invoices',
222
+ period: 'Period',
223
+ periodLast30: 'Last 30 days',
224
+ periodQuarter: 'This quarter',
225
+ periodYear: 'This year',
226
+ };
227
+ /** The default words with a host's replacements. */
228
+ export const withText = (text) => (text ? { ...CRM_TEXT, ...text } : CRM_TEXT);
229
+ //# sourceMappingURL=text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/react/text.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,UAAU,EAAE,aAAa;IACzB,cAAc,EAAE,+EAA+E;IAC/F,WAAW,EAAE,mBAAmB;IAChC,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,oBAAoB;IAC9B,UAAU,EAAE,oBAAoB;IAChC,YAAY,EAAE,uBAAuB;IACrC,aAAa,EAAE,+BAA+B;IAC9C,UAAU,EAAE,4BAA4B;IACxC,SAAS,EAAE,WAAW;IACtB,aAAa,EAAE,2BAA2B;IAC1C,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,gCAAgC;IAC7C,eAAe,EAAE,mBAAmB;IACpC,QAAQ,EAAE,WAAW;IACrB,MAAM,EAAE,cAAc;IACtB,aAAa,EAAE,iEAAiE;IAChF,cAAc,EAAE,aAAa;IAC7B,aAAa,EAAE,iBAAiB;IAChC,Q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B,aAAa,EAAE,gBAAgB;IAC/B,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,cAAc;IAC5B,aAAa,EAAE,cAAc;IAC7B,UAAU,EAAE,WAAW;CACf,CAAC;AAIX,oDAAoD;AACpD,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAuB,EAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const alertVariants: (props?: ({
4
+ variant?: "default" | "destructive" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
7
+ declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
8
+ declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
9
+ declare function AlertAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
10
+ export { Alert, AlertTitle, AlertDescription, AlertAction };
11
+ //# sourceMappingURL=alert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/react/ui/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,aAAa;;8EAclB,CAAA;AAED,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,qBASlE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7B;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQxE;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cva } from "class-variance-authority";
4
+ import { cn } from "cn";
5
+ const alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
6
+ variants: {
7
+ variant: {
8
+ default: "bg-card text-card-foreground",
9
+ destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current",
10
+ },
11
+ },
12
+ defaultVariants: {
13
+ variant: "default",
14
+ },
15
+ });
16
+ function Alert({ className, variant, ...props }) {
17
+ return (_jsx("div", { "data-slot": "alert", role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
18
+ }
19
+ function AlertTitle({ className, ...props }) {
20
+ return (_jsx("div", { "data-slot": "alert-title", className: cn("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", className), ...props }));
21
+ }
22
+ function AlertDescription({ className, ...props }) {
23
+ return (_jsx("div", { "data-slot": "alert-description", className: cn("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className), ...props }));
24
+ }
25
+ function AlertAction({ className, ...props }) {
26
+ return (_jsx("div", { "data-slot": "alert-action", className: cn("absolute top-2 right-2", className), ...props }));
27
+ }
28
+ export { Alert, AlertTitle, AlertDescription, AlertAction };
29
+ //# sourceMappingURL=alert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../src/react/ui/alert.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,IAAI,CAAA;AAEvB,MAAM,aAAa,GAAG,GAAG,CACvB,2TAA2T,EAC3T;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,8BAA8B;YACvC,WAAW,EACT,mGAAmG;SACtG;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;KACnB;CACF,CACF,CAAA;AAED,SAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACyD;IACjE,OAAO,CACL,2BACY,OAAO,EACjB,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACtE,OAAO,CACL,2BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CACX,qHAAqH,EACrH,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACoB;IAC5B,OAAO,CACL,2BACY,mBAAmB,EAC7B,SAAS,EAAE,EAAE,CACX,4JAA4J,EAC5J,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACvE,OAAO,CACL,2BACY,cAAc,EACxB,SAAS,EAAE,EAAE,CAAC,wBAAwB,EAAE,SAAS,CAAC,KAC9C,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "outline" | "secondary" | "ghost" | "destructive" | "link" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
7
+ asChild?: boolean;
8
+ }): React.JSX.Element;
9
+ export { Badge, badgeVariants };
10
+ //# sourceMappingURL=badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/react/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,aAAa;;8EAqBlB,CAAA;AAED,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAmB,EACnB,OAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,GAC7B,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,qBAW3D;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cva } from "class-variance-authority";
4
+ import { cn } from "cn";
5
+ import { Slot } from "radix-ui";
6
+ const badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
7
+ variants: {
8
+ variant: {
9
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
10
+ secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
11
+ destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
12
+ outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
13
+ ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
14
+ link: "text-primary underline-offset-4 hover:underline",
15
+ },
16
+ },
17
+ defaultVariants: {
18
+ variant: "default",
19
+ },
20
+ });
21
+ function Badge({ className, variant = "default", asChild = false, ...props }) {
22
+ const Comp = asChild ? Slot.Root : "span";
23
+ return (_jsx(Comp, { "data-slot": "badge", "data-variant": variant, className: cn(badgeVariants({ variant }), className), ...props }));
24
+ }
25
+ export { Badge, badgeVariants };
26
+ //# sourceMappingURL=badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.js","sourceRoot":"","sources":["../../../src/react/ui/badge.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,IAAI,CAAA;AACvB,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,MAAM,aAAa,GAAG,GAAG,CACvB,4eAA4e,EAC5e;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,4DAA4D;YACrE,SAAS,EACP,kEAAkE;YACpE,WAAW,EACT,gKAAgK;YAClK,OAAO,EACL,kFAAkF;YACpF,KAAK,EACH,mEAAmE;YACrE,IAAI,EAAE,iDAAiD;SACxD;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;KACnB;CACF,CACF,CAAA;AAED,SAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,OAAO,GAAG,KAAK,EACf,GAAG,KAAK,EAEkD;IAC1D,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAA;IAEzC,OAAO,CACL,KAAC,IAAI,iBACO,OAAO,kBACH,OAAO,EACrB,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "default" | "outline" | "secondary" | "ghost" | "destructive" | "link" | null | undefined;
5
+ size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
8
+ asChild?: boolean;
9
+ }): React.JSX.Element;
10
+ export { Button, buttonVariants };
11
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/react/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,cAAc;;;8EAmCnB,CAAA;AAED,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,OAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAC/B,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,qBAYF;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cva } from "class-variance-authority";
4
+ import { cn } from "cn";
5
+ import { Slot } from "radix-ui";
6
+ const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
7
+ variants: {
8
+ variant: {
9
+ default: "bg-primary text-primary-foreground hover:bg-primary/80",
10
+ outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
11
+ secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
12
+ ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
13
+ destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
14
+ link: "text-primary underline-offset-4 hover:underline",
15
+ },
16
+ size: {
17
+ default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
18
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
19
+ sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
20
+ lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
21
+ icon: "size-8",
22
+ "icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
23
+ "icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
24
+ "icon-lg": "size-9",
25
+ },
26
+ },
27
+ defaultVariants: {
28
+ variant: "default",
29
+ size: "default",
30
+ },
31
+ });
32
+ function Button({ className, variant = "default", size = "default", asChild = false, ...props }) {
33
+ const Comp = asChild ? Slot.Root : "button";
34
+ return (_jsx(Comp, { "data-slot": "button", "data-variant": variant, "data-size": size, className: cn(buttonVariants({ variant, size, className })), ...props }));
35
+ }
36
+ export { Button, buttonVariants };
37
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/react/ui/button.tsx"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cAAc,EAAE,CAAA"}
@@ -0,0 +1,12 @@
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, };
12
+ //# sourceMappingURL=card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/react/ui/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;CAAE,qBAY3D;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWtE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ5E;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,GACZ,CAAA"}
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cn } from "cn";
4
+ function Card({ className, size = "default", ...props }) {
5
+ return (_jsx("div", { "data-slot": "card", "data-size": size, className: cn("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", className), ...props }));
6
+ }
7
+ function CardHeader({ className, ...props }) {
8
+ return (_jsx("div", { "data-slot": "card-header", className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)", className), ...props }));
9
+ }
10
+ function CardTitle({ className, ...props }) {
11
+ return (_jsx("div", { "data-slot": "card-title", className: cn("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", className), ...props }));
12
+ }
13
+ function CardDescription({ className, ...props }) {
14
+ return (_jsx("div", { "data-slot": "card-description", className: cn("text-sm text-muted-foreground", className), ...props }));
15
+ }
16
+ function CardAction({ className, ...props }) {
17
+ return (_jsx("div", { "data-slot": "card-action", className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className), ...props }));
18
+ }
19
+ function CardContent({ className, ...props }) {
20
+ return (_jsx("div", { "data-slot": "card-content", className: cn("px-(--card-spacing)", className), ...props }));
21
+ }
22
+ function CardFooter({ className, ...props }) {
23
+ return (_jsx("div", { "data-slot": "card-footer", className: cn("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)", className), ...props }));
24
+ }
25
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
26
+ //# sourceMappingURL=card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.js","sourceRoot":"","sources":["../../../src/react/ui/card.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,EAAE,EAAE,MAAM,IAAI,CAAA;AAEvB,SAAS,IAAI,CAAC,EACZ,SAAS,EACT,IAAI,GAAG,SAAS,EAChB,GAAG,KAAK,EACkD;IAC1D,OAAO,CACL,2BACY,MAAM,eACL,IAAI,EACf,SAAS,EAAE,EAAE,CACX,sZAAsZ,EACtZ,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACtE,OAAO,CACL,2BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CACX,wPAAwP,EACxP,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACrE,OAAO,CACL,2BACY,YAAY,EACtB,SAAS,EAAE,EAAE,CACX,sEAAsE,EACtE,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IAC3E,OAAO,CACL,2BACY,kBAAkB,EAC5B,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACtE,OAAO,CACL,2BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CACX,gEAAgE,EAChE,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACvE,OAAO,CACL,2BACY,cAAc,EACxB,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,KAC3C,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACtE,OAAO,CACL,2BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CACX,wEAAwE,EACxE,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,GACZ,CAAA"}
@@ -0,0 +1,45 @@
1
+ import * as React from "react";
2
+ import * as RechartsPrimitive from "recharts";
3
+ import type { TooltipValueType } 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 };
45
+ //# sourceMappingURL=chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../../src/react/ui/chart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,iBAAiB,MAAM,UAAU,CAAA;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAGhD,QAAA,MAAM,MAAM;;;CAAwC,CAAA;AAGpD,KAAK,eAAe,GAAG,MAAM,GAAG,MAAM,CAAA;AAEtC,MAAM,MAAM,WAAW,GAAG,MAAM,CAC9B,MAAM,EACN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,CAAC,EAAE,OAAO,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAA;IACrC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,GAAG,IAAI,CAAC,iBAAiB,CAAC,0BAA0B,CAAC,gBAAgB,EAAE,eAAe,CAAC,EAAE,oBAAoB,CAAC,4BAsGhH;AAED,QAAA,MAAM,WAAW,sGAA2B,CAAA;AAE5C,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,QAAgB,EAChB,OAAO,EACP,aAAwB,EACxB,OAAO,GACR,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,GAAG,iBAAiB,CAAC,yBAAyB,4BAoC9C;AA2BD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,kBAAkB,EAAE,UAAU,EAAE,CAAA"}
@@ -0,0 +1,116 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cn } from "cn";
4
+ import * as RechartsPrimitive from "recharts";
5
+ // Format: { THEME_NAME: CSS_SELECTOR }
6
+ const THEMES = { light: "", dark: ".dark" };
7
+ const INITIAL_DIMENSION = { width: 320, height: 200 };
8
+ const ChartContext = React.createContext(null);
9
+ function useChart() {
10
+ const context = React.useContext(ChartContext);
11
+ if (!context) {
12
+ throw new Error("useChart must be used within a <ChartContainer />");
13
+ }
14
+ return context;
15
+ }
16
+ function ChartContainer({ id, className, children, config, initialDimension = INITIAL_DIMENSION, ...props }) {
17
+ const uniqueId = React.useId();
18
+ const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
19
+ return (_jsx(ChartContext.Provider, { value: { config }, children: _jsxs("div", { "data-slot": "chart", "data-chart": chartId, className: cn("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className), ...props, children: [_jsx(ChartStyle, { id: chartId, config: config }), _jsx(RechartsPrimitive.ResponsiveContainer, { initialDimension: initialDimension, children: children })] }) }));
20
+ }
21
+ const ChartStyle = ({ id, config }) => {
22
+ const colorConfig = Object.entries(config).filter(([, config]) => config.theme ?? config.color);
23
+ if (!colorConfig.length) {
24
+ return null;
25
+ }
26
+ return (_jsx("style", { dangerouslySetInnerHTML: {
27
+ __html: Object.entries(THEMES)
28
+ .map(([theme, prefix]) => `
29
+ ${prefix} [data-chart=${id}] {
30
+ ${colorConfig
31
+ .map(([key, itemConfig]) => {
32
+ const color = itemConfig.theme?.[theme] ?? itemConfig.color;
33
+ return color ? ` --color-${key}: ${color};` : null;
34
+ })
35
+ .join("\n")}
36
+ }
37
+ `)
38
+ .join("\n"),
39
+ } }));
40
+ };
41
+ const ChartTooltip = RechartsPrimitive.Tooltip;
42
+ function ChartTooltipContent({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }) {
43
+ const { config } = useChart();
44
+ const tooltipLabel = React.useMemo(() => {
45
+ if (hideLabel || !payload?.length) {
46
+ return null;
47
+ }
48
+ const [item] = payload;
49
+ const key = `${labelKey ?? item?.dataKey ?? item?.name ?? "value"}`;
50
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
51
+ const value = !labelKey && typeof label === "string" ? (config[label]?.label ?? label) : itemConfig?.label;
52
+ if (labelFormatter) {
53
+ return _jsx("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
54
+ }
55
+ if (!value) {
56
+ return null;
57
+ }
58
+ return _jsx("div", { className: cn("font-medium", labelClassName), children: value });
59
+ }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
60
+ if (!active || !payload?.length) {
61
+ return null;
62
+ }
63
+ const nestLabel = payload.length === 1 && indicator !== "dot";
64
+ return (_jsxs("div", { className: cn("border-border/50 bg-background grid min-w-32 items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl", className), children: [!nestLabel ? tooltipLabel : null, _jsx("div", { className: "grid gap-1.5", children: payload
65
+ .filter((item) => item.type !== "none")
66
+ .map((item, index) => {
67
+ const key = `${nameKey ?? item.name ?? item.dataKey ?? "value"}`;
68
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
69
+ const indicatorColor = color ?? item.payload?.fill ?? item.color;
70
+ return (_jsx("div", { className: cn("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5", indicator === "dot" && "items-center"), children: formatter && item?.value !== undefined && item.name ? (formatter(item.value, item.name, item, index, item.payload)) : (_jsxs(_Fragment, { children: [itemConfig?.icon ? (_jsx(itemConfig.icon, {})) : (!hideIndicator && (_jsx("div", { className: cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
71
+ "h-2.5 w-2.5": indicator === "dot",
72
+ "w-1": indicator === "line",
73
+ "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
74
+ "my-0.5": nestLabel && indicator === "dashed",
75
+ }), style: {
76
+ "--color-bg": indicatorColor,
77
+ "--color-border": indicatorColor,
78
+ } }))), _jsxs("div", { className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"), children: [_jsxs("div", { className: "grid gap-1.5", children: [nestLabel ? tooltipLabel : null, _jsx("span", { className: "text-muted-foreground", children: itemConfig?.label ?? item.name })] }), item.value != null && (_jsx("span", { className: "text-foreground font-mono font-medium tabular-nums", children: typeof item.value === "number" ? item.value.toLocaleString() : String(item.value) }))] })] })) }, index));
79
+ }) })] }));
80
+ }
81
+ const ChartLegend = RechartsPrimitive.Legend;
82
+ function ChartLegendContent({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey, }) {
83
+ const { config } = useChart();
84
+ if (!payload?.length) {
85
+ return null;
86
+ }
87
+ return (_jsx("div", { className: cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className), children: payload
88
+ .filter((item) => item.type !== "none")
89
+ .map((item, index) => {
90
+ const key = `${nameKey ?? item.dataKey ?? "value"}`;
91
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
92
+ return (_jsxs("div", { className: cn("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"), children: [itemConfig?.icon && !hideIcon ? (_jsx(itemConfig.icon, {})) : (_jsx("div", { className: "h-2 w-2 shrink-0 rounded-[2px]", style: {
93
+ backgroundColor: item.color,
94
+ } })), itemConfig?.label] }, index));
95
+ }) }));
96
+ }
97
+ function getPayloadConfigFromPayload(config, payload, key) {
98
+ if (typeof payload !== "object" || payload === null) {
99
+ return undefined;
100
+ }
101
+ const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null
102
+ ? payload.payload
103
+ : undefined;
104
+ let configLabelKey = key;
105
+ if (key in payload && typeof payload[key] === "string") {
106
+ configLabelKey = payload[key];
107
+ }
108
+ else if (payloadPayload &&
109
+ key in payloadPayload &&
110
+ typeof payloadPayload[key] === "string") {
111
+ configLabelKey = payloadPayload[key];
112
+ }
113
+ return configLabelKey in config ? config[configLabelKey] : config[key];
114
+ }
115
+ export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle };
116
+ //# sourceMappingURL=chart.js.map