@lerianstudio/sindarian-ui 2.0.0-beta.25 → 2.0.0-beta.27

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 (307) hide show
  1. package/dist/charts/chart.js +4 -231
  2. package/dist/charts/index.js +1 -11
  3. package/dist/components/breadcrumb/get-breadcrumb-paths.js +1 -18
  4. package/dist/components/breadcrumb/index.js +1 -37
  5. package/dist/components/card/account-card/index.js +1 -69
  6. package/dist/components/card/basic-card/index.js +1 -20
  7. package/dist/components/card/dashboard-card/index.js +1 -20
  8. package/dist/components/card/entity-card/index.js +1 -68
  9. package/dist/components/card/index.js +1 -20
  10. package/dist/components/dialog/confirmation-dialog/index.js +1 -96
  11. package/dist/components/dialog/confirmation-dialog/use-confirm-dialog.js +1 -55
  12. package/dist/components/dialog/index.js +1 -19
  13. package/dist/components/dialog/large-dialog/index.js +1 -21
  14. package/dist/components/entity-box/index.js +1 -67
  15. package/dist/components/entity-data-table/index.js +1 -20
  16. package/dist/components/form/combo-box-field/index.js +1 -35
  17. package/dist/components/form/country-field/index.js +1 -11
  18. package/dist/components/form/date-picker-field/index.js +1 -83
  19. package/dist/components/form/date-range-field/index.js +1 -58
  20. package/dist/components/form/date-time-picker-field/index.js +1 -114
  21. package/dist/components/form/file-upload-field/index.js +1 -69
  22. package/dist/components/form/index.js +1 -31
  23. package/dist/components/form/input-field/index.js +1 -96
  24. package/dist/components/form/otp-field/index.js +1 -19
  25. package/dist/components/form/pagination-limit-field/index.js +1 -10
  26. package/dist/components/form/password-field/index.js +1 -16
  27. package/dist/components/form/radio-group-field/index.js +1 -36
  28. package/dist/components/form/renderable-label.js +1 -57
  29. package/dist/components/form/select-field/index.js +1 -68
  30. package/dist/components/form/state-field/index.js +1 -42
  31. package/dist/components/form/switch-field/index.js +1 -16
  32. package/dist/components/form/textarea-field/index.js +1 -23
  33. package/dist/components/page/index.js +1 -20
  34. package/dist/components/page-header/index.js +1 -80
  35. package/dist/components/pagination/index.js +1 -10
  36. package/dist/components/table/id-table-cell.js +1 -109
  37. package/dist/components/table/index.js +1 -19
  38. package/dist/components/table/locked-table-actions.js +1 -41
  39. package/dist/components/table/name-table-cell.js +1 -58
  40. package/dist/components/ui/accordion/index.js +1 -62
  41. package/dist/components/ui/alert/index.js +1 -45
  42. package/dist/components/ui/alert-dialog/index.js +1 -84
  43. package/dist/components/ui/autocomplete/index.js +1 -440
  44. package/dist/components/ui/autosize-textarea/index.js +1 -89
  45. package/dist/components/ui/avatar/index.js +1 -51
  46. package/dist/components/ui/badge/index.js +1 -83
  47. package/dist/components/ui/breadcrumb/index.js +1 -35
  48. package/dist/components/ui/button/index.js +1 -65
  49. package/dist/components/ui/calendar/index.js +1 -118
  50. package/dist/components/ui/card/index.js +1 -32
  51. package/dist/components/ui/checkbox/index.js +1 -44
  52. package/dist/components/ui/collapsible/index.js +1 -50
  53. package/dist/components/ui/command/index.js +1 -95
  54. package/dist/components/ui/copy-field/index.js +1 -163
  55. package/dist/components/ui/dialog/index.js +1 -80
  56. package/dist/components/ui/dialog/styles.css +1 -1
  57. package/dist/components/ui/dropdown-menu/index.js +1 -110
  58. package/dist/components/ui/field/index.js +1 -82
  59. package/dist/components/ui/file-upload/index.js +1 -574
  60. package/dist/components/ui/form.js +1 -162
  61. package/dist/components/ui/hover-card/index.js +1 -51
  62. package/dist/components/ui/icon-button/index.js +1 -35
  63. package/dist/components/ui/input/adornment.js +1 -21
  64. package/dist/components/ui/input/index.js +1 -99
  65. package/dist/components/ui/label/index.js +1 -45
  66. package/dist/components/ui/lerian-wordmark/index.js +1 -7
  67. package/dist/components/ui/loading-button/index.js +1 -9
  68. package/dist/components/ui/multiple-select/index.js +1 -235
  69. package/dist/components/ui/otp-input/index.js +1 -62
  70. package/dist/components/ui/paper/index.js +1 -8
  71. package/dist/components/ui/paper-collapsible/index.js +1 -24
  72. package/dist/components/ui/popover/index.js +1 -55
  73. package/dist/components/ui/progress/index.js +1 -66
  74. package/dist/components/ui/qr-code/index.js +1 -27
  75. package/dist/components/ui/radio-group/index.js +1 -48
  76. package/dist/components/ui/scroll-area/index.js +1 -49
  77. package/dist/components/ui/select/index.js +1 -119
  78. package/dist/components/ui/separator/index.js +1 -43
  79. package/dist/components/ui/sheet/index.js +1 -136
  80. package/dist/components/ui/sidebar/index.js +1 -27
  81. package/dist/components/ui/sidebar/next-router.cjs +1 -119
  82. package/dist/components/ui/sidebar/sidebar-back-button.js +1 -8
  83. package/dist/components/ui/sidebar/sidebar-components.js +1 -23
  84. package/dist/components/ui/sidebar/sidebar-expand-button.js +1 -49
  85. package/dist/components/ui/sidebar/sidebar-item-button.js +1 -21
  86. package/dist/components/ui/sidebar/sidebar-item-collapsible.js +1 -52
  87. package/dist/components/ui/sidebar/sidebar-item-icon-button.js +1 -18
  88. package/dist/components/ui/sidebar/sidebar-item.js +1 -44
  89. package/dist/components/ui/sidebar/sidebar-provider.js +1 -201
  90. package/dist/components/ui/sidebar/sidebar-root.js +1 -130
  91. package/dist/components/ui/sidebar/sidebar-router.js +1 -126
  92. package/dist/components/ui/sidebar/sidebar-trigger.js +1 -57
  93. package/dist/components/ui/skeleton/index.js +1 -8
  94. package/dist/components/ui/stepper/index.js +1 -29
  95. package/dist/components/ui/switch/index.js +1 -43
  96. package/dist/components/ui/table/index.js +1 -56
  97. package/dist/components/ui/tabs/index.js +1 -55
  98. package/dist/components/ui/tabs/styles.css +1 -1
  99. package/dist/components/ui/textarea/index.js +1 -8
  100. package/dist/components/ui/time-picker/index.js +1 -85
  101. package/dist/components/ui/toast/index.js +1 -3
  102. package/dist/components/ui/toast/toaster.js +1 -16
  103. package/dist/components/ui/toggle-group/index.js +1 -156
  104. package/dist/components/ui/tooltip/index.js +1 -81
  105. package/dist/domain/blotter/index.js +1 -20
  106. package/dist/domain/delinquency-aging/aging-buckets.js +1 -120
  107. package/dist/domain/delinquency-aging/index.js +1 -222
  108. package/dist/domain/figure/index.js +1 -19
  109. package/dist/domain/format.js +1 -137
  110. package/dist/domain/index.js +1 -43
  111. package/dist/domain/key-id/index.js +1 -174
  112. package/dist/domain/ledger-sheet/index.js +1 -28
  113. package/dist/domain/money-diff.js +1 -48
  114. package/dist/domain/money-math.js +1 -104
  115. package/dist/domain/money-text/index.js +1 -123
  116. package/dist/domain/section-label/index.js +1 -17
  117. package/dist/domain/status-rail/index.js +1 -76
  118. package/dist/domain/threshold-gauge/index.js +1 -161
  119. package/dist/enterprise/alert-banner/index.js +1 -24
  120. package/dist/enterprise/app-shell/index.js +1 -87
  121. package/dist/enterprise/cursor-pager/index.js +1 -26
  122. package/dist/enterprise/data-table/column-size.js +1 -103
  123. package/dist/enterprise/data-table/index.js +1 -345
  124. package/dist/enterprise/date-range-picker/index.js +1 -115
  125. package/dist/enterprise/detail-panel/index.js +1 -20
  126. package/dist/enterprise/empty-state/index.js +1 -14
  127. package/dist/enterprise/index.js +1 -39
  128. package/dist/enterprise/number-input/index.js +1 -252
  129. package/dist/enterprise/search-input/index.js +1 -121
  130. package/dist/enterprise/stat-card/index.js +1 -75
  131. package/dist/enterprise/status-badge/index.js +1 -120
  132. package/dist/enterprise/use-is-mobile.js +1 -68
  133. package/dist/enterprise/virtualized-table/index.js +1 -141
  134. package/dist/esm/charts/chart.js +4 -190
  135. package/dist/esm/charts/index.js +1 -3
  136. package/dist/esm/components/breadcrumb/get-breadcrumb-paths.js +1 -12
  137. package/dist/esm/components/breadcrumb/index.js +1 -30
  138. package/dist/esm/components/card/account-card/index.js +1 -53
  139. package/dist/esm/components/card/basic-card/index.js +1 -14
  140. package/dist/esm/components/card/dashboard-card/index.js +1 -14
  141. package/dist/esm/components/card/entity-card/index.js +1 -52
  142. package/dist/esm/components/card/index.js +1 -4
  143. package/dist/esm/components/dialog/confirmation-dialog/index.js +1 -60
  144. package/dist/esm/components/dialog/confirmation-dialog/use-confirm-dialog.js +1 -49
  145. package/dist/esm/components/dialog/index.js +1 -3
  146. package/dist/esm/components/dialog/large-dialog/index.js +1 -16
  147. package/dist/esm/components/entity-box/index.js +1 -56
  148. package/dist/esm/components/entity-data-table/index.js +1 -17
  149. package/dist/esm/components/form/combo-box-field/index.js +1 -28
  150. package/dist/esm/components/form/country-field/index.js +1 -7
  151. package/dist/esm/components/form/date-picker-field/index.js +1 -43
  152. package/dist/esm/components/form/date-range-field/index.js +1 -18
  153. package/dist/esm/components/form/date-time-picker-field/index.js +1 -74
  154. package/dist/esm/components/form/file-upload-field/index.js +1 -65
  155. package/dist/esm/components/form/index.js +1 -15
  156. package/dist/esm/components/form/input-field/index.js +1 -92
  157. package/dist/esm/components/form/otp-field/index.js +1 -15
  158. package/dist/esm/components/form/pagination-limit-field/index.js +1 -6
  159. package/dist/esm/components/form/password-field/index.js +1 -10
  160. package/dist/esm/components/form/radio-group-field/index.js +1 -32
  161. package/dist/esm/components/form/renderable-label.js +1 -54
  162. package/dist/esm/components/form/select-field/index.js +1 -64
  163. package/dist/esm/components/form/state-field/index.js +1 -35
  164. package/dist/esm/components/form/switch-field/index.js +1 -12
  165. package/dist/esm/components/form/textarea-field/index.js +1 -19
  166. package/dist/esm/components/page/index.js +1 -15
  167. package/dist/esm/components/page-header/index.js +1 -71
  168. package/dist/esm/components/pagination/index.js +1 -6
  169. package/dist/esm/components/table/id-table-cell.js +1 -105
  170. package/dist/esm/components/table/index.js +1 -3
  171. package/dist/esm/components/table/locked-table-actions.js +1 -37
  172. package/dist/esm/components/table/name-table-cell.js +1 -54
  173. package/dist/esm/components/ui/accordion/index.js +1 -24
  174. package/dist/esm/components/ui/alert/index.js +1 -38
  175. package/dist/esm/components/ui/alert-dialog/index.js +1 -39
  176. package/dist/esm/components/ui/autocomplete/index.js +1 -392
  177. package/dist/esm/components/ui/autosize-textarea/index.js +1 -51
  178. package/dist/esm/components/ui/avatar/index.js +1 -14
  179. package/dist/esm/components/ui/badge/index.js +1 -79
  180. package/dist/esm/components/ui/breadcrumb/index.js +1 -27
  181. package/dist/esm/components/ui/button/index.js +1 -60
  182. package/dist/esm/components/ui/calendar/index.js +1 -82
  183. package/dist/esm/components/ui/card/index.js +1 -24
  184. package/dist/esm/components/ui/checkbox/index.js +1 -9
  185. package/dist/esm/components/ui/collapsible/index.js +1 -13
  186. package/dist/esm/components/ui/command/index.js +1 -51
  187. package/dist/esm/components/ui/copy-field/index.js +1 -127
  188. package/dist/esm/components/ui/dialog/index.js +1 -36
  189. package/dist/esm/components/ui/dropdown-menu/index.js +1 -60
  190. package/dist/esm/components/ui/field/index.js +1 -71
  191. package/dist/esm/components/ui/file-upload/index.js +1 -536
  192. package/dist/esm/components/ui/form.js +1 -118
  193. package/dist/esm/components/ui/hover-card/index.js +1 -14
  194. package/dist/esm/components/ui/icon-button/index.js +1 -31
  195. package/dist/esm/components/ui/input/adornment.js +1 -17
  196. package/dist/esm/components/ui/input/index.js +1 -60
  197. package/dist/esm/components/ui/label/index.js +1 -10
  198. package/dist/esm/components/ui/lerian-wordmark/index.js +1 -4
  199. package/dist/esm/components/ui/loading-button/index.js +1 -7
  200. package/dist/esm/components/ui/multiple-select/index.js +1 -196
  201. package/dist/esm/components/ui/otp-input/index.js +1 -21
  202. package/dist/esm/components/ui/paper/index.js +1 -5
  203. package/dist/esm/components/ui/paper-collapsible/index.js +1 -19
  204. package/dist/esm/components/ui/popover/index.js +1 -17
  205. package/dist/esm/components/ui/progress/index.js +1 -31
  206. package/dist/esm/components/ui/qr-code/index.js +1 -24
  207. package/dist/esm/components/ui/radio-group/index.js +1 -12
  208. package/dist/esm/components/ui/scroll-area/index.js +1 -13
  209. package/dist/esm/components/ui/select/index.js +1 -74
  210. package/dist/esm/components/ui/separator/index.js +1 -8
  211. package/dist/esm/components/ui/sheet/index.js +1 -92
  212. package/dist/esm/components/ui/sidebar/index.js +1 -11
  213. package/dist/esm/components/ui/sidebar/next-router.cjs +1 -119
  214. package/dist/esm/components/ui/sidebar/sidebar-back-button.js +1 -5
  215. package/dist/esm/components/ui/sidebar/sidebar-components.js +1 -15
  216. package/dist/esm/components/ui/sidebar/sidebar-expand-button.js +1 -42
  217. package/dist/esm/components/ui/sidebar/sidebar-item-button.js +1 -18
  218. package/dist/esm/components/ui/sidebar/sidebar-item-collapsible.js +1 -44
  219. package/dist/esm/components/ui/sidebar/sidebar-item-icon-button.js +1 -14
  220. package/dist/esm/components/ui/sidebar/sidebar-item.js +1 -40
  221. package/dist/esm/components/ui/sidebar/sidebar-provider.js +1 -193
  222. package/dist/esm/components/ui/sidebar/sidebar-root.js +1 -126
  223. package/dist/esm/components/ui/sidebar/sidebar-router.js +1 -89
  224. package/dist/esm/components/ui/sidebar/sidebar-trigger.js +1 -53
  225. package/dist/esm/components/ui/skeleton/index.js +1 -6
  226. package/dist/esm/components/ui/stepper/index.js +1 -20
  227. package/dist/esm/components/ui/switch/index.js +1 -8
  228. package/dist/esm/components/ui/table/index.js +1 -44
  229. package/dist/esm/components/ui/tabs/index.js +1 -17
  230. package/dist/esm/components/ui/textarea/index.js +1 -6
  231. package/dist/esm/components/ui/time-picker/index.js +1 -49
  232. package/dist/esm/components/ui/toast/index.js +1 -2
  233. package/dist/esm/components/ui/toast/toaster.js +1 -13
  234. package/dist/esm/components/ui/toggle-group/index.js +1 -120
  235. package/dist/esm/components/ui/tooltip/index.js +1 -43
  236. package/dist/esm/domain/blotter/index.js +1 -16
  237. package/dist/esm/domain/delinquency-aging/aging-buckets.js +1 -115
  238. package/dist/esm/domain/delinquency-aging/index.js +1 -218
  239. package/dist/esm/domain/figure/index.js +1 -15
  240. package/dist/esm/domain/format.js +1 -128
  241. package/dist/esm/domain/index.js +1 -19
  242. package/dist/esm/domain/key-id/index.js +1 -169
  243. package/dist/esm/domain/ledger-sheet/index.js +1 -24
  244. package/dist/esm/domain/money-diff.js +1 -45
  245. package/dist/esm/domain/money-math.js +1 -98
  246. package/dist/esm/domain/money-text/index.js +1 -118
  247. package/dist/esm/domain/section-label/index.js +1 -14
  248. package/dist/esm/domain/status-rail/index.js +1 -71
  249. package/dist/esm/domain/threshold-gauge/index.js +1 -157
  250. package/dist/esm/enterprise/alert-banner/index.js +1 -21
  251. package/dist/esm/enterprise/app-shell/index.js +1 -51
  252. package/dist/esm/enterprise/cursor-pager/index.js +1 -23
  253. package/dist/esm/enterprise/data-table/column-size.js +1 -97
  254. package/dist/esm/enterprise/data-table/index.js +1 -342
  255. package/dist/esm/enterprise/date-range-picker/index.js +1 -112
  256. package/dist/esm/enterprise/detail-panel/index.js +1 -17
  257. package/dist/esm/enterprise/empty-state/index.js +1 -11
  258. package/dist/esm/enterprise/index.js +1 -22
  259. package/dist/esm/enterprise/number-input/index.js +1 -214
  260. package/dist/esm/enterprise/search-input/index.js +1 -85
  261. package/dist/esm/enterprise/stat-card/index.js +1 -72
  262. package/dist/esm/enterprise/status-badge/index.js +1 -116
  263. package/dist/esm/enterprise/use-is-mobile.js +1 -31
  264. package/dist/esm/enterprise/virtualized-table/index.js +1 -138
  265. package/dist/esm/hooks/use-click-away.js +1 -22
  266. package/dist/esm/hooks/use-pagination.js +1 -38
  267. package/dist/esm/hooks/use-stepper.js +1 -22
  268. package/dist/esm/hooks/use-time.js +1 -13
  269. package/dist/esm/hooks/use-toast.js +1 -107
  270. package/dist/esm/index.js +1 -77
  271. package/dist/esm/lib/storage/get-storage-object.js +1 -17
  272. package/dist/esm/lib/storage/get-storage.js +1 -14
  273. package/dist/esm/lib/storage/index.js +1 -2
  274. package/dist/esm/lib/typography.js +1 -31
  275. package/dist/esm/lib/utils.js +1 -41
  276. package/dist/esm/theme/get-theme-script.js +1 -41
  277. package/dist/esm/theme/index.js +1 -4
  278. package/dist/esm/theme/mode-toggle.js +1 -45
  279. package/dist/esm/theme/theme-provider.js +1 -122
  280. package/dist/esm/toast/helpers.js +1 -36
  281. package/dist/esm/toast/index.js +1 -4
  282. package/dist/esm/types/metadata-type.js +1 -1
  283. package/dist/esm/utils/countries.cjs +1 -17
  284. package/dist/esm/utils/country-utils.js +1 -18
  285. package/dist/esm/utils/currency-codes.js +1 -181
  286. package/dist/hooks/use-click-away.js +1 -29
  287. package/dist/hooks/use-pagination.js +1 -41
  288. package/dist/hooks/use-stepper.js +1 -26
  289. package/dist/hooks/use-time.js +1 -20
  290. package/dist/hooks/use-toast.js +1 -111
  291. package/dist/index.js +1 -96
  292. package/dist/lib/storage/get-storage-object.js +1 -23
  293. package/dist/lib/storage/get-storage.js +1 -17
  294. package/dist/lib/storage/index.js +1 -18
  295. package/dist/lib/typography.js +1 -34
  296. package/dist/lib/utils.js +1 -45
  297. package/dist/theme/get-theme-script.js +1 -44
  298. package/dist/theme/index.js +1 -11
  299. package/dist/theme/mode-toggle.js +1 -48
  300. package/dist/theme/theme-provider.js +1 -160
  301. package/dist/toast/helpers.js +1 -41
  302. package/dist/toast/index.js +1 -10
  303. package/dist/types/metadata-type.js +1 -2
  304. package/dist/utils/countries.cjs +1 -17
  305. package/dist/utils/country-utils.js +1 -25
  306. package/dist/utils/currency-codes.js +1 -184
  307. package/package.json +4 -3
