@protonradio/proton-ui 0.11.33-beta.9 → 0.11.34

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 (367) hide show
  1. package/README.md +1 -1
  2. package/dist/components/Checkbox/CheckboxInput/CheckboxInput.cjs.js +1 -1
  3. package/dist/components/Checkbox/CheckboxInput/CheckboxInput.cjs.js.map +1 -1
  4. package/dist/components/Checkbox/CheckboxInput/CheckboxInput.es.js +49 -53
  5. package/dist/components/Checkbox/CheckboxInput/CheckboxInput.es.js.map +1 -1
  6. package/dist/components/Checkbox/CheckboxRadioGroup/CheckboxRadioGroup.cjs.js +1 -1
  7. package/dist/components/Checkbox/CheckboxRadioGroup/CheckboxRadioGroup.cjs.js.map +1 -1
  8. package/dist/components/Checkbox/CheckboxRadioGroup/CheckboxRadioGroup.es.js +31 -41
  9. package/dist/components/Checkbox/CheckboxRadioGroup/CheckboxRadioGroup.es.js.map +1 -1
  10. package/dist/components/Dialog/Dialog.cjs.js +2 -0
  11. package/dist/components/Dialog/Dialog.cjs.js.map +1 -0
  12. package/dist/components/Dialog/Dialog.es.js +15 -0
  13. package/dist/components/Dialog/Dialog.es.js.map +1 -0
  14. package/dist/components/Elevation/Elevation.cjs.js +1 -1
  15. package/dist/components/Elevation/Elevation.cjs.js.map +1 -1
  16. package/dist/components/Elevation/Elevation.es.js +10 -11
  17. package/dist/components/Elevation/Elevation.es.js.map +1 -1
  18. package/dist/components/Icon/IconComponents/AlertCircle.cjs.js +1 -1
  19. package/dist/components/Icon/IconComponents/AlertCircle.cjs.js.map +1 -1
  20. package/dist/components/Icon/IconComponents/AlertCircle.es.js +9 -9
  21. package/dist/components/Icon/IconComponents/AlertCircle.es.js.map +1 -1
  22. package/dist/components/Icon/IconComponents/AmazonMusicLogo.cjs.js +1 -1
  23. package/dist/components/Icon/IconComponents/AmazonMusicLogo.cjs.js.map +1 -1
  24. package/dist/components/Icon/IconComponents/AmazonMusicLogo.es.js +10 -10
  25. package/dist/components/Icon/IconComponents/AmazonMusicLogo.es.js.map +1 -1
  26. package/dist/components/Icon/IconComponents/AppleMusicLogo.cjs.js +1 -1
  27. package/dist/components/Icon/IconComponents/AppleMusicLogo.cjs.js.map +1 -1
  28. package/dist/components/Icon/IconComponents/AppleMusicLogo.es.js +9 -9
  29. package/dist/components/Icon/IconComponents/AppleMusicLogo.es.js.map +1 -1
  30. package/dist/components/Icon/IconComponents/ArrowLeft.cjs.js +1 -1
  31. package/dist/components/Icon/IconComponents/ArrowLeft.cjs.js.map +1 -1
  32. package/dist/components/Icon/IconComponents/ArrowLeft.es.js +11 -11
  33. package/dist/components/Icon/IconComponents/ArrowLeft.es.js.map +1 -1
  34. package/dist/components/Icon/IconComponents/BandcampLogo.cjs.js +1 -1
  35. package/dist/components/Icon/IconComponents/BandcampLogo.cjs.js.map +1 -1
  36. package/dist/components/Icon/IconComponents/BandcampLogo.es.js +15 -15
  37. package/dist/components/Icon/IconComponents/BandcampLogo.es.js.map +1 -1
  38. package/dist/components/Icon/IconComponents/BeatportLogo.cjs.js +1 -1
  39. package/dist/components/Icon/IconComponents/BeatportLogo.cjs.js.map +1 -1
  40. package/dist/components/Icon/IconComponents/BeatportLogo.es.js +14 -14
  41. package/dist/components/Icon/IconComponents/BeatportLogo.es.js.map +1 -1
  42. package/dist/components/Icon/IconComponents/Bell.cjs.js +1 -1
  43. package/dist/components/Icon/IconComponents/Bell.cjs.js.map +1 -1
  44. package/dist/components/Icon/IconComponents/Bell.es.js +7 -7
  45. package/dist/components/Icon/IconComponents/Bell.es.js.map +1 -1
  46. package/dist/components/Icon/IconComponents/CaretDown.cjs.js +1 -1
  47. package/dist/components/Icon/IconComponents/CaretDown.cjs.js.map +1 -1
  48. package/dist/components/Icon/IconComponents/CaretDown.es.js +13 -13
  49. package/dist/components/Icon/IconComponents/CaretDown.es.js.map +1 -1
  50. package/dist/components/Icon/IconComponents/CaretRight.cjs.js +1 -1
  51. package/dist/components/Icon/IconComponents/CaretRight.cjs.js.map +1 -1
  52. package/dist/components/Icon/IconComponents/CaretRight.es.js +14 -14
  53. package/dist/components/Icon/IconComponents/CaretRight.es.js.map +1 -1
  54. package/dist/components/Icon/IconComponents/Chart.cjs.js +1 -1
  55. package/dist/components/Icon/IconComponents/Chart.cjs.js.map +1 -1
  56. package/dist/components/Icon/IconComponents/Chart.es.js +14 -14
  57. package/dist/components/Icon/IconComponents/Chart.es.js.map +1 -1
  58. package/dist/components/Icon/IconComponents/CheckCircle.cjs.js +1 -1
  59. package/dist/components/Icon/IconComponents/CheckCircle.cjs.js.map +1 -1
  60. package/dist/components/Icon/IconComponents/CheckCircle.es.js +9 -9
  61. package/dist/components/Icon/IconComponents/CheckCircle.es.js.map +1 -1
  62. package/dist/components/Icon/IconComponents/ChevronDown.cjs.js +1 -1
  63. package/dist/components/Icon/IconComponents/ChevronDown.cjs.js.map +1 -1
  64. package/dist/components/Icon/IconComponents/ChevronDown.es.js +8 -12
  65. package/dist/components/Icon/IconComponents/ChevronDown.es.js.map +1 -1
  66. package/dist/components/Icon/IconComponents/ChevronLeft.cjs.js +1 -1
  67. package/dist/components/Icon/IconComponents/ChevronLeft.cjs.js.map +1 -1
  68. package/dist/components/Icon/IconComponents/ChevronLeft.es.js +8 -12
  69. package/dist/components/Icon/IconComponents/ChevronLeft.es.js.map +1 -1
  70. package/dist/components/Icon/IconComponents/ChevronRight.cjs.js +1 -1
  71. package/dist/components/Icon/IconComponents/ChevronRight.cjs.js.map +1 -1
  72. package/dist/components/Icon/IconComponents/ChevronRight.es.js +13 -13
  73. package/dist/components/Icon/IconComponents/ChevronRight.es.js.map +1 -1
  74. package/dist/components/Icon/IconComponents/ChevronSquareDown.cjs.js +1 -1
  75. package/dist/components/Icon/IconComponents/ChevronSquareDown.cjs.js.map +1 -1
  76. package/dist/components/Icon/IconComponents/ChevronSquareDown.es.js +17 -17
  77. package/dist/components/Icon/IconComponents/ChevronSquareDown.es.js.map +1 -1
  78. package/dist/components/Icon/IconComponents/ChevronUp.cjs.js +1 -1
  79. package/dist/components/Icon/IconComponents/ChevronUp.cjs.js.map +1 -1
  80. package/dist/components/Icon/IconComponents/ChevronUp.es.js +14 -14
  81. package/dist/components/Icon/IconComponents/ChevronUp.es.js.map +1 -1
  82. package/dist/components/Icon/IconComponents/Close.cjs.js +1 -1
  83. package/dist/components/Icon/IconComponents/Close.cjs.js.map +1 -1
  84. package/dist/components/Icon/IconComponents/Close.es.js +14 -14
  85. package/dist/components/Icon/IconComponents/Close.es.js.map +1 -1
  86. package/dist/components/Icon/IconComponents/Cog.cjs.js +1 -1
  87. package/dist/components/Icon/IconComponents/Cog.cjs.js.map +1 -1
  88. package/dist/components/Icon/IconComponents/Cog.es.js +11 -15
  89. package/dist/components/Icon/IconComponents/Cog.es.js.map +1 -1
  90. package/dist/components/Icon/IconComponents/Copy.cjs.js +1 -1
  91. package/dist/components/Icon/IconComponents/Copy.cjs.js.map +1 -1
  92. package/dist/components/Icon/IconComponents/Copy.es.js +11 -11
  93. package/dist/components/Icon/IconComponents/Copy.es.js.map +1 -1
  94. package/dist/components/Icon/IconComponents/DangerCircle.cjs.js +1 -1
  95. package/dist/components/Icon/IconComponents/DangerCircle.cjs.js.map +1 -1
  96. package/dist/components/Icon/IconComponents/DangerCircle.es.js +11 -11
  97. package/dist/components/Icon/IconComponents/DangerCircle.es.js.map +1 -1
  98. package/dist/components/Icon/IconComponents/Dashboard.cjs.js +1 -1
  99. package/dist/components/Icon/IconComponents/Dashboard.cjs.js.map +1 -1
  100. package/dist/components/Icon/IconComponents/Dashboard.es.js +11 -15
  101. package/dist/components/Icon/IconComponents/Dashboard.es.js.map +1 -1
  102. package/dist/components/Icon/IconComponents/DeezerLogo.cjs.js +1 -1
  103. package/dist/components/Icon/IconComponents/DeezerLogo.cjs.js.map +1 -1
  104. package/dist/components/Icon/IconComponents/DeezerLogo.es.js +10 -10
  105. package/dist/components/Icon/IconComponents/DeezerLogo.es.js.map +1 -1
  106. package/dist/components/Icon/IconComponents/Download.cjs.js +1 -1
  107. package/dist/components/Icon/IconComponents/Download.cjs.js.map +1 -1
  108. package/dist/components/Icon/IconComponents/Download.es.js +9 -13
  109. package/dist/components/Icon/IconComponents/Download.es.js.map +1 -1
  110. package/dist/components/Icon/IconComponents/DragHandle.cjs.js +1 -1
  111. package/dist/components/Icon/IconComponents/DragHandle.cjs.js.map +1 -1
  112. package/dist/components/Icon/IconComponents/DragHandle.es.js +6 -10
  113. package/dist/components/Icon/IconComponents/DragHandle.es.js.map +1 -1
  114. package/dist/components/Icon/IconComponents/Edit.cjs.js +1 -1
  115. package/dist/components/Icon/IconComponents/Edit.cjs.js.map +1 -1
  116. package/dist/components/Icon/IconComponents/Edit.es.js +9 -13
  117. package/dist/components/Icon/IconComponents/Edit.es.js.map +1 -1
  118. package/dist/components/Icon/IconComponents/Ellipsis.cjs.js +1 -1
  119. package/dist/components/Icon/IconComponents/Ellipsis.cjs.js.map +1 -1
  120. package/dist/components/Icon/IconComponents/Ellipsis.es.js +11 -15
  121. package/dist/components/Icon/IconComponents/Ellipsis.es.js.map +1 -1
  122. package/dist/components/Icon/IconComponents/EmailThick.cjs.js +1 -1
  123. package/dist/components/Icon/IconComponents/EmailThick.cjs.js.map +1 -1
  124. package/dist/components/Icon/IconComponents/EmailThick.es.js +11 -15
  125. package/dist/components/Icon/IconComponents/EmailThick.es.js.map +1 -1
  126. package/dist/components/Icon/IconComponents/EmailThin.cjs.js +1 -1
  127. package/dist/components/Icon/IconComponents/EmailThin.cjs.js.map +1 -1
  128. package/dist/components/Icon/IconComponents/EmailThin.es.js +11 -15
  129. package/dist/components/Icon/IconComponents/EmailThin.es.js.map +1 -1
  130. package/dist/components/Icon/IconComponents/ExternalLink.cjs.js +1 -1
  131. package/dist/components/Icon/IconComponents/ExternalLink.cjs.js.map +1 -1
  132. package/dist/components/Icon/IconComponents/ExternalLink.es.js +14 -18
  133. package/dist/components/Icon/IconComponents/ExternalLink.es.js.map +1 -1
  134. package/dist/components/Icon/IconComponents/FacebookLogo.cjs.js +1 -1
  135. package/dist/components/Icon/IconComponents/FacebookLogo.cjs.js.map +1 -1
  136. package/dist/components/Icon/IconComponents/FacebookLogo.es.js +10 -10
  137. package/dist/components/Icon/IconComponents/FacebookLogo.es.js.map +1 -1
  138. package/dist/components/Icon/IconComponents/Globe.cjs.js +1 -1
  139. package/dist/components/Icon/IconComponents/Globe.cjs.js.map +1 -1
  140. package/dist/components/Icon/IconComponents/Globe.es.js +7 -11
  141. package/dist/components/Icon/IconComponents/Globe.es.js.map +1 -1
  142. package/dist/components/Icon/IconComponents/Hamburger.cjs.js +1 -1
  143. package/dist/components/Icon/IconComponents/Hamburger.cjs.js.map +1 -1
  144. package/dist/components/Icon/IconComponents/Hamburger.es.js +13 -17
  145. package/dist/components/Icon/IconComponents/Hamburger.es.js.map +1 -1
  146. package/dist/components/Icon/IconComponents/Heartbeat.cjs.js +1 -1
  147. package/dist/components/Icon/IconComponents/Heartbeat.cjs.js.map +1 -1
  148. package/dist/components/Icon/IconComponents/Heartbeat.es.js +12 -16
  149. package/dist/components/Icon/IconComponents/Heartbeat.es.js.map +1 -1
  150. package/dist/components/Icon/IconComponents/Info.cjs.js +1 -1
  151. package/dist/components/Icon/IconComponents/Info.cjs.js.map +1 -1
  152. package/dist/components/Icon/IconComponents/Info.es.js +9 -9
  153. package/dist/components/Icon/IconComponents/Info.es.js.map +1 -1
  154. package/dist/components/Icon/IconComponents/InfoOutline.cjs.js +1 -1
  155. package/dist/components/Icon/IconComponents/InfoOutline.cjs.js.map +1 -1
  156. package/dist/components/Icon/IconComponents/InfoOutline.es.js +11 -15
  157. package/dist/components/Icon/IconComponents/InfoOutline.es.js.map +1 -1
  158. package/dist/components/Icon/IconComponents/InstagramLogo.cjs.js +1 -1
  159. package/dist/components/Icon/IconComponents/InstagramLogo.cjs.js.map +1 -1
  160. package/dist/components/Icon/IconComponents/InstagramLogo.es.js +10 -10
  161. package/dist/components/Icon/IconComponents/InstagramLogo.es.js.map +1 -1
  162. package/dist/components/Icon/IconComponents/IntercomLogo.cjs.js +1 -1
  163. package/dist/components/Icon/IconComponents/IntercomLogo.cjs.js.map +1 -1
  164. package/dist/components/Icon/IconComponents/IntercomLogo.es.js +10 -10
  165. package/dist/components/Icon/IconComponents/IntercomLogo.es.js.map +1 -1
  166. package/dist/components/Icon/IconComponents/Lightning.cjs.js +1 -1
  167. package/dist/components/Icon/IconComponents/Lightning.cjs.js.map +1 -1
  168. package/dist/components/Icon/IconComponents/Lightning.es.js +12 -16
  169. package/dist/components/Icon/IconComponents/Lightning.es.js.map +1 -1
  170. package/dist/components/Icon/IconComponents/Link.cjs.js +1 -1
  171. package/dist/components/Icon/IconComponents/Link.cjs.js.map +1 -1
  172. package/dist/components/Icon/IconComponents/Link.es.js +8 -12
  173. package/dist/components/Icon/IconComponents/Link.es.js.map +1 -1
  174. package/dist/components/Icon/IconComponents/MessengerLogo.cjs.js +1 -1
  175. package/dist/components/Icon/IconComponents/MessengerLogo.cjs.js.map +1 -1
  176. package/dist/components/Icon/IconComponents/MessengerLogo.es.js +10 -10
  177. package/dist/components/Icon/IconComponents/MessengerLogo.es.js.map +1 -1
  178. package/dist/components/Icon/IconComponents/MusicNote.cjs.js +1 -1
  179. package/dist/components/Icon/IconComponents/MusicNote.cjs.js.map +1 -1
  180. package/dist/components/Icon/IconComponents/MusicNote.es.js +11 -15
  181. package/dist/components/Icon/IconComponents/MusicNote.es.js.map +1 -1
  182. package/dist/components/Icon/IconComponents/Pause.cjs.js +1 -1
  183. package/dist/components/Icon/IconComponents/Pause.cjs.js.map +1 -1
  184. package/dist/components/Icon/IconComponents/Pause.es.js +13 -17
  185. package/dist/components/Icon/IconComponents/Pause.es.js.map +1 -1
  186. package/dist/components/Icon/IconComponents/Pencil.cjs.js +1 -1
  187. package/dist/components/Icon/IconComponents/Pencil.cjs.js.map +1 -1
  188. package/dist/components/Icon/IconComponents/Pencil.es.js +11 -15
  189. package/dist/components/Icon/IconComponents/Pencil.es.js.map +1 -1
  190. package/dist/components/Icon/IconComponents/PhoneThick.cjs.js +1 -1
  191. package/dist/components/Icon/IconComponents/PhoneThick.cjs.js.map +1 -1
  192. package/dist/components/Icon/IconComponents/PhoneThick.es.js +13 -17
  193. package/dist/components/Icon/IconComponents/PhoneThick.es.js.map +1 -1
  194. package/dist/components/Icon/IconComponents/PhoneThin.cjs.js +1 -1
  195. package/dist/components/Icon/IconComponents/PhoneThin.cjs.js.map +1 -1
  196. package/dist/components/Icon/IconComponents/PhoneThin.es.js +13 -17
  197. package/dist/components/Icon/IconComponents/PhoneThin.es.js.map +1 -1
  198. package/dist/components/Icon/IconComponents/Play.cjs.js +1 -1
  199. package/dist/components/Icon/IconComponents/Play.cjs.js.map +1 -1
  200. package/dist/components/Icon/IconComponents/Play.es.js +9 -13
  201. package/dist/components/Icon/IconComponents/Play.es.js.map +1 -1
  202. package/dist/components/Icon/IconComponents/ProtonLogo.cjs.js +1 -1
  203. package/dist/components/Icon/IconComponents/ProtonLogo.cjs.js.map +1 -1
  204. package/dist/components/Icon/IconComponents/ProtonLogo.es.js +10 -10
  205. package/dist/components/Icon/IconComponents/ProtonLogo.es.js.map +1 -1
  206. package/dist/components/Icon/IconComponents/Quote.cjs.js +1 -1
  207. package/dist/components/Icon/IconComponents/Quote.cjs.js.map +1 -1
  208. package/dist/components/Icon/IconComponents/Quote.es.js +14 -18
  209. package/dist/components/Icon/IconComponents/Quote.es.js.map +1 -1
  210. package/dist/components/Icon/IconComponents/Search.cjs.js +1 -1
  211. package/dist/components/Icon/IconComponents/Search.cjs.js.map +1 -1
  212. package/dist/components/Icon/IconComponents/Search.es.js +14 -14
  213. package/dist/components/Icon/IconComponents/Search.es.js.map +1 -1
  214. package/dist/components/Icon/IconComponents/Share.cjs.js +1 -1
  215. package/dist/components/Icon/IconComponents/Share.cjs.js.map +1 -1
  216. package/dist/components/Icon/IconComponents/Share.es.js +8 -12
  217. package/dist/components/Icon/IconComponents/Share.es.js.map +1 -1
  218. package/dist/components/Icon/IconComponents/SignOut.cjs.js +1 -1
  219. package/dist/components/Icon/IconComponents/SignOut.cjs.js.map +1 -1
  220. package/dist/components/Icon/IconComponents/SignOut.es.js +11 -15
  221. package/dist/components/Icon/IconComponents/SignOut.es.js.map +1 -1
  222. package/dist/components/Icon/IconComponents/SoundcloudLogo.cjs.js +1 -1
  223. package/dist/components/Icon/IconComponents/SoundcloudLogo.cjs.js.map +1 -1
  224. package/dist/components/Icon/IconComponents/SoundcloudLogo.es.js +10 -10
  225. package/dist/components/Icon/IconComponents/SoundcloudLogo.es.js.map +1 -1
  226. package/dist/components/Icon/IconComponents/SpotifyLogo.cjs.js +1 -1
  227. package/dist/components/Icon/IconComponents/SpotifyLogo.cjs.js.map +1 -1
  228. package/dist/components/Icon/IconComponents/SpotifyLogo.es.js +9 -9
  229. package/dist/components/Icon/IconComponents/SpotifyLogo.es.js.map +1 -1
  230. package/dist/components/Icon/IconComponents/Spy.cjs.js +1 -1
  231. package/dist/components/Icon/IconComponents/Spy.cjs.js.map +1 -1
  232. package/dist/components/Icon/IconComponents/Spy.es.js +9 -13
  233. package/dist/components/Icon/IconComponents/Spy.es.js.map +1 -1
  234. package/dist/components/Icon/IconComponents/SuccessCircle.cjs.js +1 -1
  235. package/dist/components/Icon/IconComponents/SuccessCircle.cjs.js.map +1 -1
  236. package/dist/components/Icon/IconComponents/SuccessCircle.es.js +9 -9
  237. package/dist/components/Icon/IconComponents/SuccessCircle.es.js.map +1 -1
  238. package/dist/components/Icon/IconComponents/TelegramLogo.cjs.js +1 -1
  239. package/dist/components/Icon/IconComponents/TelegramLogo.cjs.js.map +1 -1
  240. package/dist/components/Icon/IconComponents/TelegramLogo.es.js +14 -14
  241. package/dist/components/Icon/IconComponents/TelegramLogo.es.js.map +1 -1
  242. package/dist/components/Icon/IconComponents/TiktokLogo.cjs.js +1 -1
  243. package/dist/components/Icon/IconComponents/TiktokLogo.cjs.js.map +1 -1
  244. package/dist/components/Icon/IconComponents/TiktokLogo.es.js +10 -10
  245. package/dist/components/Icon/IconComponents/TiktokLogo.es.js.map +1 -1
  246. package/dist/components/Icon/IconComponents/Tracklist.cjs.js +1 -1
  247. package/dist/components/Icon/IconComponents/Tracklist.cjs.js.map +1 -1
  248. package/dist/components/Icon/IconComponents/Tracklist.es.js +12 -16
  249. package/dist/components/Icon/IconComponents/Tracklist.es.js.map +1 -1
  250. package/dist/components/Icon/IconComponents/TrashCan.cjs.js +1 -1
  251. package/dist/components/Icon/IconComponents/TrashCan.cjs.js.map +1 -1
  252. package/dist/components/Icon/IconComponents/TrashCan.es.js +9 -13
  253. package/dist/components/Icon/IconComponents/TrashCan.es.js.map +1 -1
  254. package/dist/components/Icon/IconComponents/TraxsourceLogo.cjs.js +1 -1
  255. package/dist/components/Icon/IconComponents/TraxsourceLogo.cjs.js.map +1 -1
  256. package/dist/components/Icon/IconComponents/TraxsourceLogo.es.js +14 -14
  257. package/dist/components/Icon/IconComponents/TraxsourceLogo.es.js.map +1 -1
  258. package/dist/components/Icon/IconComponents/User.cjs.js +1 -1
  259. package/dist/components/Icon/IconComponents/User.cjs.js.map +1 -1
  260. package/dist/components/Icon/IconComponents/User.es.js +9 -9
  261. package/dist/components/Icon/IconComponents/User.es.js.map +1 -1
  262. package/dist/components/Icon/IconComponents/Users.cjs.js +1 -1
  263. package/dist/components/Icon/IconComponents/Users.cjs.js.map +1 -1
  264. package/dist/components/Icon/IconComponents/Users.es.js +8 -12
  265. package/dist/components/Icon/IconComponents/Users.es.js.map +1 -1
  266. package/dist/components/Icon/IconComponents/WarningTriangle.cjs.js +1 -1
  267. package/dist/components/Icon/IconComponents/WarningTriangle.cjs.js.map +1 -1
  268. package/dist/components/Icon/IconComponents/WarningTriangle.es.js +14 -14
  269. package/dist/components/Icon/IconComponents/WarningTriangle.es.js.map +1 -1
  270. package/dist/components/Icon/IconComponents/WhatsappLogoThick.cjs.js +1 -1
  271. package/dist/components/Icon/IconComponents/WhatsappLogoThick.cjs.js.map +1 -1
  272. package/dist/components/Icon/IconComponents/WhatsappLogoThick.es.js +14 -14
  273. package/dist/components/Icon/IconComponents/WhatsappLogoThick.es.js.map +1 -1
  274. package/dist/components/Icon/IconComponents/WhatsappLogoThin.cjs.js +1 -1
  275. package/dist/components/Icon/IconComponents/WhatsappLogoThin.cjs.js.map +1 -1
  276. package/dist/components/Icon/IconComponents/WhatsappLogoThin.es.js +10 -10
  277. package/dist/components/Icon/IconComponents/WhatsappLogoThin.es.js.map +1 -1
  278. package/dist/components/Icon/IconComponents/XTwitterLogo.cjs.js +1 -1
  279. package/dist/components/Icon/IconComponents/XTwitterLogo.cjs.js.map +1 -1
  280. package/dist/components/Icon/IconComponents/XTwitterLogo.es.js +9 -9
  281. package/dist/components/Icon/IconComponents/XTwitterLogo.es.js.map +1 -1
  282. package/dist/components/Icon/IconComponents/YandexLogo.cjs.js +1 -1
  283. package/dist/components/Icon/IconComponents/YandexLogo.cjs.js.map +1 -1
  284. package/dist/components/Icon/IconComponents/YandexLogo.es.js +14 -14
  285. package/dist/components/Icon/IconComponents/YandexLogo.es.js.map +1 -1
  286. package/dist/components/Icon/IconComponents/YoutubeLogo.cjs.js +1 -1
  287. package/dist/components/Icon/IconComponents/YoutubeLogo.cjs.js.map +1 -1
  288. package/dist/components/Icon/IconComponents/YoutubeLogo.es.js +10 -10
  289. package/dist/components/Icon/IconComponents/YoutubeLogo.es.js.map +1 -1
  290. package/dist/components/Icon/IconProps.cjs.js +1 -1
  291. package/dist/components/Icon/IconProps.cjs.js.map +1 -1
  292. package/dist/components/Icon/IconProps.es.js +7 -11
  293. package/dist/components/Icon/IconProps.es.js.map +1 -1
  294. package/dist/components/Input/OTPInput/OTPInput.cjs.js +1 -1
  295. package/dist/components/Input/OTPInput/OTPInput.cjs.js.map +1 -1
  296. package/dist/components/Input/OTPInput/OTPInput.es.js +35 -35
  297. package/dist/components/Input/OTPInput/OTPInput.es.js.map +1 -1
  298. package/dist/components/Menu/PopoverMenu.cjs.js +1 -1
  299. package/dist/components/Menu/PopoverMenu.cjs.js.map +1 -1
  300. package/dist/components/Menu/PopoverMenu.es.js +17 -27
  301. package/dist/components/Menu/PopoverMenu.es.js.map +1 -1
  302. package/dist/components/Modal/Modal.cjs.js +1 -1
  303. package/dist/components/Modal/Modal.cjs.js.map +1 -1
  304. package/dist/components/Modal/Modal.es.js +11 -16
  305. package/dist/components/Modal/Modal.es.js.map +1 -1
  306. package/dist/components/Popover/Popover.cjs.js +1 -1
  307. package/dist/components/Popover/Popover.cjs.js.map +1 -1
  308. package/dist/components/Popover/Popover.es.js +23 -27
  309. package/dist/components/Popover/Popover.es.js.map +1 -1
  310. package/dist/components/Select/Select.cjs.js +1 -1
  311. package/dist/components/Select/Select.cjs.js.map +1 -1
  312. package/dist/components/Select/Select.es.js +119 -105
  313. package/dist/components/Select/Select.es.js.map +1 -1
  314. package/dist/components/Text/TextCountdown/TextCountdown.cjs.js +1 -1
  315. package/dist/components/Text/TextCountdown/TextCountdown.cjs.js.map +1 -1
  316. package/dist/components/Text/TextCountdown/TextCountdown.es.js +29 -26
  317. package/dist/components/Text/TextCountdown/TextCountdown.es.js.map +1 -1
  318. package/dist/components/Tooltip/ResponsiveTooltip.cjs.js +1 -1
  319. package/dist/components/Tooltip/ResponsiveTooltip.cjs.js.map +1 -1
  320. package/dist/components/Tooltip/ResponsiveTooltip.es.js +38 -39
  321. package/dist/components/Tooltip/ResponsiveTooltip.es.js.map +1 -1
  322. package/dist/components/Tooltip/Tooltip.cjs.js +1 -1
  323. package/dist/components/Tooltip/Tooltip.cjs.js.map +1 -1
  324. package/dist/components/Tooltip/Tooltip.es.js +54 -50
  325. package/dist/components/Tooltip/Tooltip.es.js.map +1 -1
  326. package/dist/dark.d.ts +2 -2
  327. package/dist/design/darkTheme/colors.cjs.js +1 -1
  328. package/dist/design/darkTheme/colors.cjs.js.map +1 -1
  329. package/dist/design/darkTheme/colors.es.js +1 -1
  330. package/dist/design/darkTheme/colors.es.js.map +1 -1
  331. package/dist/design/darkTheme/stylesheet.cjs.js +1 -1
  332. package/dist/design/darkTheme/stylesheet.cjs.js.map +1 -1
  333. package/dist/design/darkTheme/stylesheet.es.js +4 -7
  334. package/dist/design/darkTheme/stylesheet.es.js.map +1 -1
  335. package/dist/design/lightTheme/stylesheet.cjs.js +1 -1
  336. package/dist/design/lightTheme/stylesheet.cjs.js.map +1 -1
  337. package/dist/design/lightTheme/stylesheet.es.js +9 -9
  338. package/dist/design/lightTheme/stylesheet.es.js.map +1 -1
  339. package/dist/icons.d.ts +73 -78
  340. package/dist/index.cjs.js +1 -1
  341. package/dist/index.d.ts +86 -30
  342. package/dist/index.es.js +20 -20
  343. package/dist/light.d.ts +1 -1
  344. package/dist/node_modules/@react-aria/dialog/dist/useDialog.cjs.js +2 -0
  345. package/dist/node_modules/@react-aria/dialog/dist/useDialog.cjs.js.map +1 -0
  346. package/dist/node_modules/@react-aria/dialog/dist/useDialog.es.js +44 -0
  347. package/dist/node_modules/@react-aria/dialog/dist/useDialog.es.js.map +1 -0
  348. package/dist/node_modules/@react-aria/interactions/dist/usePress.cjs.js +2 -2
  349. package/dist/node_modules/@react-aria/overlays/dist/Overlay.cjs.js +2 -0
  350. package/dist/node_modules/@react-aria/overlays/dist/Overlay.cjs.js.map +1 -0
  351. package/dist/node_modules/@react-aria/overlays/dist/Overlay.es.js +16 -0
  352. package/dist/node_modules/@react-aria/overlays/dist/Overlay.es.js.map +1 -0
  353. package/dist/style.css +1 -1
  354. package/dist/theme.d.ts +1 -1
  355. package/dist/utils/palette.cjs.js +1 -1
  356. package/dist/utils/palette.cjs.js.map +1 -1
  357. package/dist/utils/palette.es.js +35 -41
  358. package/dist/utils/palette.es.js.map +1 -1
  359. package/package.json +1 -1
  360. package/dist/components/Checkbox/CheckboxIndicator.cjs.js +0 -2
  361. package/dist/components/Checkbox/CheckboxIndicator.cjs.js.map +0 -1
  362. package/dist/components/Checkbox/CheckboxIndicator.es.js +0 -44
  363. package/dist/components/Checkbox/CheckboxIndicator.es.js.map +0 -1
  364. package/dist/components/Overlay/Overlay.cjs.js +0 -2
  365. package/dist/components/Overlay/Overlay.cjs.js.map +0 -1
  366. package/dist/components/Overlay/Overlay.es.js +0 -27
  367. package/dist/components/Overlay/Overlay.es.js.map +0 -1
