@rpcbase/ui 0.280.0 → 0.282.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (519) hide show
  1. package/dist/components/AddressAutocompleteInput/index.d.ts +1 -1
  2. package/dist/components/AddressAutocompleteInput/index.d.ts.map +1 -1
  3. package/dist/components/ApplePayButton/index.d.ts +1 -1
  4. package/dist/components/ApplePayButton/index.d.ts.map +1 -1
  5. package/dist/components/Checkbox/index.d.ts +1 -1
  6. package/dist/components/Checkbox/index.d.ts.map +1 -1
  7. package/dist/components/DayPickerField/index.d.ts +2 -2
  8. package/dist/components/DayPickerField/index.d.ts.map +1 -1
  9. package/dist/components/Dialog/index.d.ts +9 -9
  10. package/dist/components/Dialog/index.d.ts.map +1 -1
  11. package/dist/components/FilesUploadField/index.d.ts +1 -1
  12. package/dist/components/FilesUploadField/index.d.ts.map +1 -1
  13. package/dist/components/HourPickerField/index.d.ts +2 -2
  14. package/dist/components/HourPickerField/index.d.ts.map +1 -1
  15. package/dist/components/I18nField/index.d.ts +1 -1
  16. package/dist/components/I18nField/index.d.ts.map +1 -1
  17. package/dist/components/Image/index.d.ts +1 -1
  18. package/dist/components/Image/index.d.ts.map +1 -1
  19. package/dist/components/ImagesField/index.d.ts +1 -1
  20. package/dist/components/ImagesField/index.d.ts.map +1 -1
  21. package/dist/components/Input/index.d.ts +1 -1
  22. package/dist/components/Input/index.d.ts.map +1 -1
  23. package/dist/components/Notifications/NotificationsButton.d.ts +1 -1
  24. package/dist/components/Notifications/NotificationsButton.d.ts.map +1 -1
  25. package/dist/components/Notifications/NotificationsDrawer.d.ts +1 -1
  26. package/dist/components/Notifications/NotificationsDrawer.d.ts.map +1 -1
  27. package/dist/components/Notifications/NotificationsSettings.d.ts +1 -1
  28. package/dist/components/Notifications/NotificationsSettings.d.ts.map +1 -1
  29. package/dist/components/PhoneNumberInput/suggestions.d.ts +3 -3
  30. package/dist/components/PhoneNumberInput/suggestions.d.ts.map +1 -1
  31. package/dist/components/Select/index.d.ts +2 -2
  32. package/dist/components/Select/index.d.ts.map +1 -1
  33. package/dist/components/header/MenuPopover/index.d.ts +1 -1
  34. package/dist/components/header/MenuPopover/index.d.ts.map +1 -1
  35. package/dist/index.js +12 -12
  36. package/dist/index10.js +6 -4
  37. package/dist/index10.js.map +1 -1
  38. package/dist/index12.js.map +1 -1
  39. package/dist/index13.js.map +1 -1
  40. package/dist/index14.js +88 -88
  41. package/dist/index14.js.map +1 -1
  42. package/dist/index15.js.map +1 -1
  43. package/dist/index154.js +19 -7
  44. package/dist/index154.js.map +1 -1
  45. package/dist/index16.js +36 -45
  46. package/dist/index16.js.map +1 -1
  47. package/dist/index160.js +3 -3
  48. package/dist/index160.js.map +1 -1
  49. package/dist/index166.js +5 -5
  50. package/dist/index166.js.map +1 -1
  51. package/dist/index172.js +27 -25
  52. package/dist/index172.js.map +1 -1
  53. package/dist/index181.js +1 -1
  54. package/dist/index181.js.map +1 -1
  55. package/dist/index182.js +145 -162
  56. package/dist/index182.js.map +1 -1
  57. package/dist/index184.js +6 -8
  58. package/dist/index184.js.map +1 -1
  59. package/dist/index186.js +2 -8
  60. package/dist/index186.js.map +1 -1
  61. package/dist/index19.js +1 -1
  62. package/dist/index19.js.map +1 -1
  63. package/dist/index195.js +1 -1
  64. package/dist/index195.js.map +1 -1
  65. package/dist/index196.js +2 -2
  66. package/dist/index196.js.map +1 -1
  67. package/dist/index197.js +1 -1
  68. package/dist/index197.js.map +1 -1
  69. package/dist/index198.js +16 -15
  70. package/dist/index198.js.map +1 -1
  71. package/dist/index199.js +13 -17
  72. package/dist/index199.js.map +1 -1
  73. package/dist/index200.js +3 -2
  74. package/dist/index200.js.map +1 -1
  75. package/dist/index207.js +5 -90
  76. package/dist/index207.js.map +1 -1
  77. package/dist/index208.js +15 -3
  78. package/dist/index208.js.map +1 -1
  79. package/dist/index209.js +102 -22
  80. package/dist/index209.js.map +1 -1
  81. package/dist/index210.js +3 -28
  82. package/dist/index210.js.map +1 -1
  83. package/dist/index211.js +23 -19
  84. package/dist/index211.js.map +1 -1
  85. package/dist/index212.js +27 -6
  86. package/dist/index212.js.map +1 -1
  87. package/dist/index213.js +19 -14
  88. package/dist/index213.js.map +1 -1
  89. package/dist/index214.js +5 -6
  90. package/dist/index214.js.map +1 -1
  91. package/dist/index215.js +14 -26
  92. package/dist/index215.js.map +1 -1
  93. package/dist/index216.js +7 -22
  94. package/dist/index216.js.map +1 -1
  95. package/dist/index217.js +27 -6
  96. package/dist/index217.js.map +1 -1
  97. package/dist/index218.js +23 -5
  98. package/dist/index218.js.map +1 -1
  99. package/dist/index219.js +6 -4
  100. package/dist/index219.js.map +1 -1
  101. package/dist/index220.js +5 -4
  102. package/dist/index220.js.map +1 -1
  103. package/dist/index221.js +4 -24
  104. package/dist/index221.js.map +1 -1
  105. package/dist/index222.js +4 -3
  106. package/dist/index222.js.map +1 -1
  107. package/dist/index223.js +21 -21
  108. package/dist/index223.js.map +1 -1
  109. package/dist/index224.js +3 -23
  110. package/dist/index224.js.map +1 -1
  111. package/dist/index225.js +23 -6
  112. package/dist/index225.js.map +1 -1
  113. package/dist/index226.js +22 -9
  114. package/dist/index226.js.map +1 -1
  115. package/dist/index227.js +5 -17
  116. package/dist/index227.js.map +1 -1
  117. package/dist/index228.js +8 -49
  118. package/dist/index228.js.map +1 -1
  119. package/dist/index229.js +18 -5
  120. package/dist/index229.js.map +1 -1
  121. package/dist/index230.js +50 -19
  122. package/dist/index230.js.map +1 -1
  123. package/dist/index231.js +20 -28
  124. package/dist/index231.js.map +1 -1
  125. package/dist/index232.js +27 -104
  126. package/dist/index232.js.map +1 -1
  127. package/dist/index233.js +98 -33
  128. package/dist/index233.js.map +1 -1
  129. package/dist/index234.js +28 -113
  130. package/dist/index234.js.map +1 -1
  131. package/dist/index235.js +117 -11
  132. package/dist/index235.js.map +1 -1
  133. package/dist/index236.js +12 -4
  134. package/dist/index236.js.map +1 -1
  135. package/dist/index237.js +4 -15
  136. package/dist/index237.js.map +1 -1
  137. package/dist/index238.js +13 -62
  138. package/dist/index238.js.map +1 -1
  139. package/dist/index239.js +64 -9
  140. package/dist/index239.js.map +1 -1
  141. package/dist/index240.js +10 -106
  142. package/dist/index240.js.map +1 -1
  143. package/dist/index241.js +107 -13
  144. package/dist/index241.js.map +1 -1
  145. package/dist/index242.js +16 -13
  146. package/dist/index242.js.map +1 -1
  147. package/dist/index243.js +13 -5
  148. package/dist/index243.js.map +1 -1
  149. package/dist/index244.js +4 -316
  150. package/dist/index244.js.map +1 -1
  151. package/dist/index245.js +315 -58
  152. package/dist/index245.js.map +1 -1
  153. package/dist/index246.js +58 -223
  154. package/dist/index246.js.map +1 -1
  155. package/dist/index247.js +215 -318
  156. package/dist/index247.js.map +1 -1
  157. package/dist/index248.js +250 -306
  158. package/dist/index248.js.map +1 -1
  159. package/dist/index249.js +308 -173
  160. package/dist/index249.js.map +1 -1
  161. package/dist/index250.js +178 -7
  162. package/dist/index250.js.map +1 -1
  163. package/dist/index251.js +8 -15
  164. package/dist/index251.js.map +1 -1
  165. package/dist/index252.js +41 -5
  166. package/dist/index252.js.map +1 -1
  167. package/dist/index253.js +46 -38
  168. package/dist/index253.js.map +1 -1
  169. package/dist/index254.js +7 -50
  170. package/dist/index254.js.map +1 -1
  171. package/dist/index255.js +49 -6
  172. package/dist/index255.js.map +1 -1
  173. package/dist/index256.js +48 -46
  174. package/dist/index256.js.map +1 -1
  175. package/dist/index257.js +6 -51
  176. package/dist/index257.js.map +1 -1
  177. package/dist/index258.js +10 -9
  178. package/dist/index258.js.map +1 -1
  179. package/dist/index259.js +60 -8
  180. package/dist/index259.js.map +1 -1
  181. package/dist/index26.js.map +1 -1
  182. package/dist/index260.js +41 -60
  183. package/dist/index260.js.map +1 -1
  184. package/dist/index261.js +88 -34
  185. package/dist/index261.js.map +1 -1
  186. package/dist/index262.js +47 -94
  187. package/dist/index262.js.map +1 -1
  188. package/dist/index263.js +36 -49
  189. package/dist/index263.js.map +1 -1
  190. package/dist/index264.js +45 -32
  191. package/dist/index264.js.map +1 -1
  192. package/dist/index265.js +47 -46
  193. package/dist/index265.js.map +1 -1
  194. package/dist/index266.js +18 -48
  195. package/dist/index266.js.map +1 -1
  196. package/dist/index267.js +174 -15
  197. package/dist/index267.js.map +1 -1
  198. package/dist/index268.js +47 -169
  199. package/dist/index268.js.map +1 -1
  200. package/dist/index269.js +17 -34
  201. package/dist/index269.js.map +1 -1
  202. package/dist/index270.js +59 -10
  203. package/dist/index270.js.map +1 -1
  204. package/dist/index271.js +10 -66
  205. package/dist/index271.js.map +1 -1
  206. package/dist/index272.js +4 -4
  207. package/dist/index273.js +71 -69
  208. package/dist/index273.js.map +1 -1
  209. package/dist/index274.js +158 -152
  210. package/dist/index274.js.map +1 -1
  211. package/dist/index275.js +7 -13
  212. package/dist/index275.js.map +1 -1
  213. package/dist/index276.js +12 -5
  214. package/dist/index276.js.map +1 -1
  215. package/dist/index277.js +12 -6
  216. package/dist/index277.js.map +1 -1
  217. package/dist/index278.js +11 -12
  218. package/dist/index278.js.map +1 -1
  219. package/dist/index279.js +65 -9
  220. package/dist/index279.js.map +1 -1
  221. package/dist/index280.js +6 -74
  222. package/dist/index280.js.map +1 -1
  223. package/dist/index281.js +25 -6
  224. package/dist/index281.js.map +1 -1
  225. package/dist/index282.js +24 -24
  226. package/dist/index282.js.map +1 -1
  227. package/dist/index283.js +125 -24
  228. package/dist/index283.js.map +1 -1
  229. package/dist/index284.js +52 -115
  230. package/dist/index284.js.map +1 -1
  231. package/dist/index285.js +59 -55
  232. package/dist/index285.js.map +1 -1
  233. package/dist/index286.js +48 -61
  234. package/dist/index286.js.map +1 -1
  235. package/dist/index287.js +5 -48
  236. package/dist/index287.js.map +1 -1
  237. package/dist/index288.js +14 -8
  238. package/dist/index288.js.map +1 -1
  239. package/dist/index289.js +18 -14
  240. package/dist/index289.js.map +1 -1
  241. package/dist/index290.js +10 -17
  242. package/dist/index290.js.map +1 -1
  243. package/dist/index291.js +23 -11
  244. package/dist/index291.js.map +1 -1
  245. package/dist/index292.js +52 -25
  246. package/dist/index292.js.map +1 -1
  247. package/dist/index293.js +6 -52
  248. package/dist/index293.js.map +1 -1
  249. package/dist/index294.js +137 -5
  250. package/dist/index294.js.map +1 -1
  251. package/dist/index295.js +59 -149
  252. package/dist/index295.js.map +1 -1
  253. package/dist/index296.js +90 -49
  254. package/dist/index296.js.map +1 -1
  255. package/dist/index297.js +11 -117
  256. package/dist/index297.js.map +1 -1
  257. package/dist/index298.js +863 -11
  258. package/dist/index298.js.map +1 -1
  259. package/dist/index299.js +21 -865
  260. package/dist/index299.js.map +1 -1
  261. package/dist/index3.js.map +1 -1
  262. package/dist/index300.js +417 -27
  263. package/dist/index300.js.map +1 -1
  264. package/dist/index301.js +774 -483
  265. package/dist/index301.js.map +1 -1
  266. package/dist/index302.js +7436 -803
  267. package/dist/index302.js.map +1 -1
  268. package/dist/index303.js +7 -7429
  269. package/dist/index303.js.map +1 -1
  270. package/dist/index304.js +12 -6
  271. package/dist/index304.js.map +1 -1
  272. package/dist/index305.js +5 -12
  273. package/dist/index305.js.map +1 -1
  274. package/dist/index306.js +3 -3
  275. package/dist/index306.js.map +1 -1
  276. package/dist/index307.js +469 -5
  277. package/dist/index307.js.map +1 -1
  278. package/dist/index308.js +32 -464
  279. package/dist/index308.js.map +1 -1
  280. package/dist/index309.js +18 -36
  281. package/dist/index309.js.map +1 -1
  282. package/dist/index310.js +28 -17
  283. package/dist/index310.js.map +1 -1
  284. package/dist/index311.js +4 -30
  285. package/dist/index311.js.map +1 -1
  286. package/dist/index312.js +59 -4
  287. package/dist/index312.js.map +1 -1
  288. package/dist/index313.js +11 -59
  289. package/dist/index313.js.map +1 -1
  290. package/dist/index314.js +5 -9
  291. package/dist/index314.js.map +1 -1
  292. package/dist/index315.js +9 -5
  293. package/dist/index315.js.map +1 -1
  294. package/dist/index316.js +12 -9
  295. package/dist/index316.js.map +1 -1
  296. package/dist/index317.js +3 -13
  297. package/dist/index317.js.map +1 -1
  298. package/dist/index318.js +17 -3
  299. package/dist/index318.js.map +1 -1
  300. package/dist/index319.js +23 -14
  301. package/dist/index319.js.map +1 -1
  302. package/dist/index320.js +39 -23
  303. package/dist/index320.js.map +1 -1
  304. package/dist/index321.js +5 -41
  305. package/dist/index321.js.map +1 -1
  306. package/dist/index322.js +25 -5
  307. package/dist/index322.js.map +1 -1
  308. package/dist/index323.js +18 -24
  309. package/dist/index323.js.map +1 -1
  310. package/dist/index324.js +32 -17
  311. package/dist/index324.js.map +1 -1
  312. package/dist/index325.js +5 -34
  313. package/dist/index325.js.map +1 -1
  314. package/dist/index326.js +9 -5
  315. package/dist/index326.js.map +1 -1
  316. package/dist/index327.js +7 -8
  317. package/dist/index327.js.map +1 -1
  318. package/dist/index328.js +9 -8
  319. package/dist/index328.js.map +1 -1
  320. package/dist/index329.js +10 -9
  321. package/dist/index329.js.map +1 -1
  322. package/dist/index330.js +7 -10
  323. package/dist/index330.js.map +1 -1
  324. package/dist/index331.js +75 -7
  325. package/dist/index331.js.map +1 -1
  326. package/dist/index332.js +153 -66
  327. package/dist/index332.js.map +1 -1
  328. package/dist/index333.js +99 -147
  329. package/dist/index333.js.map +1 -1
  330. package/dist/index334.js +13 -113
  331. package/dist/index334.js.map +1 -1
  332. package/dist/index335.js +78 -12
  333. package/dist/index335.js.map +1 -1
  334. package/dist/index336.js +23 -57
  335. package/dist/index336.js.map +1 -1
  336. package/dist/index337.js +12 -45
  337. package/dist/index337.js.map +1 -1
  338. package/dist/index338.js +16 -13
  339. package/dist/index338.js.map +1 -1
  340. package/dist/index339.js +100 -15
  341. package/dist/index339.js.map +1 -1
  342. package/dist/index340.js +50 -95
  343. package/dist/index340.js.map +1 -1
  344. package/dist/index341.js +57 -5
  345. package/dist/index341.js.map +1 -1
  346. package/dist/index342.js +41 -78
  347. package/dist/index342.js.map +1 -1
  348. package/dist/index343.js +100 -58
  349. package/dist/index343.js.map +1 -1
  350. package/dist/index344.js +46 -104
  351. package/dist/index344.js.map +1 -1
  352. package/dist/index345.js +39 -51
  353. package/dist/index345.js.map +1 -1
  354. package/dist/index346.js +143 -42
  355. package/dist/index346.js.map +1 -1
  356. package/dist/index347.js +122 -123
  357. package/dist/index347.js.map +1 -1
  358. package/dist/index348.js +224 -108
  359. package/dist/index348.js.map +1 -1
  360. package/dist/index349.js +158 -174
  361. package/dist/index349.js.map +1 -1
  362. package/dist/index350.js +213 -144
  363. package/dist/index350.js.map +1 -1
  364. package/dist/index351.js +5 -309
  365. package/dist/index351.js.map +1 -1
  366. package/dist/index352.js +6 -5
  367. package/dist/index352.js.map +1 -1
  368. package/dist/index353.js +7 -6
  369. package/dist/index353.js.map +1 -1
  370. package/dist/index354.js +4 -5
  371. package/dist/index354.js.map +1 -1
  372. package/dist/index355.js +4 -4
  373. package/dist/index355.js.map +1 -1
  374. package/dist/index356.js +21 -6
  375. package/dist/index356.js.map +1 -1
  376. package/dist/index357.js +10 -21
  377. package/dist/index357.js.map +1 -1
  378. package/dist/index358.js +128 -10
  379. package/dist/index358.js.map +1 -1
  380. package/dist/index359.js +36 -122
  381. package/dist/index359.js.map +1 -1
  382. package/dist/index360.js +64 -38
  383. package/dist/index360.js.map +1 -1
  384. package/dist/index361.js +115 -66
  385. package/dist/index361.js.map +1 -1
  386. package/dist/index362.js +485 -112
  387. package/dist/index362.js.map +1 -1
  388. package/dist/index363.js +7 -490
  389. package/dist/index363.js.map +1 -1
  390. package/dist/index364.js +1 -1
  391. package/dist/index364.js.map +1 -1
  392. package/dist/index367.js +2 -9
  393. package/dist/index367.js.map +1 -1
  394. package/dist/index368.js +26 -5
  395. package/dist/index368.js.map +1 -1
  396. package/dist/index369.js +43 -27
  397. package/dist/index369.js.map +1 -1
  398. package/dist/index370.js +35 -46
  399. package/dist/index370.js.map +1 -1
  400. package/dist/index371.js +16 -27
  401. package/dist/index371.js.map +1 -1
  402. package/dist/index372.js +41 -16
  403. package/dist/index372.js.map +1 -1
  404. package/dist/index373.js +11 -42
  405. package/dist/index373.js.map +1 -1
  406. package/dist/index374.js +10 -14
  407. package/dist/index374.js.map +1 -1
  408. package/dist/index375.js +51 -9
  409. package/dist/index375.js.map +1 -1
  410. package/dist/index376.js +40 -53
  411. package/dist/index376.js.map +1 -1
  412. package/dist/index377.js +17 -43
  413. package/dist/index377.js.map +1 -1
  414. package/dist/index378.js +4 -15
  415. package/dist/index378.js.map +1 -1
  416. package/dist/index379.js +4 -4
  417. package/dist/index379.js.map +1 -1
  418. package/dist/index380.js +9 -4
  419. package/dist/index380.js.map +1 -1
  420. package/dist/index381.js +304 -9
  421. package/dist/index381.js.map +1 -1
  422. package/dist/index382.js +4 -339
  423. package/dist/index382.js.map +1 -1
  424. package/dist/index383.js +21 -5
  425. package/dist/index383.js.map +1 -1
  426. package/dist/index384.js +106 -16
  427. package/dist/index384.js.map +1 -1
  428. package/dist/index385.js +19 -109
  429. package/dist/index385.js.map +1 -1
  430. package/dist/index386.js +18 -18
  431. package/dist/index386.js.map +1 -1
  432. package/dist/index387.js +14 -19
  433. package/dist/index387.js.map +1 -1
  434. package/dist/index388.js +12 -4
  435. package/dist/index388.js.map +1 -1
  436. package/dist/index389.js +113 -20
  437. package/dist/index389.js.map +1 -1
  438. package/dist/index390.js +5 -11
  439. package/dist/index390.js.map +1 -1
  440. package/dist/index391.js +28 -85
  441. package/dist/index391.js.map +1 -1
  442. package/dist/index392.js +9 -9
  443. package/dist/index392.js.map +1 -1
  444. package/dist/index393.js +6 -29
  445. package/dist/index393.js.map +1 -1
  446. package/dist/index394.js +254 -10
  447. package/dist/index394.js.map +1 -1
  448. package/dist/index395.js +12 -6
  449. package/dist/index395.js.map +1 -1
  450. package/dist/index396.js +11 -252
  451. package/dist/index396.js.map +1 -1
  452. package/dist/index397.js +6 -11
  453. package/dist/index397.js.map +1 -1
  454. package/dist/index398.js +22 -10
  455. package/dist/index398.js.map +1 -1
  456. package/dist/index399.js +22 -6
  457. package/dist/index399.js.map +1 -1
  458. package/dist/index4.js.map +1 -1
  459. package/dist/index400.js +103 -21
  460. package/dist/index400.js.map +1 -1
  461. package/dist/index401.js +15 -23
  462. package/dist/index401.js.map +1 -1
  463. package/dist/index402.js +11 -108
  464. package/dist/index402.js.map +1 -1
  465. package/dist/index403.js +10 -15
  466. package/dist/index403.js.map +1 -1
  467. package/dist/index404.js +237 -10
  468. package/dist/index404.js.map +1 -1
  469. package/dist/index405.js +27 -9
  470. package/dist/index405.js.map +1 -1
  471. package/dist/index406.js +33 -238
  472. package/dist/index406.js.map +1 -1
  473. package/dist/index407.js +11 -30
  474. package/dist/index407.js.map +1 -1
  475. package/dist/index408.js +118 -48
  476. package/dist/index408.js.map +1 -1
  477. package/dist/index409.js +39 -11
  478. package/dist/index409.js.map +1 -1
  479. package/dist/index410.js +18 -121
  480. package/dist/index410.js.map +1 -1
  481. package/dist/index411.js +11 -39
  482. package/dist/index411.js.map +1 -1
  483. package/dist/index412.js +21 -24
  484. package/dist/index412.js.map +1 -1
  485. package/dist/index413.js +17 -11
  486. package/dist/index413.js.map +1 -1
  487. package/dist/index414.js +10 -20
  488. package/dist/index414.js.map +1 -1
  489. package/dist/index415.js +4 -17
  490. package/dist/index415.js.map +1 -1
  491. package/dist/index416.js +300 -14
  492. package/dist/index416.js.map +1 -1
  493. package/dist/index417.js +61 -323
  494. package/dist/index417.js.map +1 -1
  495. package/dist/index418.js +4 -63
  496. package/dist/index418.js.map +1 -1
  497. package/dist/index419.js +28 -4
  498. package/dist/index419.js.map +1 -1
  499. package/dist/index420.js +468 -25
  500. package/dist/index420.js.map +1 -1
  501. package/dist/index421.js +250 -452
  502. package/dist/index421.js.map +1 -1
  503. package/dist/index6.js.map +1 -1
  504. package/dist/index7.js +91 -133
  505. package/dist/index7.js.map +1 -1
  506. package/dist/index70.js +2 -2
  507. package/dist/index70.js.map +1 -1
  508. package/dist/index71.js +11 -4
  509. package/dist/index71.js.map +1 -1
  510. package/dist/index72.js +1 -3
  511. package/dist/index72.js.map +1 -1
  512. package/dist/index8.js.map +1 -1
  513. package/dist/index9.js +16 -19
  514. package/dist/index9.js.map +1 -1
  515. package/dist/test-only/TestCoverageTestBadge/index.d.ts +1 -1
  516. package/dist/test-only/TestCoverageTestBadge/index.d.ts.map +1 -1
  517. package/package.json +15 -15
  518. package/dist/index422.js +0 -272
  519. package/dist/index422.js.map +0 -1
