@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,50 +1 @@
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.Collapsible = Collapsible;
38
- exports.CollapsibleTrigger = CollapsibleTrigger;
39
- exports.CollapsibleContent = CollapsibleContent;
40
- const jsx_runtime_1 = require("react/jsx-runtime");
41
- const CollapsiblePrimitive = __importStar(require("@radix-ui/react-collapsible"));
42
- function Collapsible({ ...props }) {
43
- return (0, jsx_runtime_1.jsx)(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
44
- }
45
- function CollapsibleTrigger({ ...props }) {
46
- return ((0, jsx_runtime_1.jsx)(CollapsiblePrimitive.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...props }));
47
- }
48
- function CollapsibleContent({ ...props }) {
49
- return ((0, jsx_runtime_1.jsx)(CollapsiblePrimitive.CollapsibleContent, { "data-slot": "collapsible-content", ...props }));
50
- }
1
+ "use client";"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,i,r){if(r===void 0)r=i;var n=Object.getOwnPropertyDescriptor(e,i);if(!n||("get"in n?!e.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return e[i]}}}Object.defineProperty(t,r,n)}):(function(t,e,i,r){if(r===void 0)r=i;t[r]=e[i]}));var __setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}):function(t,e){t["default"]=e});var __importStar=this&&this.__importStar||(function(){var t=function(e){t=Object.getOwnPropertyNames||function(i){var r=[];for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))r[r.length]=n;return r};return t(e)};return function(e){if(e&&e.__esModule)return e;var i={};if(e!=null){for(var r=t(e),n=0;n<r.length;n++)if(r[n]!=="default")__createBinding(i,e,r[n])}__setModuleDefault(i,e);return i}})();Object.defineProperty(exports,"__esModule",{value:true});exports.Collapsible=Collapsible;exports.CollapsibleTrigger=CollapsibleTrigger;exports.CollapsibleContent=CollapsibleContent;const jsx_runtime_1=require("react/jsx-runtime");const CollapsiblePrimitive=__importStar(require("@radix-ui/react-collapsible"));function Collapsible({...t}){return(0,jsx_runtime_1.jsx)(CollapsiblePrimitive.Root,{"data-slot":"collapsible",...t})}function CollapsibleTrigger({...t}){return(0,jsx_runtime_1.jsx)(CollapsiblePrimitive.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...t})}function CollapsibleContent({...t}){return(0,jsx_runtime_1.jsx)(CollapsiblePrimitive.CollapsibleContent,{"data-slot":"collapsible-content",...t})}
@@ -1,95 +1 @@
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.CommandDialog = void 0;
38
- exports.Command = Command;
39
- exports.CommandInput = CommandInput;
40
- exports.CommandList = CommandList;
41
- exports.CommandEmpty = CommandEmpty;
42
- exports.CommandGroup = CommandGroup;
43
- exports.CommandItem = CommandItem;
44
- exports.CommandShortcut = CommandShortcut;
45
- exports.CommandSeparator = CommandSeparator;
46
- const jsx_runtime_1 = require("react/jsx-runtime");
47
- const React = __importStar(require("react"));
48
- const cmdk_1 = require("cmdk");
49
- const lucide_react_1 = require("lucide-react");
50
- const utils_1 = require("../../../lib/utils");
51
- const dialog_1 = require("../../../components/ui/dialog");
52
- function Command({ className, ...props }) {
53
- return ((0, jsx_runtime_1.jsx)(cmdk_1.Command, { "data-slot": "command", className: (0, utils_1.cn)('bg-card text-foreground flex h-full w-full flex-col overflow-hidden rounded-md', className), ...props }));
54
- }
55
- const CommandDialog = ({ children, ...props }) => {
56
- return ((0, jsx_runtime_1.jsx)(dialog_1.Dialog, { ...props, children: (0, jsx_runtime_1.jsx)(dialog_1.DialogContent, { className: "overflow-hidden p-0 shadow-lg", children: (0, jsx_runtime_1.jsx)(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: children }) }) }));
57
- };
58
- exports.CommandDialog = CommandDialog;
59
- function CommandInput({ className, ...props }) {
60
- return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "command-input-wrapper", className: "flex items-center border-b px-3", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), (0, jsx_runtime_1.jsx)(cmdk_1.Command.Input, { "data-slot": "command-input", className: (0, utils_1.cn)('placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50', className), ...props })] }));
61
- }
62
- function CommandList({ className, children, ...props }) {
63
- const listRef = React.useRef(null);
64
- React.useEffect(() => {
65
- const listElement = listRef.current;
66
- if (!listElement)
67
- return;
68
- const handleWheel = (event) => {
69
- const { scrollTop, scrollHeight, clientHeight } = listElement;
70
- const isAtTop = scrollTop === 0 && event.deltaY < 0;
71
- const isAtBottom = scrollTop + clientHeight >= scrollHeight && event.deltaY > 0;
72
- if (!isAtTop && !isAtBottom) {
73
- event.stopPropagation();
74
- }
75
- };
76
- listElement.addEventListener('wheel', handleWheel, { passive: true });
77
- return () => listElement.removeEventListener('wheel', handleWheel);
78
- }, []);
79
- return ((0, jsx_runtime_1.jsx)(cmdk_1.Command.List, { ref: listRef, "data-slot": "command-list", className: (0, utils_1.cn)('max-h-[300px] overflow-x-hidden overflow-y-auto', className), ...props, children: children }));
80
- }
81
- function CommandEmpty(props) {
82
- return ((0, jsx_runtime_1.jsx)(cmdk_1.Command.Empty, { "data-slot": "command-empty", className: "py-6 text-center text-sm", ...props }));
83
- }
84
- function CommandGroup({ className, ...props }) {
85
- return ((0, jsx_runtime_1.jsx)(cmdk_1.Command.Group, { "data-slot": "command-group", className: (0, utils_1.cn)('text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium', className), ...props }));
86
- }
87
- function CommandSeparator({ className, ...props }) {
88
- return ((0, jsx_runtime_1.jsx)(cmdk_1.Command.Separator, { "data-slot": "command-separator", className: (0, utils_1.cn)('bg-border -mx-1 h-px', className), ...props }));
89
- }
90
- function CommandItem({ className, ...props }) {
91
- return ((0, jsx_runtime_1.jsx)(cmdk_1.Command.Item, { "data-slot": "command-item", className: (0, utils_1.cn)("data-[selected='true']:bg-muted data-[selected=true]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className), ...props }));
92
- }
93
- function CommandShortcut({ className, ...props }) {
94
- return ((0, jsx_runtime_1.jsx)("span", { "data-slot": "command-shortcut", className: (0, utils_1.cn)('text-muted-foreground ml-auto text-xs tracking-widest', className), ...props }));
95
- }
1
+ "use client";"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,o,r){if(r===void 0)r=o;var n=Object.getOwnPropertyDescriptor(e,o);if(!n||("get"in n?!e.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return e[o]}}}Object.defineProperty(t,r,n)}):(function(t,e,o,r){if(r===void 0)r=o;t[r]=e[o]}));var __setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}):function(t,e){t["default"]=e});var __importStar=this&&this.__importStar||(function(){var t=function(e){t=Object.getOwnPropertyNames||function(o){var r=[];for(var n in o)if(Object.prototype.hasOwnProperty.call(o,n))r[r.length]=n;return r};return t(e)};return function(e){if(e&&e.__esModule)return e;var o={};if(e!=null){for(var r=t(e),n=0;n<r.length;n++)if(r[n]!=="default")__createBinding(o,e,r[n])}__setModuleDefault(o,e);return o}})();Object.defineProperty(exports,"__esModule",{value:true});exports.CommandDialog=void 0;exports.Command=Command;exports.CommandInput=CommandInput;exports.CommandList=CommandList;exports.CommandEmpty=CommandEmpty;exports.CommandGroup=CommandGroup;exports.CommandItem=CommandItem;exports.CommandShortcut=CommandShortcut;exports.CommandSeparator=CommandSeparator;const jsx_runtime_1=require("react/jsx-runtime");const React=__importStar(require("react"));const cmdk_1=require("cmdk");const lucide_react_1=require("lucide-react");const utils_1=require("../../../lib/utils");const dialog_1=require("../../../components/ui/dialog");function Command({className:t,...e}){return(0,jsx_runtime_1.jsx)(cmdk_1.Command,{"data-slot":"command",className:(0,utils_1.cn)("bg-card text-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...e})}const CommandDialog=({children:t,...e})=>{return(0,jsx_runtime_1.jsx)(dialog_1.Dialog,{...e,children:(0,jsx_runtime_1.jsx)(dialog_1.DialogContent,{className:"overflow-hidden p-0 shadow-lg",children:(0,jsx_runtime_1.jsx)(Command,{className:"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t})})})};exports.CommandDialog=CommandDialog;function CommandInput({className:t,...e}){return(0,jsx_runtime_1.jsxs)("div",{"data-slot":"command-input-wrapper",className:"flex items-center border-b px-3",children:[(0,jsx_runtime_1.jsx)(lucide_react_1.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,jsx_runtime_1.jsx)(cmdk_1.Command.Input,{"data-slot":"command-input",className:(0,utils_1.cn)("placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),...e})]})}function CommandList({className:t,children:e,...o}){const r=React.useRef(null);React.useEffect(()=>{const n=r.current;if(!n)return;const d=a=>{const{scrollTop:s,scrollHeight:m,clientHeight:i}=n;const c=s===0&&a.deltaY<0;const u=s+i>=m&&a.deltaY>0;if(!c&&!u){a.stopPropagation()}};n.addEventListener("wheel",d,{passive:true});return()=>n.removeEventListener("wheel",d)},[]);return(0,jsx_runtime_1.jsx)(cmdk_1.Command.List,{ref:r,"data-slot":"command-list",className:(0,utils_1.cn)("max-h-[300px] overflow-x-hidden overflow-y-auto",t),...o,children:e})}function CommandEmpty(t){return(0,jsx_runtime_1.jsx)(cmdk_1.Command.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}function CommandGroup({className:t,...e}){return(0,jsx_runtime_1.jsx)(cmdk_1.Command.Group,{"data-slot":"command-group",className:(0,utils_1.cn)("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...e})}function CommandSeparator({className:t,...e}){return(0,jsx_runtime_1.jsx)(cmdk_1.Command.Separator,{"data-slot":"command-separator",className:(0,utils_1.cn)("bg-border -mx-1 h-px",t),...e})}function CommandItem({className:t,...e}){return(0,jsx_runtime_1.jsx)(cmdk_1.Command.Item,{"data-slot":"command-item",className:(0,utils_1.cn)("data-[selected='true']:bg-muted data-[selected=true]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t),...e})}function CommandShortcut({className:t,...e}){return(0,jsx_runtime_1.jsx)("span",{"data-slot":"command-shortcut",className:(0,utils_1.cn)("text-muted-foreground ml-auto text-xs tracking-widest",t),...e})}
@@ -1,163 +1 @@
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.CopyField = CopyField;
38
- const jsx_runtime_1 = require("react/jsx-runtime");
39
- const React = __importStar(require("react"));
40
- const lucide_react_1 = require("lucide-react");
41
- const icon_button_1 = require("../../../components/ui/icon-button");
42
- const use_toast_1 = require("../../../hooks/use-toast");
43
- const utils_1 = require("../../../lib/utils");
44
- const DEFAULT_COPY_LABEL = 'Copied to clipboard!';
45
- const FALLBACK_COPY_LABEL = 'Copy not available — text selected, press Ctrl/Cmd+C';
46
- const COPIED_ICON_TIMEOUT = 1500;
47
- const isClipboardAvailable = () => typeof navigator !== 'undefined' &&
48
- typeof navigator.clipboard?.writeText === 'function';
49
- const isClipboardReadable = () => typeof navigator !== 'undefined' &&
50
- typeof navigator.clipboard?.readText === 'function';
51
- /**
52
- * Wipes the clipboard, but only if it still holds `copiedValue` — the user may
53
- * have copied something else in the meantime, and clobbering that would be
54
- * worse than leaving the secret behind. Unverifiable (no `readText`, permission
55
- * denied, unfocused document) means "leave it alone".
56
- */
57
- const clearClipboardIfUnchanged = async (copiedValue) => {
58
- if (!isClipboardReadable()) {
59
- return;
60
- }
61
- try {
62
- if ((await navigator.clipboard.readText()) !== copiedValue) {
63
- return;
64
- }
65
- await navigator.clipboard.writeText('');
66
- }
67
- catch {
68
- // Read or write refused; the clipboard stays as-is.
69
- }
70
- };
71
- function CopyField({ value, label, masked = false, onCopyLabel, revealLabel = 'Show value', hideLabel = 'Hide value', valueLabel = 'Value to copy', copyLabel, fallbackLabel, mono = false, description, clearClipboardAfter }) {
72
- const { toast } = (0, use_toast_1.useToast)();
73
- const generatedId = React.useId();
74
- const inputId = `${generatedId}-copy-field`;
75
- const descriptionId = `${inputId}-description`;
76
- const inputRef = React.useRef(null);
77
- const copiedTimerRef = React.useRef(null);
78
- const clearTimerRef = React.useRef(null);
79
- const [revealed, setRevealed] = React.useState(false);
80
- const [copied, setCopied] = React.useState(false);
81
- const showAsText = !masked || revealed;
82
- const copyAccessibleName = copyLabel ?? (label ? `Copy ${label}` : 'Copy value');
83
- React.useEffect(() => {
84
- return () => {
85
- if (copiedTimerRef.current) {
86
- clearTimeout(copiedTimerRef.current);
87
- }
88
- // The clipboard-clear timer is deliberately *not* cancelled here: it
89
- // touches no state (so it can't warn about an unmounted update) and the
90
- // secret must still leave the clipboard when the dialog holding this
91
- // field closes before the timeout elapses.
92
- };
93
- }, []);
94
- const selectFieldText = () => {
95
- const input = inputRef.current;
96
- if (!input) {
97
- return;
98
- }
99
- // Reveal so the user can copy the selection manually. Flip the DOM `type`
100
- // imperatively *before* select(): `setRevealed` is batched, so a plain
101
- // state update would leave the input as type="password" at select() time,
102
- // and React's subsequent type -> "text" re-render clears the selection —
103
- // the fallback would then select nothing. We still push the state update so
104
- // the re-render stays consistent with the DOM we just mutated.
105
- if (masked) {
106
- input.type = 'text';
107
- setRevealed(true);
108
- }
109
- input.focus();
110
- input.select();
111
- };
112
- const handleFallback = () => {
113
- selectFieldText();
114
- toast({
115
- variant: 'destructive',
116
- title: fallbackLabel ?? FALLBACK_COPY_LABEL
117
- });
118
- };
119
- const handleCopy = async () => {
120
- if (!isClipboardAvailable()) {
121
- handleFallback();
122
- return;
123
- }
124
- try {
125
- await navigator.clipboard.writeText(value);
126
- toast({ variant: 'success', title: onCopyLabel ?? DEFAULT_COPY_LABEL });
127
- setCopied(true);
128
- if (copiedTimerRef.current) {
129
- clearTimeout(copiedTimerRef.current);
130
- }
131
- copiedTimerRef.current = setTimeout(() => setCopied(false), COPIED_ICON_TIMEOUT);
132
- // Only a confirmed write earns a clear — the fallback path never wrote to
133
- // the clipboard, so it has nothing of ours to wipe. `value` is captured
134
- // per copy so a later prop change can't make us clear the wrong string.
135
- if (clearTimerRef.current) {
136
- clearTimeout(clearTimerRef.current);
137
- }
138
- if (clearClipboardAfter !== undefined && clearClipboardAfter > 0) {
139
- const copiedValue = value;
140
- clearTimerRef.current = setTimeout(() => {
141
- void clearClipboardIfUnchanged(copiedValue);
142
- }, clearClipboardAfter);
143
- }
144
- }
145
- catch {
146
- handleFallback();
147
- }
148
- };
149
- return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "copy-field", className: "flex w-full flex-col gap-2", children: [label ? ((0, jsx_runtime_1.jsx)("label", { htmlFor: inputId, className: "text-muted-foreground text-sm font-semibold", children: label })) : null, (0, jsx_runtime_1.jsxs)("div", { "data-slot": "input-wrapper", className: "border-input-border focus-within:border-ring has-[input:focus]:ring-ring flex h-10 w-full cursor-text items-center gap-1 rounded-md border pr-1 pl-4 transition-[color,box-shadow] has-[input:focus]:ring-2", children: [(0, jsx_runtime_1.jsx)("input", { ref: inputRef, id: inputId, "data-slot": "input", "data-testid": "copy-field-input", type: showAsText ? 'text' : 'password', value: value, readOnly: true,
150
- // This field holds secrets: TOTP manual-entry secrets, recovery
151
- // codes. While masked it renders as type="password", which invites
152
- // browsers and password managers to autofill it or offer to SAVE its
153
- // value, and spellcheck can ship the text to a remote service.
154
- autoComplete: "off", spellCheck: false, "aria-label": label ? undefined : valueLabel, "aria-describedby": description ? descriptionId : undefined,
155
- // `min-w-0` lets this flex item shrink below its content width so a
156
- // long value (e.g. a UUID recovery code) scrolls inside the field
157
- // instead of overflowing its container. Sans by default, inheriting
158
- // the app font (Inter) so the field matches every other input;
159
- // `mono` opts identifiers, tokens and recovery codes into the
160
- // monospace face, where telling 0 from O decides whether the value
161
- // read back is the value.
162
- className: (0, utils_1.cn)('text-input-foreground h-full min-w-0 flex-1 cursor-text border-none bg-transparent text-sm outline-none select-text focus:ring-0 focus:ring-offset-0', mono && 'font-mono') }), masked ? ((0, jsx_runtime_1.jsx)(icon_button_1.IconButton, { type: "button", variant: "outline", size: "small", rounded: true, "aria-label": revealed ? hideLabel : revealLabel, onClick: () => setRevealed((prev) => !prev), children: revealed ? (0, jsx_runtime_1.jsx)(lucide_react_1.EyeOff, {}) : (0, jsx_runtime_1.jsx)(lucide_react_1.Eye, {}) })) : null, (0, jsx_runtime_1.jsx)(icon_button_1.IconButton, { type: "button", variant: "outline", size: "small", rounded: true, "aria-label": copyAccessibleName, onClick: handleCopy, children: copied ? (0, jsx_runtime_1.jsx)(lucide_react_1.Check, {}) : (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, {}) })] }), description ? ((0, jsx_runtime_1.jsx)("p", { "data-slot": "copy-field-description", id: descriptionId, className: "text-muted-foreground text-xs", children: description })) : null] }));
163
- }
1
+ "use client";"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,n,r){if(r===void 0)r=n;var i=Object.getOwnPropertyDescriptor(e,n);if(!i||("get"in i?!e.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return e[n]}}}Object.defineProperty(t,r,i)}):(function(t,e,n,r){if(r===void 0)r=n;t[r]=e[n]}));var __setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}):function(t,e){t["default"]=e});var __importStar=this&&this.__importStar||(function(){var t=function(e){t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i))r[r.length]=i;return r};return t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null){for(var r=t(e),i=0;i<r.length;i++)if(r[i]!=="default")__createBinding(n,e,r[i])}__setModuleDefault(n,e);return n}})();Object.defineProperty(exports,"__esModule",{value:true});exports.CopyField=CopyField;const jsx_runtime_1=require("react/jsx-runtime");const React=__importStar(require("react"));const lucide_react_1=require("lucide-react");const icon_button_1=require("../../../components/ui/icon-button");const use_toast_1=require("../../../hooks/use-toast");const utils_1=require("../../../lib/utils");const DEFAULT_COPY_LABEL="Copied to clipboard!";const FALLBACK_COPY_LABEL="Copy not available \u2014 text selected, press Ctrl/Cmd+C";const COPIED_ICON_TIMEOUT=1500;const isClipboardAvailable=()=>typeof navigator!=="undefined"&&typeof navigator.clipboard?.writeText==="function";const isClipboardReadable=()=>typeof navigator!=="undefined"&&typeof navigator.clipboard?.readText==="function";const clearClipboardIfUnchanged=async t=>{if(!isClipboardReadable()){return}try{if(await navigator.clipboard.readText()!==t){return}await navigator.clipboard.writeText("")}catch{}};function CopyField({value:t,label:e,masked:n=false,onCopyLabel:r,revealLabel:i="Show value",hideLabel:h="Hide value",valueLabel:v="Value to copy",copyLabel:g,fallbackLabel:m,mono:C=false,description:a,clearClipboardAfter:u}){const{toast:f}=(0,use_toast_1.useToast)();const j=React.useId();const c=`${j}-copy-field`;const p=`${c}-description`;const x=React.useRef(null);const s=React.useRef(null);const l=React.useRef(null);const[d,b]=React.useState(false);const[w,y]=React.useState(false);const O=!n||d;const T=g??(e?`Copy ${e}`:"Copy value");React.useEffect(()=>{return()=>{if(s.current){clearTimeout(s.current)}}},[]);const I=()=>{const o=x.current;if(!o){return}if(n){o.type="text";b(true)}o.focus();o.select()};const _=()=>{I();f({variant:"destructive",title:m??FALLBACK_COPY_LABEL})};const P=async()=>{if(!isClipboardAvailable()){_();return}try{await navigator.clipboard.writeText(t);f({variant:"success",title:r??DEFAULT_COPY_LABEL});y(true);if(s.current){clearTimeout(s.current)}s.current=setTimeout(()=>y(false),COPIED_ICON_TIMEOUT);if(l.current){clearTimeout(l.current)}if(u!==void 0&&u>0){const o=t;l.current=setTimeout(()=>{void clearClipboardIfUnchanged(o)},u)}}catch{_()}};return(0,jsx_runtime_1.jsxs)("div",{"data-slot":"copy-field",className:"flex w-full flex-col gap-2",children:[e?(0,jsx_runtime_1.jsx)("label",{htmlFor:c,className:"text-muted-foreground text-sm font-semibold",children:e}):null,(0,jsx_runtime_1.jsxs)("div",{"data-slot":"input-wrapper",className:"border-input-border focus-within:border-ring has-[input:focus]:ring-ring flex h-10 w-full cursor-text items-center gap-1 rounded-md border pr-1 pl-4 transition-[color,box-shadow] has-[input:focus]:ring-2",children:[(0,jsx_runtime_1.jsx)("input",{ref:x,id:c,"data-slot":"input","data-testid":"copy-field-input",type:O?"text":"password",value:t,readOnly:true,autoComplete:"off",spellCheck:false,"aria-label":e?void 0:v,"aria-describedby":a?p:void 0,className:(0,utils_1.cn)("text-input-foreground h-full min-w-0 flex-1 cursor-text border-none bg-transparent text-sm outline-none select-text focus:ring-0 focus:ring-offset-0",C&&"font-mono")}),n?(0,jsx_runtime_1.jsx)(icon_button_1.IconButton,{type:"button",variant:"outline",size:"small",rounded:true,"aria-label":d?h:i,onClick:()=>b(o=>!o),children:d?(0,jsx_runtime_1.jsx)(lucide_react_1.EyeOff,{}):(0,jsx_runtime_1.jsx)(lucide_react_1.Eye,{})}):null,(0,jsx_runtime_1.jsx)(icon_button_1.IconButton,{type:"button",variant:"outline",size:"small",rounded:true,"aria-label":T,onClick:P,children:w?(0,jsx_runtime_1.jsx)(lucide_react_1.Check,{}):(0,jsx_runtime_1.jsx)(lucide_react_1.Copy,{})})]}),a?(0,jsx_runtime_1.jsx)("p",{"data-slot":"copy-field-description",id:p,className:"text-muted-foreground text-xs",children:a}):null]})}
@@ -1,80 +1 @@
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.Dialog = Dialog;
38
- exports.DialogPortal = DialogPortal;
39
- exports.DialogOverlay = DialogOverlay;
40
- exports.DialogClose = DialogClose;
41
- exports.DialogTrigger = DialogTrigger;
42
- exports.DialogContent = DialogContent;
43
- exports.DialogHeader = DialogHeader;
44
- exports.DialogFooter = DialogFooter;
45
- exports.DialogTitle = DialogTitle;
46
- exports.DialogDescription = DialogDescription;
47
- const jsx_runtime_1 = require("react/jsx-runtime");
48
- const DialogPrimitive = __importStar(require("@radix-ui/react-dialog"));
49
- const lucide_react_1 = require("lucide-react");
50
- const utils_1 = require("../../../lib/utils");
51
- function Dialog({ ...props }) {
52
- return (0, jsx_runtime_1.jsx)(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
53
- }
54
- function DialogTrigger({ ...props }) {
55
- return (0, jsx_runtime_1.jsx)(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
56
- }
57
- function DialogPortal({ ...props }) {
58
- return (0, jsx_runtime_1.jsx)(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
59
- }
60
- function DialogClose({ ...props }) {
61
- return (0, jsx_runtime_1.jsx)(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
62
- }
63
- function DialogOverlay({ className, ...props }) {
64
- return ((0, jsx_runtime_1.jsx)(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", className: (0, utils_1.cn)('dialog-overlay', className), ...props }));
65
- }
66
- function DialogContent({ className, children, showCloseButton = true, closeLabel = 'Close', onInteractOutside, ...props }) {
67
- return ((0, jsx_runtime_1.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [(0, jsx_runtime_1.jsx)(DialogOverlay, {}), (0, jsx_runtime_1.jsxs)(DialogPrimitive.Content, { "data-slot": "dialog-content", className: (0, utils_1.cn)('dialog-content', className), onInteractOutside: (0, utils_1.keepOpenOnToast)(onInteractOutside), ...props, children: [children, showCloseButton && ((0, jsx_runtime_1.jsxs)(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "dialog-close", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.X, { className: "size-4" }), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: closeLabel })] }))] })] }));
68
- }
69
- function DialogHeader({ className, ...props }) {
70
- return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "dialog-header", className: (0, utils_1.cn)('dialog-header', className), ...props }));
71
- }
72
- function DialogFooter({ className, ...props }) {
73
- return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "dialog-footer", className: (0, utils_1.cn)('dialog-footer', className), ...props }));
74
- }
75
- function DialogTitle({ className, ...props }) {
76
- return ((0, jsx_runtime_1.jsx)(DialogPrimitive.Title, { "data-slot": "dialog-title", className: (0, utils_1.cn)('dialog-title', className), ...props }));
77
- }
78
- function DialogDescription({ className, ...props }) {
79
- return ((0, jsx_runtime_1.jsx)(DialogPrimitive.Description, { "data-slot": "dialog-description", className: (0, utils_1.cn)('dialog-description', className), ...props }));
80
- }
1
+ "use client";"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,a,r){if(r===void 0)r=a;var o=Object.getOwnPropertyDescriptor(t,a);if(!o||("get"in o?!t.__esModule:o.writable||o.configurable)){o={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,r,o)}):(function(e,t,a,r){if(r===void 0)r=a;e[r]=t[a]}));var __setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}):function(e,t){e["default"]=t});var __importStar=this&&this.__importStar||(function(){var e=function(t){e=Object.getOwnPropertyNames||function(a){var r=[];for(var o in a)if(Object.prototype.hasOwnProperty.call(a,o))r[r.length]=o;return r};return e(t)};return function(t){if(t&&t.__esModule)return t;var a={};if(t!=null){for(var r=e(t),o=0;o<r.length;o++)if(r[o]!=="default")__createBinding(a,t,r[o])}__setModuleDefault(a,t);return a}})();Object.defineProperty(exports,"__esModule",{value:true});exports.Dialog=Dialog;exports.DialogPortal=DialogPortal;exports.DialogOverlay=DialogOverlay;exports.DialogClose=DialogClose;exports.DialogTrigger=DialogTrigger;exports.DialogContent=DialogContent;exports.DialogHeader=DialogHeader;exports.DialogFooter=DialogFooter;exports.DialogTitle=DialogTitle;exports.DialogDescription=DialogDescription;const jsx_runtime_1=require("react/jsx-runtime");const DialogPrimitive=__importStar(require("@radix-ui/react-dialog"));const lucide_react_1=require("lucide-react");const utils_1=require("../../../lib/utils");function Dialog({...e}){return(0,jsx_runtime_1.jsx)(DialogPrimitive.Root,{"data-slot":"dialog",...e})}function DialogTrigger({...e}){return(0,jsx_runtime_1.jsx)(DialogPrimitive.Trigger,{"data-slot":"dialog-trigger",...e})}function DialogPortal({...e}){return(0,jsx_runtime_1.jsx)(DialogPrimitive.Portal,{"data-slot":"dialog-portal",...e})}function DialogClose({...e}){return(0,jsx_runtime_1.jsx)(DialogPrimitive.Close,{"data-slot":"dialog-close",...e})}function DialogOverlay({className:e,...t}){return(0,jsx_runtime_1.jsx)(DialogPrimitive.Overlay,{"data-slot":"dialog-overlay",className:(0,utils_1.cn)("dialog-overlay",e),...t})}function DialogContent({className:e,children:t,showCloseButton:a=true,closeLabel:r="Close",onInteractOutside:o,...i}){return(0,jsx_runtime_1.jsxs)(DialogPortal,{"data-slot":"dialog-portal",children:[(0,jsx_runtime_1.jsx)(DialogOverlay,{}),(0,jsx_runtime_1.jsxs)(DialogPrimitive.Content,{"data-slot":"dialog-content",className:(0,utils_1.cn)("dialog-content",e),onInteractOutside:(0,utils_1.keepOpenOnToast)(o),...i,children:[t,a&&(0,jsx_runtime_1.jsxs)(DialogPrimitive.Close,{"data-slot":"dialog-close",className:"dialog-close",children:[(0,jsx_runtime_1.jsx)(lucide_react_1.X,{className:"size-4"}),(0,jsx_runtime_1.jsx)("span",{className:"sr-only",children:r})]})]})]})}function DialogHeader({className:e,...t}){return(0,jsx_runtime_1.jsx)("div",{"data-slot":"dialog-header",className:(0,utils_1.cn)("dialog-header",e),...t})}function DialogFooter({className:e,...t}){return(0,jsx_runtime_1.jsx)("div",{"data-slot":"dialog-footer",className:(0,utils_1.cn)("dialog-footer",e),...t})}function DialogTitle({className:e,...t}){return(0,jsx_runtime_1.jsx)(DialogPrimitive.Title,{"data-slot":"dialog-title",className:(0,utils_1.cn)("dialog-title",e),...t})}function DialogDescription({className:e,...t}){return(0,jsx_runtime_1.jsx)(DialogPrimitive.Description,{"data-slot":"dialog-description",className:(0,utils_1.cn)("dialog-description",e),...t})}
@@ -9,7 +9,7 @@
9
9
  }