package/README.md CHANGED
@@ -100,7 +100,7 @@ For more advanced theme overrides we utilize the theme class names. The `ThemePr
100
100
 
101
101
  ```css
102
102
  .proton-ui__theme--dark .myComponent[active] {
103
- background-color: var(--proton-color__primary-light);
103
+ background-color: var(--proton-control__interactive-color);
104
104
  }
105
105
  ```
106
106
 
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../node_modules/react/jsx-runtime.cjs.js"),p=require("react"),y=require("../CheckboxIndicator.cjs.js");;/* empty css */const c=require("../../../utils/string.cjs.js"),j=p.forwardRef(({checked:k,defaultChecked:f,onChange:i,name:s,value:I,isDisabled:d=!1,isRequired:u=!1,id:m,"data-testid":_,label:o,description:r,error:t,indeterminate:l=!1,round:x=!1},R)=>{const C=p.useRef(null),n=R||C;p.useEffect(()=>{n.current&&(n.current.indeterminate=l)},[l,n]);const v=E=>{i==null||i(E.target.checked)},h=m||`${s}-checkbox`,a=typeof t=="string"?`${s}-error`:void 0,b=typeof r=="string"?`${s}-description`:void 0;return e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("div",{className:c.csx(d&&"proton-CheckboxInput--disabled"),children:e.jsxRuntimeExports.jsxs("div",{className:c.csx("proton-CheckboxInput__container",x&&"proton-CheckboxInput__container--round"),children:[typeof o=="string"?e.jsxRuntimeExports.jsx("label",{htmlFor:h,className:"proton-CheckboxInput__label",children:o}):o,e.jsxRuntimeExports.jsxs("span",{className:"proton-CheckboxInput__box",children:[e.jsxRuntimeExports.jsx("input",{ref:n,id:h,name:s,type:"checkbox",checked:k,defaultChecked:f,value:I,disabled:d,required:u,onChange:v,className:c.csx("proton-CheckboxInput__input",t&&"proton-CheckboxInput__input--error",x&&"proton-CheckboxInput__input--round"),"aria-label":o?void 0:s,"aria-invalid":!!t,"aria-errormessage":a,"aria-describedby":[a,b].filter(Boolean).join(" "),"data-testid":_}),e.jsxRuntimeExports.jsx(y.CheckboxIndicator,{round:x})]}),typeof r=="string"?e.jsxRuntimeExports.jsxs("div",{id:b,"aria-live":"polite",children:[r,u&&e.jsxRuntimeExports.jsx("span",{"aria-hidden":"true",children:" *"})]}):r]})}),typeof t=="string"?e.jsxRuntimeExports.jsx("div",{role:"alert",className:c.csx("proton-CheckboxInput__error"),id:a,children:t}):t]})});j.displayName="ProtonUICheckboxInput";exports.CheckboxInput=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../node_modules/react/jsx-runtime.cjs.js"),x=require("react");;/* empty css */const n=require("../../../utils/string.cjs.js"),k=x.forwardRef(({checked:a,defaultChecked:v,onChange:c,name:o,value:I,isDisabled:p=!1,isRequired:u=!1,id:m,"data-testid":_,label:s,description:r,error:t,indeterminate:l=!1,round:h=!1},R)=>{const y=x.useRef(null),i=R||y,b=a!==void 0;x.useEffect(()=>{i.current&&(i.current.indeterminate=l)},[l,i]);const C=g=>{c==null||c(g.target.checked)},f=m||`${o}-checkbox`,d=typeof t=="string"?`${o}-error`:void 0,j=typeof r=="string"?`${o}-description`:void 0;return e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("div",{className:n.csx(p&&"proton-CheckboxInput--disabled"),children:e.jsxRuntimeExports.jsxs("div",{className:n.csx("proton-CheckboxInput__container",h&&"proton-CheckboxInput__container--round"),children:[typeof s=="string"?e.jsxRuntimeExports.jsx("label",{htmlFor:f,className:"proton-CheckboxInput__label",children:s}):s,e.jsxRuntimeExports.jsx("input",{ref:i,id:f,name:o,type:"checkbox",checked:b?a:void 0,defaultChecked:b?void 0:v,value:I,disabled:p,required:u,onChange:C,className:n.csx("proton-CheckboxInput__input",t&&"proton-CheckboxInput__input--error",h&&"proton-CheckboxInput__input--round"),"aria-label":s?void 0:o,"aria-invalid":!!t,"aria-errormessage":d,"aria-describedby":[d,j].filter(Boolean).join(" ")||void 0,"data-testid":_}),typeof r=="string"?e.jsxRuntimeExports.jsxs("div",{id:j,"aria-live":"polite",children:[r,u&&e.jsxRuntimeExports.jsx("span",{"aria-hidden":"true",children:" *"})]}):r]})}),typeof t=="string"?e.jsxRuntimeExports.jsx("div",{role:"alert",className:n.csx("proton-CheckboxInput__error"),id:d,children:t}):t]})});k.displayName="ProtonUICheckboxInput";exports.CheckboxInput=k;
2
2
  //# sourceMappingURL=CheckboxInput.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxInput.cjs.js","sources":["../../../../src/components/Checkbox/CheckboxInput/CheckboxInput.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n ChangeEvent,\n forwardRef,\n useEffect,\n useRef,\n type ReactNode,\n type RefObject,\n} from \"react\";\nimport { csx } from \"../../../utils\";\nimport { CheckboxIndicator } from \"../CheckboxIndicator\";\nimport \"./CheckboxInput.css\";\n\nexport interface CheckboxInputProps {\n /**\n * Whether the checkbox is checked (controlled mode).\n */\n checked?: boolean;\n\n /**\n * Whether the checkbox is checked by default (uncontrolled mode).\n */\n defaultChecked?: boolean;\n\n /** The error attribute of the checkbox input. */\n error?: ReactNode | string;\n\n /** The description attribute of the checkbox input. */\n description?: ReactNode | string;\n\n /** The test id attribute of the checkbox input. */\n \"data-testid\"?: string;\n\n /**\n * Callback fired when the checkbox state changes.\n */\n onChange?: (checked: boolean) => void;\n\n /**\n * Whether the checkbox is in an indeterminate state. Used for checkboxes that are neither checked nor unchecked.\n * @default false\n * @external https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/indeterminate\n * @reference @external https://medium.com/indigoag-eng/indeterminate-checkboxes-are-weird-704b246c0f19\n */\n indeterminate?: boolean;\n\n /** The id attribute of the checkbox input. */\n id?: string;\n\n /** Whether the checkbox is disabled.\n * @default false\n */\n isDisabled?: boolean;\n\n /** Whether the checkbox is required.\n * @default false\n */\n isRequired?: boolean;\n\n /** The name attribute of the checkbox input. */\n name: string;\n\n /** The label attribute of the checkbox input. */\n label?: string | ReactNode;\n\n /**\n * The value attribute of the checkbox input (for form submission).\n * @external https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#value\n */\n value?: string;\n\n /**\n * Whether the checkbox should be rendered as a round control (with a dot indicator when checked).\n * @default false\n */\n round?: boolean;\n}\n\n/**\n * A checkbox input component with support for labels, descriptions, error states, and controlled/uncontrolled modes.\n *\n * API:\n * - {@link CheckboxInputProps}\n */\nexport const CheckboxInput = forwardRef<HTMLInputElement, CheckboxInputProps>(\n (\n {\n checked: controlledChecked,\n defaultChecked,\n onChange,\n name,\n value,\n isDisabled = false,\n isRequired = false,\n id,\n \"data-testid\": testId,\n label,\n description,\n error,\n indeterminate = false,\n round = false,\n },\n forwardedRef: RefObject<HTMLInputElement>,\n ) => {\n const checkboxRef = useRef<HTMLInputElement>(null);\n const ref = forwardedRef || checkboxRef;\n\n // indeterminate state can only be set via JS\n useEffect(() => {\n if (ref.current) {\n ref.current.indeterminate = indeterminate;\n }\n }, [indeterminate, ref]);\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n onChange?.(e.target.checked);\n };\n\n const checkboxId = id || `${name}-checkbox`;\n const errorId = typeof error === \"string\" ? `${name}-error` : undefined;\n const descriptionId =\n typeof description === \"string\" ? `${name}-description` : undefined;\n\n return (\n <div>\n <div className={csx(isDisabled && \"proton-CheckboxInput--disabled\")}>\n <div\n className={csx(\n \"proton-CheckboxInput__container\",\n round && \"proton-CheckboxInput__container--round\",\n )}\n >\n {typeof label === \"string\" ? (\n <label\n htmlFor={checkboxId}\n className=\"proton-CheckboxInput__label\"\n >\n {label}\n </label>\n ) : (\n label\n )}\n\n <span className=\"proton-CheckboxInput__box\">\n <input\n ref={ref}\n id={checkboxId}\n name={name}\n type=\"checkbox\"\n checked={controlledChecked}\n defaultChecked={defaultChecked}\n value={value}\n disabled={isDisabled}\n required={isRequired}\n onChange={handleChange}\n className={csx(\n \"proton-CheckboxInput__input\",\n error && \"proton-CheckboxInput__input--error\",\n round && \"proton-CheckboxInput__input--round\",\n )}\n aria-label={!label ? name : undefined}\n aria-invalid={Boolean(error)}\n aria-errormessage={errorId}\n aria-describedby={[errorId, descriptionId]\n .filter(Boolean)\n .join(\" \")}\n data-testid={testId}\n />\n <CheckboxIndicator round={round} />\n </span>\n\n {typeof description === \"string\" ? (\n <div id={descriptionId} aria-live=\"polite\">\n {description}\n {isRequired && <span aria-hidden=\"true\">&nbsp;*</span>}\n </div>\n ) : (\n description\n )}\n </div>\n </div>\n\n {typeof error === \"string\" ? (\n <div\n role=\"alert\"\n className={csx(\"proton-CheckboxInput__error\")}\n id={errorId}\n >\n {error}\n </div>\n ) : (\n error\n )}\n </div>\n );\n },\n);\n\nCheckboxInput.displayName = \"ProtonUICheckboxInput\";\n"],"names":["CheckboxInput","forwardRef","controlledChecked","defaultChecked","onChange","name","value","isDisabled","isRequired","id","testId","label","description","error","indeterminate","round","forwardedRef","checkboxRef","useRef","ref","useEffect","handleChange","e","checkboxId","errorId","descriptionId","jsx","csx","jsxs","CheckboxIndicator"],"mappings":"oSAqFaA,EAAgBC,EAAA,WAC3B,CACE,CACE,QAASC,EACT,eAAAC,EACA,SAAAC,EACA,KAAAC,EACA,MAAAC,EACA,WAAAC,EAAa,GACb,WAAAC,EAAa,GACb,GAAAC,EACA,cAAeC,EACf,MAAAC,EACA,YAAAC,EACA,MAAAC,EACA,cAAAC,EAAgB,GAChB,MAAAC,EAAQ,IAEVC,IACG,CACG,MAAAC,EAAcC,SAAyB,IAAI,EAC3CC,EAAMH,GAAgBC,EAG5BG,EAAAA,UAAU,IAAM,CACVD,EAAI,UACNA,EAAI,QAAQ,cAAgBL,EAC9B,EACC,CAACA,EAAeK,CAAG,CAAC,EAEjB,MAAAE,EAAgBC,GAAqC,CAC9ClB,GAAA,MAAAA,EAAAkB,EAAE,OAAO,QAAO,EAGvBC,EAAad,GAAM,GAAGJ,CA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AGHA,CAEJ,CAAA,CAAA,CAEJ,CACF,EAEAb,EAAc,YAAc"}
1
+ {"version":3,"file":"CheckboxInput.cjs.js","sources":["../../../../src/components/Checkbox/CheckboxInput/CheckboxInput.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { forwardRef, useEffect, useRef } from \"react\";\n\nimport { csx } from \"../../../utils\";\nimport \"./CheckboxInput.css\";\n\nexport interface CheckboxInputProps {\n /**\n * Whether the checkbox is checked (controlled mode).\n */\n checked?: boolean;\n\n /**\n * Whether the checkbox is checked by default (uncontrolled mode).\n */\n defaultChecked?: boolean;\n\n /** The error attribute of the checkbox input. */\n error?: React.ReactNode | string;\n\n /** The description attribute of the checkbox input. */\n description?: React.ReactNode | string;\n\n /** The test id attribute of the checkbox input. */\n \"data-testid\"?: string;\n\n /**\n * Callback fired when the checkbox state changes.\n */\n onChange?: (checked: boolean) => void;\n\n /**\n * Whether the checkbox is in an indeterminate state. Used for checkboxes that are neither checked nor unchecked.\n * @default false\n * @external https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/indeterminate\n * @reference @external https://medium.com/indigoag-eng/indeterminate-checkboxes-are-weird-704b246c0f19\n */\n indeterminate?: boolean;\n\n /** The id attribute of the checkbox input. */\n id?: string;\n\n /** Whether the checkbox is disabled. \n * @default false\n */\n isDisabled?: boolean;\n\n /** Whether the checkbox is required. \n * @default false\n */\n isRequired?: boolean;\n\n /** The name attribute of the checkbox input. */\n name: string;\n\n /** The label attribute of the checkbox input. */\n label?: string | React.ReactNode;\n\n /**\n * The value attribute of the checkbox input (for form submission).\n * @external https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#value\n */\n value?: string;\n\n /**\n * Whether the checkbox should be rendered as a round control (with a dot indicator when checked).\n * @default false\n */\n round?: boolean;\n}\n\n/**\n * A checkbox input component with support for labels, descriptions, error states, and controlled/uncontrolled modes.\n *\n * API:\n * - {@link CheckboxInputProps}\n */\nexport const CheckboxInput = forwardRef<HTMLInputElement, CheckboxInputProps>(\n (\n {\n checked: controlledChecked,\n defaultChecked,\n onChange,\n name,\n value,\n isDisabled = false,\n isRequired = false,\n id,\n \"data-testid\": testId,\n label,\n description,\n error,\n indeterminate = false,\n round = false,\n },\n forwardedRef: React.RefObject<HTMLInputElement>,\n ) => {\n const checkboxRef = useRef<HTMLInputElement>(null);\n const ref = forwardedRef || checkboxRef;\n const isControlled = controlledChecked !== undefined;\n\n // indeterminate state can only be set via JS\n useEffect(() => {\n if (ref.current) {\n ref.current.indeterminate = indeterminate;\n }\n }, [indeterminate, ref]);\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange?.(e.target.checked);\n };\n\n const checkboxId = id || `${name}-checkbox`;\n const errorId = typeof error === \"string\" ? `${name}-error` : undefined;\n const descriptionId =\n typeof description === \"string\" ? `${name}-description` : undefined;\n\n return (\n <div>\n <div className={csx(isDisabled && \"proton-CheckboxInput--disabled\")}>\n <div\n className={csx(\n \"proton-CheckboxInput__container\",\n round && \"proton-CheckboxInput__container--round\",\n )}\n >\n {typeof label === \"string\" ? (\n <label\n htmlFor={checkboxId}\n className=\"proton-CheckboxInput__label\"\n >\n {label}\n </label>\n ) : (\n label\n )}\n\n <input\n ref={ref}\n id={checkboxId}\n name={name}\n type=\"checkbox\"\n checked={isControlled ? controlledChecked : undefined}\n defaultChecked={!isControlled ? defaultChecked : undefined}\n value={value}\n disabled={isDisabled}\n required={isRequired}\n onChange={handleChange}\n className={csx(\n \"proton-CheckboxInput__input\",\n error && \"proton-CheckboxInput__input--error\",\n round && \"proton-CheckboxInput__input--round\",\n )}\n aria-label={!label ? name : undefined}\n aria-invalid={Boolean(error)}\n aria-errormessage={errorId}\n aria-describedby={\n [errorId, descriptionId].filter(Boolean).join(\" \") || undefined\n }\n data-testid={testId}\n />\n\n {typeof description === \"string\" ? (\n <div id={descriptionId} aria-live=\"polite\">\n {description}\n {isRequired && <span aria-hidden=\"true\">&nbsp;*</span>}\n </div>\n ) : (\n description\n )}\n </div>\n </div>\n\n {typeof error === \"string\" ? (\n <div\n role=\"alert\"\n className={csx(\"proton-CheckboxInput__error\")}\n id={errorId}\n >\n {error}\n </div>\n ) : (\n error\n )}\n </div>\n );\n }\n);\n\nCheckboxInput.displayName = \"ProtonUICheckboxInput\";\n"],"names":["CheckboxInput","forwardRef","controlledChecked","defaultChecked","onChange","name","value","isDisabled","isRequired","id","testId","label","description","error","indeterminate","round","forwardedRef","checkboxRef","useRef","ref","isControlled","useEffect","handleChange","e","checkboxId","errorId","descriptionId","jsx","csx","jsxs"],"mappings":"2PA8EaA,EAAgBC,EAAA,WAC3B,CACE,CACE,QAASC,EACT,eAAAC,EACA,SAAAC,EACA,KAAAC,EACA,MAAAC,EACA,WAAAC,EAAa,GACb,WAAAC,EAAa,GACb,GAAAC,EACA,cAAeC,EACf,MAAAC,EACA,YAAAC,EACA,MAAAC,EACA,cAAAC,EAAgB,GAChB,MAAAC,EAAQ,IAEVC,IACG,CACG,MAAAC,EAAcC,SAAyB,IAAI,EAC3CC,EAAMH,GAAgBC,EACtBG,EAAelB,IAAsB,OAG3CmB,EAAAA,UAAU,IAAM,CACVF,EAAI,UACNA,EAAI,QAAQ,cAAgBL,EAC9B,EACC,CAACA,EAAeK,CAAG,CAAC,EAEjB,MAAAG,EAAgBC,GAA2C,CACpDnB,GAAA,MAAAA,EAAAmB,EAAE,OAAO,QAAO,EAGvBC,EAAaf,GAAM,GAAGJ,CAAI,YAC1BoB,EAAU,OAAOZ,GAAU,SAAW,GAAGR,CAAI,SAAW,OACxDqB,EACJ,OAAOd,GAAgB,SAAW,GAAGP,CAAI,eAAiB,OAE5D,gCACG,MACC,CAAA,SAAA,CAAAsB,wBAAC,MAAI,CAAA,UAAWC,EAAAA,IAAIrB,GAAc,gCAAgC,EAChE,SAAAsB,EAAA,kBAAA,KAAC,MAAA,CACC,UAAWD,EAAA,IACT,kCACAb,GAAS,wCACX,EAEC,SAAA,CAAA,OAAOJ,GAAU,SAChBgB,EAAA,kBAAA,IAAC,QAAA,CACC,QAASH,EACT,UAAU,8BAET,SAAAb,CAAA,CAAA,EAGHA,EAGFgB,EAAA,kBAAA,IAAC,QAAA,CACC,IAAAR,EACA,GAAIK,EACJ,KAAAnB,EACA,KAAK,WACL,QAASe,EAAelB,EAAoB,OAC5C,eAAiBkB,EAAgC,OAAjBjB,EAChC,MAAAG,EACA,SAAUC,EACV,SAAUC,EACV,SAAUc,EACV,UAAWM,EAAA,IACT,8BACAf,GAAS,qCACTE,GAAS,oCACX,EACA,aAAaJ,EAAe,OAAPN,EACrB,eAAc,EAAQQ,EACtB,oBAAmBY,EACnB,mBACE,CAACA,EAASC,CAAa,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,GAAK,OAExD,cAAahB,CAAA,CACf,EAEC,OAAOE,GAAgB,SACtBiB,EAAAA,kBAAAA,KAAC,OAAI,GAAIH,EAAe,YAAU,SAC/B,SAAA,CAAAd,EACAJ,GAAcmB,EAAA,kBAAA,IAAC,OAAK,CAAA,cAAY,OAAO,SAAO,KAAA,CAAA,CAAA,CACjD,EAEAf,CAAA,CAAA,CAAA,EAGN,EAEC,OAAOC,GAAU,SAChBc,EAAA,kBAAA,IAAC,MAAA,CACC,KAAK,QACL,UAAWC,MAAI,6BAA6B,EAC5C,GAAIH,EAEH,SAAAZ,CAAA,CAAA,EAGHA,CAEJ,CAAA,CAAA,CAEJ,CACF,EAEAb,EAAc,YAAc"}
@@ -1,81 +1,77 @@
1
1
  import { j as e } from "../../../node_modules/react/jsx-runtime.es.js";
2
- import { forwardRef as y, useRef as N, useEffect as g } from "react";
3
- import { CheckboxIndicator as R } from "../CheckboxIndicator.es.js";
2
+ import { forwardRef as N, useRef as g, useEffect as R } from "react";
4
3
  /* empty css */
5
- import { csx as n } from "../../../utils/string.es.js";
6
- const $ = y(
4
+ import { csx as s } from "../../../utils/string.es.js";
5
+ const $ = N(
7
6
  ({
8
- checked: f,
9
- defaultChecked: b,
10
- onChange: i,
7
+ checked: a,
8
+ defaultChecked: k,
9
+ onChange: c,
11
10
  name: t,
12
- value: k,
11
+ value: v,
13
12
  isDisabled: p = !1,
14
13
  isRequired: l = !1,
15
14
  id: I,
16
15
  "data-testid": _,
17
16
  label: r,
18
- description: c,
17
+ description: i,
19
18
  error: o,
20
19
  indeterminate: x = !1,
21
- round: a = !1
20
+ round: h = !1
22
21
  }, m) => {
23
- const j = N(null), s = m || j;
24
- g(() => {
25
- s.current && (s.current.indeterminate = x);
26
- }, [x, s]);
27
- const v = (C) => {
28
- i == null || i(C.target.checked);
29
- }, h = I || `${t}-checkbox`, d = typeof o == "string" ? `${t}-error` : void 0, u = typeof c == "string" ? `${t}-description` : void 0;
22
+ const j = g(null), n = m || j, u = a !== void 0;
23
+ R(() => {
24
+ n.current && (n.current.indeterminate = x);
25
+ }, [x, n]);
26
+ const C = (y) => {
27
+ c == null || c(y.target.checked);
28
+ }, f = I || `${t}-checkbox`, d = typeof o == "string" ? `${t}-error` : void 0, b = typeof i == "string" ? `${t}-description` : void 0;
30
29
  return /* @__PURE__ */ e.jsxs("div", { children: [
31
- /* @__PURE__ */ e.jsx("div", { className: n(p && "proton-CheckboxInput--disabled"), children: /* @__PURE__ */ e.jsxs(
30
+ /* @__PURE__ */ e.jsx("div", { className: s(p && "proton-CheckboxInput--disabled"), children: /* @__PURE__ */ e.jsxs(
32
31
  "div",
33
32
  {
34
- className: n(
33
+ className: s(
35
34
  "proton-CheckboxInput__container",
36
- a && "proton-CheckboxInput__container--round"
35
+ h && "proton-CheckboxInput__container--round"
37
36
  ),
38
37
  children: [
39
38
  typeof r == "string" ? /* @__PURE__ */ e.jsx(
40
39
  "label",
41
40
  {
42
- htmlFor: h,
41
+ htmlFor: f,
43
42
  className: "proton-CheckboxInput__label",
44
43
  children: r
45
44
  }
46
45
  ) : r,
47
- /* @__PURE__ */ e.jsxs("span", { className: "proton-CheckboxInput__box", children: [
48
- /* @__PURE__ */ e.jsx(
49
- "input",
50
- {
51
- ref: s,
52
- id: h,
53
- name: t,
54
- type: "checkbox",
55
- checked: f,
56
- defaultChecked: b,
57
- value: k,
58
- disabled: p,
59
- required: l,
60
- onChange: v,
61
- className: n(
62
- "proton-CheckboxInput__input",
63
- o && "proton-CheckboxInput__input--error",
64
- a && "proton-CheckboxInput__input--round"
65
- ),
66
- "aria-label": r ? void 0 : t,
67
- "aria-invalid": !!o,
68
- "aria-errormessage": d,
69
- "aria-describedby": [d, u].filter(Boolean).join(" "),
70
- "data-testid": _
71
- }
72
- ),
73
- /* @__PURE__ */ e.jsx(R, { round: a })
74
- ] }),
75
- typeof c == "string" ? /* @__PURE__ */ e.jsxs("div", { id: u, "aria-live": "polite", children: [
76
- c,
46
+ /* @__PURE__ */ e.jsx(
47
+ "input",
48
+ {
49
+ ref: n,
50
+ id: f,
51
+ name: t,
52
+ type: "checkbox",
53
+ checked: u ? a : void 0,
54
+ defaultChecked: u ? void 0 : k,
55
+ value: v,
56
+ disabled: p,
57
+ required: l,
58
+ onChange: C,
59
+ className: s(
60
+ "proton-CheckboxInput__input",
61
+ o && "proton-CheckboxInput__input--error",
62
+ h && "proton-CheckboxInput__input--round"
63
+ ),
64
+ "aria-label": r ? void 0 : t,
65
+ "aria-invalid": !!o,
66
+ "aria-errormessage": d,
67
+ "aria-describedby": [d, b].filter(Boolean).join(" ") || void 0,
68
+ "data-testid": _
69
+ }
70
+ ),
71
+ typeof i == "string" ? /* @__PURE__ */ e.jsxs("div", { id: b, "aria-live": "polite", children: [
72
+ i,
77
73
  l && /* @__PURE__ */ e.jsx("span", { "aria-hidden": "true", children: " *" })
78
- ] }) : c
74
+ ] }) : i
79
75
  ]
80
76
  }
81
77
  ) }),
@@ -83,7 +79,7 @@ const $ = y(
83
79
  "div",
84
80
  {
85
81
  role: "alert",
86
- className: n("proton-CheckboxInput__error"),
82
+ className: s("proton-CheckboxInput__error"),
87
83
  id: d,
88
84
  children: o
89
85
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxInput.es.js","sources":["../../../../src/components/Checkbox/CheckboxInput/CheckboxInput.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n ChangeEvent,\n forwardRef,\n useEffect,\n useRef,\n type ReactNode,\n type RefObject,\n} from \"react\";\nimport { csx } from \"../../../utils\";\nimport { CheckboxIndicator } from \"../CheckboxIndicator\";\nimport \"./CheckboxInput.css\";\n\nexport interface CheckboxInputProps {\n /**\n * Whether the checkbox is checked (controlled mode).\n */\n checked?: boolean;\n\n /**\n * Whether the checkbox is checked by default (uncontrolled mode).\n */\n defaultChecked?: boolean;\n\n /** The error attribute of the checkbox input. */\n error?: ReactNode | string;\n\n /** The description attribute of the checkbox input. */\n description?: ReactNode | string;\n\n /** The test id attribute of the checkbox input. */\n \"data-testid\"?: string;\n\n /**\n * Callback fired when the checkbox state changes.\n */\n onChange?: (checked: boolean) => void;\n\n /**\n * Whether the checkbox is in an indeterminate state. Used for checkboxes that are neither checked nor unchecked.\n * @default false\n * @external https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/indeterminate\n * @reference @external https://medium.com/indigoag-eng/indeterminate-checkboxes-are-weird-704b246c0f19\n */\n indeterminate?: boolean;\n\n /** The id attribute of the checkbox input. */\n id?: string;\n\n /** Whether the checkbox is disabled.\n * @default false\n */\n isDisabled?: boolean;\n\n /** Whether the checkbox is required.\n * @default false\n */\n isRequired?: boolean;\n\n /** The name attribute of the checkbox input. */\n name: string;\n\n /** The label attribute of the checkbox input. */\n label?: string | ReactNode;\n\n /**\n * The value attribute of the checkbox input (for form submission).\n * @external https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#value\n */\n value?: string;\n\n /**\n * Whether the checkbox should be rendered as a round control (with a dot indicator when checked).\n * @default false\n */\n round?: boolean;\n}\n\n/**\n * A checkbox input component with support for labels, descriptions, error states, and controlled/uncontrolled modes.\n *\n * API:\n * - {@link CheckboxInputProps}\n */\nexport const CheckboxInput = forwardRef<HTMLInputElement, CheckboxInputProps>(\n (\n {\n checked: controlledChecked,\n defaultChecked,\n onChange,\n name,\n value,\n isDisabled = false,\n isRequired = false,\n id,\n \"data-testid\": testId,\n label,\n description,\n error,\n indeterminate = false,\n round = false,\n },\n forwardedRef: RefObject<HTMLInputElement>,\n ) => {\n const checkboxRef = useRef<HTMLInputElement>(null);\n const ref = forwardedRef || checkboxRef;\n\n // indeterminate state can only be set via JS\n useEffect(() => {\n if (ref.current) {\n ref.current.indeterminate = indeterminate;\n }\n }, [indeterminate, ref]);\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n onChange?.(e.target.checked);\n };\n\n const checkboxId = id || `${name}-checkbox`;\n const errorId = typeof error === \"string\" ? `${name}-error` : undefined;\n const descriptionId =\n typeof description === \"string\" ? `${name}-description` : undefined;\n\n return (\n <div>\n <div className={csx(isDisabled && \"proton-CheckboxInput--disabled\")}>\n <div\n className={csx(\n \"proton-CheckboxInput__container\",\n round && \"proton-CheckboxInput__container--round\",\n )}\n >\n {typeof label === \"string\" ? (\n <label\n htmlFor={checkboxId}\n className=\"proton-CheckboxInput__label\"\n >\n {label}\n </label>\n ) : (\n label\n )}\n\n <span className=\"proton-CheckboxInput__box\">\n <input\n ref={ref}\n id={checkboxId}\n name={name}\n type=\"checkbox\"\n checked={controlledChecked}\n defaultChecked={defaultChecked}\n value={value}\n disabled={isDisabled}\n required={isRequired}\n onChange={handleChange}\n className={csx(\n \"proton-CheckboxInput__input\",\n error && \"proton-CheckboxInput__input--error\",\n round && \"proton-CheckboxInput__input--round\",\n )}\n aria-label={!label ? name : undefined}\n aria-invalid={Boolean(error)}\n aria-errormessage={errorId}\n aria-describedby={[errorId, descriptionId]\n .filter(Boolean)\n .join(\" \")}\n data-testid={testId}\n />\n <CheckboxIndicator round={round} />\n </span>\n\n {typeof description === \"string\" ? (\n <div id={descriptionId} aria-live=\"polite\">\n {description}\n {isRequired && <span aria-hidden=\"true\">&nbsp;*</span>}\n </div>\n ) : (\n description\n )}\n </div>\n </div>\n\n {typeof error === \"string\" ? (\n <div\n role=\"alert\"\n className={csx(\"proton-CheckboxInput__error\")}\n id={errorId}\n >\n {error}\n </div>\n ) : (\n error\n )}\n </div>\n );\n },\n);\n\nCheckboxInput.displayName = \"ProtonUICheckboxInput\";\n"],"names":["CheckboxInput","forwardRef","controlledChecked","defaultChecked","onChange","name","value","isDisabled","isRequired","id","testId","label","description","error","indeterminate","round","forwardedRef","checkboxRef","useRef","ref","useEffect","handleChange","e","checkboxId","errorId","descriptionId","jsx","csx","jsxs","CheckboxIndicator"],"mappings":";;;;;AAqFO,MAAMA,IAAgBC;AAAA,EAC3B,CACE;AAAA,IACE,SAASC;AAAA,IACT,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,YAAAC,IAAa;AAAA,IACb,IAAAC;AAAA,IACA,eAAeC;AAAA,IACf,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,OAAAC;AAAA,IACA,eAAAC,IAAgB;AAAA,IAChB,OAAAC,IAAQ;AAAA,KAEVC,MACG;AACG,UAAAC,IAAcC,EAAyB,IAAI,GAC3CC,IAAMH,KAAgBC;AAG5B,IAAAG,EAAU,MAAM;AACd,MAAID,EAAI,YACNA,EAAI,QAAQ,gBAAgBL;AAAA,IAC9B,GACC,CAACA,GAAeK,CAAG,CAAC;AAEjB,UAAAE,IAAe,CAACC,MAAqC;AAC9C,MAAAlB,KAAA,QAAAA,EAAAkB,EAAE,OAAO;AAAA,IAAO,GAGvBC,IAAad,KAAM,GAAGJ,CAAI,aAC1BmB,IAAU,OAAOX,KAAU,WAAW,GAAGR,CAAI,WAAW,QACxDoB,IACJ,OAAOb,KAAgB,WAAW,GAAGP,CAAI,iBAAiB;AAE5D,kCACG,OACC,EAAA,UAAA;AAAA,MAAAqB,gBAAAA,MAAC,OAAI,EAAA,WAAWC,EAAIpB,KAAc,gCAAgC,GAChE,UAAAqB,gBAAAA,EAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAWD;AAAA,YACT;A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WC,EAAI,6BAA6B;AAAA,UAC5C,IAAIH;AAAA,UAEH,UAAAX;AAAA,QAAA;AAAA,MAAA,IAGHA;AAAA,IAEJ,EAAA,CAAA;AAAA,EAEJ;AACF;AAEAb,EAAc,cAAc;"}
1
+ {"version":3,"file":"CheckboxInput.es.js","sources":["../../../../src/components/Checkbox/CheckboxInput/CheckboxInput.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { forwardRef, useEffect, useRef } from \"react\";\n\nimport { csx } from \"../../../utils\";\nimport \"./CheckboxInput.css\";\n\nexport interface CheckboxInputProps {\n /**\n * Whether the checkbox is checked (controlled mode).\n */\n checked?: boolean;\n\n /**\n * Whether the checkbox is checked by default (uncontrolled mode).\n */\n defaultChecked?: boolean;\n\n /** The error attribute of the checkbox input. */\n error?: React.ReactNode | string;\n\n /** The description attribute of the checkbox input. */\n description?: React.ReactNode | string;\n\n /** The test id attribute of the checkbox input. */\n \"data-testid\"?: string;\n\n /**\n * Callback fired when the checkbox state changes.\n */\n onChange?: (checked: boolean) => void;\n\n /**\n * Whether the checkbox is in an indeterminate state. Used for checkboxes that are neither checked nor unchecked.\n * @default false\n * @external https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/indeterminate\n * @reference @external https://medium.com/indigoag-eng/indeterminate-checkboxes-are-weird-704b246c0f19\n */\n indeterminate?: boolean;\n\n /** The id attribute of the checkbox input. */\n id?: string;\n\n /** Whether the checkbox is disabled. \n * @default false\n */\n isDisabled?: boolean;\n\n /** Whether the checkbox is required. \n * @default false\n */\n isRequired?: boolean;\n\n /** The name attribute of the checkbox input. */\n name: string;\n\n /** The label attribute of the checkbox input. */\n label?: string | React.ReactNode;\n\n /**\n * The value attribute of the checkbox input (for form submission).\n * @external https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#value\n */\n value?: string;\n\n /**\n * Whether the checkbox should be rendered as a round control (with a dot indicator when checked).\n * @default false\n */\n round?: boolean;\n}\n\n/**\n * A checkbox input component with support for labels, descriptions, error states, and controlled/uncontrolled modes.\n *\n * API:\n * - {@link CheckboxInputProps}\n */\nexport const CheckboxInput = forwardRef<HTMLInputElement, CheckboxInputProps>(\n (\n {\n checked: controlledChecked,\n defaultChecked,\n onChange,\n name,\n value,\n isDisabled = false,\n isRequired = false,\n id,\n \"data-testid\": testId,\n label,\n description,\n error,\n indeterminate = false,\n round = false,\n },\n forwardedRef: React.RefObject<HTMLInputElement>,\n ) => {\n const checkboxRef = useRef<HTMLInputElement>(null);\n const ref = forwardedRef || checkboxRef;\n const isControlled = controlledChecked !== undefined;\n\n // indeterminate state can only be set via JS\n useEffect(() => {\n if (ref.current) {\n ref.current.indeterminate = indeterminate;\n }\n }, [indeterminate, ref]);\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange?.(e.target.checked);\n };\n\n const checkboxId = id || `${name}-checkbox`;\n const errorId = typeof error === \"string\" ? `${name}-error` : undefined;\n const descriptionId =\n typeof description === \"string\" ? `${name}-description` : undefined;\n\n return (\n <div>\n <div className={csx(isDisabled && \"proton-CheckboxInput--disabled\")}>\n <div\n className={csx(\n \"proton-CheckboxInput__container\",\n round && \"proton-CheckboxInput__container--round\",\n )}\n >\n {typeof label === \"string\" ? (\n <label\n htmlFor={checkboxId}\n className=\"proton-CheckboxInput__label\"\n >\n {label}\n </label>\n ) : (\n label\n )}\n\n <input\n ref={ref}\n id={checkboxId}\n name={name}\n type=\"checkbox\"\n checked={isControlled ? controlledChecked : undefined}\n defaultChecked={!isControlled ? defaultChecked : undefined}\n value={value}\n disabled={isDisabled}\n required={isRequired}\n onChange={handleChange}\n className={csx(\n \"proton-CheckboxInput__input\",\n error && \"proton-CheckboxInput__input--error\",\n round && \"proton-CheckboxInput__input--round\",\n )}\n aria-label={!label ? name : undefined}\n aria-invalid={Boolean(error)}\n aria-errormessage={errorId}\n aria-describedby={\n [errorId, descriptionId].filter(Boolean).join(\" \") || undefined\n }\n data-testid={testId}\n />\n\n {typeof description === \"string\" ? (\n <div id={descriptionId} aria-live=\"polite\">\n {description}\n {isRequired && <span aria-hidden=\"true\">&nbsp;*</span>}\n </div>\n ) : (\n description\n )}\n </div>\n </div>\n\n {typeof error === \"string\" ? (\n <div\n role=\"alert\"\n className={csx(\"proton-CheckboxInput__error\")}\n id={errorId}\n >\n {error}\n </div>\n ) : (\n error\n )}\n </div>\n );\n }\n);\n\nCheckboxInput.displayName = \"ProtonUICheckboxInput\";\n"],"names":["CheckboxInput","forwardRef","controlledChecked","defaultChecked","onChange","name","value","isDisabled","isRequired","id","testId","label","description","error","indeterminate","round","forwardedRef","checkboxRef","useRef","ref","isControlled","useEffect","handleChange","e","checkboxId","errorId","descriptionId","jsx","csx","jsxs"],"mappings":";;;;AA8EO,MAAMA,IAAgBC;AAAA,EAC3B,CACE;AAAA,IACE,SAASC;AAAA,IACT,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,YAAAC,IAAa;AAAA,IACb,IAAAC;AAAA,IACA,eAAeC;AAAA,IACf,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,OAAAC;AAAA,IACA,eAAAC,IAAgB;AAAA,IAChB,OAAAC,IAAQ;AAAA,KAEVC,MACG;AACG,UAAAC,IAAcC,EAAyB,IAAI,GAC3CC,IAAMH,KAAgBC,GACtBG,IAAelB,MAAsB;AAG3C,IAAAmB,EAAU,MAAM;AACd,MAAIF,EAAI,YACNA,EAAI,QAAQ,gBAAgBL;AAAA,IAC9B,GACC,CAACA,GAAeK,CAAG,CAAC;AAEjB,UAAAG,IAAe,CAACC,MAA2C;AACpD,MAAAnB,KAAA,QAAAA,EAAAmB,EAAE,OAAO;AAAA,IAAO,GAGvBC,IAAaf,KAAM,GAAGJ,CAAI,aAC1BoB,IAAU,OAAOZ,KAAU,WAAW,GAAGR,CAAI,WAAW,QACxDqB,IACJ,OAAOd,KAAgB,WAAW,GAAGP,CAAI,iBAAiB;AAE5D,kCACG,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AU,WAChBc,gBAAAA,EAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,WAAWC,EAAI,6BAA6B;AAAA,UAC5C,IAAIH;AAAA,UAEH,UAAAZ;AAAA,QAAA;AAAA,MAAA,IAGHA;AAAA,IAEJ,EAAA,CAAA;AAAA,EAEJ;AACF;AAEAb,EAAc,cAAc;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../node_modules/react/jsx-runtime.cjs.js"),I=require("react"),a=require("radix-ui"),m=require("../CheckboxIndicator.cjs.js");;/* empty css */;/* empty css */const s=require("../../../utils/string.cjs.js"),u=I.forwardRef(({name:i,items:l,value:b,defaultValue:h,onChange:R,isDisabled:c=!1,isRequired:j=!1,orientation:d="vertical",round:t=!1,error:r,"data-testid":k},C)=>{const p=typeof r=="string"?`${i}-error`:void 0;return e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx(a.RadioGroup.Root,{ref:C,name:i,value:b,defaultValue:h,onValueChange:R,disabled:c,required:j,orientation:d,className:s.csx("proton-CheckboxRadioGroup",`proton-CheckboxRadioGroup--${d}`),"aria-invalid":!!r,"aria-errormessage":p,"data-testid":k,children:l.map(o=>{const n=`${i}-${o.value}`,_=c||o.isDisabled,x=typeof o.description=="string"?`${n}-description`:void 0;return e.jsxRuntimeExports.jsxs("div",{className:s.csx(_&&"proton-CheckboxInput--disabled"),children:[e.jsxRuntimeExports.jsxs("div",{className:s.csx("proton-CheckboxInput__container",t&&"proton-CheckboxInput__container--round"),children:[e.jsxRuntimeExports.jsx(a.RadioGroup.Item,{id:n,value:o.value,disabled:o.isDisabled,className:s.csx("proton-CheckboxInput__input",t&&"proton-CheckboxInput__input--round",r&&"proton-CheckboxInput__input--error"),"aria-describedby":x,children:e.jsxRuntimeExports.jsx(a.RadioGroup.Indicator,{className:s.csx(!t&&"proton-CheckboxRadioGroup__checkmark"),forceMount:!0,children:e.jsxRuntimeExports.jsx(m.CheckboxIndicator,{round:t})})}),typeof o.label=="string"?e.jsxRuntimeExports.jsx("label",{htmlFor:n,className:"proton-CheckboxInput__label",children:o.label}):o.label]}),typeof o.description=="string"?e.jsxRuntimeExports.jsx("div",{id:x,className:"proton-CheckboxRadioGroup__description",children:o.description}):o.description]},o.value)})}),typeof r=="string"?e.jsxRuntimeExports.jsx("div",{role:"alert",className:"proton-CheckboxInput__error",id:p,children:r}):r]})});u.displayName="ProtonUICheckboxRadioGroup";exports.CheckboxRadioGroup=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../node_modules/react/jsx-runtime.cjs.js"),v=require("react"),n=require("radix-ui");;/* empty css */;/* empty css */const s=require("../../../utils/string.cjs.js"),u=v.forwardRef(({name:i,items:x,value:b,defaultValue:h,onChange:R,isDisabled:a=!1,isRequired:j=!1,orientation:d="vertical",round:c=!1,error:r,"data-testid":_},C)=>{const p=typeof r=="string"?`${i}-error`:void 0;return e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx(n.RadioGroup.Root,{ref:C,name:i,value:b,defaultValue:h,onValueChange:R,disabled:a,required:j,orientation:d,className:s.csx("proton-CheckboxRadioGroup",`proton-CheckboxRadioGroup--${d}`),"aria-invalid":!!r,"aria-errormessage":p,"data-testid":_,children:x.map(o=>{const t=`${i}-${o.value}`,k=a||o.isDisabled,l=typeof o.description=="string"?`${t}-description`:void 0;return e.jsxRuntimeExports.jsxs("div",{className:s.csx(k&&"proton-CheckboxInput--disabled"),children:[e.jsxRuntimeExports.jsxs("div",{className:s.csx("proton-CheckboxInput__container",c&&"proton-CheckboxInput__container--round"),children:[e.jsxRuntimeExports.jsx(n.RadioGroup.Item,{id:t,value:o.value,disabled:o.isDisabled,className:s.csx("proton-CheckboxInput__input",c&&"proton-CheckboxInput__input--round",r&&"proton-CheckboxInput__input--error"),"aria-describedby":l,children:e.jsxRuntimeExports.jsx(n.RadioGroup.Indicator,{className:"proton-CheckboxRadioGroup__indicator"})}),typeof o.label=="string"?e.jsxRuntimeExports.jsx("label",{htmlFor:t,className:"proton-CheckboxInput__label",children:o.label}):o.label]}),typeof o.description=="string"?e.jsxRuntimeExports.jsx("div",{id:l,className:"proton-CheckboxRadioGroup__description",children:o.description}):o.description]},o.value)})}),typeof r=="string"?e.jsxRuntimeExports.jsx("div",{role:"alert",className:"proton-CheckboxInput__error",id:p,children:r}):r]})});u.displayName="ProtonUICheckboxRadioGroup";exports.CheckboxRadioGroup=u;
2
2
  //# sourceMappingURL=CheckboxRadioGroup.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxRadioGroup.cjs.js","sources":["../../../../src/components/Checkbox/CheckboxRadioGroup/CheckboxRadioGroup.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef, ReactNode } from \"react\";\nimport { RadioGroup as RadixRadioGroup } from \"radix-ui\";\nimport { CheckboxIndicator } from \"../CheckboxIndicator\";\n\nimport { csx } from \"../../../utils\";\nimport \"../CheckboxInput/CheckboxInput.css\";\nimport \"./CheckboxRadioGroup.css\";\n\nexport interface CheckboxRadioGroupItem {\n /**\n * Unique value for the radio option.\n */\n value: string;\n\n /**\n * Label displayed next to the radio button.\n */\n label: string | ReactNode;\n\n /**\n * Optional description text below the label.\n */\n description?: string | ReactNode;\n\n /**\n * Whether this specific option is disabled.\n * @default false\n */\n isDisabled?: boolean;\n}\n\nexport interface CheckboxRadioGroupProps {\n /**\n * The name attribute for the radio group (for form submission).\n */\n name: string;\n\n /**\n * Array of radio options.\n */\n items: CheckboxRadioGroupItem[];\n\n /**\n * Currently selected value (controlled mode).\n */\n value?: string;\n\n /**\n * Default selected value (uncontrolled mode).\n */\n defaultValue?: string;\n\n /**\n * Callback when selection changes.\n */\n onChange?: (value: string) => void;\n\n /**\n * Whether the entire group is disabled.\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * Whether selection is required.\n * @default false\n */\n isRequired?: boolean;\n\n /**\n * Error message or element.\n */\n error?: ReactNode | string;\n\n /**\n * Layout orientation.\n * @default \"vertical\"\n */\n orientation?: \"vertical\" | \"horizontal\";\n\n /**\n * Whether radio buttons are round or square.\n * @default false\n */\n round?: boolean;\n\n /**\n * Test ID for the group.\n */\n \"data-testid\"?: string;\n}\n\n/**\n * A declaritive radio group for single-select lists.\n *\n * API:\n * - {@link CheckboxRadioGroupProps}\n * - {@link CheckboxRadioGroupItem}\n */\nexport const CheckboxRadioGroup = forwardRef<\n HTMLDivElement,\n CheckboxRadioGroupProps\n>(\n (\n {\n name,\n items,\n value,\n defaultValue,\n onChange,\n isDisabled = false,\n isRequired = false,\n orientation = \"vertical\",\n round = false,\n error,\n \"data-testid\": testId,\n },\n ref,\n ) => {\n const errorId = typeof error === \"string\" ? `${name}-error` : undefined;\n\n return (\n <div>\n <RadixRadioGroup.Root\n ref={ref}\n name={name}\n value={value}\n defaultValue={defaultValue}\n onValueChange={onChange}\n disabled={isDisabled}\n required={isRequired}\n orientation={orientation}\n className={csx(\n \"proton-CheckboxRadioGroup\",\n `proton-CheckboxRadioGroup--${orientation}`,\n )}\n aria-invalid={Boolean(error)}\n aria-errormessage={errorId}\n data-testid={testId}\n >\n {items.map((item) => {\n const itemId = `${name}-${item.value}`;\n const itemDisabled = isDisabled || item.isDisabled;\n const descriptionId =\n typeof item.description === \"string\"\n ? `${itemId}-description`\n : undefined;\n\n return (\n <div\n key={item.value}\n className={csx(\n itemDisabled && \"proton-CheckboxInput--disabled\",\n )}\n >\n <div\n className={csx(\n \"proton-CheckboxInput__container\",\n round && \"proton-CheckboxInput__container--round\",\n )}\n >\n <RadixRadioGroup.Item\n id={itemId}\n value={item.value}\n disabled={item.isDisabled}\n className={csx(\n \"proton-CheckboxInput__input\",\n round && \"proton-CheckboxInput__input--round\",\n error && \"proton-CheckboxInput__input--error\",\n )}\n aria-describedby={descriptionId}\n >\n <RadixRadioGroup.Indicator\n className={csx(\n !round && \"proton-CheckboxRadioGroup__checkmark\",\n )}\n forceMount\n >\n <CheckboxIndicator round={round} />\n </RadixRadioGroup.Indicator>\n </RadixRadioGroup.Item>\n\n {typeof item.label === \"string\" ? (\n <label\n htmlFor={itemId}\n className=\"proton-CheckboxInput__label\"\n >\n {item.label}\n </label>\n ) : (\n item.label\n )}\n </div>\n\n {typeof item.description === \"string\" ? (\n <div\n id={descriptionId}\n className=\"proton-CheckboxRadioGroup__description\"\n >\n {item.description}\n </div>\n ) : (\n item.description\n )}\n </div>\n );\n })}\n </RadixRadioGroup.Root>\n\n {typeof error === \"string\" ? (\n <div\n role=\"alert\"\n className=\"proton-CheckboxInput__error\"\n id={errorId}\n >\n {error}\n </div>\n ) : (\n error\n )}\n </div>\n );\n },\n);\n\nCheckboxRadioGroup.displayName = \"ProtonUICheckboxRadioGroup\";\n"],"names":["CheckboxRadioGroup","forwardRef","name","items","value","defaultValue","onChange","isDisabled","isRequired","orientation","round","error","testId","ref","errorId","jsx","RadixRadioGroup","csx","item","itemId","itemDisabled","descriptionId","jsxs","CheckboxIndicator"],"mappings":"oXAqGaA,EAAqBC,EAAA,WAIhC,CACE,CACE,KAAAC,EACA,MAAAC,EACA,MAAAC,EACA,aAAAC,EACA,SAAAC,EACA,WAAAC,EAAa,GACb,WAAAC,EAAa,GACb,YAAAC,EAAc,WACd,MAAAC,EAAQ,GACR,MAAAC,EACA,cAAeC,GAEjBC,IACG,CACH,MAAMC,EAAU,OAAOH,GAAU,SAAW,GAAGT,CAAI,SAAW,OAE9D,gCACG,MACC,CAAA,SAAA,CAAAa,EAAA,kBAAA,IAACC,EAAAA,WAAgB,KAAhB,CACC,IAAAH,EACA,KAAAX,EACA,MAAAE,EACA,aAAAC,EACA,cAAeC,EACf,SAAUC,EACV,SAAUC,EACV,YAAAC,EACA,UAAWQ,EAAA,IACT,4BACA,8BAA8BR,CAAW,EAC3C,EACA,eAAc,EAAQE,EACtB,oBAAmBG,EACnB,cAAaF,EAEZ,SAAAT,EAAM,IAAKe,GAAS,CACnB,MAAMC,EAAS,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roup.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef, ReactNode } from \"react\";\nimport { RadioGroup as RadixRadioGroup } from \"radix-ui\";\n\nimport { csx } from \"../../../utils\";\nimport \"../CheckboxInput/CheckboxInput.css\";\nimport \"./CheckboxRadioGroup.css\";\n\nexport interface CheckboxRadioGroupItem {\n /**\n * Unique value for the radio option.\n */\n value: string;\n\n /**\n * Label displayed next to the radio button.\n */\n label: string | ReactNode;\n\n /**\n * Optional description text below the label.\n */\n description?: string | ReactNode;\n\n /**\n * Whether this specific option is disabled.\n * @default false\n */\n isDisabled?: boolean;\n}\n\nexport interface CheckboxRadioGroupProps {\n /**\n * The name attribute for the radio group (for form submission).\n */\n name: string;\n\n /**\n * Array of radio options.\n */\n items: CheckboxRadioGroupItem[];\n\n /**\n * Currently selected value (controlled mode).\n */\n value?: string;\n\n /**\n * Default selected value (uncontrolled mode).\n */\n defaultValue?: string;\n\n /**\n * Callback when selection changes.\n */\n onChange?: (value: string) => void;\n\n /**\n * Whether the entire group is disabled.\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * Whether selection is required.\n * @default false\n */\n isRequired?: boolean;\n\n /**\n * Error message or element.\n */\n error?: ReactNode | string;\n\n /**\n * Layout orientation.\n * @default \"vertical\"\n */\n orientation?: \"vertical\" | \"horizontal\";\n\n /**\n * Whether radio buttons are round or square.\n * @default false\n */\n round?: boolean;\n\n /**\n * Test ID for the group.\n */\n \"data-testid\"?: string;\n}\n\n/**\n * A declaritive radio group for single-select lists.\n *\n * API:\n * - {@link CheckboxRadioGroupProps}\n * - {@link CheckboxRadioGroupItem}\n */\nexport const CheckboxRadioGroup = forwardRef<\n HTMLDivElement,\n CheckboxRadioGroupProps\n>(\n (\n {\n name,\n items,\n value,\n defaultValue,\n onChange,\n isDisabled = false,\n isRequired = false,\n orientation = \"vertical\",\n round = false,\n error,\n \"data-testid\": testId,\n },\n ref,\n ) => {\n const errorId = typeof error === \"string\" ? `${name}-error` : undefined;\n\n return (\n <div>\n <RadixRadioGroup.Root\n ref={ref}\n name={name}\n value={value}\n defaultValue={defaultValue}\n onValueChange={onChange}\n disabled={isDisabled}\n required={isRequired}\n orientation={orientation}\n className={csx(\n \"proton-CheckboxRadioGroup\",\n `proton-CheckboxRadioGroup--${orientation}`,\n )}\n aria-invalid={Boolean(error)}\n aria-errormessage={errorId}\n data-testid={testId}\n >\n {items.map((item) => {\n const itemId = `${name}-${item.value}`;\n const itemDisabled = isDisabled || item.isDisabled;\n const descriptionId =\n typeof item.description === \"string\"\n ? `${itemId}-description`\n : undefined;\n\n return (\n <div\n key={item.value}\n className={csx(\n itemDisabled && \"proton-CheckboxInput--disabled\",\n )}\n >\n <div\n className={csx(\n \"proton-CheckboxInput__container\",\n round && \"proton-CheckboxInput__container--round\",\n )}\n >\n <RadixRadioGroup.Item\n id={itemId}\n value={item.value}\n disabled={item.isDisabled}\n className={csx(\n \"proton-CheckboxInput__input\",\n round && \"proton-CheckboxInput__input--round\",\n error && \"proton-CheckboxInput__input--error\",\n )}\n aria-describedby={descriptionId}\n >\n <RadixRadioGroup.Indicator className=\"proton-CheckboxRadioGroup__indicator\" />\n </RadixRadioGroup.Item>\n\n {typeof item.label === \"string\" ? (\n <label\n htmlFor={itemId}\n className=\"proton-CheckboxInput__label\"\n >\n {item.label}\n </label>\n ) : (\n item.label\n )}\n </div>\n\n {typeof item.description === \"string\" ? (\n <div\n id={descriptionId}\n className=\"proton-CheckboxRadioGroup__description\"\n >\n {item.description}\n </div>\n ) : (\n item.description\n )}\n </div>\n );\n })}\n </RadixRadioGroup.Root>\n\n {typeof error === \"string\" ? (\n <div\n role=\"alert\"\n className=\"proton-CheckboxInput__error\"\n id={errorId}\n >\n {error}\n </div>\n ) : (\n error\n )}\n </div>\n );\n },\n);\n\nCheckboxRadioGroup.displayName = \"ProtonUICheckboxRadioGroup\";\n"],"names":["CheckboxRadioGroup","forwardRef","name","items","value","defaultValue","onChange","isDisabled","isRequired","orientation","round","error","testId","ref","errorId","jsx","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EAAA,kBAAA,IAAC,QAAA,CACC,QAASI,EACT,UAAU,8BAET,SAAKD,EAAA,KAAA,GAGRA,EAAK,KAAA,CAAA,CAET,EAEC,OAAOA,EAAK,aAAgB,SAC3BH,EAAA,kBAAA,IAAC,MAAA,CACC,GAAIM,EACJ,UAAU,yCAET,SAAKH,EAAA,WAAA,GAGRA,EAAK,WAAA,CAAA,EA7CFA,EAAK,KAAA,CA+CZ,CAEH,CAAA,CACH,EAEC,OAAOP,GAAU,SAChBI,EAAA,kBAAA,IAAC,MAAA,CACC,KAAK,QACL,UAAU,8BACV,GAAID,EAEH,SAAAH,CAAA,CAAA,EAGHA,CAEJ,CAAA,CAAA,CAEJ,CACF,EAEAX,EAAmB,YAAc"}
@@ -1,51 +1,50 @@
1
1
  import { j as r } from "../../../node_modules/react/jsx-runtime.es.js";
2
- import { forwardRef as C } from "react";
3
- import { RadioGroup as n } from "radix-ui";
4
- import { CheckboxIndicator as I } from "../CheckboxIndicator.es.js";
2
+ import { forwardRef as I } from "react";
3
+ import { RadioGroup as t } from "radix-ui";
5
4
  /* empty css */
6
5
  /* empty css */
7
6
  import { csx as i } from "../../../utils/string.es.js";
8
- const v = C(
7
+ const m = I(
9
8
  ({
10
- name: a,
11
- items: x,
12
- value: u,
9
+ name: s,
10
+ items: u,
11
+ value: x,
13
12
  defaultValue: b,
14
13
  onChange: h,
15
- isDisabled: d = !1,
14
+ isDisabled: n = !1,
16
15
  isRequired: _ = !1,
17
- orientation: c = "vertical",
18
- round: s = !1,
16
+ orientation: d = "vertical",
17
+ round: p = !1,
19
18
  error: e,
20
- "data-testid": k
19
+ "data-testid": C
21
20
  }, f) => {
22
- const p = typeof e == "string" ? `${a}-error` : void 0;
21
+ const c = typeof e == "string" ? `${s}-error` : void 0;
23
22
  return /* @__PURE__ */ r.jsxs("div", { children: [
24
23
  /* @__PURE__ */ r.jsx(
25
- n.Root,
24
+ t.Root,
26
25
  {
27
26
  ref: f,
28
- name: a,
29
- value: u,
27
+ name: s,
28
+ value: x,
30
29
  defaultValue: b,
31
30
  onValueChange: h,
32
- disabled: d,
31
+ disabled: n,
33
32
  required: _,
34
- orientation: c,
33
+ orientation: d,
35
34
  className: i(
36
35
  "proton-CheckboxRadioGroup",
37
- `proton-CheckboxRadioGroup--${c}`
36
+ `proton-CheckboxRadioGroup--${d}`
38
37
  ),
39
38
  "aria-invalid": !!e,
40
- "aria-errormessage": p,
41
- "data-testid": k,
42
- children: x.map((o) => {
43
- const t = `${a}-${o.value}`, m = d || o.isDisabled, l = typeof o.description == "string" ? `${t}-description` : void 0;
39
+ "aria-errormessage": c,
40
+ "data-testid": C,
41
+ children: u.map((o) => {
42
+ const a = `${s}-${o.value}`, k = n || o.isDisabled, l = typeof o.description == "string" ? `${a}-description` : void 0;
44
43
  return /* @__PURE__ */ r.jsxs(
45
44
  "div",
46
45
  {
47
46
  className: i(
48
- m && "proton-CheckboxInput--disabled"
47
+ k && "proton-CheckboxInput--disabled"
49
48
  ),
50
49
  children: [
51
50
  /* @__PURE__ */ r.jsxs(
@@ -53,37 +52,28 @@ const v = C(
53
52
  {
54
53
  className: i(
55
54
  "proton-CheckboxInput__container",
56
- s && "proton-CheckboxInput__container--round"
55
+ p && "proton-CheckboxInput__container--round"
57
56
  ),
58
57
  children: [
59
58
  /* @__PURE__ */ r.jsx(
60
- n.Item,
59
+ t.Item,
61
60
  {
62
- id: t,
61
+ id: a,
63
62
  value: o.value,
64
63
  disabled: o.isDisabled,
65
64
  className: i(
66
65
  "proton-CheckboxInput__input",
67
- s && "proton-CheckboxInput__input--round",
66
+ p && "proton-CheckboxInput__input--round",
68
67
  e && "proton-CheckboxInput__input--error"
69
68
  ),
70
69
  "aria-describedby": l,
71
- children: /* @__PURE__ */ r.jsx(
72
- n.Indicator,
73
- {
74
- className: i(
75
- !s && "proton-CheckboxRadioGroup__checkmark"
76
- ),
77
- forceMount: !0,
78
- children: /* @__PURE__ */ r.jsx(I, { round: s })
79
- }
80
- )
70
+ children: /* @__PURE__ */ r.jsx(t.Indicator, { className: "proton-CheckboxRadioGroup__indicator" })
81
71
  }
82
72
  ),
83
73
  typeof o.label == "string" ? /* @__PURE__ */ r.jsx(
84
74
  "label",
85
75
  {
86
- htmlFor: t,
76
+ htmlFor: a,
87
77
  className: "proton-CheckboxInput__label",
88
78
  children: o.label
89
79
  }
@@ -111,15 +101,15 @@ const v = C(
111
101
  {
112
102
  role: "alert",
113
103
  className: "proton-CheckboxInput__error",
114
- id: p,
104
+ id: c,
115
105
  children: e
116
106
  }
117
107
  ) : e
118
108
  ] });
119
109
  }
120
110
  );
121
- v.displayName = "ProtonUICheckboxRadioGroup";
111
+ m.displayName = "ProtonUICheckboxRadioGroup";
122
112
  export {
123
- v as CheckboxRadioGroup
113
+ m as CheckboxRadioGroup
124
114
  };
125
115
  //# sourceMappingURL=CheckboxRadioGroup.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxRadioGroup.es.js","sources":["../../../../src/components/Checkbox/CheckboxRadioGroup/CheckboxRadioGroup.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef, ReactNode } from \"react\";\nimport { RadioGroup as RadixRadioGroup } from \"radix-ui\";\nimport { CheckboxIndicator } from \"../CheckboxIndicator\";\n\nimport { csx } from \"../../../utils\";\nimport \"../CheckboxInput/CheckboxInput.css\";\nimport \"./CheckboxRadioGroup.css\";\n\nexport interface CheckboxRadioGroupItem {\n /**\n * Unique value for the radio option.\n */\n value: string;\n\n /**\n * Label displayed next to the radio button.\n */\n label: string | ReactNode;\n\n /**\n * Optional description text below the label.\n */\n description?: string | ReactNode;\n\n /**\n * Whether this specific option is disabled.\n * @default false\n */\n isDisabled?: boolean;\n}\n\nexport interface CheckboxRadioGroupProps {\n /**\n * The name attribute for the radio group (for form submission).\n */\n name: string;\n\n /**\n * Array of radio options.\n */\n items: CheckboxRadioGroupItem[];\n\n /**\n * Currently selected value (controlled mode).\n */\n value?: string;\n\n /**\n * Default selected value (uncontrolled mode).\n */\n defaultValue?: string;\n\n /**\n * Callback when selection changes.\n */\n onChange?: (value: string) => void;\n\n /**\n * Whether the entire group is disabled.\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * Whether selection is required.\n * @default false\n */\n isRequired?: boolean;\n\n /**\n * Error message or element.\n */\n error?: ReactNode | string;\n\n /**\n * Layout orientation.\n * @default \"vertical\"\n */\n orientation?: \"vertical\" | \"horizontal\";\n\n /**\n * Whether radio buttons are round or square.\n * @default false\n */\n round?: boolean;\n\n /**\n * Test ID for the group.\n */\n \"data-testid\"?: string;\n}\n\n/**\n * A declaritive radio group for single-select lists.\n *\n * API:\n * - {@link CheckboxRadioGroupProps}\n * - {@link CheckboxRadioGroupItem}\n */\nexport const CheckboxRadioGroup = forwardRef<\n HTMLDivElement,\n CheckboxRadioGroupProps\n>(\n (\n {\n name,\n items,\n value,\n defaultValue,\n onChange,\n isDisabled = false,\n isRequired = false,\n orientation = \"vertical\",\n round = false,\n error,\n \"data-testid\": testId,\n },\n ref,\n ) => {\n const errorId = typeof error === \"string\" ? `${name}-error` : undefined;\n\n return (\n <div>\n <RadixRadioGroup.Root\n ref={ref}\n name={name}\n value={value}\n defaultValue={defaultValue}\n onValueChange={onChange}\n disabled={isDisabled}\n required={isRequired}\n orientation={orientation}\n className={csx(\n \"proton-CheckboxRadioGroup\",\n `proton-CheckboxRadioGroup--${orientation}`,\n )}\n aria-invalid={Boolean(error)}\n aria-errormessage={errorId}\n data-testid={testId}\n >\n {items.map((item) => {\n const itemId = `${name}-${item.value}`;\n const itemDisabled = isDisabled || item.isDisabled;\n const descriptionId =\n typeof item.description === \"string\"\n ? `${itemId}-description`\n : undefined;\n\n return (\n <div\n key={item.value}\n className={csx(\n itemDisabled && \"proton-CheckboxInput--disabled\",\n )}\n >\n <div\n className={csx(\n \"proton-CheckboxInput__container\",\n round && \"proton-CheckboxInput__container--round\",\n )}\n >\n <RadixRadioGroup.Item\n id={itemId}\n value={item.value}\n disabled={item.isDisabled}\n className={csx(\n \"proton-CheckboxInput__input\",\n round && \"proton-CheckboxInput__input--round\",\n error && \"proton-CheckboxInput__input--error\",\n )}\n aria-describedby={descriptionId}\n >\n <RadixRadioGroup.Indicator\n className={csx(\n !round && \"proton-CheckboxRadioGroup__checkmark\",\n )}\n forceMount\n >\n <CheckboxIndicator round={round} />\n </RadixRadioGroup.Indicator>\n </RadixRadioGroup.Item>\n\n {typeof item.label === \"string\" ? (\n <label\n htmlFor={itemId}\n className=\"proton-CheckboxInput__label\"\n >\n {item.label}\n </label>\n ) : (\n item.label\n )}\n </div>\n\n {typeof item.description === \"string\" ? (\n <div\n id={descriptionId}\n className=\"proton-CheckboxRadioGroup__description\"\n >\n {item.description}\n </div>\n ) : (\n item.description\n )}\n </div>\n );\n })}\n </RadixRadioGroup.Root>\n\n {typeof error === \"string\" ? (\n <div\n role=\"alert\"\n className=\"proton-CheckboxInput__error\"\n id={errorId}\n >\n {error}\n </div>\n ) : (\n error\n )}\n </div>\n );\n },\n);\n\nCheckboxRadioGroup.displayName = \"ProtonUICheckboxRadioGroup\";\n"],"names":["CheckboxRadioGroup","forwardRef","name","items","value","defaultValue","onChange","isDisabled","isRequired","orientation","round","error","testId","ref","errorId","jsx","RadixRadioGroup","csx","item","itemId","itemDisabled","descriptionId","jsxs","CheckboxIndicator"],"mappings":";;;;;;;AAqGO,MAAMA,IAAqBC;AAAA,EAIhC,CACE;AAAA,IACE,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,YAAAC,IAAa;AAAA,IACb,aAAAC,IAAc;AAAA,IACd,OAAAC,IAAQ;AAAA,IACR,OAAAC;AAAA,IACA,eAAeC;AAAA,KAEjBC,MACG;AACH,UAAMC,IAAU,OAAOH,KAAU,WAAW,GAAGT,CAAI,WAAW;AAE9D,kCACG,OACC,EAAA,UAAA;AAAA,MAAAa,gBAAAA,EAAA;AAAA,QAACC,EAAgB;AAAA,QAAh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,wBACF;AAAA,wBAEC,OAAOQ,EAAK,SAAU,WACrBH,gBAAAA,EAAA;AAAA,0BAAC;AAAA,0BAAA;AAAA,4BACC,SAASI;AAAA,4BACT,WAAU;AAAA,4BAET,UAAKD,EAAA;AAAA,0BAAA;AAAA,4BAGRA,EAAK;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBAET;AAAA,kBAEC,OAAOA,EAAK,eAAgB,WAC3BH,gBAAAA,EAAA;AAAA,oBAAC;AAAA,oBAAA;AAAA,sBACC,IAAIM;AAAA,sBACJ,WAAU;AAAA,sBAET,UAAKH,EAAA;AAAA,oBAAA;AAAA,sBAGRA,EAAK;AAAA,gBAAA;AAAA,cAAA;AAAA,cApDFA,EAAK;AAAA,YAAA;AAAA,UAsDZ,CAEH;AAAA,QAAA;AAAA,MACH;AAAA,MAEC,OAAOP,KAAU,WAChBI,gBAAAA,EAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,WAAU;AAAA,UACV,IAAID;AAAA,UAEH,UAAAH;AAAA,QAAA;AAAA,MAAA,IAGHA;AAAA,IAEJ,EAAA,CAAA;AAAA,EAEJ;AACF;AAEAX,EAAmB,cAAc;"}
1
+ {"version":3,"file":"CheckboxRadioGroup.es.js","sources":["../../../../src/components/Checkbox/CheckboxRadioGroup/CheckboxRadioGroup.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef, ReactNode } from \"react\";\nimport { RadioGroup as RadixRadioGroup } from \"radix-ui\";\n\nimport { csx } from \"../../../utils\";\nimport \"../CheckboxInput/CheckboxInput.css\";\nimport \"./CheckboxRadioGroup.css\";\n\nexport interface CheckboxRadioGroupItem {\n /**\n * Unique value for the radio option.\n */\n value: string;\n\n /**\n * Label displayed next to the radio button.\n */\n label: string | ReactNode;\n\n /**\n * Optional description text below the label.\n */\n description?: string | ReactNode;\n\n /**\n * Whether this specific option is disabled.\n * @default false\n */\n isDisabled?: boolean;\n}\n\nexport interface CheckboxRadioGroupProps {\n /**\n * The name attribute for the radio group (for form submission).\n */\n name: string;\n\n /**\n * Array of radio options.\n */\n items: CheckboxRadioGroupItem[];\n\n /**\n * Currently selected value (controlled mode).\n */\n value?: string;\n\n /**\n * Default selected value (uncontrolled mode).\n */\n defaultValue?: string;\n\n /**\n * Callback when selection changes.\n */\n onChange?: (value: string) => void;\n\n /**\n * Whether the entire group is disabled.\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * Whether selection is required.\n * @default false\n */\n isRequired?: boolean;\n\n /**\n * Error message or element.\n */\n error?: ReactNode | string;\n\n /**\n * Layout orientation.\n * @default \"vertical\"\n */\n orientation?: \"vertical\" | \"horizontal\";\n\n /**\n * Whether radio buttons are round or square.\n * @default false\n */\n round?: boolean;\n\n /**\n * Test ID for the group.\n */\n \"data-testid\"?: string;\n}\n\n/**\n * A declaritive radio group for single-select lists.\n *\n * API:\n * - {@link CheckboxRadioGroupProps}\n * - {@link CheckboxRadioGroupItem}\n */\nexport const CheckboxRadioGroup = forwardRef<\n HTMLDivElement,\n CheckboxRadioGroupProps\n>(\n (\n {\n name,\n items,\n value,\n defaultValue,\n onChange,\n isDisabled = false,\n isRequired = false,\n orientation = \"vertical\",\n round = false,\n error,\n \"data-testid\": testId,\n },\n ref,\n ) => {\n const errorId = typeof error === \"string\" ? `${name}-error` : undefined;\n\n return (\n <div>\n <RadixRadioGroup.Root\n ref={ref}\n name={name}\n value={value}\n defaultValue={defaultValue}\n onValueChange={onChange}\n disabled={isDisabled}\n required={isRequired}\n orientation={orientation}\n className={csx(\n \"proton-CheckboxRadioGroup\",\n `proton-CheckboxRadioGroup--${orientation}`,\n )}\n aria-invalid={Boolean(error)}\n aria-errormessage={errorId}\n data-testid={testId}\n >\n {items.map((item) => {\n const itemId = `${name}-${item.value}`;\n const itemDisabled = isDisabled || item.isDisabled;\n const descriptionId =\n typeof item.description === \"string\"\n ? `${itemId}-description`\n : undefined;\n\n return (\n <div\n key={item.value}\n className={csx(\n itemDisabled && \"proton-CheckboxInput--disabled\",\n )}\n >\n <div\n className={csx(\n \"proton-CheckboxInput__container\",\n round && \"proton-CheckboxInput__container--round\",\n )}\n >\n <RadixRadioGroup.Item\n id={itemId}\n value={item.value}\n disabled={item.isDisabled}\n className={csx(\n \"proton-CheckboxInput__input\",\n round && \"proton-CheckboxInput__input--round\",\n error && \"proton-CheckboxInput__input--error\",\n )}\n aria-describedby={descriptionId}\n >\n <RadixRadioGroup.Indicator className=\"proton-CheckboxRadioGroup__indicator\" />\n </RadixRadioGroup.Item>\n\n {typeof item.label === \"string\" ? (\n <label\n htmlFor={itemId}\n className=\"proton-CheckboxInput__label\"\n >\n {item.label}\n </label>\n ) : (\n item.label\n )}\n </div>\n\n {typeof item.description === \"string\" ? (\n <div\n id={descriptionId}\n className=\"proton-CheckboxRadioGroup__description\"\n >\n {item.description}\n </div>\n ) : (\n item.description\n )}\n </div>\n );\n })}\n </RadixRadioGroup.Root>\n\n {typeof error === \"string\" ? (\n <div\n role=\"alert\"\n className=\"proton-CheckboxInput__error\"\n id={errorId}\n >\n {error}\n </div>\n ) : (\n error\n )}\n </div>\n );\n },\n);\n\nCheckboxRadioGroup.displayName = \"ProtonUICheckboxRadioGroup\";\n"],"names":["CheckboxRadioGroup","forwardRef","name","items","value","defaultValue","onChange","isDisabled","isRequired","orientation","round","error","testId","ref","errorId","jsx","RadixRadioGroup","csx","item","itemId","itemDisabled","descriptionId","jsxs"],"mappings":";;;;;;AAoGO,MAAMA,IAAqBC;AAAA,EAIhC,CACE;AAAA,IACE,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,YAAAC,IAAa;AAAA,IACb,aAAAC,IAAc;AAAA,IACd,OAAAC,IAAQ;AAAA,IACR,OAAAC;AAAA,IACA,eAAeC;AAAA,KAEjBC,MACG;AACH,UAAMC,IAAU,OAAOH,KAAU,WAAW,GAAGT,CAAI,WAAW;AAE9D,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,0BAAA;AAAA,4BACC,SAASI;AAAA,4BACT,WAAU;AAAA,4BAET,UAAKD,EAAA;AAAA,0BAAA;AAAA,4BAGRA,EAAK;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBAET;AAAA,kBAEC,OAAOA,EAAK,eAAgB,WAC3BH,gBAAAA,EAAA;AAAA,oBAAC;AAAA,oBAAA;AAAA,sBACC,IAAIM;AAAA,sBACJ,WAAU;AAAA,sBAET,UAAKH,EAAA;AAAA,oBAAA;AAAA,sBAGRA,EAAK;AAAA,gBAAA;AAAA,cAAA;AAAA,cA7CFA,EAAK;AAAA,YAAA;AAAA,UA+CZ,CAEH;AAAA,QAAA;AAAA,MACH;AAAA,MAEC,OAAOP,KAAU,WAChBI,gBAAAA,EAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,WAAU;AAAA,UACV,IAAID;AAAA,UAEH,UAAAH;AAAA,QAAA;AAAA,MAAA,IAGHA;AAAA,IAEJ,EAAA,CAAA;AAAA,EAEJ;AACF;AAEAX,EAAmB,cAAc;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../node_modules/react/jsx-runtime.cjs.js"),n=require("react"),u=require("../../node_modules/@react-aria/dialog/dist/useDialog.cjs.js");;/* empty css */function a({title:e,children:s,...i}){let r=n.useRef(null),{dialogProps:t,titleProps:l}=u.useDialog(i,r);return o.jsxRuntimeExports.jsxs("div",{...t,ref:r,className:"proton-Dialog",children:[e&&o.jsxRuntimeExports.jsx("h3",{...l,className:"proton-Dialog__header",children:e}),s]})}exports.Dialog=a;
2
+ //# sourceMappingURL=Dialog.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.cjs.js","sources":["../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { useRef } from \"react\";\nimport { type AriaDialogProps, useDialog } from \"@react-aria/dialog\";\n\nimport \"./Dialog.css\";\n\ninterface DialogProps extends AriaDialogProps {\n title?: React.ReactNode;\n children: React.ReactNode;\n}\n\n/**\n * Intended use in overlay containers such as modals or popovers.\n *\n * API:\n * - {@link DialogProps}\n * - extends {@link AriaDialogProps}\n */\nexport function Dialog({ title, children, ...props }: DialogProps) {\n let ref = useRef(null);\n let { dialogProps, titleProps } = useDialog(props, ref);\n\n return (\n <div {...dialogProps} ref={ref} className=\"proton-Dialog\">\n {title && (\n <h3 {...titleProps} className=\"proton-Dialog__header\">\n {title}\n </h3>\n )}\n {children}\n </div>\n );\n}\n"],"names":["Dialog","title","children","props","ref","useRef","dialogProps","titleProps","useDialog"],"mappings":"0QAmBO,SAASA,EAAO,CAAE,MAAAC,EAAO,SAAAC,EAAU,GAAGC,GAAsB,CAC7D,IAAAC,EAAMC,SAAO,IAAI,EACjB,CAAE,YAAAC,EAAa,WAAAC,CAAA,EAAeC,EAAAA,UAAUL,EAAOC,CAAG,EAEtD,gCACG,MAAK,CAAA,GAAGE,EAAa,IAAAF,EAAU,UAAU,gBACvC,SAAA,CAAAH,2BACE,KAAI,CAAA,GAAGM,EAAY,UAAU,wBAC3B,SACHN,EAAA,EAEDC,CACH,CAAA,CAAA,CAEJ"}
@@ -0,0 +1,15 @@
1
+ import { j as r } from "../../node_modules/react/jsx-runtime.es.js";
2
+ import { useRef as a } from "react";
3
+ import { useDialog as p } from "../../node_modules/@react-aria/dialog/dist/useDialog.es.js";
4
+ /* empty css */
5
+ function u({ title: o, children: s, ...i }) {
6
+ let e = a(null), { dialogProps: t, titleProps: l } = p(i, e);
7
+ return /* @__PURE__ */ r.jsxs("div", { ...t, ref: e, className: "proton-Dialog", children: [
8
+ o && /* @__PURE__ */ r.jsx("h3", { ...l, className: "proton-Dialog__header", children: o }),
9
+ s
10
+ ] });
11
+ }
12
+ export {
13
+ u as Dialog
14
+ };
15
+ //# sourceMappingURL=Dialog.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.es.js","sources":["../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { useRef } from \"react\";\nimport { type AriaDialogProps, useDialog } from \"@react-aria/dialog\";\n\nimport \"./Dialog.css\";\n\ninterface DialogProps extends AriaDialogProps {\n title?: React.ReactNode;\n children: React.ReactNode;\n}\n\n/**\n * Intended use in overlay containers such as modals or popovers.\n *\n * API:\n * - {@link DialogProps}\n * - extends {@link AriaDialogProps}\n */\nexport function Dialog({ title, children, ...props }: DialogProps) {\n let ref = useRef(null);\n let { dialogProps, titleProps } = useDialog(props, ref);\n\n return (\n <div {...dialogProps} ref={ref} className=\"proton-Dialog\">\n {title && (\n <h3 {...titleProps} className=\"proton-Dialog__header\">\n {title}\n </h3>\n )}\n {children}\n </div>\n );\n}\n"],"names":["Dialog","title","children","props","ref","useRef","dialogProps","titleProps","useDialog"],"mappings":";;;;AAmBO,SAASA,EAAO,EAAE,OAAAC,GAAO,UAAAC,GAAU,GAAGC,KAAsB;AAC7D,MAAAC,IAAMC,EAAO,IAAI,GACjB,EAAE,aAAAC,GAAa,YAAAC,EAAA,IAAeC,EAAUL,GAAOC,CAAG;AAEtD,gCACG,OAAK,EAAA,GAAGE,GAAa,KAAAF,GAAU,WAAU,iBACvC,UAAA;AAAA,IAAAH,2BACE,MAAI,EAAA,GAAGM,GAAY,WAAU,yBAC3B,UACHN,GAAA;AAAA,IAEDC;AAAA,EACH,EAAA,CAAA;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../node_modules/react/jsx-runtime.cjs.js"),e=require("../../node_modules/color2k/dist/index.exports.import.es.cjs.js"),m=require("../ThemeProvider.cjs.js");;/* empty css */const v=require("../../utils/string.cjs.js"),x=({children:o,hasPrimaryGradient:s=!1,"data-testid":i})=>{const{hasPalette:l,palette:n,style:c}=m.useTheme(),t=c["--proton-control__elevation-color"];let r=t,a=e.transparentize(t,.01);if(l&&(r=e.transparentize(t,.1),a=e.transparentize(t,.12),s)){const p=e.transparentize(n.PRIMARY.MEDIUM_LIGHT,.88),d=e.transparentize(n.PRIMARY.LIGHT,.84);r=e.mix(r,p,.15),a=e.mix(a,d,.15)}return u.jsxRuntimeExports.jsx("div",{className:v.csx("proton-Elevation","proton-Elevation--glass"),"data-testid":i,role:"presentation","aria-label":"Elevated content area",style:{background:`linear-gradient(to top left, ${r}, ${a})`},children:o})};exports.Elevation=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../node_modules/react/jsx-runtime.cjs.js"),e=require("../../node_modules/color2k/dist/index.exports.import.es.cjs.js"),m=require("../ThemeProvider.cjs.js");;/* empty css */const x=({children:o,hasPrimaryGradient:i=!1,"data-testid":s})=>{const{hasPalette:l,palette:n,style:c}=m.useTheme(),t=c["--proton-control__background-color-light"];let r=t,a=e.transparentize(t,.01);if(l&&(r=e.transparentize(t,.1),a=e.transparentize(t,.12),i)){const d=e.transparentize(n.PRIMARY.MEDIUM_LIGHT,.88),p=e.transparentize(n.PRIMARY.LIGHT,.84);r=e.mix(r,d,.15),a=e.mix(a,p,.15)}return u.jsxRuntimeExports.jsx("div",{className:"proton-Elevation","data-testid":s,role:"presentation","aria-label":"Elevated content area",style:{background:`linear-gradient(to top left, ${r}, ${a})`},children:o})};exports.Elevation=x;
2
2
  //# sourceMappingURL=Elevation.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Elevation.cjs.js","sources":["../../../src/components/Elevation/Elevation.tsx"],"sourcesContent":["\"use client\";\n\nimport { ReactNode } from \"react\";\nimport { transparentize, mix } from \"color2k\";\nimport { useTheme } from \"../ThemeProvider\";\nimport \"./Elevation.css\";\nimport { csx } from \"../../utils\";\n\nexport interface ElevationProps {\n /**\n * The content to be displayed within the elevation.\n */\n children?: ReactNode;\n /**\n * The data-testid attribute for testing purposes.\n */\n \"data-testid\"?: string;\n /**\n * Whether the elevation should have a background gradient.\n * @important only works in custom dark mode\n * @default false\n */\n hasPrimaryGradient?: boolean;\n}\n\n/**\n * Elevation component creates a visual elevation effect using the theme-aware background color.\n *\n * This component is designed to be used as a visual layer that sits on top of other content\n * to create a sense of depth or hierarchy in the UI. It uses the `--proton-control__background-color-light`\n * CSS variable which is theme-aware and will adapt to light, dark themes.\n *\n * API:\n * - {@link ElevationProps}\n */\nexport const Elevation = ({\n children,\n hasPrimaryGradient = false,\n \"data-testid\": dataTestId,\n}: ElevationProps) => {\n const { hasPalette, palette, style } = useTheme();\n\n const defaultBg = style[\"--proton-control__elevation-color\"];\n let primaryDark = defaultBg;\n let secondaryDark = transparentize(defaultBg, 0.01);\n\n if (hasPalette) {\n primaryDark = transparentize(defaultBg, 0.1);\n secondaryDark = transparentize(defaultBg, 0.12);\n if (hasPrimaryGradient) {\n const basePrimary = transparentize(palette.PRIMARY.MEDIUM_LIGHT, 0.88);\n const baseSecondary = transparentize(palette.PRIMARY.LIGHT, 0.84);\n primaryDark = mix(primaryDark, basePrimary, 0.15);\n secondaryDark = mix(secondaryDark, baseSecondary, 0.15);\n }\n }\n\n return (\n <div\n className={csx(\"proton-Elevation\", \"proton-Elevation--glass\")}\n data-testid={dataTestId}\n role=\"presentation\"\n aria-label=\"Elevated content area\"\n style={{\n background: `linear-gradient(to top left, ${primaryDark}, ${secondaryDark})`,\n }}\n >\n {children}\n </div>\n );\n};\n"],"names":["Elevation","children","hasPrimaryGradient","dataTestId","hasPalette","palette","style","useTheme","defaultBg","primaryDark","secondaryDark","transparentize","basePrimary","baseSecondary","mix","jsx","csx"],"mappings":"+UAmCaA,EAAY,CAAC,CACxB,SAAAC,EACA,mBAAAC,EAAqB,GACrB,cAAeC,CACjB,IAAsB,CACpB,KAAM,CAAE,WAAAC,EAAY,QAAAC,EAAS,MAAAC,GAAUC,EAAS,SAAA,EAE1CC,EAAYF,EAAM,mCAAmC,EAC3D,IAAIG,EAAcD,EACdE,EAAgBC,EAAAA,eAAeH,EAAW,GAAI,EAElD,GAAIJ,IACYK,EAAAE,EAAA,eAAeH,EAAW,EAAG,EAC3BE,EAAAC,EAAA,eAAeH,EAAW,GAAI,EAC1CN,GAAoB,CACtB,MAAMU,EAAcD,EAAAA,eAAeN,EAAQ,QAAQ,aAAc,GAAI,EAC/DQ,EAAgBF,EAAAA,eAAeN,EAAQ,QAAQ,MAAO,GAAI,EAClDI,EAAAK,EAAAA,IAAIL,EAAaG,EAAa,GAAI,EAChCF,EAAAI,EAAAA,IAAIJ,EAAeG,EAAe,GAAI,CACxD,CAIA,OAAAE,EAAA,kBAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,IAAI,mBAAoB,yBAAyB,EAC5D,cAAab,EACb,KAAK,eACL,aAAW,wBACX,MAAO,CACL,WAAY,gCAAgCM,CAAW,KAAKC,CAAa,GAC3E,EAEC,SAAAT,CAAA,CAAA,CAGP"}
1
+ {"version":3,"file":"Elevation.cjs.js","sources":["../../../src/components/Elevation/Elevation.tsx"],"sourcesContent":["\"use client\";\n\nimport { ReactNode } from \"react\";\nimport { transparentize, mix } from \"color2k\";\nimport { useTheme } from \"../ThemeProvider\";\nimport \"./Elevation.css\";\n\nexport interface ElevationProps {\n /**\n * The content to be displayed within the elevation.\n */\n children?: ReactNode;\n /**\n * The data-testid attribute for testing purposes.\n */\n \"data-testid\"?: string;\n /**\n * Whether the elevation should have a background gradient.\n * @important only works in custom dark mode\n * @default false\n */\n hasPrimaryGradient?: boolean;\n}\n\n/**\n * Elevation component creates a visual elevation effect using the theme-aware background color.\n *\n * This component is designed to be used as a visual layer that sits on top of other content\n * to create a sense of depth or hierarchy in the UI. It uses the `--proton-control__background-color-light`\n * CSS variable which is theme-aware and will adapt to light, dark themes.\n *\n * API:\n * - {@link ElevationProps}\n */\nexport const Elevation = ({\n children,\n hasPrimaryGradient = false,\n \"data-testid\": dataTestId,\n}: ElevationProps) => {\n const { hasPalette, palette, style } = useTheme();\n\n const defaultBg = style[\"--proton-control__background-color-light\"];\n let primaryDark = defaultBg;\n let secondaryDark = transparentize(defaultBg, 0.01);\n\n if (hasPalette) {\n primaryDark = transparentize(defaultBg, 0.1);\n secondaryDark = transparentize(defaultBg, 0.12);\n if (hasPrimaryGradient) {\n const basePrimary = transparentize(palette.PRIMARY.MEDIUM_LIGHT, 0.88);\n const baseSecondary = transparentize(palette.PRIMARY.LIGHT, 0.84);\n primaryDark = mix(primaryDark, basePrimary, 0.15);\n secondaryDark = mix(secondaryDark, baseSecondary, 0.15);\n }\n }\n\n return (\n <div\n className=\"proton-Elevation\"\n data-testid={dataTestId}\n role=\"presentation\"\n aria-label=\"Elevated content area\"\n style={{\n background: `linear-gradient(to top left, ${primaryDark}, ${secondaryDark})`,\n }}\n >\n {children}\n </div>\n );\n};\n"],"names":["Elevation","children","hasPrimaryGradient","dataTestId","hasPalette","palette","style","useTheme","defaultBg","primaryDark","secondaryDark","transparentize","basePrimary","baseSecondary","mix","jsx"],"mappings":"kSAkCO,MAAMA,EAAY,CAAC,CACxB,SAAAC,EACA,mBAAAC,EAAqB,GACrB,cAAeC,CACjB,IAAsB,CACpB,KAAM,CAAE,WAAAC,EAAY,QAAAC,EAAS,MAAAC,GAAUC,EAAS,SAAA,EAE1CC,EAAYF,EAAM,0CAA0C,EAClE,IAAIG,EAAcD,EACdE,EAAgBC,EAAAA,eAAeH,EAAW,GAAI,EAElD,GAAIJ,IACYK,EAAAE,EAAA,eAAeH,EAAW,EAAG,EAC3BE,EAAAC,EAAA,eAAeH,EAAW,GAAI,EAC1CN,GAAoB,CACtB,MAAMU,EAAcD,EAAAA,eAAeN,EAAQ,QAAQ,aAAc,GAAI,EAC/DQ,EAAgBF,EAAAA,eAAeN,EAAQ,QAAQ,MAAO,GAAI,EAClDI,EAAAK,EAAAA,IAAIL,EAAaG,EAAa,GAAI,EAChCF,EAAAI,EAAAA,IAAIJ,EAAeG,EAAe,GAAI,CACxD,CAIA,OAAAE,EAAA,kBAAA,IAAC,MAAA,CACC,UAAU,mBACV,cAAaZ,EACb,KAAK,eACL,aAAW,wBACX,MAAO,CACL,WAAY,gCAAgCM,CAAW,KAAKC,CAAa,GAC3E,EAEC,SAAAT,CAAA,CAAA,CAGP"}