@@ -1,232 +1,5 @@
1
- 'use client';
2
- "use strict";
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || (function () {
20
- var ownKeys = function(o) {
21
- ownKeys = Object.getOwnPropertyNames || function (o) {
22
- var ar = [];
23
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
- return ar;
25
- };
26
- return ownKeys(o);
27
- };
28
- return function (mod) {
29
- if (mod && mod.__esModule) return mod;
30
- var result = {};
31
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
- __setModuleDefault(result, mod);
33
- return result;
34
- };
35
- })();
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.ChartStyle = exports.ChartLegend = exports.ChartTooltip = void 0;
38
- exports.ChartContainer = ChartContainer;
39
- exports.ChartTooltipContent = ChartTooltipContent;
40
- exports.ChartLegendContent = ChartLegendContent;
41
- const jsx_runtime_1 = require("react/jsx-runtime");
42
- /**
43
- * Recharts wrapper family (shadcn canon).
44
- *
45
- * `ChartContainer` takes a `ChartConfig` keyed by series name and injects one
46
- * `--color-<key>` CSS variable per series, scoped to that chart instance and
47
- * emitted twice — once for light, once under `.dark` — so a chart re-colors
48
- * with the theme without a re-render. Recharts series then reference
49
- * `var(--color-<key>)`.
50
- *
51
- * Series colors come from the design tokens: pass `color: 'var(--color-chart-1)'`
52
- * (the Tailwind `@theme` name, already wrapped in `hsl()`), never the raw
53
- * `var(--chart-1)` triple, which is not a usable color value on its own.
54
- */
55
- const React = __importStar(require("react"));
56
- const RechartsPrimitive = __importStar(require("recharts"));
57
- const utils_1 = require("../lib/utils");
58
- // Format: { THEME_NAME: CSS_SELECTOR }
59
- const THEMES = { light: '', dark: '.dark' };
60
- /**
61
- * ChartStyle writes a stylesheet through `dangerouslySetInnerHTML`, so every
62
- * interpolated value is an injection sink: `</style>` inside a config key, id,
63
- * or color would close the element and let arbitrary markup follow. Config
64
- * often carries server data (series names from an API), so these are validated
65
- * rather than trusted.
66
- *
67
- * CSS_IDENT — the chart id, which lands in an UNQUOTED attribute selector and
68
- * so may not lead with a digit.
69
- * CONFIG_KEY — series keys, which become `--color-<key>` custom-property names.
70
- * Custom properties DO allow a leading digit, so a numeric series (a year, say)
71
- * must pass; only CSS syntax is excluded.
72
- */
73
- const CSS_IDENT = /^[A-Za-z_][\w-]*$/;
74
- const CONFIG_KEY = /^[\w-]+$/;
75
- /**
76
- * A deliberately conservative character allowlist covering hex, named, `var(…)`,
77
- * `rgb()/hsl()/color-mix()` and slash-alpha forms. It admits no `<`, `>`, `{`,
78
- * `}`, `;`, `:`, quote, backslash, `@`, `*` or `!`, which rules out tag-closing,
79
- * rule termination, comments, at-rules and `!important`.
80
- *
81
- * `url(…)` is rejected separately: the allowlist alone would pass an unquoted
82
- * `url(//evil.test/pixel.png)` — no colon or quote required — which the browser
83
- * would fetch, leaking the viewer's IP and referrer to a third party. The
84
- * whitespace tolerance covers `url (…)` variants.
85
- */
86
- const CSS_COLOR = /^[\w\s#%.,()/-]+$/;
87
- const CSS_URL = /url\s*\(/i;
88
- function isSafeColor(color) {
89
- return CSS_COLOR.test(color) && !CSS_URL.test(color);
90
- }
91
- const INITIAL_DIMENSION = { width: 320, height: 200 };
92
- const ChartContext = React.createContext(null);
93
- function useChart() {
94
- const context = React.useContext(ChartContext);
95
- if (!context) {
96
- throw new Error('useChart must be used within a <ChartContainer />');
97
- }
98
- return context;
99
- }
100
- function ChartContainer({ id, className, children, config, ariaLabel, initialDimension = INITIAL_DIMENSION, ...props }) {
101
- const uniqueId = React.useId();
102
- // chartId lands in BOTH a DOM attribute and a CSS attribute selector, so the
103
- // two must agree and neither may carry syntax — strip to [\w-] once, here.
104
- const chartId = `chart-${(id ?? uniqueId).replace(/[^\w-]/g, '')}`;
105
- // Resolve the accessibility contract for the container element:
106
- // named → expose as an image with that name; false → hide from a11y tree.
107
- const a11yProps = typeof ariaLabel === 'string' && ariaLabel.length > 0
108
- ? { role: 'img', 'aria-label': ariaLabel }
109
- : ariaLabel === false
110
- ? { 'aria-hidden': true }
111
- : {};
112
- return ((0, jsx_runtime_1.jsx)(ChartContext.Provider, { value: { config }, children: (0, jsx_runtime_1.jsxs)("div", { "data-slot": "chart", "data-chart": chartId, ...a11yProps, className: (0, utils_1.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: [(0, jsx_runtime_1.jsx)(ChartStyle, { id: chartId, config: config }), (0, jsx_runtime_1.jsx)(RechartsPrimitive.ResponsiveContainer, { initialDimension: initialDimension, children: children })] }) }));
113
- }
114
- const ChartStyle = ({ id, config }) => {
115
- // An id that cannot be written as a CSS identifier cannot be scoped safely,
116
- // and an unscoped rule would leak across every chart on the page.
117
- if (!CSS_IDENT.test(id)) {
118
- return null;
119
- }
120
- const colorConfig = Object.entries(config).filter(([key, config]) => CONFIG_KEY.test(key) && (config.theme ?? config.color));
121
- if (!colorConfig.length) {
122
- return null;
123
- }
124
- return ((0, jsx_runtime_1.jsx)("style", { dangerouslySetInnerHTML: {
125
- __html: Object.entries(THEMES)
126
- .map(([theme, prefix]) => `
127
- ${prefix} [data-chart=${id}] {
128
- ${colorConfig
129
- .map(([key, itemConfig]) => {
130
- const color = itemConfig.theme?.[theme] ??
131
- itemConfig.color;
132
- return color && isSafeColor(color) ? ` --color-${key}: ${color};` : null;
133
- })
134
- .join('\n')}
135
- }
136
- `)
137
- .join('\n')
138
- } }));
139
- };
140
- exports.ChartStyle = ChartStyle;
141
- const ChartTooltip = RechartsPrimitive.Tooltip;
142
- exports.ChartTooltip = ChartTooltip;
143
- function ChartTooltipContent({ active, payload, className, indicator = 'dot', hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey }) {
144
- const { config } = useChart();
145
- const tooltipLabel = React.useMemo(() => {
146
- if (hideLabel || !payload?.length) {
147
- return null;
148
- }
149
- const [item] = payload;
150
- const key = `${labelKey ?? item?.dataKey ?? item?.name ?? 'value'}`;
151
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
152
- const value = !labelKey && typeof label === 'string'
153
- ? (config[label]?.label ?? label)
154
- : itemConfig?.label;
155
- if (labelFormatter) {
156
- return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('font-medium', labelClassName), children: labelFormatter(value, payload) }));
157
- }
158
- if (!value) {
159
- return null;
160
- }
161
- return (0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('font-medium', labelClassName), children: value });
162
- }, [
163
- label,
164
- labelFormatter,
165
- payload,
166
- hideLabel,
167
- labelClassName,
168
- config,
169
- labelKey
170
- ]);
171
- if (!active || !payload?.length) {
172
- return null;
173
- }
174
- const nestLabel = payload.length === 1 && indicator !== 'dot';
175
- return ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)('border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl', className), children: [!nestLabel ? tooltipLabel : null, (0, jsx_runtime_1.jsx)("div", { className: "grid gap-1.5", children: payload
176
- .filter((item) => item.type !== 'none')
177
- .map((item, index) => {
178
- const key = `${nameKey ?? item.name ?? item.dataKey ?? 'value'}`;
179
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
180
- const indicatorColor = color ?? item.payload?.fill ?? item.color;
181
- return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.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)) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [itemConfig?.icon ? ((0, jsx_runtime_1.jsx)(itemConfig.icon, {})) : (!hideIndicator && ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)', {
182
- 'h-2.5 w-2.5': indicator === 'dot',
183
- 'w-1': indicator === 'line',
184
- 'w-0 border-[1.5px] border-dashed bg-transparent': indicator === 'dashed',
185
- 'my-0.5': nestLabel && indicator === 'dashed'
186
- }), style: {
187
- '--color-bg': indicatorColor,
188
- '--color-border': indicatorColor
189
- } }))), (0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)('flex flex-1 justify-between leading-none', nestLabel ? 'items-end' : 'items-center'), children: [(0, jsx_runtime_1.jsxs)("div", { className: "grid gap-1.5", children: [nestLabel ? tooltipLabel : null, (0, jsx_runtime_1.jsx)("span", { className: "text-muted-foreground", children: itemConfig?.label ?? item.name })] }), item.value != null && ((0, jsx_runtime_1.jsx)("span", { className: "text-foreground font-mono font-medium tabular-nums", children: typeof item.value === 'number'
190
- ? item.value.toLocaleString()
191
- : String(item.value) }))] })] })) }, index));
192
- }) })] }));
193
- }
194
- const ChartLegend = RechartsPrimitive.Legend;
195
- exports.ChartLegend = ChartLegend;
196
- function ChartLegendContent({ className, hideIcon = false, payload, verticalAlign = 'bottom', nameKey }) {
197
- const { config } = useChart();
198
- if (!payload?.length) {
199
- return null;
200
- }
201
- return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('flex items-center justify-center gap-4', verticalAlign === 'top' ? 'pb-3' : 'pt-3', className), children: payload
202
- .filter((item) => item.type !== 'none')
203
- .map((item, index) => {
204
- const key = `${nameKey ?? item.dataKey ?? 'value'}`;
205
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
206
- return ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)('[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3'), children: [itemConfig?.icon && !hideIcon ? ((0, jsx_runtime_1.jsx)(itemConfig.icon, {})) : ((0, jsx_runtime_1.jsx)("div", { className: "h-2 w-2 shrink-0 rounded-[2px]", style: {
207
- backgroundColor: item.color
208
- } })), itemConfig?.label] }, index));
209
- }) }));
210
- }
211
- // Helper to extract item config from a payload.
212
- function getPayloadConfigFromPayload(config, payload, key) {
213
- if (typeof payload !== 'object' || payload === null) {
214
- return undefined;
215
- }
216
- const payloadPayload = 'payload' in payload &&
217
- typeof payload.payload === 'object' &&
218
- payload.payload !== null
219
- ? payload.payload
220
- : undefined;
221
- let configLabelKey = key;
222
- if (key in payload &&
223
- typeof payload[key] === 'string') {
224
- configLabelKey = payload[key];
225
- }
226
- else if (payloadPayload &&
227
- key in payloadPayload &&
228
- typeof payloadPayload[key] === 'string') {
229
- configLabelKey = payloadPayload[key];
230
- }
231
- return configLabelKey in config ? config[configLabelKey] : config[key];
1
+ "use client";"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(s,e,n,t){if(t===void 0)t=n;var r=Object.getOwnPropertyDescriptor(e,n);if(!r||("get"in r?!e.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return e[n]}}}Object.defineProperty(s,t,r)}):(function(s,e,n,t){if(t===void 0)t=n;s[t]=e[n]}));var __setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:true,value:e})}):function(s,e){s["default"]=e});var __importStar=this&&this.__importStar||(function(){var s=function(e){s=Object.getOwnPropertyNames||function(n){var t=[];for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))t[t.length]=r;return t};return s(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null){for(var t=s(e),r=0;r<t.length;r++)if(t[r]!=="default")__createBinding(n,e,t[r])}__setModuleDefault(n,e);return n}})();Object.defineProperty(exports,"__esModule",{value:true});exports.ChartStyle=exports.ChartLegend=exports.ChartTooltip=void 0;exports.ChartContainer=ChartContainer;exports.ChartTooltipContent=ChartTooltipContent;exports.ChartLegendContent=ChartLegendContent;const jsx_runtime_1=require("react/jsx-runtime");const React=__importStar(require("react"));const RechartsPrimitive=__importStar(require("recharts"));const utils_1=require("../lib/utils");const THEMES={light:"",dark:".dark"};const CSS_IDENT=/^[A-Za-z_][\w-]*$/;const CONFIG_KEY=/^[\w-]+$/;const CSS_COLOR=/^[\w\s#%.,()/-]+$/;const CSS_URL=/url\s*\(/i;function isSafeColor(s){return CSS_COLOR.test(s)&&!CSS_URL.test(s)}const INITIAL_DIMENSION={width:320,height:200};const ChartContext=React.createContext(null);function useChart(){const s=React.useContext(ChartContext);if(!s){throw new Error("useChart must be used within a <ChartContainer />")}return s}function ChartContainer({id:s,className:e,children:n,config:t,ariaLabel:r,initialDimension:u=INITIAL_DIMENSION,...c}){const i=React.useId();const a=`chart-${(s??i).replace(/[^\w-]/g,"")}`;const l=typeof r==="string"&&r.length>0?{role:"img","aria-label":r}:r===false?{"aria-hidden":true}:{};return(0,jsx_runtime_1.jsx)(ChartContext.Provider,{value:{config:t},children:(0,jsx_runtime_1.jsxs)("div",{"data-slot":"chart","data-chart":a,...l,className:(0,utils_1.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",e),...c,children:[(0,jsx_runtime_1.jsx)(ChartStyle,{id:a,config:t}),(0,jsx_runtime_1.jsx)(RechartsPrimitive.ResponsiveContainer,{initialDimension:u,children:n})]})})}const ChartStyle=({id:s,config:e})=>{if(!CSS_IDENT.test(s)){return null}const n=Object.entries(e).filter(([t,r])=>CONFIG_KEY.test(t)&&(r.theme??r.color));if(!n.length){return null}return(0,jsx_runtime_1.jsx)("style",{dangerouslySetInnerHTML:{__html:Object.entries(THEMES).map(([t,r])=>`
2
+ ${r} [data-chart=${s}] {
3
+ ${n.map(([u,c])=>{const i=c.theme?.[t]??c.color;return i&&isSafeColor(i)?` --color-${u}: ${i};`:null}).join("\n")}
232
4
  }
5
+ `).join("\n")}})};exports.ChartStyle=ChartStyle;const ChartTooltip=RechartsPrimitive.Tooltip;exports.ChartTooltip=ChartTooltip;function ChartTooltipContent({active:s,payload:e,className:n,indicator:t="dot",hideLabel:r=false,hideIndicator:u=false,label:c,labelFormatter:i,labelClassName:a,formatter:l,color:j,nameKey:C,labelKey:p}){const{config:f}=useChart();const v=React.useMemo(()=>{if(r||!e?.length){return null}const[o]=e;const g=`${p??o?.dataKey??o?.name??"value"}`;const x=getPayloadConfigFromPayload(f,o,g);const d=!p&&typeof c==="string"?f[c]?.label??c:x?.label;if(i){return(0,jsx_runtime_1.jsx)("div",{className:(0,utils_1.cn)("font-medium",a),children:i(d,e)})}if(!d){return null}return(0,jsx_runtime_1.jsx)("div",{className:(0,utils_1.cn)("font-medium",a),children:d})},[c,i,e,r,a,f,p]);if(!s||!e?.length){return null}const h=e.length===1&&t!=="dot";return(0,jsx_runtime_1.jsxs)("div",{className:(0,utils_1.cn)("border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",n),children:[!h?v:null,(0,jsx_runtime_1.jsx)("div",{className:"grid gap-1.5",children:e.filter(o=>o.type!=="none").map((o,g)=>{const x=`${C??o.name??o.dataKey??"value"}`;const d=getPayloadConfigFromPayload(f,o,x);const _=j??o.payload?.fill??o.color;return(0,jsx_runtime_1.jsx)("div",{className:(0,utils_1.cn)("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",t==="dot"&&"items-center"),children:l&&o?.value!==void 0&&o.name?l(o.value,o.name,o,g,o.payload):(0,jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment,{children:[d?.icon?(0,jsx_runtime_1.jsx)(d.icon,{}):!u&&(0,jsx_runtime_1.jsx)("div",{className:(0,utils_1.cn)("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",{"h-2.5 w-2.5":t==="dot","w-1":t==="line","w-0 border-[1.5px] border-dashed bg-transparent":t==="dashed","my-0.5":h&&t==="dashed"}),style:{"--color-bg":_,"--color-border":_}}),(0,jsx_runtime_1.jsxs)("div",{className:(0,utils_1.cn)("flex flex-1 justify-between leading-none",h?"items-end":"items-center"),children:[(0,jsx_runtime_1.jsxs)("div",{className:"grid gap-1.5",children:[h?v:null,(0,jsx_runtime_1.jsx)("span",{className:"text-muted-foreground",children:d?.label??o.name})]}),o.value!=null&&(0,jsx_runtime_1.jsx)("span",{className:"text-foreground font-mono font-medium tabular-nums",children:typeof o.value==="number"?o.value.toLocaleString():String(o.value)})]})]})},g)})})]})}const ChartLegend=RechartsPrimitive.Legend;exports.ChartLegend=ChartLegend;function ChartLegendContent({className:s,hideIcon:e=false,payload:n,verticalAlign:t="bottom",nameKey:r}){const{config:u}=useChart();if(!n?.length){return null}return(0,jsx_runtime_1.jsx)("div",{className:(0,utils_1.cn)("flex items-center justify-center gap-4",t==="top"?"pb-3":"pt-3",s),children:n.filter(c=>c.type!=="none").map((c,i)=>{const a=`${r??c.dataKey??"value"}`;const l=getPayloadConfigFromPayload(u,c,a);return(0,jsx_runtime_1.jsxs)("div",{className:(0,utils_1.cn)("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),children:[l?.icon&&!e?(0,jsx_runtime_1.jsx)(l.icon,{}):(0,jsx_runtime_1.jsx)("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:c.color}}),l?.label]},i)})})}function getPayloadConfigFromPayload(s,e,n){if(typeof e!=="object"||e===null){return void 0}const t="payload"in e&&typeof e.payload==="object"&&e.payload!==null?e.payload:void 0;let r=n;if(n in e&&typeof e[n]==="string"){r=e[n]}else if(t&&n in t&&typeof t[n]==="string"){r=t[n]}return r in s?s[r]:s[n]}
@@ -1,11 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChartLegendContent = exports.ChartLegend = exports.ChartTooltipContent = exports.ChartTooltip = exports.ChartContainer = void 0;
4
- // Owned by lane theme-toasts-charts — see docs/plans/2026-08-26-sindarian-x-retirement/
5
- // ChartStyle stays internal: it is an implementation detail of ChartContainer.
6
- var chart_1 = require("./chart");
7
- Object.defineProperty(exports, "ChartContainer", { enumerable: true, get: function () { return chart_1.ChartContainer; } });
8
- Object.defineProperty(exports, "ChartTooltip", { enumerable: true, get: function () { return chart_1.ChartTooltip; } });
9
- Object.defineProperty(exports, "ChartTooltipContent", { enumerable: true, get: function () { return chart_1.ChartTooltipContent; } });
10
- Object.defineProperty(exports, "ChartLegend", { enumerable: true, get: function () { return chart_1.ChartLegend; } });
11
- Object.defineProperty(exports, "ChartLegendContent", { enumerable: true, get: function () { return chart_1.ChartLegendContent; } });
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.ChartLegendContent=exports.ChartLegend=exports.ChartTooltipContent=exports.ChartTooltip=exports.ChartContainer=void 0;var chart_1=require("./chart");Object.defineProperty(exports,"ChartContainer",{enumerable:true,get:function(){return chart_1.ChartContainer}});Object.defineProperty(exports,"ChartTooltip",{enumerable:true,get:function(){return chart_1.ChartTooltip}});Object.defineProperty(exports,"ChartTooltipContent",{enumerable:true,get:function(){return chart_1.ChartTooltipContent}});Object.defineProperty(exports,"ChartLegend",{enumerable:true,get:function(){return chart_1.ChartLegend}});Object.defineProperty(exports,"ChartLegendContent",{enumerable:true,get:function(){return chart_1.ChartLegendContent}});
@@ -1,18 +1 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getBreadcrumbPaths = getBreadcrumbPaths;
7
- const isNil_js_1 = __importDefault(require("lodash/isNil.js"));
8
- function getBreadcrumbPaths(paths) {
9
- return (paths
10
- .filter((path) => {
11
- if ((0, isNil_js_1.default)(path.active)) {
12
- return true;
13
- }
14
- return path.active();
15
- })
16
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
17
- .map(({ active, ...path }) => path));
18
- }
1
+ "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(exports,"__esModule",{value:true});exports.getBreadcrumbPaths=getBreadcrumbPaths;const isNil_js_1=__importDefault(require("lodash/isNil.js"));function getBreadcrumbPaths(e){return e.filter(t=>{if((0,isNil_js_1.default)(t.active)){return true}return t.active()}).map(({active:t,...r})=>r)}
@@ -1,37 +1 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Breadcrumb = void 0;
7
- const jsx_runtime_1 = require("react/jsx-runtime");
8
- const react_1 = __importDefault(require("react"));
9
- const breadcrumb_1 = require("../../components/ui/breadcrumb");
10
- const Breadcrumb = ({ paths }) => {
11
- const last = paths.length - 1;
12
- return ((0, jsx_runtime_1.jsx)(breadcrumb_1.Breadcrumb, { children: (0, jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbList, { children: paths.map((path, index) => {
13
- /**
14
- * ⛔ THE LAST CRUMB IS THE PAGE, whatever the caller passed.
15
- *
16
- * The page marker used to be a side effect of the caller omitting
17
- * `href`, and nothing in `getBreadcrumbPaths` makes the last entry
18
- * omit one. A trail whose final entry carried an href therefore had
19
- * no `aria-current="page"` anywhere — a screen reader could not tell
20
- * which of three links was the page being read — and the crumb was a
21
- * live link back to the page the reader is already on.
22
- *
23
- * ⚠️ AND AN HREF-LESS ANCESTOR IS NOT A SWITCHED-OFF LINK. It used
24
- * to reach `BreadcrumbPage` too, which hard-codes `role="link"
25
- * aria-disabled="true"` — the right shape for the page you are ON,
26
- * a destination that exists and simply is not navigable from here.
27
- * An ancestor with no href is a grouping label: there is no page
28
- * behind it, so "Settings, link, dimmed" told the reader a
29
- * destination was unavailable to them rather than that it was never
30
- * a destination, and inflated the link count of the trail. It is
31
- * plain text now, and only the last crumb is the page.
32
- */
33
- const isLast = index === last;
34
- return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbItem, { children: path.href && !isLast ? ((0, jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbLink, { href: path.href, children: path.name })) : isLast ? ((0, jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbPage, { children: path.name })) : ((0, jsx_runtime_1.jsx)("span", { className: "breadcrumb-page", children: path.name })) }), !isLast && (0, jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbSeparator, {})] }, index));
35
- }) }) }));
36
- };
37
- exports.Breadcrumb = Breadcrumb;
1
+ "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(exports,"__esModule",{value:true});exports.Breadcrumb=void 0;const jsx_runtime_1=require("react/jsx-runtime");const react_1=__importDefault(require("react"));const breadcrumb_1=require("../../components/ui/breadcrumb");const Breadcrumb=({paths:e})=>{const s=e.length-1;return(0,jsx_runtime_1.jsx)(breadcrumb_1.Breadcrumb,{children:(0,jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbList,{children:e.map((r,c)=>{const t=c===s;return(0,jsx_runtime_1.jsxs)(react_1.default.Fragment,{children:[(0,jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbItem,{children:r.href&&!t?(0,jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbLink,{href:r.href,children:r.name}):t?(0,jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbPage,{children:r.name}):(0,jsx_runtime_1.jsx)("span",{className:"breadcrumb-page",children:r.name})}),!t&&(0,jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbSeparator,{})]},c)})})})};exports.Breadcrumb=Breadcrumb;
@@ -1,69 +1 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.AccountBalanceCard = AccountBalanceCard;
7
- exports.AccountBalanceCardIcon = AccountBalanceCardIcon;
8
- exports.AccountBalanceCardHeader = AccountBalanceCardHeader;
9
- exports.AccountBalanceCardTitle = AccountBalanceCardTitle;
10
- exports.AccountBalanceCardDeleteButton = AccountBalanceCardDeleteButton;
11
- exports.AccountBalanceCardContent = AccountBalanceCardContent;
12
- exports.AccountBalanceCardLoading = AccountBalanceCardLoading;
13
- exports.AccountBalanceCardEmpty = AccountBalanceCardEmpty;
14
- exports.AccountBalanceCardInfo = AccountBalanceCardInfo;
15
- exports.AccountBalanceCardUpdateButton = AccountBalanceCardUpdateButton;
16
- exports.AccountBalanceCardTrigger = AccountBalanceCardTrigger;
17
- const jsx_runtime_1 = require("react/jsx-runtime");
18
- const react_1 = __importDefault(require("react"));
19
- const react_collapsible_1 = require("@radix-ui/react-collapsible");
20
- const utils_1 = require("../../../lib/utils");
21
- const card_1 = require("../../../components/ui/card");
22
- const button_1 = require("../../../components/ui/button");
23
- const lucide_react_1 = require("lucide-react");
24
- const collapsible_1 = require("../../../components/ui/collapsible");
25
- const skeleton_1 = require("../../../components/ui/skeleton");
26
- const use_time_1 = require("../../../hooks/use-time");
27
- const dayjs_1 = __importDefault(require("dayjs"));
28
- const icon_button_1 = require("../../../components/ui/icon-button");
29
- const AccountBalanceCardContext = react_1.default.createContext({
30
- open: false
31
- });
32
- function AccountBalanceCard({ className, open, onOpenChange, children, ...props }) {
33
- return ((0, jsx_runtime_1.jsx)(react_collapsible_1.Collapsible, { open: open, onOpenChange: onOpenChange, "data-slot": "account-balance-card", className: (0, utils_1.cn)('w-full', className), ...props, children: (0, jsx_runtime_1.jsx)(AccountBalanceCardContext.Provider, { value: { open }, children: (0, jsx_runtime_1.jsx)(card_1.Card, { className: "relative gap-2 px-5 py-4 shadow-xs", children: children }) }) }));
34
- }
35
- function AccountBalanceCardIcon({ className, ...props }) {
36
- return ((0, jsx_runtime_1.jsx)(lucide_react_1.User, { "data-slot": "account-balance-card-icon", strokeWidth: 1, className: (0, utils_1.cn)('text-foreground mb-[14px] size-8 opacity-40', className), ...props }));
37
- }
38
- function AccountBalanceCardHeader({ className, ...props }) {
39
- return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "account-balance-card-header", className: (0, utils_1.cn)('flex flex-col', className), ...props }));
40
- }
41
- function AccountBalanceCardTitle({ className, ...props }) {
42
- return ((0, jsx_runtime_1.jsx)("p", { "data-slot": "account-balance-card-title", className: (0, utils_1.cn)('text-foreground text-lg font-bold', className), ...props }));
43
- }
44
- function AccountBalanceCardDeleteButton({ className, ...props }) {
45
- return ((0, jsx_runtime_1.jsx)(icon_button_1.IconButton, { variant: "outline", size: "small", rounded: true, "data-slot": "account-balance-card-delete-button", className: (0, utils_1.cn)('absolute top-3 right-3', className), ...props, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Trash, { className: "text-muted-foreground h-4 w-4" }) }));
46
- }
47
- function AccountBalanceCardContent({ className, ...props }) {
48
- return ((0, jsx_runtime_1.jsx)(collapsible_1.CollapsibleContent, { "data-slot": "account-balance-card-content", className: (0, utils_1.cn)('motion-safe:data-[state=closed]:animate-accordion-up motion-safe:data-[state=open]:animate-accordion-down overflow-hidden', className), ...props }));
49
- }
50
- function AccountBalanceCardLoading({ className, ...props }) {
51
- return ((0, jsx_runtime_1.jsx)(skeleton_1.Skeleton, { "data-slot": "account-balance-card-loading", className: (0, utils_1.cn)('bg-muted mt-3 h-3 w-full rounded-md', className), ...props }));
52
- }
53
- function AccountBalanceCardEmpty({ className, ...props }) {
54
- return ((0, jsx_runtime_1.jsx)("p", { "data-slot": "account-balance-card-empty", className: (0, utils_1.cn)('text-muted-foreground mt-3 text-center text-sm font-normal', className), ...props }));
55
- }
56
- function AccountBalanceCardInfo({ className, assetCode, value, children: _children, ref, ...props }) {
57
- return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, "data-slot": "account-balance-card-info", className: (0, utils_1.cn)('text-muted-foreground mt-3 flex flex-row items-center justify-between text-sm font-normal', className), ...props, children: [(0, jsx_runtime_1.jsx)("p", { children: assetCode }), (0, jsx_runtime_1.jsx)("p", { children: value })] }));
58
- }
59
- function AccountBalanceCardUpdateButton({ className: _className, loading, timestamp, loadingLabel = 'Updating...', updatedInLabel = 'Updated in', updatedLabel = 'Updated', onRefresh, children: _children, ref, ...props }) {
60
- const _time = (0, use_time_1.useTime)({ interval: 1000 * 60 });
61
- const updated = react_1.default.useMemo(() => {
62
- return !(0, dayjs_1.default)(timestamp).isBefore((0, dayjs_1.default)().subtract(1, 'minute'));
63
- }, [_time, timestamp]);
64
- return ((0, jsx_runtime_1.jsxs)("div", { className: "mb-3 flex flex-row items-center justify-end gap-2", children: [(0, jsx_runtime_1.jsxs)("p", { className: "text-muted-foreground text-xs font-medium", children: [loading && loadingLabel, !loading && !updated && updatedInLabel, !loading && updated && updatedLabel] }), !loading && updated && ((0, jsx_runtime_1.jsx)(lucide_react_1.CheckCircle2, { className: "text-system-success-h1a h-4 w-4" })), (!updated || loading) && ((0, jsx_runtime_1.jsx)(button_1.Button, { ref: ref, variant: "link", "data-slot": "account-balance-card-update-button", className: "h-3 p-0", onClick: onRefresh, disabled: loading, ...props, children: (0, jsx_runtime_1.jsx)(lucide_react_1.RefreshCw, { className: (0, utils_1.cn)('size-4', { 'motion-safe:animate-spin': loading }) }) }))] }));
65
- }
66
- function AccountBalanceCardTrigger({ className, openLabel, closeLabel, children: _children, ...props }) {
67
- const { open } = react_1.default.useContext(AccountBalanceCardContext);
68
- return ((0, jsx_runtime_1.jsx)(collapsible_1.CollapsibleTrigger, { asChild: true, children: (0, jsx_runtime_1.jsx)(button_1.Button, { variant: "link", "data-slot": "account-balance-card-trigger", className: (0, utils_1.cn)('text-muted-foreground h-4 p-0 text-xs', className), ...props, children: !open ? openLabel : closeLabel }) }));
69
- }
1
+ "use strict";var __importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(exports,"__esModule",{value:true});exports.AccountBalanceCard=AccountBalanceCard;exports.AccountBalanceCardIcon=AccountBalanceCardIcon;exports.AccountBalanceCardHeader=AccountBalanceCardHeader;exports.AccountBalanceCardTitle=AccountBalanceCardTitle;exports.AccountBalanceCardDeleteButton=AccountBalanceCardDeleteButton;exports.AccountBalanceCardContent=AccountBalanceCardContent;exports.AccountBalanceCardLoading=AccountBalanceCardLoading;exports.AccountBalanceCardEmpty=AccountBalanceCardEmpty;exports.AccountBalanceCardInfo=AccountBalanceCardInfo;exports.AccountBalanceCardUpdateButton=AccountBalanceCardUpdateButton;exports.AccountBalanceCardTrigger=AccountBalanceCardTrigger;const jsx_runtime_1=require("react/jsx-runtime");const react_1=__importDefault(require("react"));const react_collapsible_1=require("@radix-ui/react-collapsible");const utils_1=require("../../../lib/utils");const card_1=require("../../../components/ui/card");const button_1=require("../../../components/ui/button");const lucide_react_1=require("lucide-react");const collapsible_1=require("../../../components/ui/collapsible");const skeleton_1=require("../../../components/ui/skeleton");const use_time_1=require("../../../hooks/use-time");const dayjs_1=__importDefault(require("dayjs"));const icon_button_1=require("../../../components/ui/icon-button");const AccountBalanceCardContext=react_1.default.createContext({open:false});function AccountBalanceCard({className:t,open:e,onOpenChange:a,children:c,...n}){return(0,jsx_runtime_1.jsx)(react_collapsible_1.Collapsible,{open:e,onOpenChange:a,"data-slot":"account-balance-card",className:(0,utils_1.cn)("w-full",t),...n,children:(0,jsx_runtime_1.jsx)(AccountBalanceCardContext.Provider,{value:{open:e},children:(0,jsx_runtime_1.jsx)(card_1.Card,{className:"relative gap-2 px-5 py-4 shadow-xs",children:c})})})}function AccountBalanceCardIcon({className:t,...e}){return(0,jsx_runtime_1.jsx)(lucide_react_1.User,{"data-slot":"account-balance-card-icon",strokeWidth:1,className:(0,utils_1.cn)("text-foreground mb-[14px] size-8 opacity-40",t),...e})}function AccountBalanceCardHeader({className:t,...e}){return(0,jsx_runtime_1.jsx)("div",{"data-slot":"account-balance-card-header",className:(0,utils_1.cn)("flex flex-col",t),...e})}function AccountBalanceCardTitle({className:t,...e}){return(0,jsx_runtime_1.jsx)("p",{"data-slot":"account-balance-card-title",className:(0,utils_1.cn)("text-foreground text-lg font-bold",t),...e})}function AccountBalanceCardDeleteButton({className:t,...e}){return(0,jsx_runtime_1.jsx)(icon_button_1.IconButton,{variant:"outline",size:"small",rounded:true,"data-slot":"account-balance-card-delete-button",className:(0,utils_1.cn)("absolute top-3 right-3",t),...e,children:(0,jsx_runtime_1.jsx)(lucide_react_1.Trash,{className:"text-muted-foreground h-4 w-4"})})}function AccountBalanceCardContent({className:t,...e}){return(0,jsx_runtime_1.jsx)(collapsible_1.CollapsibleContent,{"data-slot":"account-balance-card-content",className:(0,utils_1.cn)("motion-safe:data-[state=closed]:animate-accordion-up motion-safe:data-[state=open]:animate-accordion-down overflow-hidden",t),...e})}function AccountBalanceCardLoading({className:t,...e}){return(0,jsx_runtime_1.jsx)(skeleton_1.Skeleton,{"data-slot":"account-balance-card-loading",className:(0,utils_1.cn)("bg-muted mt-3 h-3 w-full rounded-md",t),...e})}function AccountBalanceCardEmpty({className:t,...e}){return(0,jsx_runtime_1.jsx)("p",{"data-slot":"account-balance-card-empty",className:(0,utils_1.cn)("text-muted-foreground mt-3 text-center text-sm font-normal",t),...e})}function AccountBalanceCardInfo({className:t,assetCode:e,value:a,children:c,ref:n,...r}){return(0,jsx_runtime_1.jsxs)("div",{ref:n,"data-slot":"account-balance-card-info",className:(0,utils_1.cn)("text-muted-foreground mt-3 flex flex-row items-center justify-between text-sm font-normal",t),...r,children:[(0,jsx_runtime_1.jsx)("p",{children:e}),(0,jsx_runtime_1.jsx)("p",{children:a})]})}function AccountBalanceCardUpdateButton({className:t,loading:e,timestamp:a,loadingLabel:c="Updating...",updatedInLabel:n="Updated in",updatedLabel:r="Updated",onRefresh:s,children:i,ref:l,...u}){const d=(0,use_time_1.useTime)({interval:1e3*60});const o=react_1.default.useMemo(()=>{return!(0,dayjs_1.default)(a).isBefore((0,dayjs_1.default)().subtract(1,"minute"))},[d,a]);return(0,jsx_runtime_1.jsxs)("div",{className:"mb-3 flex flex-row items-center justify-end gap-2",children:[(0,jsx_runtime_1.jsxs)("p",{className:"text-muted-foreground text-xs font-medium",children:[e&&c,!e&&!o&&n,!e&&o&&r]}),!e&&o&&(0,jsx_runtime_1.jsx)(lucide_react_1.CheckCircle2,{className:"text-system-success-h1a h-4 w-4"}),(!o||e)&&(0,jsx_runtime_1.jsx)(button_1.Button,{ref:l,variant:"link","data-slot":"account-balance-card-update-button",className:"h-3 p-0",onClick:s,disabled:e,...u,children:(0,jsx_runtime_1.jsx)(lucide_react_1.RefreshCw,{className:(0,utils_1.cn)("size-4",{"motion-safe:animate-spin":e})})})]})}function AccountBalanceCardTrigger({className:t,openLabel:e,closeLabel:a,children:c,...n}){const{open:r}=react_1.default.useContext(AccountBalanceCardContext);return(0,jsx_runtime_1.jsx)(collapsible_1.CollapsibleTrigger,{asChild:true,children:(0,jsx_runtime_1.jsx)(button_1.Button,{variant:"link","data-slot":"account-balance-card-trigger",className:(0,utils_1.cn)("text-muted-foreground h-4 p-0 text-xs",t),...n,children:!r?e:a})})}
@@ -1,20 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BasicCard = BasicCard;
4
- exports.BasicCardTitle = BasicCardTitle;
5
- exports.BasicCardContent = BasicCardContent;
6
- exports.BasicCardAction = BasicCardAction;
7
- const jsx_runtime_1 = require("react/jsx-runtime");
8
- const utils_1 = require("../../../lib/utils");
9
- function BasicCard({ className, ...props }) {
10
- return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('bg-card flex flex-col rounded-lg p-6', className), ...props }));
11
- }
12
- function BasicCardTitle({ className, ...props }) {
13
- return ((0, jsx_runtime_1.jsx)("h2", { className: (0, utils_1.cn)('text-foreground mb-4 text-sm font-medium', className), ...props }));
14
- }
15
- function BasicCardContent({ className, ...props }) {
16
- return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('text-muted-foreground mb-6 text-sm font-medium', className), ...props }));
17
- }
18
- function BasicCardAction({ className, ...props }) {
19
- return (0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('flex flex-col', className), ...props });
20
- }
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.BasicCard=BasicCard;exports.BasicCardTitle=BasicCardTitle;exports.BasicCardContent=BasicCardContent;exports.BasicCardAction=BasicCardAction;const jsx_runtime_1=require("react/jsx-runtime");const utils_1=require("../../../lib/utils");function BasicCard({className:e,...t}){return(0,jsx_runtime_1.jsx)("div",{className:(0,utils_1.cn)("bg-card flex flex-col rounded-lg p-6",e),...t})}function BasicCardTitle({className:e,...t}){return(0,jsx_runtime_1.jsx)("h2",{className:(0,utils_1.cn)("text-foreground mb-4 text-sm font-medium",e),...t})}function BasicCardContent({className:e,...t}){return(0,jsx_runtime_1.jsx)("div",{className:(0,utils_1.cn)("text-muted-foreground mb-6 text-sm font-medium",e),...t})}function BasicCardAction({className:e,...t}){return(0,jsx_runtime_1.jsx)("div",{className:(0,utils_1.cn)("flex flex-col",e),...t})}
@@ -1,20 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DashboardCard = DashboardCard;
4
- exports.DashboardCardIcon = DashboardCardIcon;
5
- exports.DashboardCardTitle = DashboardCardTitle;
6
- exports.DashboardCardContent = DashboardCardContent;
7
- const jsx_runtime_1 = require("react/jsx-runtime");
8
- const utils_1 = require("../../../lib/utils");
9
- function DashboardCard({ className, ...props }) {
10
- return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('bg-card relative flex flex-col rounded-lg p-6 pt-4', className), ...props }));
11
- }
12
- function DashboardCardIcon({ className, ...props }) {
13
- return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('text-muted-foreground absolute top-4 right-6 flex size-6 items-center justify-center [&>svg]:size-6', className), ...props }));
14
- }
15
- function DashboardCardTitle({ className, ...props }) {
16
- return ((0, jsx_runtime_1.jsx)("h2", { className: (0, utils_1.cn)('text-muted-foreground mb-4 text-sm font-medium uppercase', className), ...props }));
17
- }
18
- function DashboardCardContent({ className, ...props }) {
19
- return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('text-muted-foreground text-[32px] font-extrabold', className), ...props }));
20
- }
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DashboardCard=DashboardCard;exports.DashboardCardIcon=DashboardCardIcon;exports.DashboardCardTitle=DashboardCardTitle;exports.DashboardCardContent=DashboardCardContent;const jsx_runtime_1=require("react/jsx-runtime");const utils_1=require("../../../lib/utils");function DashboardCard({className:e,...t}){return(0,jsx_runtime_1.jsx)("div",{className:(0,utils_1.cn)("bg-card relative flex flex-col rounded-lg p-6 pt-4",e),...t})}function DashboardCardIcon({className:e,...t}){return(0,jsx_runtime_1.jsx)("div",{className:(0,utils_1.cn)("text-muted-foreground absolute top-4 right-6 flex size-6 items-center justify-center [&>svg]:size-6",e),...t})}function DashboardCardTitle({className:e,...t}){return(0,jsx_runtime_1.jsx)("h2",{className:(0,utils_1.cn)("text-muted-foreground mb-4 text-sm font-medium uppercase",e),...t})}function DashboardCardContent({className:e,...t}){return(0,jsx_runtime_1.jsx)("div",{className:(0,utils_1.cn)("text-muted-foreground text-[32px] font-extrabold",e),...t})}
@@ -1,68 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EntityCardActionItem = void 0;
4
- exports.EntityCardGrid = EntityCardGrid;
5
- exports.EntityCardGridFooter = EntityCardGridFooter;
6
- exports.EntityCard = EntityCard;
7
- exports.EntityCardAction = EntityCardAction;
8
- exports.EntityCardHeader = EntityCardHeader;
9
- exports.EntityCardTitle = EntityCardTitle;
10
- exports.EntityCardIcon = EntityCardIcon;
11
- exports.EntityCardBadgeList = EntityCardBadgeList;
12
- exports.EntityCardBadge = EntityCardBadge;
13
- exports.EntityCardContent = EntityCardContent;
14
- exports.EntityCardDescription = EntityCardDescription;
15
- exports.EntityCardList = EntityCardList;
16
- exports.EntityCardFooter = EntityCardFooter;
17
- const jsx_runtime_1 = require("react/jsx-runtime");
18
- const badge_1 = require("../../../components/ui/badge");
19
- const dropdown_menu_1 = require("../../../components/ui/dropdown-menu");
20
- const icon_button_1 = require("../../../components/ui/icon-button");
21
- const progress_1 = require("../../../components/ui/progress");
22
- const separator_1 = require("../../../components/ui/separator");
23
- const utils_1 = require("../../../lib/utils");
24
- const lucide_react_1 = require("lucide-react");
25
- function EntityCardGrid({ className, ...props }) {
26
- return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3', className), "data-slot": "entity-card-grid", ...props }));
27
- }
28
- function EntityCardGridFooter({ className, ...props }) {
29
- return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)(
30
- // Semantic tokens, not raw palette steps: `bg-white`/`border-zinc-200`
31
- // have no dark counterpart, so this footer stayed a white slab under
32
- // cards that followed the theme.
33
- 'border-border bg-card flex items-center justify-between rounded-lg border px-6 py-4', className), "data-slot": "entity-card-grid-footer", ...props }));
34
- }
35
- function EntityCard({ className, value, progress = false, children, ...props }) {
36
- return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "entity-card-wrapper", className: "transition-shadow hover:shadow-xl", children: [(0, jsx_runtime_1.jsx)("div", { "data-slot": "entity-card", className: (0, utils_1.cn)('bg-card relative flex flex-col gap-4 rounded-lg px-5 py-4', { 'rounded-b-none': progress }, className), ...props, children: children }), progress && (0, jsx_runtime_1.jsx)(progress_1.Progress, { className: "h-1.5 rounded-t-none", value: value })] }));
37
- }
38
- function EntityCardAction({ children, ...props }) {
39
- return ((0, jsx_runtime_1.jsxs)(dropdown_menu_1.DropdownMenu, { ...props, children: [(0, jsx_runtime_1.jsx)(dropdown_menu_1.DropdownMenuTrigger, { className: "absolute top-2.5 right-2.5", children: (0, jsx_runtime_1.jsx)(icon_button_1.IconButton, { variant: "outline", size: "small", rounded: true, children: (0, jsx_runtime_1.jsx)(lucide_react_1.EllipsisVertical, {}) }) }), (0, jsx_runtime_1.jsx)(dropdown_menu_1.DropdownMenuContent, { children: children })] }));
40
- }
41
- exports.EntityCardActionItem = dropdown_menu_1.DropdownMenuItem;
42
- function EntityCardHeader({ className, ...props }) {
43
- return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "entity-card-header", className: (0, utils_1.cn)('flex flex-col gap-2', className), ...props }));
44
- }
45
- function EntityCardTitle({ className, ...props }) {
46
- return ((0, jsx_runtime_1.jsx)("h3", { "data-slot": "entity-card-title", className: (0, utils_1.cn)('text-foreground text-sm font-semibold', className), ...props }));
47
- }
48
- function EntityCardIcon({ className, ...props }) {
49
- return ((0, jsx_runtime_1.jsx)("span", { "data-slot": "entity-card-icon", className: (0, utils_1.cn)('text-muted-foreground size-8 [&>svg]:size-8 [&>svg]:stroke-[1.5]', className), ...props }));
50
- }
51
- function EntityCardBadgeList({ className, ...props }) {
52
- return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "entity-card-badge-list", className: (0, utils_1.cn)('flex flex-wrap gap-2', className), ...props }));
53
- }
54
- function EntityCardBadge({ className, ...props }) {
55
- return ((0, jsx_runtime_1.jsx)(badge_1.Badge, { "data-slot": "entity-card-badge", className: (0, utils_1.cn)('h-5 text-xs', className), ...props }));
56
- }
57
- function EntityCardContent({ className, ...props }) {
58
- return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "entity-card-content", className: (0, utils_1.cn)('flex flex-col gap-2.5', className), ...props }));
59
- }
60
- function EntityCardDescription({ className, ...props }) {
61
- return ((0, jsx_runtime_1.jsx)("p", { "data-slot": "entity-card-description", className: (0, utils_1.cn)('text-muted-foreground text-xs font-medium', className), ...props }));
62
- }
63
- function EntityCardList({ className, ...props }) {
64
- return ((0, jsx_runtime_1.jsx)("ul", { "data-slot": "entity-card-list", className: (0, utils_1.cn)('text-muted-foreground mx-2 list-inside list-disc space-y-1 text-xs font-medium', className), ...props }));
65
- }
66
- function EntityCardFooter({ className, children, ...props }) {
67
- return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "entity-card-footer", className: (0, utils_1.cn)('text-muted-foreground flex flex-col gap-2 text-xs font-medium', className), ...props, children: [(0, jsx_runtime_1.jsx)(separator_1.Separator, {}), (0, jsx_runtime_1.jsx)("div", { className: "[&>svg]:text-muted-foreground flex flex-row items-center gap-2 [&>svg]:size-4 [&>svg]:stroke-[1.5]", children: children })] }));
68
- }
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.EntityCardActionItem=void 0;exports.EntityCardGrid=EntityCardGrid;exports.EntityCardGridFooter=EntityCardGridFooter;exports.EntityCard=EntityCard;exports.EntityCardAction=EntityCardAction;exports.EntityCardHeader=EntityCardHeader;exports.EntityCardTitle=EntityCardTitle;exports.EntityCardIcon=EntityCardIcon;exports.EntityCardBadgeList=EntityCardBadgeList;exports.EntityCardBadge=EntityCardBadge;exports.EntityCardContent=EntityCardContent;exports.EntityCardDescription=EntityCardDescription;exports.EntityCardList=EntityCardList;exports.EntityCardFooter=EntityCardFooter;const jsx_runtime_1=require("react/jsx-runtime");const badge_1=require("../../../components/ui/badge");const dropdown_menu_1=require("../../../components/ui/dropdown-menu");const icon_button_1=require("../../../components/ui/icon-button");const progress_1=require("../../../components/ui/progress");const separator_1=require("../../../components/ui/separator");const utils_1=require("../../../lib/utils");const lucide_react_1=require("lucide-react");function EntityCardGrid({className:t,...e}){return(0,jsx_runtime_1.jsx)("div",{className:(0,utils_1.cn)("grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",t),"data-slot":"entity-card-grid",...e})}function EntityCardGridFooter({className:t,...e}){return(0,jsx_runtime_1.jsx)("div",{className:(0,utils_1.cn)("border-border bg-card flex items-center justify-between rounded-lg border px-6 py-4",t),"data-slot":"entity-card-grid-footer",...e})}function EntityCard({className:t,value:e,progress:r=false,children:n,...s}){return(0,jsx_runtime_1.jsxs)("div",{"data-slot":"entity-card-wrapper",className:"transition-shadow hover:shadow-xl",children:[(0,jsx_runtime_1.jsx)("div",{"data-slot":"entity-card",className:(0,utils_1.cn)("bg-card relative flex flex-col gap-4 rounded-lg px-5 py-4",{"rounded-b-none":r},t),...s,children:n}),r&&(0,jsx_runtime_1.jsx)(progress_1.Progress,{className:"h-1.5 rounded-t-none",value:e})]})}function EntityCardAction({children:t,...e}){return(0,jsx_runtime_1.jsxs)(dropdown_menu_1.DropdownMenu,{...e,children:[(0,jsx_runtime_1.jsx)(dropdown_menu_1.DropdownMenuTrigger,{className:"absolute top-2.5 right-2.5",children:(0,jsx_runtime_1.jsx)(icon_button_1.IconButton,{variant:"outline",size:"small",rounded:true,children:(0,jsx_runtime_1.jsx)(lucide_react_1.EllipsisVertical,{})})}),(0,jsx_runtime_1.jsx)(dropdown_menu_1.DropdownMenuContent,{children:t})]})}exports.EntityCardActionItem=dropdown_menu_1.DropdownMenuItem;function EntityCardHeader({className:t,...e}){return(0,jsx_runtime_1.jsx)("div",{"data-slot":"entity-card-header",className:(0,utils_1.cn)("flex flex-col gap-2",t),...e})}function EntityCardTitle({className:t,...e}){return(0,jsx_runtime_1.jsx)("h3",{"data-slot":"entity-card-title",className:(0,utils_1.cn)("text-foreground text-sm font-semibold",t),...e})}function EntityCardIcon({className:t,...e}){return(0,jsx_runtime_1.jsx)("span",{"data-slot":"entity-card-icon",className:(0,utils_1.cn)("text-muted-foreground size-8 [&>svg]:size-8 [&>svg]:stroke-[1.5]",t),...e})}function EntityCardBadgeList({className:t,...e}){return(0,jsx_runtime_1.jsx)("div",{"data-slot":"entity-card-badge-list",className:(0,utils_1.cn)("flex flex-wrap gap-2",t),...e})}function EntityCardBadge({className:t,...e}){return(0,jsx_runtime_1.jsx)(badge_1.Badge,{"data-slot":"entity-card-badge",className:(0,utils_1.cn)("h-5 text-xs",t),...e})}function EntityCardContent({className:t,...e}){return(0,jsx_runtime_1.jsx)("div",{"data-slot":"entity-card-content",className:(0,utils_1.cn)("flex flex-col gap-2.5",t),...e})}function EntityCardDescription({className:t,...e}){return(0,jsx_runtime_1.jsx)("p",{"data-slot":"entity-card-description",className:(0,utils_1.cn)("text-muted-foreground text-xs font-medium",t),...e})}function EntityCardList({className:t,...e}){return(0,jsx_runtime_1.jsx)("ul",{"data-slot":"entity-card-list",className:(0,utils_1.cn)("text-muted-foreground mx-2 list-inside list-disc space-y-1 text-xs font-medium",t),...e})}function EntityCardFooter({className:t,children:e,...r}){return(0,jsx_runtime_1.jsxs)("div",{"data-slot":"entity-card-footer",className:(0,utils_1.cn)("text-muted-foreground flex flex-col gap-2 text-xs font-medium",t),...r,children:[(0,jsx_runtime_1.jsx)(separator_1.Separator,{}),(0,jsx_runtime_1.jsx)("div",{className:"[&>svg]:text-muted-foreground flex flex-row items-center gap-2 [&>svg]:size-4 [&>svg]:stroke-[1.5]",children:e})]})}
@@ -1,20 +1 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./account-card"), exports);
18
- __exportStar(require("./basic-card"), exports);
19
- __exportStar(require("./dashboard-card"), exports);
20
- __exportStar(require("./entity-card"), exports);
1
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(i,r,e,t){if(t===void 0)t=e;var n=Object.getOwnPropertyDescriptor(r,e);if(!n||("get"in n?!r.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return r[e]}}}Object.defineProperty(i,t,n)}):(function(i,r,e,t){if(t===void 0)t=e;i[t]=r[e]}));var __exportStar=this&&this.__exportStar||function(i,r){for(var e in i)if(e!=="default"&&!Object.prototype.hasOwnProperty.call(r,e))__createBinding(r,i,e)};Object.defineProperty(exports,"__esModule",{value:true});__exportStar(require("./account-card"),exports);__exportStar(require("./basic-card"),exports);__exportStar(require("./dashboard-card"),exports);__exportStar(require("./entity-card"),exports);