10
10
 
11
11
  .dialog-content {
12
- @apply bg-background motion-safe:data-[state=open]:animate-in motion-safe:data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-8 border p-7 shadow-lg duration-200 sm:max-w-[425px] sm:rounded-lg;
12
+ @apply bg-background motion-safe:data-[state=open]:animate-in motion-safe:data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid max-h-[calc(100dvh-2rem)] w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-8 overflow-y-auto border p-7 shadow-lg duration-200 sm:max-w-[425px] sm:rounded-lg;
13
13
  }
14
14
 
15
15
  .dialog-close {
@@ -1,110 +1 @@
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.DropdownMenu = DropdownMenu;
38
- exports.DropdownMenuTrigger = DropdownMenuTrigger;
39
- exports.DropdownMenuContent = DropdownMenuContent;
40
- exports.DropdownMenuItem = DropdownMenuItem;
41
- exports.DropdownMenuItemIcon = DropdownMenuItemIcon;
42
- exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
43
- exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
44
- exports.DropdownMenuLabel = DropdownMenuLabel;
45
- exports.DropdownMenuSeparator = DropdownMenuSeparator;
46
- exports.DropdownMenuShortcut = DropdownMenuShortcut;
47
- exports.DropdownMenuGroup = DropdownMenuGroup;
48
- exports.DropdownMenuPortal = DropdownMenuPortal;
49
- exports.DropdownMenuSub = DropdownMenuSub;
50
- exports.DropdownMenuSubContent = DropdownMenuSubContent;
51
- exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
52
- exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
53
- const jsx_runtime_1 = require("react/jsx-runtime");
54
- const React = __importStar(require("react"));
55
- const DropdownMenuPrimitive = __importStar(require("@radix-ui/react-dropdown-menu"));
56
- const lucide_react_1 = require("lucide-react");
57
- const utils_1 = require("../../../lib/utils");
58
- function DropdownMenu({ ...props }) {
59
- return (0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
60
- }
61
- function DropdownMenuPortal({ ...props }) {
62
- return ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props }));
63
- }
64
- function DropdownMenuTrigger({ className, ...props }) {
65
- return ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", className: (0, utils_1.cn)('flex items-center justify-center outline-hidden', className), ...props }));
66
- }
67
- function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
68
- return ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Portal, { children: (0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Content, { "data-slot": "dropdown-menu-content", sideOffset: sideOffset, className: (0, utils_1.cn)('bg-popover text-popover-foreground motion-safe:data-[state=open]:animate-in motion-safe:data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-lg border shadow-md', className), ...props }) }));
69
- }
70
- function DropdownMenuGroup({ ...props }) {
71
- return ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props }));
72
- }
73
- function DropdownMenuItem({ className, inset, variant = 'default', ...props }) {
74
- return ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Item, { "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: (0, utils_1.cn)('focus:bg-shadcn-100 focus:text-accent-foreground text-muted-foreground relative flex cursor-pointer items-center gap-3 px-3 py-2 text-sm font-medium outline-hidden transition-colors select-none data-disabled:pointer-events-none data-disabled:opacity-50', className), ...props }));
75
- }
76
- function DropdownMenuItemIcon({ className, children, ...props }) {
77
- return ((0, jsx_runtime_1.jsx)("span", { "data-slot": "dropdown-menu-item-icon",
78
- // A meaningful glyph inside an interactive item answers to the 3:1 floor
79
- // of SC 1.4.11. base/400 reads 2.56:1 on the popover surface in light.
80
- className: (0, utils_1.cn)('text-muted-foreground', className), ...props, children: React.Children.map(React.Children.toArray(children), (child) => React.isValidElement(child)
81
- ? React.cloneElement(child, { size: 16 })
82
- : child) }));
83
- }
84
- function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
85
- return ((0, jsx_runtime_1.jsxs)(DropdownMenuPrimitive.CheckboxItem, { "data-slot": "dropdown-menu-checkbox-item", className: (0, utils_1.cn)('focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden transition-colors select-none data-disabled:pointer-events-none data-disabled:opacity-50', className), checked: checked, ...props, children: [(0, jsx_runtime_1.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: (0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { className: "size-4" }) }) }), children] }));
86
- }
87
- function DropdownMenuRadioGroup({ ...props }) {
88
- return ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props }));
89
- }
90
- function DropdownMenuRadioItem({ className, children, ...props }) {
91
- return ((0, jsx_runtime_1.jsxs)(DropdownMenuPrimitive.RadioItem, { "data-slot": "dropdown-menu-radio-item", className: (0, utils_1.cn)('focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden transition-colors select-none data-disabled:pointer-events-none data-disabled:opacity-50', className), ...props, children: [(0, jsx_runtime_1.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: (0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: (0, jsx_runtime_1.jsx)(lucide_react_1.Circle, { className: "size-2 fill-current" }) }) }), children] }));
92
- }
93
- function DropdownMenuLabel({ className, inset, ...props }) {
94
- return ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Label, { "data-slot": "dropdown-menu-label", "data-inset": inset, className: (0, utils_1.cn)('hover:bg-shadcn-100 hover:text-accent-foreground text-muted-foreground flex items-center gap-3 px-3 py-2 text-sm font-bold transition-colors', className), ...props }));
95
- }
96
- function DropdownMenuSeparator({ className, ...props }) {
97
- return ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Separator, { "data-slot": "dropdown-menu-separator", className: (0, utils_1.cn)('bg-muted -mx-1 my-1 h-px', className), ...props }));
98
- }
99
- function DropdownMenuShortcut({ className, ...props }) {
100
- return ((0, jsx_runtime_1.jsx)("span", { "data-slot": "dropdown-menu-shortcut", className: (0, utils_1.cn)('text-muted-foreground ml-auto text-xs tracking-widest', className), ...props }));
101
- }
102
- function DropdownMenuSub({ ...props }) {
103
- return (0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
104
- }
105
- function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
106
- return ((0, jsx_runtime_1.jsxs)(DropdownMenuPrimitive.SubTrigger, { "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: (0, utils_1.cn)('focus:bg-shadcn-100 focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground text-muted-foreground flex cursor-default items-center gap-3 px-3 py-2 text-sm font-medium outline-hidden select-none', className), ...props, children: [children, (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "ml-auto h-4 w-4" })] }));
107
- }
108
- function DropdownMenuSubContent({ className, ...props }) {
109
- return ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.SubContent, { "data-slot": "dropdown-menu-sub-content", className: (0, utils_1.cn)('bg-popover text-popover-foreground motion-safe:data-[state=open]:animate-in motion-safe:data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-md border p-1 shadow-lg', className), ...props }));
110
- }
1
+ "use client";"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,o,n){if(n===void 0)n=o;var r=Object.getOwnPropertyDescriptor(t,o);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[o]}}}Object.defineProperty(e,n,r)}):(function(e,t,o,n){if(n===void 0)n=o;e[n]=t[o]}));var __setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}):function(e,t){e["default"]=t});var __importStar=this&&this.__importStar||(function(){var e=function(t){e=Object.getOwnPropertyNames||function(o){var n=[];for(var r in o)if(Object.prototype.hasOwnProperty.call(o,r))n[n.length]=r;return n};return e(t)};return function(t){if(t&&t.__esModule)return t;var o={};if(t!=null){for(var n=e(t),r=0;r<n.length;r++)if(n[r]!=="default")__createBinding(o,t,n[r])}__setModuleDefault(o,t);return o}})();Object.defineProperty(exports,"__esModule",{value:true});exports.DropdownMenu=DropdownMenu;exports.DropdownMenuTrigger=DropdownMenuTrigger;exports.DropdownMenuContent=DropdownMenuContent;exports.DropdownMenuItem=DropdownMenuItem;exports.DropdownMenuItemIcon=DropdownMenuItemIcon;exports.DropdownMenuCheckboxItem=DropdownMenuCheckboxItem;exports.DropdownMenuRadioItem=DropdownMenuRadioItem;exports.DropdownMenuLabel=DropdownMenuLabel;exports.DropdownMenuSeparator=DropdownMenuSeparator;exports.DropdownMenuShortcut=DropdownMenuShortcut;exports.DropdownMenuGroup=DropdownMenuGroup;exports.DropdownMenuPortal=DropdownMenuPortal;exports.DropdownMenuSub=DropdownMenuSub;exports.DropdownMenuSubContent=DropdownMenuSubContent;exports.DropdownMenuSubTrigger=DropdownMenuSubTrigger;exports.DropdownMenuRadioGroup=DropdownMenuRadioGroup;const jsx_runtime_1=require("react/jsx-runtime");const React=__importStar(require("react"));const DropdownMenuPrimitive=__importStar(require("@radix-ui/react-dropdown-menu"));const lucide_react_1=require("lucide-react");const utils_1=require("../../../lib/utils");function DropdownMenu({...e}){return(0,jsx_runtime_1.jsx)(DropdownMenuPrimitive.Root,{"data-slot":"dropdown-menu",...e})}function DropdownMenuPortal({...e}){return(0,jsx_runtime_1.jsx)(DropdownMenuPrimitive.Portal,{"data-slot":"dropdown-menu-portal",...e})}function DropdownMenuTrigger({className:e,...t}){return(0,jsx_runtime_1.jsx)(DropdownMenuPrimitive.Trigger,{"data-slot":"dropdown-menu-trigger",className:(0,utils_1.cn)("flex items-center justify-center outline-hidden",e),...t})}function DropdownMenuContent({className:e,sideOffset:t=4,...o}){return(0,jsx_runtime_1.jsx)(DropdownMenuPrimitive.Portal,{children:(0,jsx_runtime_1.jsx)(DropdownMenuPrimitive.Content,{"data-slot":"dropdown-menu-content",sideOffset:t,className:(0,utils_1.cn)("bg-popover text-popover-foreground motion-safe:data-[state=open]:animate-in motion-safe:data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-lg border shadow-md",e),...o})})}function DropdownMenuGroup({...e}){return(0,jsx_runtime_1.jsx)(DropdownMenuPrimitive.Group,{"data-slot":"dropdown-menu-group",...e})}function DropdownMenuItem({className:e,inset:t,variant:o="default",...n}){return(0,jsx_runtime_1.jsx)(DropdownMenuPrimitive.Item,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":o,className:(0,utils_1.cn)("focus:bg-shadcn-100 focus:text-accent-foreground text-muted-foreground relative flex cursor-pointer items-center gap-3 px-3 py-2 text-sm font-medium outline-hidden transition-colors select-none data-disabled:pointer-events-none data-disabled:opacity-50",e),...n})}function DropdownMenuItemIcon({className:e,children:t,...o}){return(0,jsx_runtime_1.jsx)("span",{"data-slot":"dropdown-menu-item-icon",className:(0,utils_1.cn)("text-muted-foreground",e),...o,children:React.Children.map(React.Children.toArray(t),n=>React.isValidElement(n)?React.cloneElement(n,{size:16}):n)})}function DropdownMenuCheckboxItem({className:e,children:t,checked:o,...n}){return(0,jsx_runtime_1.jsxs)(DropdownMenuPrimitive.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item",className:(0,utils_1.cn)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden transition-colors select-none data-disabled:pointer-events-none data-disabled:opacity-50",e),checked:o,...n,children:[(0,jsx_runtime_1.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,jsx_runtime_1.jsx)(DropdownMenuPrimitive.ItemIndicator,{children:(0,jsx_runtime_1.jsx)(lucide_react_1.Check,{className:"size-4"})})}),t]})}function DropdownMenuRadioGroup({...e}){return(0,jsx_runtime_1.jsx)(DropdownMenuPrimitive.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})}function DropdownMenuRadioItem({className:e,children:t,...o}){return(0,jsx_runtime_1.jsxs)(DropdownMenuPrimitive.RadioItem,{"data-slot":"dropdown-menu-radio-item",className:(0,utils_1.cn)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden transition-colors select-none data-disabled:pointer-events-none data-disabled:opacity-50",e),...o,children:[(0,jsx_runtime_1.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,jsx_runtime_1.jsx)(DropdownMenuPrimitive.ItemIndicator,{children:(0,jsx_runtime_1.jsx)(lucide_react_1.Circle,{className:"size-2 fill-current"})})}),t]})}function DropdownMenuLabel({className:e,inset:t,...o}){return(0,jsx_runtime_1.jsx)(DropdownMenuPrimitive.Label,{"data-slot":"dropdown-menu-label","data-inset":t,className:(0,utils_1.cn)("hover:bg-shadcn-100 hover:text-accent-foreground text-muted-foreground flex items-center gap-3 px-3 py-2 text-sm font-bold transition-colors",e),...o})}function DropdownMenuSeparator({className:e,...t}){return(0,jsx_runtime_1.jsx)(DropdownMenuPrimitive.Separator,{"data-slot":"dropdown-menu-separator",className:(0,utils_1.cn)("bg-muted -mx-1 my-1 h-px",e),...t})}function DropdownMenuShortcut({className:e,...t}){return(0,jsx_runtime_1.jsx)("span",{"data-slot":"dropdown-menu-shortcut",className:(0,utils_1.cn)("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function DropdownMenuSub({...e}){return(0,jsx_runtime_1.jsx)(DropdownMenuPrimitive.Sub,{"data-slot":"dropdown-menu-sub",...e})}function DropdownMenuSubTrigger({className:e,inset:t,children:o,...n}){return(0,jsx_runtime_1.jsxs)(DropdownMenuPrimitive.SubTrigger,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:(0,utils_1.cn)("focus:bg-shadcn-100 focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground text-muted-foreground flex cursor-default items-center gap-3 px-3 py-2 text-sm font-medium outline-hidden select-none",e),...n,children:[o,(0,jsx_runtime_1.jsx)(lucide_react_1.ChevronRight,{className:"ml-auto h-4 w-4"})]})}function DropdownMenuSubContent({className:e,...t}){return(0,jsx_runtime_1.jsx)(DropdownMenuPrimitive.SubContent,{"data-slot":"dropdown-menu-sub-content",className:(0,utils_1.cn)("bg-popover text-popover-foreground motion-safe:data-[state=open]:animate-in motion-safe:data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}