package/dist/index421.js CHANGED
@@ -1,474 +1,272 @@
1
1
  import { cn as e } from "./index12.js";
2
- import { DialogBackdrop as t } from "./index199.js";
3
- import { DialogClose as n } from "./index210.js";
4
- import { DialogPopup as r } from "./index280.js";
5
- import { DialogPortal as i } from "./index283.js";
6
- import { DialogRoot as a } from "./index288.js";
7
- import { DialogTitle as o } from "./index289.js";
8
- import { c as s } from "react/compiler-runtime";
9
- import { createContext as c, useCallback as l, useContext as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
10
- import { Loader2 as h, MoreVertical as g, X as _ } from "lucide-react";
11
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
12
- //#region src/components/Notifications/NotificationsDrawer.tsx
13
- var b = (e) => {
14
- let t = Date.parse(e);
15
- return Number.isFinite(t) ? t : 0;
16
- }, x = (e) => {
17
- let t = new Date(b(e));
18
- return Number.isFinite(t.getTime()) ? `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, "0")}-${String(t.getDate()).padStart(2, "0")}` : "unknown";
19
- }, S = (e) => {
20
- if (e === "unknown") return "Unknown date";
21
- let [t, n, r] = e.split("-"), i = Number(t), a = Number(n), o = Number(r);
22
- if (!Number.isFinite(i) || !Number.isFinite(a) || !Number.isFinite(o)) return "Unknown date";
23
- let s = new Date(i, a - 1, o);
24
- if (!Number.isFinite(s.getTime())) return "Unknown date";
25
- let c = (/* @__PURE__ */ new Date()).getFullYear() !== i;
26
- return s.toLocaleDateString(void 0, c ? {
27
- weekday: "short",
28
- month: "short",
29
- day: "numeric",
30
- year: "numeric"
31
- } : {
32
- weekday: "short",
33
- month: "short",
34
- day: "numeric"
35
- });
36
- }, C = (e) => {
37
- let t = e.data?.link?.trim();
38
- if (t) return t;
39
- let n = e.platform?.webpush;
40
- if (!n || typeof n != "object" || Array.isArray(n)) return "";
41
- let r = n.fcmOptions;
42
- if (!r || typeof r != "object" || Array.isArray(r)) return "";
43
- let i = r.link;
44
- return typeof i == "string" ? i.trim() : "";
45
- }, w = (e) => e.data?.linkMode === "merge_current_search" ? "merge_current_search" : "navigate", T = (e) => {
46
- let t = C(e);
47
- return t ? {
48
- link: t,
49
- mode: w(e)
50
- } : null;
51
- }, E = (e) => e ? e.mode === "merge_current_search" ? "Open" : e.link : "", D = (e) => {
52
- window.history.pushState(window.history.state, "", e), window.dispatchEvent(new PopStateEvent("popstate", { state: window.history.state }));
53
- }, O = (e) => {
54
- if (e.mode === "merge_current_search") {
55
- let t = new URL(window.location.href), n = new URL(e.link, t);
56
- n.searchParams.forEach((e, n) => {
57
- t.searchParams.set(n, e);
58
- }), n.hash && (t.hash = n.hash), D(`${t.pathname}${t.search}${t.hash}`);
59
- return;
60
- }
61
- window.location.href = e.link;
62
- }, k = (e) => {
63
- let t = [], n = null;
64
- for (let r of e) {
65
- let e = x(r.createdAt);
66
- e !== n && (n = e, t.push({
67
- key: e,
68
- label: S(e),
69
- items: []
70
- })), t[t.length - 1].items.push(r);
2
+ import { useEffect as t, useMemo as n, useState as r } from "react";
3
+ import { Loader2 as i } from "lucide-react";
4
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
+ //#region src/components/Notifications/NotificationsSettings.tsx
6
+ var s = [
7
+ {
8
+ value: "off",
9
+ label: "Off"
10
+ },
11
+ {
12
+ value: "daily",
13
+ label: "Daily"
14
+ },
15
+ {
16
+ value: "weekly",
17
+ label: "Weekly"
71
18
  }
72
- return t;
73
- }, A = () => typeof window > "u" || !("Notification" in window) ? "unsupported" : window.Notification.permission, j = c(null);
74
- function M({ open: s, onOpenChange: c, className: p, limit: g = 50, defaultUnreadOnly: b = !1, realtimeContext: x }) {
75
- let S = u(x ?? j), [C, w] = m([]), [T, E] = m(0), [D, O] = m(0), [M, F] = m(!1), [I, L] = m(null), [R, z] = m(b), [B, V] = m(() => A()), [H, U] = m(!1), W = S?.notifications ?? C, G = S?.unreadCount ?? T, K = S?.unseenCount ?? D, ee = S?.loading ?? M, q = S?.error ? S.error instanceof Error ? S.error.message : String(S.error) : I, J = f(() => W.slice(0, g), [g, W]), Y = f(() => J.filter((e) => !e.readAt), [J]), X = f(() => J.filter((e) => !!e.readAt), [J]), Z = f(() => k(Y), [Y]), te = f(() => k(X), [X]), Q = l(async ({ unreadOnly: e, markSeen: t }) => {
76
- F(!0), L(null);
19
+ ], c = (e) => {
20
+ let t = e?.digestFrequency;
21
+ return {
22
+ digestFrequency: t === "off" || t === "daily" || t === "weekly" ? t : "weekly",
23
+ topicPreferences: Array.isArray(e?.topicPreferences) ? e.topicPreferences.map((e) => ({
24
+ topic: typeof e.topic == "string" ? e.topic.trim() : "",
25
+ inApp: e.inApp === !0,
26
+ emailDigest: e.emailDigest === !0,
27
+ push: e.push === !0
28
+ })).filter((e) => e.topic.length > 0) : [],
29
+ ...typeof e?.lastDigestSentAt == "string" ? { lastDigestSentAt: e.lastDigestSentAt } : {}
30
+ };
31
+ }, l = (e) => {
32
+ if (!Array.isArray(e)) return [];
33
+ let t = /* @__PURE__ */ new Set();
34
+ return e.map((e) => ({
35
+ topic: typeof e.topic == "string" ? e.topic.trim() : "",
36
+ title: typeof e.title == "string" ? e.title.trim() : "",
37
+ description: typeof e.description == "string" ? e.description.trim() : void 0
38
+ })).filter((e) => e.topic.length > 0).filter((e) => !t.has(e.topic) && (t.add(e.topic), !0));
39
+ }, u = (e, t) => {
40
+ let n = {
41
+ topic: "",
42
+ inApp: !0,
43
+ emailDigest: !0,
44
+ push: !1
45
+ }, r = new Map(e.topicPreferences.map((e) => [e.topic, e]));
46
+ return {
47
+ ...e,
48
+ topicPreferences: t.map((e) => {
49
+ let t = r.get(e.topic);
50
+ return t ? {
51
+ topic: e.topic,
52
+ inApp: t.inApp === !0,
53
+ emailDigest: t.emailDigest === !0,
54
+ push: t.push === !0
55
+ } : {
56
+ ...n,
57
+ topic: e.topic
58
+ };
59
+ })
60
+ };
61
+ };
62
+ function d({ className: d, topics: f }) {
63
+ let [p, m] = r(!0), [h, g] = r(!1), [_, v] = r(null), [y, b] = r(() => c({
64
+ digestFrequency: "weekly",
65
+ topicPreferences: []
66
+ })), x = n(() => l(f), [f]), S = async () => {
67
+ m(!0), v(null);
77
68
  try {
78
- let n = await fetch("/api/rb/notifications", {
79
- method: "POST",
80
- headers: { "Content-Type": "application/json" },
81
- credentials: "include",
82
- body: JSON.stringify({
83
- limit: g,
84
- unreadOnly: e,
85
- markSeen: t
86
- })
87
- }), r = await n.json().catch(() => null);
88
- if (!n.ok || !r?.ok) {
89
- L(r?.error || "Unable to load notifications.");
90
- return;
91
- }
92
- let i = Array.isArray(r.notifications) ? r.notifications : [];
93
- w(i), E(Number.isFinite(r.unreadCount) ? Math.max(0, Math.floor(r.unreadCount ?? 0)) : 0), O(Number.isFinite(r.unseenCount) ? Math.max(0, Math.floor(r.unseenCount ?? 0)) : 0);
94
- } catch {
95
- L("Unable to load notifications.");
96
- } finally {
97
- F(!1);
98
- }
99
- }, [g]);
100
- d(() => {
101
- if (s) {
102
- if (S) {
103
- (async () => {
104
- try {
105
- await fetch("/api/rb/notifications", {
106
- method: "POST",
107
- headers: { "Content-Type": "application/json" },
108
- credentials: "include",
109
- keepalive: !0,
110
- body: JSON.stringify({
111
- limit: 1,
112
- markSeen: !0
113
- })
114
- });
115
- } catch {
116
- return;
117
- }
118
- })();
69
+ let e = await fetch("/api/rb/notifications/settings", {
70
+ method: "GET",
71
+ credentials: "include"
72
+ }), t = await e.json().catch(() => null);
73
+ if (!e.ok || !t?.ok) {
74
+ v(t?.error || "Unable to load notification settings.");
119
75
  return;
120
76
  }
121
- Q({
122
- unreadOnly: R,
123
- markSeen: !0
124
- });
125
- }
126
- }, [
127
- s,
128
- S,
129
- Q,
130
- R
131
- ]), d(() => {
132
- s && (S || Q({
133
- unreadOnly: R,
134
- markSeen: !1
135
- }));
136
- }, [
137
- s,
138
- S,
139
- Q,
140
- R
141
- ]), d(() => {
142
- if (!s || (V(A()), typeof navigator > "u" || !navigator.permissions?.query)) return;
143
- let e = null, t = !1, n = () => {
144
- V(A());
145
- };
146
- try {
147
- navigator.permissions.query({ name: "notifications" }).then((r) => {
148
- t || (e = r, n(), r.addEventListener("change", n));
149
- }).catch(() => {});
150
- } catch {
151
- return;
152
- }
153
- return () => {
154
- t = !0, e?.removeEventListener("change", n);
155
- };
156
- }, [s]);
157
- let ne = async () => {
158
- if (typeof window > "u" || !("Notification" in window)) {
159
- V("unsupported");
160
- return;
161
- }
162
- U(!0);
163
- try {
164
- let e = await window.Notification.requestPermission();
165
- V(e);
77
+ let n = c(t.settings);
78
+ b(x.length > 0 ? u(n, x) : n);
166
79
  } catch {
167
- V(A());
80
+ v("Unable to load notification settings.");
168
81
  } finally {
169
- U(!1);
82
+ m(!1);
170
83
  }
171
- }, re = async (e) => {
84
+ }, C = async (e) => {
85
+ g(!0), v(null);
172
86
  try {
173
- let t = await fetch(`/api/rb/notifications/${encodeURIComponent(e)}/read`, {
174
- method: "POST",
87
+ let t = await fetch("/api/rb/notifications/settings", {
88
+ method: "PUT",
175
89
  headers: { "Content-Type": "application/json" },
176
90
  credentials: "include",
177
- keepalive: !0,
178
- body: "{}"
179
- }), n = await t.json().catch(() => null);
180
- if (!t.ok || !n?.ok) return;
181
- let r = (/* @__PURE__ */ new Date()).toISOString();
182
- if (S) return;
183
- w((t) => {
184
- let n = t.find((t) => t.id === e);
185
- return n && !n.readAt && E((e) => Math.max(0, e - 1)), n && !n.seenAt && O((e) => Math.max(0, e - 1)), t.map((t) => t.id === e && !t.readAt ? {
186
- ...t,
187
- readAt: r,
188
- ...t.seenAt ? {} : { seenAt: r }
189
- } : t);
190
- });
191
- } catch {
192
- return;
193
- }
194
- }, ie = async (e) => {
195
- try {
196
- let t = await fetch(`/api/rb/notifications/${encodeURIComponent(e)}/archive`, {
197
- method: "POST",
198
- headers: { "Content-Type": "application/json" },
199
- credentials: "include",
200
- body: "{}"
91
+ body: JSON.stringify({
92
+ digestFrequency: e.digestFrequency,
93
+ topicPreferences: e.topicPreferences
94
+ })
201
95
  }), n = await t.json().catch(() => null);
202
- if (!t.ok || !n?.ok || S) return;
203
- w((t) => {
204
- let n = t.find((t) => t.id === e);
205
- return n && !n.readAt && E((e) => Math.max(0, e - 1)), n && !n.seenAt && O((e) => Math.max(0, e - 1)), t.filter((t) => t.id !== e);
206
- });
96
+ if (!t.ok || !n?.ok) {
97
+ v(n?.error || "Unable to save notification settings.");
98
+ return;
99
+ }
100
+ let r = c(n.settings);
101
+ b(x.length > 0 ? u(r, x) : r);
207
102
  } catch {
208
- return;
103
+ v("Unable to save notification settings.");
104
+ } finally {
105
+ g(!1);
209
106
  }
210
- }, $ = () => {
211
- c(!1);
212
107
  };
213
- return /* @__PURE__ */ v(a, {
214
- open: s,
215
- onOpenChange: (e) => {
216
- if (e) {
217
- c(!0);
218
- return;
219
- }
220
- $();
221
- },
222
- children: /* @__PURE__ */ y(i, { children: [/* @__PURE__ */ v(t, {
223
- className: "fixed inset-0 z-50 bg-black/50",
224
- onClick: $
225
- }), /* @__PURE__ */ y(r, {
226
- className: e("fixed right-0 top-0 z-50 flex h-full w-full max-w-md flex-col border-l bg-background shadow-xl outline-none", p),
227
- children: [/* @__PURE__ */ y("header", {
228
- className: "flex items-center justify-between gap-2 border-b px-4 py-3",
229
- children: [/* @__PURE__ */ y("div", {
230
- className: "flex min-w-0 flex-col",
231
- children: [/* @__PURE__ */ v(o, {
232
- className: "text-sm font-semibold",
233
- children: "Notifications"
234
- }), /* @__PURE__ */ v("span", {
235
- className: "text-xs text-muted-foreground",
236
- children: G > 0 ? `${G} unread` : K > 0 ? `${K} new` : "All caught up"
237
- })]
238
- }), /* @__PURE__ */ y("div", {
239
- className: "flex items-center gap-2",
240
- children: [/* @__PURE__ */ v("button", {
241
- type: "button",
242
- onClick: () => z((e) => !e),
243
- className: e("rounded-md border px-2 py-1 text-xs", R ? "bg-accent text-foreground" : "bg-background text-muted-foreground hover:bg-accent"),
244
- children: R ? "Unread" : "All"
245
- }), /* @__PURE__ */ v(n, {
246
- type: "button",
247
- "aria-label": "Close notifications",
248
- className: "inline-flex h-8 w-8 items-center justify-center rounded-md hover:bg-accent",
249
- onClick: $,
250
- children: /* @__PURE__ */ v(_, { className: "h-4 w-4" })
251
- })]
252
- })]
253
- }), /* @__PURE__ */ y("div", {
254
- className: "flex-1 overflow-y-auto px-4 pb-3",
255
- children: [/* @__PURE__ */ v(N, {
256
- permission: B,
257
- requesting: H,
258
- onEnable: ne
259
- }), ee ? /* @__PURE__ */ v("div", {
260
- className: "flex items-center justify-center py-10 text-muted-foreground",
261
- children: /* @__PURE__ */ v(h, { className: "h-4 w-4 animate-spin" })
262
- }) : q ? /* @__PURE__ */ v("div", {
263
- className: "py-10 text-center text-sm text-muted-foreground",
264
- children: q
265
- }) : J.length === 0 ? /* @__PURE__ */ v("div", {
266
- className: "py-10 text-center text-sm text-muted-foreground",
267
- children: "No notifications."
268
- }) : /* @__PURE__ */ y("div", {
269
- className: "flex flex-col gap-4",
270
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
271
- className: "sticky top-0 z-20 -mx-4 flex h-8 items-center border-b bg-background px-4 text-xs font-semibold text-muted-foreground",
272
- children: "Unread notifications"
273
- }), Z.length === 0 ? /* @__PURE__ */ v("div", {
274
- className: "py-6 text-center text-sm text-muted-foreground",
275
- children: "No unread notifications."
276
- }) : Z.map((e) => /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
277
- className: "sticky top-8 z-10 -mx-4 flex h-7 items-center bg-background px-4 text-[11px] font-semibold text-muted-foreground",
278
- children: e.label
279
- }), /* @__PURE__ */ v("div", {
280
- className: "-mx-4 flex flex-col divide-y divide-border",
281
- children: e.items.map((e) => /* @__PURE__ */ v(P, {
282
- notification: e,
283
- onMarkRead: re,
284
- onArchive: ie,
285
- onAction: $
286
- }, e.id))
287
- })] }, `unread:${e.key}`))] }), R ? null : /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
288
- className: "sticky top-0 z-20 -mx-4 flex h-8 items-center border-b bg-background px-4 text-xs font-semibold text-muted-foreground",
289
- children: "Previous notifications"
290
- }), te.length === 0 ? /* @__PURE__ */ v("div", {
291
- className: "py-6 text-center text-sm text-muted-foreground",
292
- children: "No previous notifications."
293
- }) : te.map((e) => /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
294
- className: "sticky top-8 z-10 -mx-4 flex h-7 items-center bg-background px-4 text-[11px] font-semibold text-muted-foreground",
108
+ t(() => {
109
+ S();
110
+ }, []), t(() => {
111
+ x.length !== 0 && b((e) => u(e, x));
112
+ }, [x]);
113
+ let w = (e, t) => {
114
+ let n = y.topicPreferences.some((t) => t.topic === e) ? y.topicPreferences.map((n) => n.topic === e ? t(n) : n) : [...y.topicPreferences, t({
115
+ topic: e,
116
+ inApp: !0,
117
+ emailDigest: !0,
118
+ push: !1
119
+ })], r = c({
120
+ ...y,
121
+ topicPreferences: n
122
+ });
123
+ b(r), C(r);
124
+ };
125
+ return p ? /* @__PURE__ */ a("div", {
126
+ className: e("flex items-center justify-center py-10 text-muted-foreground", d),
127
+ children: /* @__PURE__ */ a(i, { className: "h-4 w-4 animate-spin" })
128
+ }) : /* @__PURE__ */ o("div", {
129
+ className: e("space-y-4", d),
130
+ children: [/* @__PURE__ */ a("div", {
131
+ className: "rounded-md border bg-background p-4",
132
+ children: /* @__PURE__ */ o("div", {
133
+ className: "flex items-start justify-between gap-3",
134
+ children: [/* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("div", {
135
+ className: "text-sm font-semibold",
136
+ children: "Email digest"
137
+ }), /* @__PURE__ */ a("div", {
138
+ className: "mt-1 text-xs text-muted-foreground",
139
+ children: "Choose how often we email you a summary."
140
+ })] }), /* @__PURE__ */ a("select", {
141
+ value: y.digestFrequency,
142
+ onChange: (e) => {
143
+ let t = e.target.value, n = c({
144
+ ...y,
145
+ digestFrequency: t
146
+ });
147
+ b(n), C(n);
148
+ },
149
+ className: "h-9 rounded-md border bg-background px-2 text-sm",
150
+ children: s.map((e) => /* @__PURE__ */ a("option", {
151
+ value: e.value,
295
152
  children: e.label
296
- }), /* @__PURE__ */ v("div", {
297
- className: "-mx-4 flex flex-col divide-y divide-border",
298
- children: e.items.map((e) => /* @__PURE__ */ v(P, {
299
- notification: e,
300
- onMarkRead: re,
301
- onArchive: ie,
302
- onAction: $
303
- }, e.id))
304
- })] }, `previous:${e.key}`))] })]
153
+ }, e.value))
305
154
  })]
306
- })]
307
- })] })
308
- });
309
- }
310
- function N(e) {
311
- let t = s(13), { permission: n, requesting: r, onEnable: i } = e;
312
- if (n === "granted") return null;
313
- if (n === "unsupported") {
314
- let e;
315
- return t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ v("div", {
316
- className: "mt-3 rounded-md border bg-muted/40 p-3 text-sm text-muted-foreground",
317
- children: "Browser notifications are not supported by this browser."
318
- }), t[0] = e) : e = t[0], e;
319
- }
320
- let a = n === "denied", o = a ? "Browser notifications are blocked." : "Browser notifications are not enabled.", c;
321
- t[1] === o ? c = t[2] : (c = /* @__PURE__ */ v("div", {
322
- className: "text-sm font-medium",
323
- children: o
324
- }), t[1] = o, t[2] = c);
325
- let l = a ? "Enable notifications for this site in your browser settings, then click again." : "Enable browser notifications to receive important alerts.", u;
326
- t[3] === l ? u = t[4] : (u = /* @__PURE__ */ v("div", {
327
- className: "mt-1 text-xs text-muted-foreground",
328
- children: l
329
- }), t[3] = l, t[4] = u);
330
- let d = r ? "Enabling..." : "Enable browser notifications", f;
331
- t[5] !== i || t[6] !== r || t[7] !== d ? (f = /* @__PURE__ */ v("button", {
332
- type: "button",
333
- className: "mt-3 inline-flex h-8 items-center rounded-md border bg-background px-2.5 text-xs font-medium hover:bg-accent disabled:pointer-events-none disabled:opacity-50",
334
- disabled: r,
335
- onClick: i,
336
- children: d
337
- }), t[5] = i, t[6] = r, t[7] = d, t[8] = f) : f = t[8];
338
- let p;
339
- return t[9] !== c || t[10] !== u || t[11] !== f ? (p = /* @__PURE__ */ y("div", {
340
- className: "mt-3 rounded-md border bg-muted/40 p-3",
341
- children: [
342
- c,
343
- u,
344
- f
345
- ]
346
- }), t[9] = c, t[10] = u, t[11] = f, t[12] = p) : p = t[12], p;
347
- }
348
- function P(t) {
349
- let n = s(49), { notification: r, onMarkRead: i, onArchive: a, onAction: o } = t, [c, l] = m(!1), u = p(null), f = p(null), h = !r.readAt, _, x;
350
- n[0] === r ? (_ = n[1], x = n[2]) : (_ = T(r), x = E(_), n[0] = r, n[1] = _, n[2] = x);
351
- let S = x, C;
352
- if (n[3] !== r.createdAt) {
353
- bb0: {
354
- let e = new Date(b(r.createdAt));
355
- if (!Number.isFinite(e.getTime())) {
356
- C = "";
357
- break bb0;
358
- }
359
- C = e.toLocaleString();
360
- }
361
- n[3] = r.createdAt, n[4] = C;
362
- } else C = n[4];
363
- let w = C, D, k;
364
- n[5] === c ? (D = n[6], k = n[7]) : (D = () => {
365
- if (!c) return;
366
- let e = (e) => {
367
- let t = e.target;
368
- t instanceof Node && (u.current?.contains(t) || f.current?.contains(t) || l(!1));
369
- }, t = (e) => {
370
- e.key === "Escape" && (l(!1), f.current?.focus());
371
- };
372
- return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
373
- document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
374
- };
375
- }, k = [c], n[5] = c, n[6] = D, n[7] = k), d(D, k);
376
- let A = h ? "bg-primary/5" : "bg-background", j;
377
- n[8] === A ? j = n[9] : (j = e("group flex w-full gap-3 px-4 py-3 hover:bg-accent/40", A), n[8] = A, n[9] = j);
378
- let M;
379
- n[10] !== _ || n[11] !== h || n[12] !== r.id || n[13] !== o || n[14] !== i ? (M = () => {
380
- h && i(r.id), _ && (o(), O(_));
381
- }, n[10] = _, n[11] = h, n[12] = r.id, n[13] = o, n[14] = i, n[15] = M) : M = n[15];
382
- let N;
383
- n[16] === r.title ? N = n[17] : (N = /* @__PURE__ */ v("div", {
384
- className: "truncate text-sm font-semibold",
385
- children: r.title
386
- }), n[16] = r.title, n[17] = N);
387
- let P;
388
- n[18] === r.body ? P = n[19] : (P = r.body ? /* @__PURE__ */ v("div", {
389
- className: "mt-0.5 line-clamp-2 text-xs text-muted-foreground",
390
- children: r.body
391
- }) : null, n[18] = r.body, n[19] = P);
392
- let I;
393
- n[20] !== N || n[21] !== P ? (I = /* @__PURE__ */ y("div", {
394
- className: "min-w-0",
395
- children: [N, P]
396
- }), n[20] = N, n[21] = P, n[22] = I) : I = n[22];
397
- let L;
398
- n[23] === S ? L = n[24] : (L = S ? /* @__PURE__ */ v("div", {
399
- className: "mt-2 truncate text-xs text-primary",
400
- children: S
401
- }) : null, n[23] = S, n[24] = L);
402
- let R;
403
- n[25] === w ? R = n[26] : (R = w ? /* @__PURE__ */ v("div", {
404
- className: "mt-2 text-[11px] text-muted-foreground",
405
- children: w
406
- }) : null, n[25] = w, n[26] = R);
407
- let z;
408
- n[27] !== I || n[28] !== L || n[29] !== R || n[30] !== M ? (z = /* @__PURE__ */ y("button", {
409
- type: "button",
410
- className: "min-w-0 flex-1 text-left",
411
- onClick: M,
412
- children: [
413
- I,
414
- L,
415
- R
416
- ]
417
- }), n[27] = I, n[28] = L, n[29] = R, n[30] = M, n[31] = z) : z = n[31];
418
- let B, V;
419
- n[32] === Symbol.for("react.memo_cache_sentinel") ? (B = () => {
420
- l(F);
421
- }, V = /* @__PURE__ */ v(g, { className: "h-4 w-4" }), n[32] = B, n[33] = V) : (B = n[32], V = n[33]);
422
- let H;
423
- n[34] === c ? H = n[35] : (H = /* @__PURE__ */ v("button", {
424
- ref: f,
425
- type: "button",
426
- className: "inline-flex h-8 w-8 items-center justify-center rounded-md hover:bg-accent",
427
- "aria-label": "Notification options",
428
- "aria-haspopup": "menu",
429
- "aria-expanded": c,
430
- onClick: B,
431
- children: V
432
- }), n[34] = c, n[35] = H);
433
- let U;
434
- n[36] !== h || n[37] !== c || n[38] !== r.id || n[39] !== a || n[40] !== i ? (U = c ? /* @__PURE__ */ y("div", {
435
- ref: u,
436
- role: "menu",
437
- className: e("absolute right-0 top-full z-50 mt-1 min-w-[10rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md", "animate-in fade-in-0 zoom-in-95"),
438
- children: [/* @__PURE__ */ v("button", {
439
- type: "button",
440
- role: "menuitem",
441
- className: "relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm outline-none transition-colors hover:bg-accent focus:bg-accent focus:text-accent-foreground",
442
- onClick: () => {
443
- l(!1), a(r.id);
444
- },
445
- children: "Archive"
446
- }), /* @__PURE__ */ v("button", {
447
- type: "button",
448
- role: "menuitem",
449
- className: "relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm outline-none transition-colors hover:bg-accent focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50",
450
- disabled: !h,
451
- onClick: () => {
452
- l(!1), i(r.id);
453
- },
454
- children: "Mark as read"
155
+ })
156
+ }), /* @__PURE__ */ o("div", {
157
+ className: "rounded-md border bg-background p-4",
158
+ children: [
159
+ /* @__PURE__ */ a("div", {
160
+ className: "flex items-start justify-between gap-3",
161
+ children: /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("div", {
162
+ className: "text-sm font-semibold",
163
+ children: "Topics"
164
+ }), /* @__PURE__ */ a("div", {
165
+ className: "mt-1 text-xs text-muted-foreground",
166
+ children: "Choose where you receive each topic."
167
+ })] })
168
+ }),
169
+ x.length === 0 ? /* @__PURE__ */ a("div", {
170
+ className: "mt-4 text-sm text-muted-foreground",
171
+ children: "No topics configured."
172
+ }) : /* @__PURE__ */ a("div", {
173
+ className: "mt-4 overflow-x-auto",
174
+ children: /* @__PURE__ */ o("table", {
175
+ className: "w-full text-sm",
176
+ children: [/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ o("tr", {
177
+ className: "text-left text-xs text-muted-foreground",
178
+ children: [
179
+ /* @__PURE__ */ a("th", {
180
+ className: "py-2 pr-4 font-medium",
181
+ children: "Topic"
182
+ }),
183
+ /* @__PURE__ */ a("th", {
184
+ className: "py-2 pr-4 font-medium",
185
+ children: "In-app"
186
+ }),
187
+ /* @__PURE__ */ a("th", {
188
+ className: "py-2 pr-4 font-medium",
189
+ children: "Email digest"
190
+ }),
191
+ /* @__PURE__ */ a("th", {
192
+ className: "py-2 pr-4 font-medium",
193
+ children: "Push"
194
+ })
195
+ ]
196
+ }) }), /* @__PURE__ */ a("tbody", { children: y.topicPreferences.map((e) => {
197
+ let t = x.find((t) => t.topic === e.topic);
198
+ return /* @__PURE__ */ o("tr", {
199
+ className: "border-t align-top",
200
+ children: [
201
+ /* @__PURE__ */ a("td", {
202
+ className: "py-3 pr-4",
203
+ children: /* @__PURE__ */ o("div", {
204
+ className: "flex flex-col gap-1",
205
+ children: [
206
+ /* @__PURE__ */ a("span", {
207
+ className: "font-medium",
208
+ children: t?.title || e.topic
209
+ }),
210
+ t?.description ? /* @__PURE__ */ a("span", {
211
+ className: "text-xs text-muted-foreground",
212
+ children: t.description
213
+ }) : null,
214
+ /* @__PURE__ */ a("span", {
215
+ className: "text-[11px] text-muted-foreground",
216
+ children: e.topic
217
+ })
218
+ ]
219
+ })
220
+ }),
221
+ /* @__PURE__ */ a("td", {
222
+ className: "py-3 pr-4",
223
+ children: /* @__PURE__ */ a("input", {
224
+ type: "checkbox",
225
+ checked: e.inApp,
226
+ onChange: (t) => w(e.topic, (e) => ({
227
+ ...e,
228
+ inApp: t.target.checked
229
+ }))
230
+ })
231
+ }),
232
+ /* @__PURE__ */ a("td", {
233
+ className: "py-3 pr-4",
234
+ children: /* @__PURE__ */ a("input", {
235
+ type: "checkbox",
236
+ checked: e.emailDigest,
237
+ onChange: (t) => w(e.topic, (e) => ({
238
+ ...e,
239
+ emailDigest: t.target.checked
240
+ }))
241
+ })
242
+ }),
243
+ /* @__PURE__ */ a("td", {
244
+ className: "py-3 pr-4",
245
+ children: /* @__PURE__ */ a("input", {
246
+ type: "checkbox",
247
+ checked: e.push,
248
+ disabled: !0,
249
+ className: "opacity-50",
250
+ "aria-label": "Push notifications (coming soon)"
251
+ })
252
+ })
253
+ ]
254
+ }, e.topic);
255
+ }) })]
256
+ })
257
+ }),
258
+ _ ? /* @__PURE__ */ a("div", {
259
+ className: "mt-3 text-sm text-destructive",
260
+ children: _
261
+ }) : h ? /* @__PURE__ */ a("div", {
262
+ className: "mt-3 text-xs text-muted-foreground",
263
+ children: "Saving…"
264
+ }) : null
265
+ ]
455
266
  })]
456
- }) : null, n[36] = h, n[37] = c, n[38] = r.id, n[39] = a, n[40] = i, n[41] = U) : U = n[41];
457
- let W;
458
- n[42] !== H || n[43] !== U ? (W = /* @__PURE__ */ y("div", {
459
- className: "relative flex items-start",
460
- children: [H, U]
461
- }), n[42] = H, n[43] = U, n[44] = W) : W = n[44];
462
- let G;
463
- return n[45] !== z || n[46] !== W || n[47] !== j ? (G = /* @__PURE__ */ y("div", {
464
- className: j,
465
- children: [z, W]
466
- }), n[45] = z, n[46] = W, n[47] = j, n[48] = G) : G = n[48], G;
467
- }
468
- function F(e) {
469
- return !e;
267
+ });
470
268
  }
471
269
  //#endregion
472
- export { M as NotificationsDrawer };
270
+ export { d as NotificationsSettings };
473
271
 
474
272
  //# sourceMappingURL=index421.js.map