@purpur/library 9.0.5 → 9.0.7

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 (255) hide show
  1. package/CHANGELOG.json +39 -0
  2. package/CHANGELOG.md +20 -1
  3. package/dist/{RichText-DRacgpis.mjs → RichText-Bi51HE6X.mjs} +3 -3
  4. package/dist/{RichText-DRacgpis.mjs.map → RichText-Bi51HE6X.mjs.map} +1 -1
  5. package/dist/{RichText-DMyGiMN0.js → RichText-DNroJJXv.js} +2 -2
  6. package/dist/{RichText-DMyGiMN0.js.map → RichText-DNroJJXv.js.map} +1 -1
  7. package/dist/{ThemeProvider-CrjMv3M8.mjs → ThemeProvider-BR1hJQOD.mjs} +85 -85
  8. package/dist/{ThemeProvider-CrjMv3M8.mjs.map → ThemeProvider-BR1hJQOD.mjs.map} +1 -1
  9. package/dist/{accordion-DWflnyWa.mjs → accordion-BKTz9DM6.mjs} +18 -18
  10. package/dist/{accordion-DWflnyWa.mjs.map → accordion-BKTz9DM6.mjs.map} +1 -1
  11. package/dist/{accordion-CF2fj2uq.js → accordion-DX8efWOt.js} +2 -2
  12. package/dist/{accordion-CF2fj2uq.js.map → accordion-DX8efWOt.js.map} +1 -1
  13. package/dist/accordion.cjs.js +1 -1
  14. package/dist/accordion.es.js +1 -1
  15. package/dist/{alert-badge-u7qAhYbR.mjs → alert-badge-DR8cigWu.mjs} +3 -3
  16. package/dist/{alert-badge-u7qAhYbR.mjs.map → alert-badge-DR8cigWu.mjs.map} +1 -1
  17. package/dist/alert-badge.es.js +1 -1
  18. package/dist/{autocomplete-yD0-1vlF.js → autocomplete-6qSqK3SI.js} +2 -2
  19. package/dist/{autocomplete-yD0-1vlF.js.map → autocomplete-6qSqK3SI.js.map} +1 -1
  20. package/dist/{autocomplete-0kGG_STe.mjs → autocomplete-B4dZx9zF.mjs} +3 -3
  21. package/dist/{autocomplete-0kGG_STe.mjs.map → autocomplete-B4dZx9zF.mjs.map} +1 -1
  22. package/dist/autocomplete.cjs.js +1 -1
  23. package/dist/autocomplete.es.js +1 -1
  24. package/dist/button-BfYKNBmC.mjs +102 -0
  25. package/dist/button-BfYKNBmC.mjs.map +1 -0
  26. package/dist/button-DDYGuqZ0.js +2 -0
  27. package/dist/button-DDYGuqZ0.js.map +1 -0
  28. package/dist/button.cjs.js +1 -1
  29. package/dist/button.es.js +1 -1
  30. package/dist/{calendar-pMM0fKEu.js → calendar-CxkJMONO.js} +2 -2
  31. package/dist/{calendar-pMM0fKEu.js.map → calendar-CxkJMONO.js.map} +1 -1
  32. package/dist/{calendar-DDie8jSH.mjs → calendar-vALLklKV.mjs} +2 -2
  33. package/dist/{calendar-DDie8jSH.mjs.map → calendar-vALLklKV.mjs.map} +1 -1
  34. package/dist/calendar.cjs.js +1 -1
  35. package/dist/calendar.es.js +1 -1
  36. package/dist/{card-DiMVw06l.mjs → card-CkZQZOz1.mjs} +9 -9
  37. package/dist/{card-DiMVw06l.mjs.map → card-CkZQZOz1.mjs.map} +1 -1
  38. package/dist/{card-B512KHpr.js → card-VMa3cGCP.js} +2 -2
  39. package/dist/{card-B512KHpr.js.map → card-VMa3cGCP.js.map} +1 -1
  40. package/dist/card.cjs.js +1 -1
  41. package/dist/card.es.js +1 -1
  42. package/dist/{checkbox-LYzMiXu7.mjs → checkbox-D6qWgpWR.mjs} +8 -8
  43. package/dist/{checkbox-LYzMiXu7.mjs.map → checkbox-D6qWgpWR.mjs.map} +1 -1
  44. package/dist/checkbox.es.js +1 -1
  45. package/dist/{chip-group-aj1fdnjC.js → chip-group-B775zvKD.js} +2 -2
  46. package/dist/{chip-group-aj1fdnjC.js.map → chip-group-B775zvKD.js.map} +1 -1
  47. package/dist/{chip-group-CJVvfl_J.mjs → chip-group-xuOe7nL3.mjs} +3 -3
  48. package/dist/{chip-group-CJVvfl_J.mjs.map → chip-group-xuOe7nL3.mjs.map} +1 -1
  49. package/dist/chip-group.cjs.js +1 -1
  50. package/dist/chip-group.es.js +1 -1
  51. package/dist/components/button/src/button.d.ts +1 -2
  52. package/dist/components/button/src/button.d.ts.map +1 -1
  53. package/dist/components/date-field/src/date-field.d.ts.map +1 -1
  54. package/dist/components/stepper/src/stepper-button.d.ts.map +1 -1
  55. package/dist/components/table/src/draggable-table.d.ts.map +1 -1
  56. package/dist/components/table/src/table-settings-drawer.d.ts.map +1 -1
  57. package/dist/components/table/src/table-toolbar.d.ts.map +1 -1
  58. package/dist/components/tabs/src/tab-content.d.ts.map +1 -1
  59. package/dist/components/tabs/src/tabs.d.ts.map +1 -1
  60. package/dist/{container-Bw12NgHN.mjs → container-DLjBTB_w.mjs} +3 -3
  61. package/dist/{container-Bw12NgHN.mjs.map → container-DLjBTB_w.mjs.map} +1 -1
  62. package/dist/container.es.js +1 -1
  63. package/dist/{content-block-DUcjAZgG.mjs → content-block-BMOvlH7a.mjs} +6 -6
  64. package/dist/{content-block-DUcjAZgG.mjs.map → content-block-BMOvlH7a.mjs.map} +1 -1
  65. package/dist/{content-block-kzdUWgvH.js → content-block-Cd7xSE8t.js} +2 -2
  66. package/dist/{content-block-kzdUWgvH.js.map → content-block-Cd7xSE8t.js.map} +1 -1
  67. package/dist/content-block.cjs.js +1 -1
  68. package/dist/content-block.es.js +1 -1
  69. package/dist/{countdown-DxAGVUFI.mjs → countdown-DZ4IwkNy.mjs} +12 -12
  70. package/dist/{countdown-DxAGVUFI.mjs.map → countdown-DZ4IwkNy.mjs.map} +1 -1
  71. package/dist/countdown.es.js +1 -1
  72. package/dist/date-field-CORqon6B.js +2 -0
  73. package/dist/{date-field-CPiTZqa0.js.map → date-field-CORqon6B.js.map} +1 -1
  74. package/dist/{date-field-D_6iP2fC.mjs → date-field-CTJB8O0e.mjs} +325 -310
  75. package/dist/{date-field-D_6iP2fC.mjs.map → date-field-CTJB8O0e.mjs.map} +1 -1
  76. package/dist/date-field.cjs.js +1 -1
  77. package/dist/date-field.es.js +1 -1
  78. package/dist/{date-picker-BRnwwZv1.mjs → date-picker-CJcIJ5VL.mjs} +5 -5
  79. package/dist/{date-picker-BRnwwZv1.mjs.map → date-picker-CJcIJ5VL.mjs.map} +1 -1
  80. package/dist/{date-picker-DlJGggam.js → date-picker-Dv3W05Hf.js} +2 -2
  81. package/dist/{date-picker-DlJGggam.js.map → date-picker-Dv3W05Hf.js.map} +1 -1
  82. package/dist/date-picker.cjs.js +1 -1
  83. package/dist/date-picker.es.js +1 -1
  84. package/dist/{dismissable-chip-group-DsO2cZaF.js → dismissable-chip-group-CnziecOt.js} +2 -2
  85. package/dist/{dismissable-chip-group-DsO2cZaF.js.map → dismissable-chip-group-CnziecOt.js.map} +1 -1
  86. package/dist/{dismissable-chip-group-Bl0D18qM.mjs → dismissable-chip-group-ZCYOt1sB.mjs} +2 -2
  87. package/dist/{dismissable-chip-group-Bl0D18qM.mjs.map → dismissable-chip-group-ZCYOt1sB.mjs.map} +1 -1
  88. package/dist/dismissable-chip-group.cjs.js +1 -1
  89. package/dist/dismissable-chip-group.es.js +1 -1
  90. package/dist/{drawer-nBpCtIdI.js → drawer-Ce5LNpU2.js} +2 -2
  91. package/dist/{drawer-nBpCtIdI.js.map → drawer-Ce5LNpU2.js.map} +1 -1
  92. package/dist/{drawer-Boqmgh-i.mjs → drawer-DSFZ61OH.mjs} +14 -14
  93. package/dist/{drawer-Boqmgh-i.mjs.map → drawer-DSFZ61OH.mjs.map} +1 -1
  94. package/dist/drawer.cjs.js +1 -1
  95. package/dist/drawer.es.js +1 -1
  96. package/dist/{floating-ui.react-dom-0ol4sFzt.mjs → floating-ui.react-dom-gsHLgcoR.mjs} +5 -5
  97. package/dist/{floating-ui.react-dom-0ol4sFzt.mjs.map → floating-ui.react-dom-gsHLgcoR.mjs.map} +1 -1
  98. package/dist/{footer-DrjAwjuL.js → footer-BL0ewBZT.js} +2 -2
  99. package/dist/{footer-DrjAwjuL.js.map → footer-BL0ewBZT.js.map} +1 -1
  100. package/dist/{footer-DcWsihxS.mjs → footer-cH07Xqil.mjs} +5 -5
  101. package/dist/{footer-DcWsihxS.mjs.map → footer-cH07Xqil.mjs.map} +1 -1
  102. package/dist/footer.cjs.js +1 -1
  103. package/dist/footer.es.js +1 -1
  104. package/dist/heading-drD5ugCC.js +2 -0
  105. package/dist/{heading-DLCdW6gx.js.map → heading-drD5ugCC.js.map} +1 -1
  106. package/dist/heading-xwBuT_-9.mjs +75 -0
  107. package/dist/{heading-gqtQNo5n.mjs.map → heading-xwBuT_-9.mjs.map} +1 -1
  108. package/dist/heading.cjs.js +1 -1
  109. package/dist/heading.es.js +1 -1
  110. package/dist/{hero-banner-B8fRHxXc.mjs → hero-banner-CkSSlxTW.mjs} +5 -5
  111. package/dist/{hero-banner-B8fRHxXc.mjs.map → hero-banner-CkSSlxTW.mjs.map} +1 -1
  112. package/dist/{hero-banner-D3peC1NR.js → hero-banner-JFaqW20R.js} +2 -2
  113. package/dist/{hero-banner-D3peC1NR.js.map → hero-banner-JFaqW20R.js.map} +1 -1
  114. package/dist/hero-banner.cjs.js +1 -1
  115. package/dist/hero-banner.es.js +1 -1
  116. package/dist/library.cjs.js +1 -1
  117. package/dist/library.es.js +44 -44
  118. package/dist/{listbox-u6__DsLw.mjs → listbox-oDeP8FvH.mjs} +2 -2
  119. package/dist/{listbox-u6__DsLw.mjs.map → listbox-oDeP8FvH.mjs.map} +1 -1
  120. package/dist/listbox.es.js +1 -1
  121. package/dist/{modal-C2UQsW-g.mjs → modal-2ymCXTup.mjs} +19 -19
  122. package/dist/{modal-C2UQsW-g.mjs.map → modal-2ymCXTup.mjs.map} +1 -1
  123. package/dist/{modal-nyhf5zxG.js → modal-CXi2xez5.js} +2 -2
  124. package/dist/{modal-nyhf5zxG.js.map → modal-CXi2xez5.js.map} +1 -1
  125. package/dist/modal.cjs.js +1 -1
  126. package/dist/modal.es.js +1 -1
  127. package/dist/{notification-C32wHljA.mjs → notification-BFSOuDp8.mjs} +22 -22
  128. package/dist/{notification-C32wHljA.mjs.map → notification-BFSOuDp8.mjs.map} +1 -1
  129. package/dist/{notification-Bg1vQkQ3.js → notification-DdnI2rOh.js} +2 -2
  130. package/dist/{notification-Bg1vQkQ3.js.map → notification-DdnI2rOh.js.map} +1 -1
  131. package/dist/{notification-banner-BY2iZOIa.mjs → notification-banner-CQvBezAL.mjs} +3 -3
  132. package/dist/{notification-banner-BY2iZOIa.mjs.map → notification-banner-CQvBezAL.mjs.map} +1 -1
  133. package/dist/{notification-banner-C8XsBDTq.js → notification-banner-CT4ew8IQ.js} +2 -2
  134. package/dist/{notification-banner-C8XsBDTq.js.map → notification-banner-CT4ew8IQ.js.map} +1 -1
  135. package/dist/notification-banner.cjs.js +1 -1
  136. package/dist/notification-banner.es.js +1 -1
  137. package/dist/notification.cjs.js +1 -1
  138. package/dist/notification.es.js +1 -1
  139. package/dist/{pagination-CVVCAQ65.mjs → pagination-BdCjh1Pi.mjs} +2 -2
  140. package/dist/{pagination-CVVCAQ65.mjs.map → pagination-BdCjh1Pi.mjs.map} +1 -1
  141. package/dist/pagination.es.js +1 -1
  142. package/dist/{paragraph-DNtj7OLr.mjs → paragraph-Ci50OF1u.mjs} +3 -3
  143. package/dist/{paragraph-DNtj7OLr.mjs.map → paragraph-Ci50OF1u.mjs.map} +1 -1
  144. package/dist/paragraph.es.js +1 -1
  145. package/dist/{popover-B1BgSoQx.js → popover-D3qWbbU4.js} +2 -2
  146. package/dist/popover-D3qWbbU4.js.map +1 -0
  147. package/dist/{popover-DBMI9Jy1.mjs → popover-ZeQKmyEb.mjs} +25 -25
  148. package/dist/popover-ZeQKmyEb.mjs.map +1 -0
  149. package/dist/popover.cjs.js +1 -1
  150. package/dist/popover.es.js +1 -1
  151. package/dist/{product-card-rfpJbzzV.mjs → product-card-BU1ThhCx.mjs} +12 -12
  152. package/dist/{product-card-rfpJbzzV.mjs.map → product-card-BU1ThhCx.mjs.map} +1 -1
  153. package/dist/{product-card-DOBHGAa2.js → product-card-CNBegEBW.js} +2 -2
  154. package/dist/{product-card-DOBHGAa2.js.map → product-card-CNBegEBW.js.map} +1 -1
  155. package/dist/product-card.cjs.js +1 -1
  156. package/dist/product-card.es.js +1 -1
  157. package/dist/{promotion-card-C7B5ZJaB.js → promotion-card-CXNhskRl.js} +2 -2
  158. package/dist/{promotion-card-C7B5ZJaB.js.map → promotion-card-CXNhskRl.js.map} +1 -1
  159. package/dist/{promotion-card-wGGt75eI.mjs → promotion-card-_bPyVr9t.mjs} +33 -33
  160. package/dist/{promotion-card-wGGt75eI.mjs.map → promotion-card-_bPyVr9t.mjs.map} +1 -1
  161. package/dist/promotion-card.cjs.js +1 -1
  162. package/dist/promotion-card.es.js +1 -1
  163. package/dist/purpur.css +1 -1
  164. package/dist/{quantity-selector-DPOTlMSq.js → quantity-selector-CjSAaj7d.js} +2 -2
  165. package/dist/{quantity-selector-DPOTlMSq.js.map → quantity-selector-CjSAaj7d.js.map} +1 -1
  166. package/dist/{quantity-selector-_VcZYLjR.mjs → quantity-selector-HvyYSKah.mjs} +5 -5
  167. package/dist/{quantity-selector-_VcZYLjR.mjs.map → quantity-selector-HvyYSKah.mjs.map} +1 -1
  168. package/dist/quantity-selector.cjs.js +1 -1
  169. package/dist/quantity-selector.es.js +1 -1
  170. package/dist/{radio-button-group-CZ_FnVAi.js → radio-button-group-BaFpGAcD.js} +2 -2
  171. package/dist/{radio-button-group-CZ_FnVAi.js.map → radio-button-group-BaFpGAcD.js.map} +1 -1
  172. package/dist/{radio-button-group-BnCPcmSN.mjs → radio-button-group-CFqPsu5A.mjs} +5 -5
  173. package/dist/{radio-button-group-BnCPcmSN.mjs.map → radio-button-group-CFqPsu5A.mjs.map} +1 -1
  174. package/dist/radio-button-group.cjs.js +1 -1
  175. package/dist/radio-button-group.es.js +1 -1
  176. package/dist/{radio-card-group-DkaMcmen.mjs → radio-card-group-BlRZBa-9.mjs} +16 -16
  177. package/dist/{radio-card-group-DkaMcmen.mjs.map → radio-card-group-BlRZBa-9.mjs.map} +1 -1
  178. package/dist/{radio-card-group-BT5pV3tA.js → radio-card-group-sYcfDPJq.js} +2 -2
  179. package/dist/{radio-card-group-BT5pV3tA.js.map → radio-card-group-sYcfDPJq.js.map} +1 -1
  180. package/dist/radio-card-group.cjs.js +1 -1
  181. package/dist/radio-card-group.es.js +1 -1
  182. package/dist/rich-text.cjs.js +1 -1
  183. package/dist/rich-text.es.js +1 -1
  184. package/dist/scss/heading.mixins.scss +1 -1
  185. package/dist/{search-field-DH0xeW_J.mjs → search-field-BOmCVr5b.mjs} +11 -11
  186. package/dist/{search-field-DH0xeW_J.mjs.map → search-field-BOmCVr5b.mjs.map} +1 -1
  187. package/dist/{search-field-CxX4BBcg.js → search-field-CanOlkIY.js} +2 -2
  188. package/dist/{search-field-CxX4BBcg.js.map → search-field-CanOlkIY.js.map} +1 -1
  189. package/dist/search-field.cjs.js +1 -1
  190. package/dist/search-field.es.js +1 -1
  191. package/dist/{stepper-BfIbJwZn.mjs → stepper-D7T0wed7.mjs} +68 -71
  192. package/dist/stepper-D7T0wed7.mjs.map +1 -0
  193. package/dist/stepper-DYjJgEHL.js +2 -0
  194. package/dist/stepper-DYjJgEHL.js.map +1 -0
  195. package/dist/stepper.cjs.js +1 -1
  196. package/dist/stepper.es.js +1 -1
  197. package/dist/{table-DvcpczWf.mjs → table-B4pts_r4.mjs} +181 -179
  198. package/dist/{table-DvcpczWf.mjs.map → table-B4pts_r4.mjs.map} +1 -1
  199. package/dist/{table-BNeo_B1h.js → table-Bv_BISXV.js} +4 -4
  200. package/dist/{table-BNeo_B1h.js.map → table-Bv_BISXV.js.map} +1 -1
  201. package/dist/table.cjs.js +1 -1
  202. package/dist/table.es.js +1 -1
  203. package/dist/tabs-Bye5lgZ1.mjs +424 -0
  204. package/dist/tabs-Bye5lgZ1.mjs.map +1 -0
  205. package/dist/tabs-D-nfZHIA.js +2 -0
  206. package/dist/tabs-D-nfZHIA.js.map +1 -0
  207. package/dist/tabs.cjs.js +1 -1
  208. package/dist/tabs.es.js +1 -1
  209. package/dist/{text-area-Cb9Hm2Z9.mjs → text-area-CpYWt99s.mjs} +3 -3
  210. package/dist/{text-area-Cb9Hm2Z9.mjs.map → text-area-CpYWt99s.mjs.map} +1 -1
  211. package/dist/text-area.es.js +1 -1
  212. package/dist/{text-field-PKAaXO1N.mjs → text-field-5rIuW8gc.mjs} +2 -2
  213. package/dist/{text-field-PKAaXO1N.mjs.map → text-field-5rIuW8gc.mjs.map} +1 -1
  214. package/dist/{text-field-B8a-NKm4.js → text-field-Xt6T3zjO.js} +2 -2
  215. package/dist/{text-field-B8a-NKm4.js.map → text-field-Xt6T3zjO.js.map} +1 -1
  216. package/dist/text-field.cjs.js +1 -1
  217. package/dist/text-field.es.js +1 -1
  218. package/dist/theme.es.js +2 -2
  219. package/dist/{toggle-Cezg5MUc.mjs → toggle-D23x1wWk.mjs} +9 -9
  220. package/dist/{toggle-Cezg5MUc.mjs.map → toggle-D23x1wWk.mjs.map} +1 -1
  221. package/dist/toggle.es.js +1 -1
  222. package/dist/tokens.es.js +3 -3
  223. package/dist/{tooltip-DXi7ikUT.mjs → tooltip-DkwyNxrQ.mjs} +12 -12
  224. package/dist/{tooltip-DXi7ikUT.mjs.map → tooltip-DkwyNxrQ.mjs.map} +1 -1
  225. package/dist/{tooltip-CLQLxoaf.js → tooltip-svlZkXBs.js} +2 -2
  226. package/dist/{tooltip-CLQLxoaf.js.map → tooltip-svlZkXBs.js.map} +1 -1
  227. package/dist/tooltip.cjs.js +1 -1
  228. package/dist/tooltip.es.js +1 -1
  229. package/dist/{useColorScheme-DRQcbSog.mjs → useColorScheme-9rgSgG0N.mjs} +2 -2
  230. package/dist/{useColorScheme-DRQcbSog.mjs.map → useColorScheme-9rgSgG0N.mjs.map} +1 -1
  231. package/dist/{variables-91UvS2rU.mjs → variables-BVgnpUH9.mjs} +253 -253
  232. package/dist/{variables-91UvS2rU.mjs.map → variables-BVgnpUH9.mjs.map} +1 -1
  233. package/dist/{variables-BSsIx39i.mjs → variables-DkCN2x27.mjs} +7 -7
  234. package/dist/{variables-BSsIx39i.mjs.map → variables-DkCN2x27.mjs.map} +1 -1
  235. package/dist/{variables-BUfnQw6H.mjs → variables-Dr3Hsdn-.mjs} +9 -9
  236. package/dist/{variables-BUfnQw6H.mjs.map → variables-Dr3Hsdn-.mjs.map} +1 -1
  237. package/package.json +27 -27
  238. package/scripts/generate.mts +4 -1
  239. package/vite-plugin-generate-components-metadata.js +4 -1
  240. package/dist/button-ChYUPi2k.js +0 -2
  241. package/dist/button-ChYUPi2k.js.map +0 -1
  242. package/dist/button-DBX_tvfJ.mjs +0 -105
  243. package/dist/button-DBX_tvfJ.mjs.map +0 -1
  244. package/dist/date-field-CPiTZqa0.js +0 -2
  245. package/dist/heading-DLCdW6gx.js +0 -2
  246. package/dist/heading-gqtQNo5n.mjs +0 -75
  247. package/dist/popover-B1BgSoQx.js.map +0 -1
  248. package/dist/popover-DBMI9Jy1.mjs.map +0 -1
  249. package/dist/stepper-B248FwO-.js +0 -2
  250. package/dist/stepper-B248FwO-.js.map +0 -1
  251. package/dist/stepper-BfIbJwZn.mjs.map +0 -1
  252. package/dist/tabs-CfHd4UQ2.js +0 -2
  253. package/dist/tabs-CfHd4UQ2.js.map +0 -1
  254. package/dist/tabs-CoXMAwMx.mjs +0 -396
  255. package/dist/tabs-CoXMAwMx.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover-ZeQKmyEb.mjs","sources":["../../../components/popover/src/popover-flow.tsx","../../../components/popover/src/popover-internal-context.tsx","../../../components/popover/src/use-screen-size.hook.ts","../../../components/popover/src/popover-back.tsx","../../../common/temp/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.14__@types+react@_e05f2c19a58a99fddf374207b5e3778c/node_modules/@radix-ui/react-arrow/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.14__@types+react_13e0521d8aea7ebfbfb8bee1fb615c05/node_modules/@radix-ui/react-popper/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.14__@types+rea_8b5332f8e883134e9d9ab2856fc4395d/node_modules/@radix-ui/react-popover/dist/index.mjs","../../../components/popover/src/popover-button.tsx","../../../components/popover/src/popover-steps.tsx","../../../components/popover/src/popover-footer.tsx","../../../components/popover/src/popover-header.tsx","../../../components/popover/src/popover-next.tsx","../../../components/popover/src/popover-content.tsx","../../../components/popover/src/popover-standalone.tsx","../../../components/popover/src/use-smooth-scroll.ts","../../../components/popover/src/usePopoverTrigger.ts","../../../components/popover/src/popover-trigger.tsx","../../../components/popover/src/usePopoverWalkthrough.ts","../../../components/popover/src/popover-walkthrough.tsx","../../../components/popover/src/popover.tsx"],"sourcesContent":["import React, {\n createContext,\n type ReactNode,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from \"react\";\n\ntype PopoverFlowContextType = {\n currentStep: number;\n totalSteps: number;\n next: () => void;\n back: () => void;\n dismiss: () => void;\n registerStep: (step: number) => void;\n unregisterStep: (step: number) => void;\n separatorText: string;\n stepText: string;\n backLabel: string;\n nextLabel: string;\n finishLabel: string;\n openDelay: number;\n};\n\nconst PopoverFlowContext = createContext<PopoverFlowContextType | null>(null);\n\nexport const usePopoverFlow = () => {\n const context = useContext(PopoverFlowContext);\n if (!context) {\n throw new Error(\"usePopoverFlow must be used within a PopoverFlow provider\");\n }\n return context;\n};\n\nexport const useOptionalPopoverFlow = (): PopoverFlowContextType | null => {\n return useContext(PopoverFlowContext);\n};\n\nexport type PopoverFlowProps = {\n /**\n * Child components, typically multiple Popover components with step numbers.\n */\n children: ReactNode;\n /**\n * The step number to show when the flow starts.\n * @default 1\n */\n initialStep?: number;\n /**\n * Callback fired when the user completes the last step of the flow.\n */\n onComplete?: () => void;\n /**\n * Callback fired when the user dismisses the flow before completing it.\n */\n onDismiss?: () => void;\n /**\n * Text used as separator in the step indicator (e.g., \"of\" in \"1 of 3\").\n */\n separatorText: string;\n /**\n * Text label for \"Step\" in the step indicator.\n */\n stepText: string;\n /**\n * Label for the back navigation button.\n */\n backLabel: string;\n /**\n * Label for the next navigation button.\n */\n nextLabel: string;\n /**\n * Label for the finish button on the last step.\n */\n finishLabel: string;\n /**\n * Delay in milliseconds before opening the next popover in the flow.\n * @default 0\n */\n openDelay?: number;\n};\n\nexport const PopoverFlow = ({\n children,\n initialStep = 1,\n onComplete,\n onDismiss,\n separatorText,\n stepText,\n backLabel,\n nextLabel,\n finishLabel,\n openDelay = 0,\n}: PopoverFlowProps) => {\n const [currentStep, setCurrentStep] = useState(initialStep);\n const [registeredSteps, setRegisteredSteps] = useState<Set<number>>(new Set());\n\n const registerStep = useCallback((step: number) => {\n setRegisteredSteps((prev) => {\n const next = new Set(prev);\n next.add(step);\n return next;\n });\n }, []);\n\n const unregisterStep = useCallback((step: number) => {\n setRegisteredSteps((prev) => {\n const next = new Set(prev);\n next.delete(step);\n return next;\n });\n }, []);\n\n const next = useCallback(() => {\n setCurrentStep((prev) => {\n const nextStep = prev + 1;\n if (nextStep > registeredSteps.size) {\n onComplete?.();\n return prev;\n }\n return nextStep;\n });\n }, [registeredSteps.size, onComplete]);\n\n const back = useCallback(() => {\n setCurrentStep((prev) => Math.max(1, prev - 1));\n }, []);\n\n const dismiss = useCallback(() => {\n setCurrentStep(0);\n onDismiss?.();\n }, [onDismiss]);\n\n const value = useMemo(\n () => ({\n currentStep,\n totalSteps: registeredSteps.size,\n next,\n back,\n dismiss,\n registerStep,\n unregisterStep,\n separatorText,\n stepText,\n backLabel,\n nextLabel,\n finishLabel,\n openDelay,\n }),\n [\n currentStep,\n registeredSteps.size,\n next,\n back,\n dismiss,\n registerStep,\n unregisterStep,\n separatorText,\n stepText,\n backLabel,\n nextLabel,\n finishLabel,\n openDelay,\n ]\n );\n\n return <PopoverFlowContext.Provider value={value}>{children}</PopoverFlowContext.Provider>;\n};\n","import { createContext, useContext } from \"react\";\n\nexport type PopoverInternalContextValue = {\n isOpen: boolean;\n walkthroughStep: number;\n onScrollComplete?: () => void;\n onScrollStart?: () => void;\n disableClickOutside?: boolean;\n};\n\nexport const PopoverInternalContext = createContext<PopoverInternalContextValue | null>(null);\n\nexport const usePopoverInternal = () => {\n const context = useContext(PopoverInternalContext);\n return context;\n};\n\n// Separate context for UI-specific props that are set at the Content level\nexport type PopoverNegativeContextValue = {\n negative: boolean;\n};\n\nexport const PopoverNegativeContext = createContext<PopoverNegativeContextValue>({ negative: false });\n\nexport const usePopoverNegative = () => {\n const context = useContext(PopoverNegativeContext);\n return context;\n};\n","import { useCallback, useEffect, useState } from \"react\";\nimport { purpurBreakpointMd } from \"@purpur/tokens\";\n\nconst DEBOUNCE_DELAY = 150;\n\nexport const SCREEN_MEDIA_QUERY = {\n MAX_MD: `(max-width: ${purpurBreakpointMd})`,\n} as const;\n\nexport const useScreenSize = () => {\n const maxMediumScreen = window.matchMedia(SCREEN_MEDIA_QUERY.MAX_MD);\n function updateSize() {\n setIsMdOrSmaller(maxMediumScreen.matches);\n }\n\n const [isMdOrSmaller, setIsMdOrSmaller] = useState(() => {\n if (typeof window === \"undefined\") return false;\n return window.matchMedia(SCREEN_MEDIA_QUERY.MAX_MD).matches;\n });\n\n const handleResize = useCallback(() => {\n let timeoutId: ReturnType<typeof setTimeout>;\n\n return () => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => updateSize(), DEBOUNCE_DELAY);\n };\n }, [updateSize]);\n\n useEffect(() => {\n if (typeof window === \"undefined\") return;\n\n window.addEventListener(\"resize\", handleResize);\n\n return () => window.removeEventListener(\"resize\", handleResize);\n }, [handleResize]);\n\n return { isMdOrSmaller };\n};\n","import React, { type ReactNode } from \"react\";\nimport { Button } from \"@purpur/button\";\n\nimport { usePopoverFlow } from \"./popover-flow\";\nimport { usePopoverNegative } from \"./popover-internal-context\";\nimport { useScreenSize } from \"./use-screen-size.hook\";\n\nexport const PopoverBack = ({\n children,\n onClick,\n}: {\n children: ReactNode;\n onClick?: () => void;\n}) => {\n const { back } = usePopoverFlow();\n const { negative: isNegative } = usePopoverNegative();\n const { isMdOrSmaller } = useScreenSize();\n\n // Invert negative: if popover is negative (light), buttons should be normal (dark)\n const negative = isNegative ? false : true;\n\n const handleClick = () => {\n onClick?.();\n back();\n };\n\n return (\n <Button\n size=\"sm\"\n variant=\"secondary\"\n onClick={handleClick}\n negative={negative}\n fullWidth={isMdOrSmaller}\n >\n {children}\n </Button>\n );\n};\n\nPopoverBack.displayName = \"PopoverBack\";\n","// src/arrow.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Arrow\";\nvar Arrow = React.forwardRef((props, forwardedRef) => {\n const { children, width = 10, height = 5, ...arrowProps } = props;\n return /* @__PURE__ */ jsx(\n Primitive.svg,\n {\n ...arrowProps,\n ref: forwardedRef,\n width,\n height,\n viewBox: \"0 0 30 10\",\n preserveAspectRatio: \"none\",\n children: props.asChild ? children : /* @__PURE__ */ jsx(\"polygon\", { points: \"0,0 30,0 15,10\" })\n }\n );\n});\nArrow.displayName = NAME;\nvar Root = Arrow;\nexport {\n Arrow,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/popper.tsx\nimport * as React from \"react\";\nimport {\n useFloating,\n autoUpdate,\n offset,\n shift,\n limitShift,\n hide,\n arrow as floatingUIarrow,\n flip,\n size\n} from \"@floating-ui/react-dom\";\nimport * as ArrowPrimitive from \"@radix-ui/react-arrow\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SIDE_OPTIONS = [\"top\", \"right\", \"bottom\", \"left\"];\nvar ALIGN_OPTIONS = [\"start\", \"center\", \"end\"];\nvar POPPER_NAME = \"Popper\";\nvar [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);\nvar [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);\nvar Popper = (props) => {\n const { __scopePopper, children } = props;\n const [anchor, setAnchor] = React.useState(null);\n return /* @__PURE__ */ jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });\n};\nPopper.displayName = POPPER_NAME;\nvar ANCHOR_NAME = \"PopperAnchor\";\nvar PopperAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopper, virtualRef, ...anchorProps } = props;\n const context = usePopperContext(ANCHOR_NAME, __scopePopper);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const anchorRef = React.useRef(null);\n React.useEffect(() => {\n const previousAnchor = anchorRef.current;\n anchorRef.current = virtualRef?.current || ref.current;\n if (previousAnchor !== anchorRef.current) {\n context.onAnchorChange(anchorRef.current);\n }\n });\n return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });\n }\n);\nPopperAnchor.displayName = ANCHOR_NAME;\nvar CONTENT_NAME = \"PopperContent\";\nvar [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);\nvar PopperContent = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopper,\n side = \"bottom\",\n sideOffset = 0,\n align = \"center\",\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary = [],\n collisionPadding: collisionPaddingProp = 0,\n sticky = \"partial\",\n hideWhenDetached = false,\n updatePositionStrategy = \"optimized\",\n onPlaced,\n ...contentProps\n } = props;\n const context = usePopperContext(CONTENT_NAME, __scopePopper);\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const [arrow, setArrow] = React.useState(null);\n const arrowSize = useSize(arrow);\n const arrowWidth = arrowSize?.width ?? 0;\n const arrowHeight = arrowSize?.height ?? 0;\n const desiredPlacement = side + (align !== \"center\" ? \"-\" + align : \"\");\n const collisionPadding = typeof collisionPaddingProp === \"number\" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };\n const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];\n const hasExplicitBoundaries = boundary.length > 0;\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary.filter(isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: hasExplicitBoundaries\n };\n const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({\n // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues\n strategy: \"fixed\",\n placement: desiredPlacement,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n animationFrame: updatePositionStrategy === \"always\"\n });\n return cleanup;\n },\n elements: {\n reference: context.anchor\n },\n middleware: [\n offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),\n avoidCollisions && shift({\n mainAxis: true,\n crossAxis: false,\n limiter: sticky === \"partial\" ? limitShift() : void 0,\n ...detectOverflowOptions\n }),\n avoidCollisions && flip({ ...detectOverflowOptions }),\n size({\n ...detectOverflowOptions,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty(\"--radix-popper-available-width\", `${availableWidth}px`);\n contentStyle.setProperty(\"--radix-popper-available-height\", `${availableHeight}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-width\", `${anchorWidth}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-height\", `${anchorHeight}px`);\n }\n }),\n arrow && floatingUIarrow({ element: arrow, padding: arrowPadding }),\n transformOrigin({ arrowWidth, arrowHeight }),\n hideWhenDetached && hide({ strategy: \"referenceHidden\", ...detectOverflowOptions })\n ]\n });\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const handlePlaced = useCallbackRef(onPlaced);\n useLayoutEffect(() => {\n if (isPositioned) {\n handlePlaced?.();\n }\n }, [isPositioned, handlePlaced]);\n const arrowX = middlewareData.arrow?.x;\n const arrowY = middlewareData.arrow?.y;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n ref: refs.setFloating,\n \"data-radix-popper-content-wrapper\": \"\",\n style: {\n ...floatingStyles,\n transform: isPositioned ? floatingStyles.transform : \"translate(0, -200%)\",\n // keep off the page when measuring\n minWidth: \"max-content\",\n zIndex: contentZIndex,\n [\"--radix-popper-transform-origin\"]: [\n middlewareData.transformOrigin?.x,\n middlewareData.transformOrigin?.y\n ].join(\" \"),\n // hide the content if using the hide middleware and should be hidden\n // set visibility to hidden and disable pointer events so the UI behaves\n // as if the PopperContent isn't there at all\n ...middlewareData.hide?.referenceHidden && {\n visibility: \"hidden\",\n pointerEvents: \"none\"\n }\n },\n dir: props.dir,\n children: /* @__PURE__ */ jsx(\n PopperContentProvider,\n {\n scope: __scopePopper,\n placedSide,\n onArrowChange: setArrow,\n arrowX,\n arrowY,\n shouldHideArrow: cannotCenterArrow,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-side\": placedSide,\n \"data-align\": placedAlign,\n ...contentProps,\n ref: composedRefs,\n style: {\n ...contentProps.style,\n // if the PopperContent hasn't been placed yet (not all measurements done)\n // we prevent animations so that users's animation don't kick in too early referring wrong sides\n animation: !isPositioned ? \"none\" : void 0\n }\n }\n )\n }\n )\n }\n );\n }\n);\nPopperContent.displayName = CONTENT_NAME;\nvar ARROW_NAME = \"PopperArrow\";\nvar OPPOSITE_SIDE = {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\"\n};\nvar PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {\n const { __scopePopper, ...arrowProps } = props;\n const contentContext = useContentContext(ARROW_NAME, __scopePopper);\n const baseSide = OPPOSITE_SIDE[contentContext.placedSide];\n return (\n // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)\n // doesn't report size as we'd expect on SVG elements.\n // it reports their bounding box which is effectively the largest path inside the SVG.\n /* @__PURE__ */ jsx(\n \"span\",\n {\n ref: contentContext.onArrowChange,\n style: {\n position: \"absolute\",\n left: contentContext.arrowX,\n top: contentContext.arrowY,\n [baseSide]: 0,\n transformOrigin: {\n top: \"\",\n right: \"0 0\",\n bottom: \"center 0\",\n left: \"100% 0\"\n }[contentContext.placedSide],\n transform: {\n top: \"translateY(100%)\",\n right: \"translateY(50%) rotate(90deg) translateX(-50%)\",\n bottom: `rotate(180deg)`,\n left: \"translateY(50%) rotate(-90deg) translateX(50%)\"\n }[contentContext.placedSide],\n visibility: contentContext.shouldHideArrow ? \"hidden\" : void 0\n },\n children: /* @__PURE__ */ jsx(\n ArrowPrimitive.Root,\n {\n ...arrowProps,\n ref: forwardedRef,\n style: {\n ...arrowProps.style,\n // ensures the element can be measured correctly (mostly for if SVG)\n display: \"block\"\n }\n }\n )\n }\n )\n );\n});\nPopperArrow.displayName = ARROW_NAME;\nfunction isNotNull(value) {\n return value !== null;\n}\nvar transformOrigin = (options) => ({\n name: \"transformOrigin\",\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const noArrowAlign = { start: \"0%\", center: \"50%\", end: \"100%\" }[placedAlign];\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n let x = \"\";\n let y = \"\";\n if (placedSide === \"bottom\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n } else if (placedSide === \"top\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n } else if (placedSide === \"right\") {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n } else if (placedSide === \"left\") {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return { data: { x, y } };\n }\n});\nfunction getSideAndAlignFromPlacement(placement) {\n const [side, align = \"center\"] = placement.split(\"-\");\n return [side, align];\n}\nvar Root2 = Popper;\nvar Anchor = PopperAnchor;\nvar Content = PopperContent;\nvar Arrow = PopperArrow;\nexport {\n ALIGN_OPTIONS,\n Anchor,\n Arrow,\n Content,\n Popper,\n PopperAnchor,\n PopperArrow,\n PopperContent,\n Root2 as Root,\n SIDE_OPTIONS,\n createPopperScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","import React, { type ReactNode } from \"react\";\nimport { Button, type ButtonProps } from \"@purpur/button\";\nimport * as RadixPopover from \"@radix-ui/react-popover\";\n\nimport { useOptionalPopoverFlow } from \"./popover-flow\";\nimport { usePopoverNegative } from \"./popover-internal-context\";\nimport { useScreenSize } from \"./use-screen-size.hook\";\n\nexport type PopoverButtonProps = RadixPopover.PopoverCloseProps & {\n /**\n * Button label or content.\n */\n children: ReactNode;\n /**\n * Whether to use the child element as the button instead of wrapping in a Button component.\n * @default false\n */\n asChild?: boolean;\n /**\n * Click handler called when the button is clicked.\n */\n onClick?: () => void;\n /**\n * Visual variant of the button.\n * @default \"primary\"\n */\n variant?: ButtonProps[\"variant\"];\n /**\n * Whether clicking the button should dismiss/close the popover.\n * @default true\n */\n dismiss?: boolean;\n /**\n * Whether the button should take full width. If not specified, defaults to true on mobile (md or smaller).\n */\n fullWidth?: boolean;\n};\n\nexport const PopoverButton = ({\n children,\n asChild,\n onClick,\n variant = \"primary\",\n dismiss = true,\n fullWidth,\n}: PopoverButtonProps) => {\n const flow = useOptionalPopoverFlow();\n const { isMdOrSmaller } = useScreenSize();\n const { negative: isNegative } = usePopoverNegative();\n // Invert negative: if popover is negative (light), buttons should be normal (dark)\n const negative = isNegative ? false : true;\n\n const handleClick = () => {\n onClick?.();\n if (dismiss) {\n flow?.dismiss();\n }\n };\n\n const isFullWidth = fullWidth ?? isMdOrSmaller;\n\n const content = asChild ? (\n children\n ) : (\n <Button\n variant={variant}\n size=\"sm\"\n fullWidth={isFullWidth}\n negative={negative}\n onClick={handleClick}\n >\n {children}\n </Button>\n );\n\n // Always wrap with RadixPopover.Close for proper dismiss behavior\n if (dismiss) {\n return <RadixPopover.Close asChild>{content}</RadixPopover.Close>;\n }\n\n return content;\n};\n\nPopoverButton.displayName = \"PopoverButton\";\n","import React from \"react\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./popover.module.scss\";\nimport { usePopoverFlow } from \"./popover-flow\";\nimport { usePopoverInternal } from \"./popover-internal-context\";\n\nconst cx = c.bind(styles);\n\nexport const PopoverSteps = () => {\n const flow = usePopoverFlow();\n const context = usePopoverInternal();\n\n // Use walkthroughStep from context (each popover knows its own step number)\n const currentStep = context?.walkthroughStep || flow.currentStep;\n const { totalSteps, separatorText, stepText } = flow;\n return (\n <>\n <Paragraph\n className={cx(\"purpur-popover__steps\")}\n role=\"status\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {stepText} {currentStep} {separatorText} {totalSteps}\n </Paragraph>\n </>\n );\n};\n\nPopoverSteps.displayName = \"PopoverSteps\";\n","import React, { type ReactNode } from \"react\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./popover.module.scss\";\nimport { useOptionalPopoverFlow } from \"./popover-flow\";\nimport { usePopoverInternal } from \"./popover-internal-context\";\nimport { PopoverSteps } from \"./popover-steps\";\n\nconst cx = c.bind(styles);\n\nexport type PopoverFooterProps = {\n /**\n * Footer content, typically navigation buttons like PopoverButton, PopoverNext, or PopoverBack.\n */\n children: ReactNode;\n /**\n * Optional CSS class name for custom styling.\n */\n className?: string;\n};\n\nexport const PopoverFooter = ({ children, className }: PopoverFooterProps) => {\n const flow = useOptionalPopoverFlow();\n const internal = usePopoverInternal();\n\n // Only show steps if we have a flow context AND this popover is part of the flow (walkthroughStep > 0)\n const showSteps = flow && internal && internal.walkthroughStep > 0;\n\n return (\n <div className={cx(\"purpur-popover__footer\", className)}>\n {showSteps && <PopoverSteps />}\n <div className={cx(\"purpur-popover__footer-button-group\")}>{children}</div>\n </div>\n );\n};\n\nPopoverFooter.displayName = \"PopoverFooter\";\n","import React, { forwardRef, type ReactNode } from \"react\";\nimport { Heading } from \"@purpur/heading\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./popover.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type PopoverHeaderProps = {\n title: string;\n icon?: ReactNode;\n};\n\nexport const PopoverHeader = forwardRef<HTMLDivElement, PopoverHeaderProps>(\n ({ title, icon }, ref) => {\n return (\n <div ref={ref} className={cx(\"purpur-popover__header-content\")}>\n {icon && <span className={cx(\"purpur-popover__icon\")}>{icon}</span>}\n <Heading\n tag=\"h2\"\n variant=\"title-100\"\n className={cx(\"purpur-popover__title\")}\n id=\"popover-heading\"\n >\n {title}\n </Heading>\n </div>\n );\n }\n);\n\nPopoverHeader.displayName = \"PopoverHeader\";\n","import React, { type ReactNode } from \"react\";\nimport { Button } from \"@purpur/button\";\n\nimport { usePopoverFlow } from \"./popover-flow\";\nimport { usePopoverNegative } from \"./popover-internal-context\";\nimport { useScreenSize } from \"./use-screen-size.hook\";\n\nexport const PopoverNext = ({\n children,\n onClick,\n}: {\n children: ReactNode;\n onClick?: () => void;\n}) => {\n const { next } = usePopoverFlow();\n const { negative: isNegative } = usePopoverNegative();\n const { isMdOrSmaller } = useScreenSize();\n\n // Invert negative: if popover is negative (light), buttons should be normal (dark)\n const negative = isNegative ? false : true;\n\n const handleClick = () => {\n onClick?.();\n next();\n };\n\n return (\n <Button\n size=\"sm\"\n variant=\"primary\"\n onClick={handleClick}\n negative={negative}\n fullWidth={isMdOrSmaller}\n >\n {children}\n </Button>\n );\n};\n\nPopoverNext.displayName = \"PopoverNext\";\n","import React, { forwardRef, type ReactNode, useRef } from \"react\";\nimport { Button } from \"@purpur/button\";\nimport { IconClose } from \"@purpur/icon/close\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport * as RadixPopover from \"@radix-ui/react-popover\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./popover.module.scss\";\nimport { PopoverBack } from \"./popover-back\";\nimport { PopoverButton } from \"./popover-button\";\nimport { useOptionalPopoverFlow } from \"./popover-flow\";\nimport { PopoverFooter } from \"./popover-footer\";\nimport { PopoverHeader } from \"./popover-header\";\nimport { PopoverNegativeContext, usePopoverInternal } from \"./popover-internal-context\";\nimport { PopoverNext } from \"./popover-next\";\n\nconst cx = c.bind(styles);\n\nexport type PopoverAction = {\n type: \"next\" | \"back\" | \"finish\" | \"dismiss\";\n step?: number;\n};\n\nexport type PopoverContentProps = RadixPopover.PopoverContentProps & {\n /**\n * Position of the arrow/beak pointing to the trigger element.\n * Set to \"none\" to hide the arrow.\n * @default \"down\"\n */\n beakPosition?: \"up\" | \"right\" | \"down\" | \"left\" | \"none\";\n /**\n * Whether to use negative (light) styling for the popover content.\n * @default false\n */\n negative?: boolean;\n /**\n * Accessible label for the close button icon.\n */\n closeIconAriaLabel: string;\n /**\n * Main title text displayed in the popover header.\n */\n title: string;\n /**\n * Optional icon displayed in the popover header next to the title.\n */\n icon?: ReactNode;\n /**\n * Main body text content of the popover.\n */\n body: string;\n /**\n * Custom footer content. If not provided and used within PopoverFlow,\n * default navigation buttons will be rendered.\n */\n children?: ReactNode;\n /**\n * Callback fired when user interacts with navigation buttons (next, back, finish, dismiss).\n */\n onAction?: (action: PopoverAction) => void;\n /**\n * CSS z-index value for the popover content.\n * @default 210\n */\n zIndex?: number;\n};\n\nexport const PopoverContent = forwardRef<HTMLDivElement, PopoverContentProps>(\n (\n {\n children,\n className,\n beakPosition = \"down\",\n align = \"center\",\n alignOffset = 0,\n sideOffset = 5, // How close or far the popover is from the trigger\n negative = false,\n closeIconAriaLabel,\n title,\n icon,\n body,\n onAction,\n zIndex = 210,\n ...props\n },\n ref\n ) => {\n const flow = useOptionalPopoverFlow();\n const context = usePopoverInternal();\n const headerRef = useRef<HTMLDivElement>(null);\n\n // Map beakPosition to Radix side values\n const beakPositionMap: Record<\n \"up\" | \"right\" | \"down\" | \"left\" | \"none\",\n \"bottom\" | \"left\" | \"top\" | \"right\"\n > = {\n up: \"bottom\",\n right: \"left\",\n down: \"top\",\n left: \"right\",\n none: \"bottom\", // Default position when no arrow\n };\n\n const radixSide = beakPositionMap[beakPosition];\n const shouldShowArrow = beakPosition !== \"none\";\n\n let footerContent = children;\n\n if (flow && !children) {\n // Use walkthroughStep from context (0 for standalone, actual step for walkthrough)\n const currentStep = context?.walkthroughStep || flow.currentStep;\n const isFirstStep = currentStep === 1;\n const isLastStep = currentStep === flow.totalSteps;\n\n footerContent = (\n <PopoverFooter>\n {!isFirstStep && (\n <PopoverBack onClick={() => onAction?.({ type: \"back\", step: currentStep })}>\n {flow.backLabel}\n </PopoverBack>\n )}\n {isLastStep ? (\n <PopoverButton\n onClick={() => onAction?.({ type: \"finish\", step: currentStep })}\n dismiss\n >\n {flow.finishLabel}\n </PopoverButton>\n ) : (\n <PopoverNext onClick={() => onAction?.({ type: \"next\", step: currentStep })}>\n {flow.nextLabel}\n </PopoverNext>\n )}\n </PopoverFooter>\n );\n }\n\n const handleOpenAutoFocus = (event: Event) => {\n event.preventDefault();\n\n if (flow) {\n const contentElement = event.currentTarget as HTMLElement;\n // Focus the content element for better accessibility\n // Use setTimeout to ensure the DOM has fully rendered\n setTimeout(() => {\n contentElement.setAttribute(\"tabindex\", \"-1\");\n contentElement.focus();\n }, 0);\n }\n\n props.onOpenAutoFocus?.(event);\n };\n\n const handleCloseAutoFocus = (event: Event) => {\n // Prevent focus from returning to trigger in walkthrough flow\n // This allows the next popover to manage focus properly\n if (flow) {\n event.preventDefault();\n }\n\n props.onCloseAutoFocus?.(event);\n };\n\n const handleClose = (event: React.MouseEvent) => {\n const prefersReducedMotion = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n\n if (flow && !prefersReducedMotion) {\n event.preventDefault();\n setTimeout(() => {\n onAction?.({ type: \"dismiss\", step: flow.currentStep });\n flow.dismiss();\n }, 200);\n } else {\n onAction?.({ type: \"dismiss\", step: flow?.currentStep });\n flow?.dismiss();\n }\n };\n\n const handleEscapeKey = (event: KeyboardEvent) => {\n const prefersReducedMotion = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n\n if (flow && !prefersReducedMotion) {\n event.preventDefault();\n setTimeout(() => {\n onAction?.({ type: \"dismiss\", step: flow.currentStep });\n flow.dismiss();\n }, 200);\n } else {\n onAction?.({ type: \"dismiss\", step: flow?.currentStep });\n flow?.dismiss();\n }\n };\n\n const handleInteractOutside = (event: Event) => {\n if (context?.disableClickOutside) {\n event.preventDefault();\n return;\n }\n\n if (flow) {\n const target = event.target as HTMLElement;\n const isPopoverInteraction =\n target.closest(\"[role='dialog']\") ||\n target.closest(\".purpur-popover__trigger\") ||\n target.closest(\"button[aria-haspopup='dialog']\");\n\n if (!isPopoverInteraction) {\n onAction?.({ type: \"dismiss\", step: flow.currentStep });\n setTimeout(() => {\n flow.dismiss();\n }, 0);\n }\n }\n };\n\n return (\n <RadixPopover.Portal>\n <RadixPopover.Content\n data-testid=\"popover-content\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={props[\"aria-label\"] ? undefined : \"popover-heading\"}\n ref={ref}\n side={radixSide}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n style={\n {\n \"--popover-z-index\": zIndex,\n } as React.CSSProperties\n }\n className={cx(\n \"purpur-popover__content\",\n { \"purpur-popover__content--negative\": negative },\n className\n )}\n onOpenAutoFocus={handleOpenAutoFocus}\n onCloseAutoFocus={handleCloseAutoFocus}\n onEscapeKeyDown={handleEscapeKey}\n onInteractOutside={handleInteractOutside}\n {...props}\n >\n <PopoverNegativeContext.Provider value={{ negative }}>\n <div className={cx(\"purpur-popover__inner\")}>\n <PopoverHeader ref={headerRef} title={title} icon={icon} />\n <Paragraph className={cx(\"purpur-popover__body\")}>{body}</Paragraph>\n </div>\n {footerContent}\n\n <RadixPopover.Close asChild onClick={handleClose}>\n <Button\n variant={negative ? \"text\" : \"tertiary-purple\"}\n size=\"sm\"\n aria-label={closeIconAriaLabel}\n className={cx(\"purpur-popover__close\")}\n negative={!negative}\n iconOnly\n >\n <IconClose size=\"xs\" className={cx(\"purpur-popover__icon\")} />\n </Button>\n </RadixPopover.Close>\n </PopoverNegativeContext.Provider>\n {shouldShowArrow && (\n <RadixPopover.Arrow\n className={cx(\"purpur-popover__arrow\")}\n aria-hidden=\"true\"\n tabIndex={-1}\n />\n )}\n </RadixPopover.Content>\n </RadixPopover.Portal>\n );\n }\n);\n\nPopoverContent.displayName = \"PopoverContent\";\n","import React, { type ReactNode, useState } from \"react\";\nimport * as RadixPopover from \"@radix-ui/react-popover\";\n\nimport { PopoverInternalContext } from \"./popover-internal-context\";\n\nexport type PopoverStandaloneProps = RadixPopover.PopoverProps & {\n children: ReactNode;\n className?: string;\n disableClickOutside?: boolean;\n};\n\nexport const PopoverStandalone = ({\n children,\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n disableClickOutside,\n ...props\n}: PopoverStandaloneProps) => {\n // Internal state for uncontrolled mode\n const [internalOpen, setInternalOpen] = useState(defaultOpen);\n\n const isControlled = controlledOpen !== undefined;\n const isOpen = isControlled ? controlledOpen : internalOpen;\n\n const handleOpenChange = (newOpen: boolean) => {\n if (!isControlled) {\n setInternalOpen(newOpen);\n }\n onOpenChange?.(newOpen);\n };\n\n return (\n <RadixPopover.Root open={isOpen} onOpenChange={handleOpenChange} {...props}>\n <PopoverInternalContext.Provider\n value={{\n isOpen,\n walkthroughStep: 0,\n disableClickOutside,\n }}\n >\n {children}\n </PopoverInternalContext.Provider>\n </RadixPopover.Root>\n );\n};\n\nPopoverStandalone.displayName = \"PopoverStandalone\";\n","import { useCallback, useRef } from \"react\";\n\nexport const useSmoothScroll = (onComplete?: () => void) => {\n const scrollAnimationId = useRef<number | null>(null);\n\n const cancelScroll = useCallback(() => {\n if (scrollAnimationId.current) {\n cancelAnimationFrame(scrollAnimationId.current);\n scrollAnimationId.current = null;\n }\n }, []);\n\n const scrollToElement = useCallback(\n (element: HTMLElement, duration: number = 600) => {\n const prefersReducedMotion = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n const rect = element.getBoundingClientRect();\n const absoluteTop = rect.top + window.pageYOffset;\n const elementHeight = rect.height;\n const viewportHeight = window.innerHeight;\n\n let targetY = absoluteTop - viewportHeight / 2 + elementHeight / 2;\n const documentHeight = document.documentElement.scrollHeight;\n const maxScroll = Math.max(0, documentHeight - viewportHeight);\n targetY = Math.max(0, Math.min(targetY, maxScroll));\n\n if (prefersReducedMotion) {\n window.scrollTo(0, targetY);\n onComplete?.();\n return;\n }\n\n const startY = window.pageYOffset;\n const distance = targetY - startY;\n const startTime = performance.now();\n\n const animateScroll = (currentTime: number) => {\n const elapsed = currentTime - startTime;\n const progress = Math.min(elapsed / duration, 1);\n\n const easeInOut =\n progress < 0.5 ? 2 * progress * progress : 1 - Math.pow(-2 * progress + 2, 2) / 2;\n\n const currentY = startY + distance * easeInOut;\n window.scrollTo(0, currentY);\n\n if (progress < 1) {\n scrollAnimationId.current = requestAnimationFrame(animateScroll);\n } else {\n scrollAnimationId.current = null;\n onComplete?.();\n }\n };\n\n cancelScroll();\n\n scrollAnimationId.current = requestAnimationFrame(animateScroll);\n },\n [onComplete, cancelScroll]\n );\n\n return { scrollToElement, cancelScroll };\n};\n","import { useEffect, useRef } from \"react\";\n\nimport { useOptionalPopoverFlow } from \"./popover-flow\";\nimport { usePopoverInternal } from \"./popover-internal-context\";\nimport { useSmoothScroll } from \"./use-smooth-scroll\";\n\nexport function usePopoverTrigger(ref: React.Ref<HTMLButtonElement>) {\n const triggerRef = useRef<HTMLButtonElement>(null);\n const context = usePopoverInternal();\n const flow = useOptionalPopoverFlow();\n const hasScrolled = useRef(false);\n const { scrollToElement, cancelScroll } = useSmoothScroll(context?.onScrollComplete);\n\n // Forward ref\n useEffect(() => {\n if (typeof ref === \"function\") {\n ref(triggerRef.current);\n } else if (ref) {\n (ref as React.MutableRefObject<HTMLButtonElement | null>).current = triggerRef.current;\n }\n }, [ref]);\n\n // Walkthrough scroll logic\n useEffect(() => {\n const isActiveStep =\n flow &&\n context?.walkthroughStep !== undefined &&\n flow.currentStep === context.walkthroughStep &&\n triggerRef.current &&\n !hasScrolled.current;\n\n if (isActiveStep) {\n const element = triggerRef.current!;\n const rect = element.getBoundingClientRect();\n const buffer = 100;\n const isVisible =\n rect.top >= -buffer &&\n rect.bottom <= window.innerHeight + buffer &&\n rect.left >= -buffer &&\n rect.right <= window.innerWidth + buffer;\n\n if (isVisible) {\n context?.onScrollComplete?.();\n } else {\n context?.onScrollStart?.();\n scrollToElement(element);\n }\n hasScrolled.current = true;\n } else if (flow?.currentStep !== context?.walkthroughStep) {\n hasScrolled.current = false;\n cancelScroll();\n }\n }, [flow?.currentStep, context?.walkthroughStep, flow, scrollToElement, cancelScroll, context]);\n\n // Cancel scroll on unmount\n useEffect(() => cancelScroll, [cancelScroll]);\n\n return { triggerRef, context };\n}\n","import React, { forwardRef } from \"react\";\nimport * as RadixPopover from \"@radix-ui/react-popover\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./popover.module.scss\";\nimport { usePopoverTrigger } from \"./usePopoverTrigger\";\n\nconst cx = c.bind(styles);\n\nexport type PopoverTriggerProps = RadixPopover.PopoverTriggerProps & {\n /**\n * Whether to show visual highlight effect around the trigger when popover is open.\n * @default true\n */\n highlight?: boolean;\n /**\n * Whether to use negative (light) styling for the highlight effect.\n * @default false\n */\n negative?: boolean;\n};\n\nexport const PopoverTrigger = forwardRef<HTMLButtonElement, PopoverTriggerProps>(\n ({ children, className, highlight = true, negative = false, ...props }, ref) => {\n const { triggerRef, context } = usePopoverTrigger(ref);\n\n return (\n <div\n className={cx(\n \"purpur-popover__trigger\",\n { \"purpur-popover__trigger--highlight\": context?.isOpen && highlight },\n className\n )}\n >\n {context?.isOpen && highlight && (\n <>\n {/* State 1: Outer glow effect */}\n <div\n className={cx(\n \"purpur-popover__trigger-highlight\",\n \"purpur-popover__trigger-highlight--state1\",\n { \"purpur-popover__trigger-highlight--negative\": negative }\n )}\n aria-hidden=\"true\"\n />\n {/* State 2: Inner border only */}\n <div\n className={cx(\n \"purpur-popover__trigger-highlight\",\n \"purpur-popover__trigger-highlight--state2\",\n { \"purpur-popover__trigger-highlight--negative\": negative }\n )}\n aria-hidden=\"true\"\n />\n </>\n )}\n <RadixPopover.Trigger\n ref={triggerRef}\n asChild\n aria-expanded={context?.isOpen ?? false}\n aria-haspopup=\"dialog\"\n {...props}\n >\n {children}\n </RadixPopover.Trigger>\n </div>\n );\n }\n);\n\nPopoverTrigger.displayName = \"PopoverTrigger\";\n","import { useCallback, useEffect, useRef, useState } from \"react\";\n\nimport { useOptionalPopoverFlow } from \"./popover-flow\";\n\nexport function usePopoverWalkthrough(step: number) {\n const flow = useOptionalPopoverFlow();\n const [actuallyOpen, setActuallyOpen] = useState(false);\n const [waitingForScroll, setWaitingForScroll] = useState(false);\n const timeoutRef = useRef<number | null>(null);\n const openedAtRef = useRef<number>(0);\n\n useEffect(() => {\n if (flow) {\n flow.registerStep(step);\n return () => flow.unregisterStep(step);\n }\n return () => {};\n }, [flow, step]);\n\n const shouldBeOpen = flow?.currentStep === step;\n\n const onScrollStart = useCallback(() => {\n setWaitingForScroll(true);\n }, []);\n\n const onScrollComplete = useCallback(() => {\n setWaitingForScroll(false);\n if (shouldBeOpen) {\n const delay = flow.openDelay;\n timeoutRef.current = window.setTimeout(() => {\n setActuallyOpen(true);\n openedAtRef.current = Date.now();\n }, delay);\n }\n }, [shouldBeOpen, flow]);\n\n useEffect(() => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = null;\n }\n\n if (shouldBeOpen) {\n if (!waitingForScroll) {\n const delay = flow.openDelay;\n timeoutRef.current = window.setTimeout(() => {\n setActuallyOpen(true);\n openedAtRef.current = Date.now();\n }, delay);\n }\n } else {\n setActuallyOpen(false);\n setWaitingForScroll(false);\n openedAtRef.current = 0;\n }\n\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = null;\n }\n };\n }, [shouldBeOpen, waitingForScroll, flow]);\n\n const handleOpenChange = useCallback(\n (open: boolean, consumerOnOpenChange?: (open: boolean) => void) => {\n consumerOnOpenChange?.(open);\n if (!open && actuallyOpen && flow && flow.currentStep === step) {\n const timeSinceOpen = Date.now() - openedAtRef.current;\n if (timeSinceOpen < 10 || timeoutRef.current !== null) {\n return;\n }\n flow.dismiss();\n }\n },\n [actuallyOpen, flow, step]\n );\n\n return {\n actuallyOpen,\n onScrollStart,\n onScrollComplete,\n handleOpenChange,\n };\n}\n","import React, { type ReactNode } from \"react\";\nimport * as RadixPopover from \"@radix-ui/react-popover\";\n\nimport { PopoverInternalContext } from \"./popover-internal-context\";\nimport { usePopoverWalkthrough } from \"./usePopoverWalkthrough\";\n\nexport type PopoverWalkthroughProps = RadixPopover.PopoverProps & {\n children: ReactNode;\n step: number;\n className?: string;\n disableClickOutside?: boolean;\n};\n\nexport const PopoverWalkthrough = ({\n children,\n step,\n onOpenChange: consumerOnOpenChange,\n disableClickOutside = true,\n ...props\n}: PopoverWalkthroughProps) => {\n const { actuallyOpen, onScrollStart, onScrollComplete, handleOpenChange } =\n usePopoverWalkthrough(step);\n\n return (\n <RadixPopover.Root\n open={actuallyOpen}\n onOpenChange={(open) => handleOpenChange(open, consumerOnOpenChange)}\n {...props}\n >\n <PopoverInternalContext.Provider\n value={{\n isOpen: actuallyOpen,\n walkthroughStep: step,\n onScrollStart,\n onScrollComplete,\n disableClickOutside,\n }}\n >\n {children}\n </PopoverInternalContext.Provider>\n </RadixPopover.Root>\n );\n};\n\nPopoverWalkthrough.displayName = \"PopoverWalkthrough\";\n","import React, { type ReactNode } from \"react\";\nimport type * as RadixPopover from \"@radix-ui/react-popover\";\n\nimport { PopoverBack } from \"./popover-back\";\nimport { PopoverButton } from \"./popover-button\";\nimport { type PopoverAction,PopoverContent } from \"./popover-content\";\nimport { PopoverFlow } from \"./popover-flow\";\nimport { PopoverFooter } from \"./popover-footer\";\nimport { PopoverNext } from \"./popover-next\";\nimport { PopoverStandalone } from \"./popover-standalone\";\nimport { PopoverTrigger } from \"./popover-trigger\";\nimport { PopoverWalkthrough } from \"./popover-walkthrough\";\n\nexport type { PopoverAction };\n\n// Base props shared by both variants\ntype BasePopoverProps = RadixPopover.PopoverProps & {\n children: ReactNode;\n className?: string;\n};\n\n// Standalone variant props\ntype StandalonePopoverProps = BasePopoverProps & {\n multistep?: false;\n step?: never;\n disableClickOutside?: boolean;\n};\n\n// Walkthrough variant props\ntype WalkthroughPopoverProps = BasePopoverProps & {\n multistep: true;\n step: number;\n disableClickOutside?: boolean;\n};\n\nexport type PopoverProps = StandalonePopoverProps | WalkthroughPopoverProps;\n\ntype PopoverCmp<P> = React.FunctionComponent<P> & {\n Back: typeof PopoverBack;\n Button: typeof PopoverButton;\n Content: typeof PopoverContent;\n Flow: typeof PopoverFlow;\n Footer: typeof PopoverFooter;\n Next: typeof PopoverNext;\n Trigger: typeof PopoverTrigger;\n};\n\nexport const Popover: PopoverCmp<PopoverProps> = (props) => {\n const { multistep = false, disableClickOutside, ...restProps } = props;\n\n if (multistep) {\n return (\n <PopoverWalkthrough\n {...(restProps as WalkthroughPopoverProps)}\n disableClickOutside={disableClickOutside ?? true}\n />\n );\n }\n\n return (\n <PopoverStandalone\n {...(restProps as StandalonePopoverProps)}\n disableClickOutside={disableClickOutside}\n />\n );\n};\n\nPopover.Back = PopoverBack;\nPopover.Button = PopoverButton;\nPopover.Content = PopoverContent;\nPopover.Flow = PopoverFlow;\nPopover.Footer = PopoverFooter;\nPopover.Next = PopoverNext;\nPopover.Trigger = PopoverTrigger;\n\nPopover.displayName = \"Popover\";\n"],"names":["PopoverFlowContext","createContext","usePopoverFlow","context","useContext","useOptionalPopoverFlow","PopoverFlow","children","initialStep","onComplete","onDismiss","separatorText","stepText","backLabel","nextLabel","finishLabel","openDelay","currentStep","setCurrentStep","useState","registeredSteps","setRegisteredSteps","registerStep","useCallback","step","prev","next","unregisterStep","nextStep","back","dismiss","value","useMemo","jsx","PopoverInternalContext","usePopoverInternal","PopoverNegativeContext","usePopoverNegative","DEBOUNCE_DELAY","SCREEN_MEDIA_QUERY","purpurBreakpointMd","useScreenSize","maxMediumScreen","updateSize","setIsMdOrSmaller","isMdOrSmaller","handleResize","timeoutId","useEffect","PopoverBack","onClick","isNegative","Button","NAME","Arrow","React","props","forwardedRef","width","height","arrowProps","Primitive","Root","POPPER_NAME","createPopperContext","createPopperScope","createContextScope","PopperProvider","usePopperContext","Popper","__scopePopper","anchor","setAnchor","ANCHOR_NAME","PopperAnchor","virtualRef","anchorProps","ref","composedRefs","useComposedRefs","anchorRef","previousAnchor","CONTENT_NAME","PopperContentProvider","useContentContext","PopperContent","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPaddingProp","sticky","hideWhenDetached","updatePositionStrategy","onPlaced","contentProps","content","setContent","node","arrow","setArrow","arrowSize","useSize","arrowWidth","arrowHeight","desiredPlacement","collisionPadding","boundary","hasExplicitBoundaries","detectOverflowOptions","isNotNull","refs","floatingStyles","placement","isPositioned","middlewareData","useFloating","args","autoUpdate","offset","shift","limitShift","flip","size","elements","rects","availableWidth","availableHeight","anchorWidth","anchorHeight","contentStyle","floatingUIarrow","transformOrigin","hide","placedSide","placedAlign","getSideAndAlignFromPlacement","handlePlaced","useCallbackRef","useLayoutEffect","arrowX","arrowY","cannotCenterArrow","contentZIndex","setContentZIndex","ARROW_NAME","OPPOSITE_SIDE","PopperArrow","contentContext","baseSide","ArrowPrimitive.Root","options","data","isArrowHidden","noArrowAlign","arrowXCenter","arrowYCenter","x","y","Root2","Anchor","Content","POPOVER_NAME","createPopoverContext","usePopperScope","PopoverProvider","usePopoverContext","Popover","__scopePopover","openProp","defaultOpen","onOpenChange","modal","popperScope","triggerRef","hasCustomAnchor","setHasCustomAnchor","open","setOpen","useControllableState","PopperPrimitive.Root","useId","prevOpen","PopoverAnchor","onCustomAnchorAdd","onCustomAnchorRemove","PopperPrimitive.Anchor","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","trigger","getState","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","PopoverPortal","forceMount","container","Presence","PortalPrimitive","PopoverContent","portalContext","PopoverContentModal","PopoverContentNonModal","Slot","createSlot","contentRef","isRightClickOutsideRef","hideOthers","RemoveScroll","PopoverContentImpl","event","originalEvent","ctrlLeftClick","isRightClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","useFocusGuards","FocusScope","DismissableLayer","PopperPrimitive.Content","CLOSE_NAME","PopoverClose","closeProps","PopoverArrow","PopperPrimitive.Arrow","Trigger","Portal","Content2","Close","Arrow2","PopoverButton","asChild","variant","fullWidth","flow","RadixPopover.Close","cx","c","styles","PopoverSteps","totalSteps","Fragment","jsxs","Paragraph","PopoverFooter","className","internal","showSteps","PopoverHeader","forwardRef","title","icon","Heading","PopoverNext","beakPosition","negative","closeIconAriaLabel","body","onAction","zIndex","headerRef","useRef","radixSide","shouldShowArrow","footerContent","isFirstStep","isLastStep","handleOpenAutoFocus","contentElement","handleCloseAutoFocus","handleClose","prefersReducedMotion","handleEscapeKey","handleInteractOutside","RadixPopover.Portal","RadixPopover.Content","IconClose","RadixPopover.Arrow","PopoverStandalone","controlledOpen","disableClickOutside","internalOpen","setInternalOpen","isControlled","isOpen","RadixPopover.Root","newOpen","useSmoothScroll","scrollAnimationId","cancelScroll","element","duration","rect","absoluteTop","elementHeight","viewportHeight","targetY","documentHeight","maxScroll","startY","distance","startTime","animateScroll","currentTime","elapsed","progress","easeInOut","currentY","usePopoverTrigger","hasScrolled","scrollToElement","buffer","highlight","RadixPopover.Trigger","usePopoverWalkthrough","actuallyOpen","setActuallyOpen","waitingForScroll","setWaitingForScroll","timeoutRef","openedAtRef","shouldBeOpen","onScrollStart","onScrollComplete","delay","handleOpenChange","consumerOnOpenChange","PopoverWalkthrough","multistep","restProps"],"mappings":";;;;;;;;;;;;;;;;;AAyBA,MAAMA,KAAqBC,GAA6C,IAAI,GAE/DC,KAAiB,MAAM;AAClC,QAAMC,IAAUC,EAAWJ,EAAkB;AAC7C,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,2DAA2D;AAE7E,SAAOA;AACT,GAEaE,IAAyB,MAC7BD,EAAWJ,EAAkB,GAgDzBM,KAAc,CAAC;AAAA,EAC1B,UAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC,IAAY;AACd,MAAwB;AACtB,QAAM,CAACC,GAAaC,CAAc,IAAIC,EAASX,CAAW,GACpD,CAACY,GAAiBC,CAAkB,IAAIF,EAAsB,oBAAI,KAA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gK,EAAiBhK,GAAMiK,CAAoB;AAAA,MAClE,GAAG7R;AAAA,MAEJ,UAAA,gBAAAvB;AAAA,QAACC,GAAuB;AAAA,QAAvB;AAAA,UACC,OAAO;AAAA,YACL,QAAQwS;AAAA,YACR,iBAAiBlT;AAAA,YACjB,eAAAyT;AAAA,YACA,kBAAAC;AAAA,YACA,qBAAA3C;AAAA,UAAA;AAAA,UAGD,UAAAhS;AAAA,QAAA;AAAA,MAAA;AAAA,IACH;AAAA,EAAA;AAGN;AAEA+U,GAAmB,cAAc;ACG1B,MAAM5K,IAAoC,CAAClH,MAAU;AAC1D,QAAM,EAAE,WAAA+R,IAAY,IAAO,qBAAAhD,GAAqB,GAAGiD,MAAchS;AAEjE,SAAI+R,IAEA,gBAAAtT;AAAA,IAACqT;AAAA,IAAA;AAAA,MACE,GAAIE;AAAA,MACL,qBAAqBjD,KAAuB;AAAA,IAAA;AAAA,EAAA,IAMhD,gBAAAtQ;AAAA,IAACoQ;AAAA,IAAA;AAAA,MACE,GAAImD;AAAA,MACL,qBAAAjD;AAAA,IAAA;AAAA,EAAA;AAGN;AAEA7H,EAAQ,OAAOzH;AACfyH,EAAQ,SAAS2E;AACjB3E,EAAQ,UAAUmC;AAClBnC,EAAQ,OAAOpK;AACfoK,EAAQ,SAASyF;AACjBzF,EAAQ,OAAOkG;AACflG,EAAQ,UAAUqB;AAElBrB,EAAQ,cAAc;","x_google_ignoreList":[4,5,6]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./popover-B1BgSoQx.js");exports.Popover=e.Popover;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./popover-D3qWbbU4.js");exports.Popover=e.Popover;
2
2
  //# sourceMappingURL=popover.cjs.js.map
@@ -1,4 +1,4 @@
1
- import { P as e } from "./popover-DBMI9Jy1.mjs";
1
+ import { P as e } from "./popover-ZeQKmyEb.mjs";
2
2
  export {
3
3
  e as Popover
4
4
  };
@@ -1,10 +1,10 @@
1
1
  import { jsx as r, jsxs as c, Fragment as I } from "react/jsx-runtime";
2
2
  import { forwardRef as T } from "react";
3
- import { C as o } from "./card-DiMVw06l.mjs";
4
- import { a as s } from "./paragraph-DNtj7OLr.mjs";
3
+ import { C as o } from "./card-CkZQZOz1.mjs";
4
+ import { P as s } from "./paragraph-Ci50OF1u.mjs";
5
5
  import { c as l } from "./bind-CU-R61T-.mjs";
6
6
  import { a as rr } from "./color-dot-6Mxngvce.mjs";
7
- import { b as tr, A as C } from "./alert-badge-u7qAhYbR.mjs";
7
+ import { a as tr, A as C } from "./alert-badge-DR8cigWu.mjs";
8
8
  import { i as ar } from "./arrow-right.es-C7SkjAB6.mjs";
9
9
  import { b as or } from "./icon-DNHpBTHs-JfI8WyiR.mjs";
10
10
  const cr = {
@@ -63,22 +63,22 @@ const cr = {
63
63
  "purpur-product-header": "_purpur-product-header_1athi_1",
64
64
  "purpur-product-header__product-image": "_purpur-product-header__product-image_1athi_7",
65
65
  "purpur-product-header__product-information": "_purpur-product-header__product-information_1athi_21"
66
- }, w = l.bind(ur), b = "purpur-product-header", k = ({
66
+ }, w = l.bind(ur), S = "purpur-product-header", k = ({
67
67
  ["data-testid"]: t = "purpur-product-header",
68
68
  children: a
69
- }) => a.productImage ? /* @__PURE__ */ c("div", { className: w(b), "data-testid": t, children: [
70
- /* @__PURE__ */ r("div", { className: w(`${b}__product-image`), children: a.productImage }),
71
- /* @__PURE__ */ r("div", { className: w(`${b}__product-information`), children: /* @__PURE__ */ r(o.Content, { children: a.productInformation }) })
69
+ }) => a.productImage ? /* @__PURE__ */ c("div", { className: w(S), "data-testid": t, children: [
70
+ /* @__PURE__ */ r("div", { className: w(`${S}__product-image`), children: a.productImage }),
71
+ /* @__PURE__ */ r("div", { className: w(`${S}__product-information`), children: /* @__PURE__ */ r(o.Content, { children: a.productInformation }) })
72
72
  ] }) : a.productInformation, nr = {
73
73
  "purpur-stock-status": "_purpur-stock-status_dslay_1"
74
- }, sr = l.bind(nr), S = {
74
+ }, sr = l.bind(nr), b = {
75
75
  IN_STOCK: "in-stock",
76
76
  BACK_IN_STOCK: "back-in-stock",
77
77
  NOT_IN_STOCK: "not-in-stock"
78
78
  }, _r = {
79
- [S.IN_STOCK]: C.SUCCESS,
80
- [S.BACK_IN_STOCK]: C.WARNING,
81
- [S.NOT_IN_STOCK]: C.ERROR
79
+ [b.IN_STOCK]: C.SUCCESS,
80
+ [b.BACK_IN_STOCK]: C.WARNING,
81
+ [b.NOT_IN_STOCK]: C.ERROR
82
82
  }, lr = "purpur-stock-status", x = ({
83
83
  ["data-testid"]: t = "purpur-stock-status",
84
84
  stockStatus: a,
@@ -270,4 +270,4 @@ m.displayName = "ProductCard";
270
270
  export {
271
271
  m as P
272
272
  };
273
- //# sourceMappingURL=product-card-rfpJbzzV.mjs.map
273
+ //# sourceMappingURL=product-card-BU1ThhCx.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"product-card-rfpJbzzV.mjs","sources":["../../../components/product-card/src/colors.tsx","../../../components/product-card/src/price.tsx","../../../components/product-card/src/product-header.tsx","../../../components/product-card/src/stock-status.tsx","../../../components/icon/dist/components/cart.es.js","../../../components/product-card/src/product-card.tsx"],"sourcesContent":["import React from \"react\";\nimport { ColorDot } from \"@purpur/color-dot\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./colors.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type ColorsProps = {\n [\"aria-label\"]?: string;\n [\"data-testid\"]?: string;\n colors?: string[];\n colorDotAriaLabels?: string[];\n};\n\nconst rootClassName = \"purpur-colors\";\n\nexport const Colors = ({\n [\"aria-label\"]: ariaLabel,\n [\"data-testid\"]: dataTestId = \"purpur-colors\",\n colors,\n colorDotAriaLabels,\n}: ColorsProps) =>\n !!colors?.length && (\n <ul className={cx(rootClassName)} data-testid={dataTestId} aria-label={ariaLabel}>\n {colors.map((color: string, index: number) => (\n <li key={color}>\n <ColorDot\n data-testid={`${dataTestId}-color-dot`}\n withBorder\n color={color}\n size=\"xs\"\n aria-label={colorDotAriaLabels && colorDotAriaLabels[index]}\n />\n </li>\n ))}\n </ul>\n );\n","import React from \"react\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./price.module.scss\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-price\";\n\nexport type PriceProps = {\n [\"data-testid\"]?: string;\n regularPriceText?: string;\n priceDescription?: string;\n priceText?: string;\n pricePrefix?: string;\n};\n\nexport const Price = ({\n [\"data-testid\"]: dataTestId = \"purpur-price\",\n regularPriceText,\n priceDescription,\n priceText,\n pricePrefix,\n}: PriceProps) => {\n if (!regularPriceText && !priceText && !pricePrefix && !priceDescription) {\n return null;\n }\n\n return (\n <div className={cx(rootClassName)} data-testid={dataTestId}>\n {regularPriceText && (\n <Paragraph data-testid={`${dataTestId}-regular`} variant=\"additional-100\">\n {regularPriceText}\n </Paragraph>\n )}\n <div className={cx(`${rootClassName}__price-container`)}>\n {pricePrefix && (\n <Paragraph data-testid={`${dataTestId}-from`} variant=\"paragraph-200\">\n {pricePrefix}\n </Paragraph>\n )}\n {priceText && (\n <Paragraph\n className={cx(`${rootClassName}__price-text`, {\n [`${rootClassName}__price-text--discount`]: !!regularPriceText,\n })}\n data-testid={`${dataTestId}-actual`}\n variant=\"paragraph-100-bold\"\n >\n {priceText}\n </Paragraph>\n )}\n </div>\n {priceDescription && (\n <Paragraph data-testid={`${dataTestId}-description`} variant=\"additional-100\">\n {priceDescription}\n </Paragraph>\n )}\n </div>\n );\n};\n","import React, { type ReactNode } from \"react\";\nimport { Card } from \"@purpur/card\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./product-header.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type HeaderChildren = {\n productImage: ReactNode | null;\n productInformation: ReactNode;\n};\n\nexport type HeaderProps = { [\"data-testid\"]?: string; children: HeaderChildren };\n\nconst rootClassName = \"purpur-product-header\";\n\nexport const ProductHeader = ({\n [\"data-testid\"]: dataTestId = \"purpur-product-header\",\n children,\n}: HeaderProps) =>\n children.productImage ? (\n <div className={cx(rootClassName)} data-testid={dataTestId}>\n <div className={cx(`${rootClassName}__product-image`)}>{children.productImage}</div>\n <div className={cx(`${rootClassName}__product-information`)}>\n <Card.Content>{children.productInformation}</Card.Content>\n </div>\n </div>\n ) : (\n children.productInformation\n );\n","import React from \"react\";\nimport { ALERT_BADGE_VARIANT, AlertBadge } from \"@purpur/alert-badge\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./stock-status.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport const STOCK_STATUS = {\n IN_STOCK: \"in-stock\",\n BACK_IN_STOCK: \"back-in-stock\",\n NOT_IN_STOCK: \"not-in-stock\",\n} as const;\n\nexport const StockStatusToAlertBadgeVariantMap = {\n [STOCK_STATUS.IN_STOCK]: ALERT_BADGE_VARIANT.SUCCESS,\n [STOCK_STATUS.BACK_IN_STOCK]: ALERT_BADGE_VARIANT.WARNING,\n [STOCK_STATUS.NOT_IN_STOCK]: ALERT_BADGE_VARIANT.ERROR,\n};\n\nexport type StockStatusVariants = (typeof STOCK_STATUS)[keyof typeof STOCK_STATUS];\n\nexport type StockStatusProps = {\n [\"data-testid\"]?: string;\n stockStatus?: StockStatusVariants;\n stockStatusText?: string;\n};\n\nconst rootClassName = \"purpur-stock-status\";\n\nexport const StockStatus = ({\n [\"data-testid\"]: dataTestId = \"purpur-stock-status\",\n stockStatus,\n stockStatusText,\n}: StockStatusProps) =>\n stockStatus &&\n stockStatusText && (\n <div className={cx(rootClassName)} data-testid={dataTestId}>\n <AlertBadge variant={StockStatusToAlertBadgeVariantMap[stockStatus]} />\n <Paragraph variant=\"paragraph-100-medium\">{stockStatusText}</Paragraph>\n </div>\n );\n","import { jsx as o } from \"react/jsx-runtime\";\nimport { I as r } from \"../icon-DNHpBTHs.mjs\";\nconst t = {\n name: \"cart\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M1.6 3a.9.9 0 0 1 .9-.9H5a.9.9 0 0 1 .88.713L8.275 14.1h10.54l2-7.2H10a.9.9 0 0 1 0-1.8h12a.9.9 0 0 1 .867 1.14l-2.5 9a.9.9 0 0 1-.867.66H8.656l.263 1.236a2.403 2.403 0 0 1 1.806 1.464h5.55a2.4 2.4 0 1 1 0 1.8h-5.55a2.4 2.4 0 1 1-3.567-2.89L4.27 3.9H2.5a.9.9 0 0 1-.9-.9Zm6.9 15.9a.6.6 0 1 0 0 1.2.6.6 0 0 0 0-1.2Zm10 0a.6.6 0 1 0 0 1.2.6.6 0 0 0 0-1.2Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"cart\"],\n category: \"other\"\n}, e = (a) => /* @__PURE__ */ o(r, { ...a, svg: t });\ne.displayName = \"IconCart\";\nexport {\n e as IconCart\n};\n//# sourceMappingURL=cart.es.js.map\n","import React, {\n forwardRef,\n type ForwardRefExoticComponent,\n type PropsWithoutRef,\n type ReactNode,\n} from \"react\";\nimport type { BadgeVariant } from \"@purpur/badge\";\nimport type {\n CardHeadingButtonProps,\n CardHeadingDefaultProps,\n CardHeadingLinkProps,\n CardHeadingNonInteractiveProps,\n CardProps,\n} from \"@purpur/card\";\nimport { Card } from \"@purpur/card\";\nimport type { HeadingTagType } from \"@purpur/heading\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport { Colors } from \"./colors\";\nimport { Price } from \"./price\";\nimport styles from \"./product-card.module.scss\";\nimport { ProductHeader } from \"./product-header\";\nimport { StockStatus } from \"./stock-status\";\nexport type { StockStatusVariants } from \"./stock-status\";\nimport { IconArrowRight } from \"@purpur/icon/arrow-right\";\nimport { IconCart } from \"@purpur/icon/cart\";\n\nimport type { StockStatusVariants } from \"./stock-status\";\n\nconst cx = c.bind(styles);\n\nexport type ProductCardProps = Omit<CardProps, \"children\"> &\n (CardHeadingLinkProps | CardHeadingButtonProps | CardHeadingNonInteractiveProps) & {\n /**\n * The text that will be in the badge in the top right corner of the card. This is coupled with the badgeVariant prop. Both needs to be set for the badge to be displayed.\n */\n badgeText?: string;\n /**\n * The variant (color) of the badge in the top right corner of the card. This is coupled with the badgeText prop. Both needs to be set for the badge to be displayed.\n */\n badgeVariant?: BadgeVariant;\n /**\n * This is the descriptive text about the product displayed under the product name.\n */\n bodyText?: string;\n /**\n * ReactNode in the default slot under the feature list\n */\n children?: ReactNode;\n /**\n * This is the color dots informing the customers about the available colors. Send in a list of colors e.g. [\"#000000\", \"#F0E68C\", \"#B0C4DE\", \"#EFD9F4\"].\n */\n colorVariants?: string[];\n colorNames?: string[];\n colorListAriaLabel?: string;\n ctaText?: string;\n /**\n * Determine if the card should take up the full height of the parent. Useful for getting equal height cards when used in a flex grid. Defaults to true.\n */\n fullHeight?: boolean;\n /**\n * Any ReactElement that you want to put in under the price.\n */\n footerContent?: ReactNode;\n /**\n * This is the heading tag used for the product name in the card. Defaults to h2.\n */\n headingTag?: HeadingTagType;\n /**\n * This is the feature list where each entry is preceded by a checkmark.\n */\n listItems?: string[];\n /**\n * This is a loading flag used when using the product card as a button (not setting a href). This is so that the user can do some work in the clickHandler and display a loading state in the card. Defaults to false.\n */\n loading?: boolean;\n /**\n * This is the text above the product name. Used to for example render the product brand name.\n */\n overline?: string;\n /**\n * The actual price the customer will pay without the \"from\"-prefix. E.g. \"799 kr/mån\"\n */\n priceText?: string;\n /**\n * Here you can type additional information that will be displayed below the price. E.g. \"VAT excluded\"\n */\n priceDescription?: string;\n /**\n * The first part of the price text before the actual price. E.g. From 799kr/mån. It's the \"From\" part.\n */\n pricePrefix?: string;\n /**\n * Provide an image to be displayed at the top of the card. The image container height is set to --purpur-spacing-1600 (128px). So try not to use to big images. The image in the example is 100px width and 128px height giving ~4:5 aspect ratio.\n */\n image?: ReactNode;\n imageSize?: \"sm\" | \"md\" | \"lg\";\n /**\n * The name of the product.\n */\n title: string;\n /**\n * This is used if there is a discount. The priceText will receive additional styling if this field is set. E.g. Regular price 999 kr/mån\n */\n regularPriceText?: string;\n /**\n * Use this to display the stock status. It has three statuses. in-stock, back-in-stock and not-in-stock. This is to be used together with stockStatus text to display stock status.\n */\n stockStatus?: StockStatusVariants;\n /**\n * The text for stock status. Could be e.g \"In stock\", \"Back in stock 2024-08-11\" or \"Not in stock\".\n */\n stockStatusText?: string;\n };\n\nconst rootClassName = \"purpur-product-card\";\n\ntype ProductCardStatic = {\n Colors: typeof Colors;\n Price: typeof Price;\n ProductHeader: typeof ProductHeader;\n StockStatus: typeof StockStatus;\n};\n\ntype ProductCardComponent = ForwardRefExoticComponent<PropsWithoutRef<ProductCardProps>> &\n ProductCardStatic;\n\nexport const ProductCard = forwardRef<HTMLDivElement, ProductCardProps>(\n (\n {\n [\"data-testid\"]: dataTestId = \"purpur-product-card\",\n badgeText,\n badgeVariant,\n bodyText,\n children,\n className,\n colorVariants,\n colorNames,\n colorListAriaLabel,\n ctaText,\n disabled,\n fullHeight = true,\n footerContent,\n headingTag = \"h2\",\n href,\n onClick,\n linkElement,\n listItems,\n loading = false,\n overline,\n priceText,\n priceDescription,\n pricePrefix,\n image,\n imageSize = \"sm\",\n title,\n regularPriceText,\n stockStatus,\n stockStatusText,\n ...props\n },\n ref\n ) => {\n const classes = cx(className, rootClassName);\n\n const headingProps: Pick<\n CardHeadingDefaultProps,\n \"title\" | \"titleTag\" | \"variant\" | \"data-testid\"\n > = {\n title,\n titleTag: headingTag,\n variant: \"title-200\",\n \"data-testid\": `${dataTestId}-product-name`,\n };\n\n return (\n <Card\n className={classes}\n data-testid={dataTestId}\n fullHeight={fullHeight}\n ref={ref}\n {...props}\n >\n <Card.Badge text={badgeText} variant={badgeVariant} data-testid={`${dataTestId}-badge`} />\n <Card.ContentContainer\n gapSize=\"lg\"\n className={cx(`${rootClassName}__content-container`)}\n fullHeight={fullHeight}\n >\n <Card.Content>\n <ProductHeader data-testid={`${dataTestId}-product-header`}>\n {{\n productImage: image ? (\n <div\n className={cx(\n `${rootClassName}__product-image`,\n `${rootClassName}__product-image--${imageSize}`\n )}\n data-testid={`${dataTestId}-product-image`}\n >\n {image}\n </div>\n ) : null,\n productInformation: (\n <>\n <div>\n <Card.Overline data-testid={`${dataTestId}-overline`} overline={overline} />\n {href && (\n <Card.Heading\n href={href}\n linkElement={linkElement}\n disabled={disabled}\n onClick={onClick}\n {...headingProps}\n />\n )}\n {onClick && !href && (\n <Card.Heading disabled={disabled} onClick={onClick} {...headingProps} />\n )}\n {!href && !onClick && <Card.Heading {...headingProps} />}\n </div>\n <Colors\n colors={colorVariants}\n colorDotAriaLabels={colorNames}\n aria-label={colorListAriaLabel}\n data-testid={`${dataTestId}-colors`}\n />\n </>\n ),\n }}\n </ProductHeader>\n {(bodyText || !!listItems?.length) && (\n <div className={cx(`${rootClassName}__body`)}>\n {bodyText && (\n <Paragraph data-testid={`${dataTestId}-body-text`}>{bodyText}</Paragraph>\n )}\n <Card.FeatureList\n data-testid={`${dataTestId}-feature-list`}\n listItems={listItems}\n />\n </div>\n )}\n </Card.Content>\n {children && (\n <Card.Content\n className={`${rootClassName}__children`}\n data-testid={`${dataTestId}-default-content`}\n >\n {children}\n </Card.Content>\n )}\n </Card.ContentContainer>\n <div>\n <Card.ContentContainer isFooter>\n <Card.Content>\n <div\n className={cx(`${rootClassName}__footer`, {\n [`${rootClassName}-with-cta-text`]: ctaText,\n })}\n >\n <Price\n data-testid={`${dataTestId}-price`}\n pricePrefix={pricePrefix}\n regularPriceText={regularPriceText}\n priceDescription={priceDescription}\n priceText={priceText}\n />\n {(href || onClick) && (\n <Card.Cta\n className={cx(`${rootClassName}__cta-button`)}\n data-testid={`${dataTestId}-cta-button`}\n disabled={disabled}\n iconPosition={ctaText ? (href ? \"right\" : \"left\") : undefined}\n loading={loading}\n text={ctaText}\n linkStyling={Boolean(href && !ctaText)}\n >\n {href ? <IconArrowRight size=\"sm\" /> : <IconCart size=\"sm\" />}\n </Card.Cta>\n )}\n </div>\n </Card.Content>\n {footerContent && (\n <Card.Content data-testid={`${dataTestId}-footer-content`}>\n {footerContent}\n </Card.Content>\n )}\n </Card.ContentContainer>\n <StockStatus\n data-testid={`${dataTestId}-stock-status`}\n stockStatus={stockStatus}\n stockStatusText={stockStatusText}\n />\n </div>\n </Card>\n );\n }\n) as ProductCardComponent;\n\nProductCard.Colors = Colors;\nProductCard.Price = Price;\nProductCard.ProductHeader = ProductHeader;\nProductCard.StockStatus = StockStatus;\nProductCard.displayName = \"ProductCard\";\n"],"names":["cx","c","styles","rootClassName","Colors","ariaLabel","dataTestId","colors","colorDotAriaLabels","color","index","jsx","ColorDot","Price","regularPriceText","priceDescription","priceText","pricePrefix","Paragraph","ProductHeader","children","jsxs","Card","STOCK_STATUS","StockStatusToAlertBadgeVariantMap","ALERT_BADGE_VARIANT","StockStatus","stockStatus","stockStatusText","AlertBadge","t","e","a","o","r","ProductCard","forwardRef","badgeText","badgeVariant","bodyText","className","colorVariants","colorNames","colorListAriaLabel","ctaText","disabled","fullHeight","footerContent","headingTag","href","onClick","linkElement","listItems","loading","overline","image","imageSize","title","props","ref","classes","headingProps","Fragment","IconArrowRight","IconCart"],"mappings":";;;;;;;;;;;GAMMA,KAAKC,EAAE,KAAKC,EAAM,GASlBC,KAAgB,iBAETC,IAAS,CAAC;AAAA,EACrB,CAAC,eAAeC;AAAA,EAChB,CAAC,gBAAgBC,IAAa;AAAA,EAC9B,QAAAC;AAAA,EACA,oBAAAC;AACF,MACE,CAAC,CAACD,GAAQ,4BACP,MAAA,EAAG,WAAWP,GAAGG,EAAa,GAAG,eAAaG,GAAY,cAAYD,GACpE,UAAAE,EAAO,IAAI,CAACE,GAAeC,wBACzB,MAAA,EACC,UAAA,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,eAAa,GAAGN,CAAU;AAAA,IAC1B,YAAU;AAAA,IACV,OAAAG;AAAA,IACA,MAAK;AAAA,IACL,cAA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,SAAU;AAAA,wBACpD,SAAAI;AAAA,wBACA,MAAMT;AAAA,wBACN,aAAa,GAAQK,KAAQ,CAACL;AAAA,wBAE7B,UAAAK,sBAAQc,IAAA,EAAe,MAAK,MAAK,IAAK,gBAAApD,EAACqD,GAAA,EAAS,MAAK,KAAA,CAAK;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBAC7D;AAAA,gBAAA;AAAA,cAAA,GAGN;AAAA,cACCjB,uBACEzB,EAAK,SAAL,EAAa,eAAa,GAAGhB,CAAU,mBACrC,UAAAyC,EAAA,CACH;AAAA,YAAA,GAEJ;AAAA,YACA,gBAAApC;AAAA,cAACe;AAAA,cAAA;AAAA,gBACC,eAAa,GAAGpB,CAAU;AAAA,gBAC1B,aAAAqB;AAAA,gBACA,iBAAAC;AAAA,cAAA;AAAA,YAAA;AAAA,UACF,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAO,EAAY,SAAS/B;AACrB+B,EAAY,QAAQtB;AACpBsB,EAAY,gBAAgBhB;AAC5BgB,EAAY,cAAcT;AAC1BS,EAAY,cAAc;"}
1
+ {"version":3,"file":"product-card-BU1ThhCx.mjs","sources":["../../../components/product-card/src/colors.tsx","../../../components/product-card/src/price.tsx","../../../components/product-card/src/product-header.tsx","../../../components/product-card/src/stock-status.tsx","../../../components/icon/dist/components/cart.es.js","../../../components/product-card/src/product-card.tsx"],"sourcesContent":["import React from \"react\";\nimport { ColorDot } from \"@purpur/color-dot\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./colors.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type ColorsProps = {\n [\"aria-label\"]?: string;\n [\"data-testid\"]?: string;\n colors?: string[];\n colorDotAriaLabels?: string[];\n};\n\nconst rootClassName = \"purpur-colors\";\n\nexport const Colors = ({\n [\"aria-label\"]: ariaLabel,\n [\"data-testid\"]: dataTestId = \"purpur-colors\",\n colors,\n colorDotAriaLabels,\n}: ColorsProps) =>\n !!colors?.length && (\n <ul className={cx(rootClassName)} data-testid={dataTestId} aria-label={ariaLabel}>\n {colors.map((color: string, index: number) => (\n <li key={color}>\n <ColorDot\n data-testid={`${dataTestId}-color-dot`}\n withBorder\n color={color}\n size=\"xs\"\n aria-label={colorDotAriaLabels && colorDotAriaLabels[index]}\n />\n </li>\n ))}\n </ul>\n );\n","import React from \"react\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./price.module.scss\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-price\";\n\nexport type PriceProps = {\n [\"data-testid\"]?: string;\n regularPriceText?: string;\n priceDescription?: string;\n priceText?: string;\n pricePrefix?: string;\n};\n\nexport const Price = ({\n [\"data-testid\"]: dataTestId = \"purpur-price\",\n regularPriceText,\n priceDescription,\n priceText,\n pricePrefix,\n}: PriceProps) => {\n if (!regularPriceText && !priceText && !pricePrefix && !priceDescription) {\n return null;\n }\n\n return (\n <div className={cx(rootClassName)} data-testid={dataTestId}>\n {regularPriceText && (\n <Paragraph data-testid={`${dataTestId}-regular`} variant=\"additional-100\">\n {regularPriceText}\n </Paragraph>\n )}\n <div className={cx(`${rootClassName}__price-container`)}>\n {pricePrefix && (\n <Paragraph data-testid={`${dataTestId}-from`} variant=\"paragraph-200\">\n {pricePrefix}\n </Paragraph>\n )}\n {priceText && (\n <Paragraph\n className={cx(`${rootClassName}__price-text`, {\n [`${rootClassName}__price-text--discount`]: !!regularPriceText,\n })}\n data-testid={`${dataTestId}-actual`}\n variant=\"paragraph-100-bold\"\n >\n {priceText}\n </Paragraph>\n )}\n </div>\n {priceDescription && (\n <Paragraph data-testid={`${dataTestId}-description`} variant=\"additional-100\">\n {priceDescription}\n </Paragraph>\n )}\n </div>\n );\n};\n","import React, { type ReactNode } from \"react\";\nimport { Card } from \"@purpur/card\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./product-header.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type HeaderChildren = {\n productImage: ReactNode | null;\n productInformation: ReactNode;\n};\n\nexport type HeaderProps = { [\"data-testid\"]?: string; children: HeaderChildren };\n\nconst rootClassName = \"purpur-product-header\";\n\nexport const ProductHeader = ({\n [\"data-testid\"]: dataTestId = \"purpur-product-header\",\n children,\n}: HeaderProps) =>\n children.productImage ? (\n <div className={cx(rootClassName)} data-testid={dataTestId}>\n <div className={cx(`${rootClassName}__product-image`)}>{children.productImage}</div>\n <div className={cx(`${rootClassName}__product-information`)}>\n <Card.Content>{children.productInformation}</Card.Content>\n </div>\n </div>\n ) : (\n children.productInformation\n );\n","import React from \"react\";\nimport { ALERT_BADGE_VARIANT, AlertBadge } from \"@purpur/alert-badge\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./stock-status.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport const STOCK_STATUS = {\n IN_STOCK: \"in-stock\",\n BACK_IN_STOCK: \"back-in-stock\",\n NOT_IN_STOCK: \"not-in-stock\",\n} as const;\n\nexport const StockStatusToAlertBadgeVariantMap = {\n [STOCK_STATUS.IN_STOCK]: ALERT_BADGE_VARIANT.SUCCESS,\n [STOCK_STATUS.BACK_IN_STOCK]: ALERT_BADGE_VARIANT.WARNING,\n [STOCK_STATUS.NOT_IN_STOCK]: ALERT_BADGE_VARIANT.ERROR,\n};\n\nexport type StockStatusVariants = (typeof STOCK_STATUS)[keyof typeof STOCK_STATUS];\n\nexport type StockStatusProps = {\n [\"data-testid\"]?: string;\n stockStatus?: StockStatusVariants;\n stockStatusText?: string;\n};\n\nconst rootClassName = \"purpur-stock-status\";\n\nexport const StockStatus = ({\n [\"data-testid\"]: dataTestId = \"purpur-stock-status\",\n stockStatus,\n stockStatusText,\n}: StockStatusProps) =>\n stockStatus &&\n stockStatusText && (\n <div className={cx(rootClassName)} data-testid={dataTestId}>\n <AlertBadge variant={StockStatusToAlertBadgeVariantMap[stockStatus]} />\n <Paragraph variant=\"paragraph-100-medium\">{stockStatusText}</Paragraph>\n </div>\n );\n","import { jsx as o } from \"react/jsx-runtime\";\nimport { I as r } from \"../icon-DNHpBTHs.mjs\";\nconst t = {\n name: \"cart\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M1.6 3a.9.9 0 0 1 .9-.9H5a.9.9 0 0 1 .88.713L8.275 14.1h10.54l2-7.2H10a.9.9 0 0 1 0-1.8h12a.9.9 0 0 1 .867 1.14l-2.5 9a.9.9 0 0 1-.867.66H8.656l.263 1.236a2.403 2.403 0 0 1 1.806 1.464h5.55a2.4 2.4 0 1 1 0 1.8h-5.55a2.4 2.4 0 1 1-3.567-2.89L4.27 3.9H2.5a.9.9 0 0 1-.9-.9Zm6.9 15.9a.6.6 0 1 0 0 1.2.6.6 0 0 0 0-1.2Zm10 0a.6.6 0 1 0 0 1.2.6.6 0 0 0 0-1.2Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"cart\"],\n category: \"other\"\n}, e = (a) => /* @__PURE__ */ o(r, { ...a, svg: t });\ne.displayName = \"IconCart\";\nexport {\n e as IconCart\n};\n//# sourceMappingURL=cart.es.js.map\n","import React, {\n forwardRef,\n type ForwardRefExoticComponent,\n type PropsWithoutRef,\n type ReactNode,\n} from \"react\";\nimport type { BadgeVariant } from \"@purpur/badge\";\nimport type {\n CardHeadingButtonProps,\n CardHeadingDefaultProps,\n CardHeadingLinkProps,\n CardHeadingNonInteractiveProps,\n CardProps,\n} from \"@purpur/card\";\nimport { Card } from \"@purpur/card\";\nimport type { HeadingTagType } from \"@purpur/heading\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport { Colors } from \"./colors\";\nimport { Price } from \"./price\";\nimport styles from \"./product-card.module.scss\";\nimport { ProductHeader } from \"./product-header\";\nimport { StockStatus } from \"./stock-status\";\nexport type { StockStatusVariants } from \"./stock-status\";\nimport { IconArrowRight } from \"@purpur/icon/arrow-right\";\nimport { IconCart } from \"@purpur/icon/cart\";\n\nimport type { StockStatusVariants } from \"./stock-status\";\n\nconst cx = c.bind(styles);\n\nexport type ProductCardProps = Omit<CardProps, \"children\"> &\n (CardHeadingLinkProps | CardHeadingButtonProps | CardHeadingNonInteractiveProps) & {\n /**\n * The text that will be in the badge in the top right corner of the card. This is coupled with the badgeVariant prop. Both needs to be set for the badge to be displayed.\n */\n badgeText?: string;\n /**\n * The variant (color) of the badge in the top right corner of the card. This is coupled with the badgeText prop. Both needs to be set for the badge to be displayed.\n */\n badgeVariant?: BadgeVariant;\n /**\n * This is the descriptive text about the product displayed under the product name.\n */\n bodyText?: string;\n /**\n * ReactNode in the default slot under the feature list\n */\n children?: ReactNode;\n /**\n * This is the color dots informing the customers about the available colors. Send in a list of colors e.g. [\"#000000\", \"#F0E68C\", \"#B0C4DE\", \"#EFD9F4\"].\n */\n colorVariants?: string[];\n colorNames?: string[];\n colorListAriaLabel?: string;\n ctaText?: string;\n /**\n * Determine if the card should take up the full height of the parent. Useful for getting equal height cards when used in a flex grid. Defaults to true.\n */\n fullHeight?: boolean;\n /**\n * Any ReactElement that you want to put in under the price.\n */\n footerContent?: ReactNode;\n /**\n * This is the heading tag used for the product name in the card. Defaults to h2.\n */\n headingTag?: HeadingTagType;\n /**\n * This is the feature list where each entry is preceded by a checkmark.\n */\n listItems?: string[];\n /**\n * This is a loading flag used when using the product card as a button (not setting a href). This is so that the user can do some work in the clickHandler and display a loading state in the card. Defaults to false.\n */\n loading?: boolean;\n /**\n * This is the text above the product name. Used to for example render the product brand name.\n */\n overline?: string;\n /**\n * The actual price the customer will pay without the \"from\"-prefix. E.g. \"799 kr/mån\"\n */\n priceText?: string;\n /**\n * Here you can type additional information that will be displayed below the price. E.g. \"VAT excluded\"\n */\n priceDescription?: string;\n /**\n * The first part of the price text before the actual price. E.g. From 799kr/mån. It's the \"From\" part.\n */\n pricePrefix?: string;\n /**\n * Provide an image to be displayed at the top of the card. The image container height is set to --purpur-spacing-1600 (128px). So try not to use to big images. The image in the example is 100px width and 128px height giving ~4:5 aspect ratio.\n */\n image?: ReactNode;\n imageSize?: \"sm\" | \"md\" | \"lg\";\n /**\n * The name of the product.\n */\n title: string;\n /**\n * This is used if there is a discount. The priceText will receive additional styling if this field is set. E.g. Regular price 999 kr/mån\n */\n regularPriceText?: string;\n /**\n * Use this to display the stock status. It has three statuses. in-stock, back-in-stock and not-in-stock. This is to be used together with stockStatus text to display stock status.\n */\n stockStatus?: StockStatusVariants;\n /**\n * The text for stock status. Could be e.g \"In stock\", \"Back in stock 2024-08-11\" or \"Not in stock\".\n */\n stockStatusText?: string;\n };\n\nconst rootClassName = \"purpur-product-card\";\n\ntype ProductCardStatic = {\n Colors: typeof Colors;\n Price: typeof Price;\n ProductHeader: typeof ProductHeader;\n StockStatus: typeof StockStatus;\n};\n\ntype ProductCardComponent = ForwardRefExoticComponent<PropsWithoutRef<ProductCardProps>> &\n ProductCardStatic;\n\nexport const ProductCard = forwardRef<HTMLDivElement, ProductCardProps>(\n (\n {\n [\"data-testid\"]: dataTestId = \"purpur-product-card\",\n badgeText,\n badgeVariant,\n bodyText,\n children,\n className,\n colorVariants,\n colorNames,\n colorListAriaLabel,\n ctaText,\n disabled,\n fullHeight = true,\n footerContent,\n headingTag = \"h2\",\n href,\n onClick,\n linkElement,\n listItems,\n loading = false,\n overline,\n priceText,\n priceDescription,\n pricePrefix,\n image,\n imageSize = \"sm\",\n title,\n regularPriceText,\n stockStatus,\n stockStatusText,\n ...props\n },\n ref\n ) => {\n const classes = cx(className, rootClassName);\n\n const headingProps: Pick<\n CardHeadingDefaultProps,\n \"title\" | \"titleTag\" | \"variant\" | \"data-testid\"\n > = {\n title,\n titleTag: headingTag,\n variant: \"title-200\",\n \"data-testid\": `${dataTestId}-product-name`,\n };\n\n return (\n <Card\n className={classes}\n data-testid={dataTestId}\n fullHeight={fullHeight}\n ref={ref}\n {...props}\n >\n <Card.Badge text={badgeText} variant={badgeVariant} data-testid={`${dataTestId}-badge`} />\n <Card.ContentContainer\n gapSize=\"lg\"\n className={cx(`${rootClassName}__content-container`)}\n fullHeight={fullHeight}\n >\n <Card.Content>\n <ProductHeader data-testid={`${dataTestId}-product-header`}>\n {{\n productImage: image ? (\n <div\n className={cx(\n `${rootClassName}__product-image`,\n `${rootClassName}__product-image--${imageSize}`\n )}\n data-testid={`${dataTestId}-product-image`}\n >\n {image}\n </div>\n ) : null,\n productInformation: (\n <>\n <div>\n <Card.Overline data-testid={`${dataTestId}-overline`} overline={overline} />\n {href && (\n <Card.Heading\n href={href}\n linkElement={linkElement}\n disabled={disabled}\n onClick={onClick}\n {...headingProps}\n />\n )}\n {onClick && !href && (\n <Card.Heading disabled={disabled} onClick={onClick} {...headingProps} />\n )}\n {!href && !onClick && <Card.Heading {...headingProps} />}\n </div>\n <Colors\n colors={colorVariants}\n colorDotAriaLabels={colorNames}\n aria-label={colorListAriaLabel}\n data-testid={`${dataTestId}-colors`}\n />\n </>\n ),\n }}\n </ProductHeader>\n {(bodyText || !!listItems?.length) && (\n <div className={cx(`${rootClassName}__body`)}>\n {bodyText && (\n <Paragraph data-testid={`${dataTestId}-body-text`}>{bodyText}</Paragraph>\n )}\n <Card.FeatureList\n data-testid={`${dataTestId}-feature-list`}\n listItems={listItems}\n />\n </div>\n )}\n </Card.Content>\n {children && (\n <Card.Content\n className={`${rootClassName}__children`}\n data-testid={`${dataTestId}-default-content`}\n >\n {children}\n </Card.Content>\n )}\n </Card.ContentContainer>\n <div>\n <Card.ContentContainer isFooter>\n <Card.Content>\n <div\n className={cx(`${rootClassName}__footer`, {\n [`${rootClassName}-with-cta-text`]: ctaText,\n })}\n >\n <Price\n data-testid={`${dataTestId}-price`}\n pricePrefix={pricePrefix}\n regularPriceText={regularPriceText}\n priceDescription={priceDescription}\n priceText={priceText}\n />\n {(href || onClick) && (\n <Card.Cta\n className={cx(`${rootClassName}__cta-button`)}\n data-testid={`${dataTestId}-cta-button`}\n disabled={disabled}\n iconPosition={ctaText ? (href ? \"right\" : \"left\") : undefined}\n loading={loading}\n text={ctaText}\n linkStyling={Boolean(href && !ctaText)}\n >\n {href ? <IconArrowRight size=\"sm\" /> : <IconCart size=\"sm\" />}\n </Card.Cta>\n )}\n </div>\n </Card.Content>\n {footerContent && (\n <Card.Content data-testid={`${dataTestId}-footer-content`}>\n {footerContent}\n </Card.Content>\n )}\n </Card.ContentContainer>\n <StockStatus\n data-testid={`${dataTestId}-stock-status`}\n stockStatus={stockStatus}\n stockStatusText={stockStatusText}\n />\n </div>\n </Card>\n );\n }\n) as ProductCardComponent;\n\nProductCard.Colors = Colors;\nProductCard.Price = Price;\nProductCard.ProductHeader = ProductHeader;\nProductCard.StockStatus = StockStatus;\nProductCard.displayName = \"ProductCard\";\n"],"names":["cx","c","styles","rootClassName","Colors","ariaLabel","dataTestId","colors","colorDotAriaLabels","color","index","jsx","ColorDot","Price","regularPriceText","priceDescription","priceText","pricePrefix","Paragraph","ProductHeader","children","jsxs","Card","STOCK_STATUS","StockStatusToAlertBadgeVariantMap","ALERT_BADGE_VARIANT","StockStatus","stockStatus","stockStatusText","AlertBadge","t","e","a","o","r","ProductCard","forwardRef","badgeText","badgeVariant","bodyText","className","colorVariants","colorNames","colorListAriaLabel","ctaText","disabled","fullHeight","footerContent","headingTag","href","onClick","linkElement","listItems","loading","overline","image","imageSize","title","props","ref","classes","headingProps","Fragment","IconArrowRight","IconCart"],"mappings":";;;;;;;;;;;GAMMA,KAAKC,EAAE,KAAKC,EAAM,GASlBC,KAAgB,iBAETC,IAAS,CAAC;AAAA,EACrB,CAAC,eAAeC;AAAA,EAChB,CAAC,gBAAgBC,IAAa;AAAA,EAC9B,QAAAC;AAAA,EACA,oBAAAC;AACF,MACE,CAAC,CAACD,GAAQ,4BACP,MAAA,EAAG,WAAWP,GAAGG,EAAa,GAAG,eAAaG,GAAY,cAAYD,GACpE,UAAAE,EAAO,IAAI,CAACE,GAAeC,wBACzB,MAAA,EACC,UAAA,gBAAAC;AAAA,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AG,GAAGG,CAAa,cAAc;AAAA,wBAC5C,eAAa,GAAGG,CAAU;AAAA,wBAC1B,UAAAuC;AAAA,wBACA,cAAcD,IAAWK,IAAO,UAAU,SAAU;AAAA,wBACpD,SAAAI;AAAA,wBACA,MAAMT;AAAA,wBACN,aAAa,GAAQK,KAAQ,CAACL;AAAA,wBAE7B,UAAAK,sBAAQc,IAAA,EAAe,MAAK,MAAK,IAAK,gBAAApD,EAACqD,GAAA,EAAS,MAAK,KAAA,CAAK;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBAC7D;AAAA,gBAAA;AAAA,cAAA,GAGN;AAAA,cACCjB,uBACEzB,EAAK,SAAL,EAAa,eAAa,GAAGhB,CAAU,mBACrC,UAAAyC,EAAA,CACH;AAAA,YAAA,GAEJ;AAAA,YACA,gBAAApC;AAAA,cAACe;AAAA,cAAA;AAAA,gBACC,eAAa,GAAGpB,CAAU;AAAA,gBAC1B,aAAAqB;AAAA,gBACA,iBAAAC;AAAA,cAAA;AAAA,YAAA;AAAA,UACF,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAO,EAAY,SAAS/B;AACrB+B,EAAY,QAAQtB;AACpBsB,EAAY,gBAAgBhB;AAC5BgB,EAAY,cAAcT;AAC1BS,EAAY,cAAc;"}
@@ -1,2 +1,2 @@
1
- "use strict";const r=require("react/jsx-runtime"),Y=require("react"),c=require("./card-B512KHpr.js"),p=require("./paragraph-BsI53OR0.js"),l=require("./bind-DeUYJ6m9.js"),I=require("./color-dot-B9w_ucWb.js"),g=require("./alert-badge-DguuS7Qq.js"),T=require("./arrow-right.es-eH-IgGi9.js"),rr=require("./icon-DNHpBTHs-faYHqTXU.js"),tr={"purpur-colors":"_purpur-colors_1190y_1"},ar=l.c.bind(tr),cr="purpur-colors",R=({["aria-label"]:t,["data-testid"]:a="purpur-colors",colors:s,colorDotAriaLabels:o})=>!!s?.length&&r.jsx("ul",{className:ar(cr),"data-testid":a,"aria-label":t,children:s.map((d,x)=>r.jsx("li",{children:r.jsx(I.ColorDot,{"data-testid":`${a}-color-dot`,withBorder:!0,color:d,size:"xs","aria-label":o&&o[x]})},d))}),sr={"purpur-price":"_purpur-price_1lcgf_1","purpur-price__price-container":"_purpur-price__price-container_1lcgf_7","purpur-price__price-text--discount":"_purpur-price__price-text--discount_1lcgf_12"},$=l.c.bind(sr),m="purpur-price",B=({["data-testid"]:t="purpur-price",regularPriceText:a,priceDescription:s,priceText:o,pricePrefix:d})=>!a&&!o&&!d&&!s?null:r.jsxs("div",{className:$(m),"data-testid":t,children:[a&&r.jsx(p.Paragraph,{"data-testid":`${t}-regular`,variant:"additional-100",children:a}),r.jsxs("div",{className:$(`${m}__price-container`),children:[d&&r.jsx(p.Paragraph,{"data-testid":`${t}-from`,variant:"paragraph-200",children:d}),o&&r.jsx(p.Paragraph,{className:$(`${m}__price-text`,{[`${m}__price-text--discount`]:!!a}),"data-testid":`${t}-actual`,variant:"paragraph-100-bold",children:o})]}),s&&r.jsx(p.Paragraph,{"data-testid":`${t}-description`,variant:"additional-100",children:s})]}),or={"purpur-product-card__content-container":"_purpur-product-card__content-container_71zwa_1","purpur-product-card__product-image":"_purpur-product-card__product-image_71zwa_9","purpur-product-card__product-image--md":"_purpur-product-card__product-image--md_71zwa_17","purpur-product-card__product-image--lg":"_purpur-product-card__product-image--lg_71zwa_20","purpur-product-card__body":"_purpur-product-card__body_71zwa_24","purpur-product-card__footer":"_purpur-product-card__footer_71zwa_29","purpur-product-card-with-cta-text":"_purpur-product-card-with-cta-text_71zwa_34","purpur-product-card__cta-button":"_purpur-product-card__cta-button_71zwa_39"},dr={"purpur-product-header":"_purpur-product-header_1athi_1","purpur-product-header__product-image":"_purpur-product-header__product-image_1athi_7","purpur-product-header__product-information":"_purpur-product-header__product-information_1athi_21"},N=l.c.bind(dr),v="purpur-product-header",f=({["data-testid"]:t="purpur-product-header",children:a})=>a.productImage?r.jsxs("div",{className:N(v),"data-testid":t,children:[r.jsx("div",{className:N(`${v}__product-image`),children:a.productImage}),r.jsx("div",{className:N(`${v}__product-information`),children:r.jsx(c.Card.Content,{children:a.productInformation})})]}):a.productInformation,er={"purpur-stock-status":"_purpur-stock-status_dslay_1"},ur=l.c.bind(er),w={IN_STOCK:"in-stock",BACK_IN_STOCK:"back-in-stock",NOT_IN_STOCK:"not-in-stock"},ir={[w.IN_STOCK]:g.ALERT_BADGE_VARIANT.SUCCESS,[w.BACK_IN_STOCK]:g.ALERT_BADGE_VARIANT.WARNING,[w.NOT_IN_STOCK]:g.ALERT_BADGE_VARIANT.ERROR},pr="purpur-stock-status",z=({["data-testid"]:t="purpur-stock-status",stockStatus:a,stockStatusText:s})=>a&&s&&r.jsxs("div",{className:ur(pr),"data-testid":t,children:[r.jsx(g.AlertBadge,{variant:ir[a]}),r.jsx(p.Paragraph,{variant:"paragraph-100-medium",children:s})]}),nr={name:"cart",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M1.6 3a.9.9 0 0 1 .9-.9H5a.9.9 0 0 1 .88.713L8.275 14.1h10.54l2-7.2H10a.9.9 0 0 1 0-1.8h12a.9.9 0 0 1 .867 1.14l-2.5 9a.9.9 0 0 1-.867.66H8.656l.263 1.236a2.403 2.403 0 0 1 1.806 1.464h5.55a2.4 2.4 0 1 1 0 1.8h-5.55a2.4 2.4 0 1 1-3.567-2.89L4.27 3.9H2.5a.9.9 0 0 1-.9-.9Zm6.9 15.9a.6.6 0 1 0 0 1.2.6.6 0 0 0 0-1.2Zm10 0a.6.6 0 1 0 0 1.2.6.6 0 0 0 0-1.2Z" clip-rule="evenodd"/></svg>',keywords:["cart"],category:"other"},O=t=>r.jsx(rr.b,{...t,svg:nr});O.displayName="IconCart";const i=l.c.bind(or),e="purpur-product-card",n=Y.forwardRef(({["data-testid"]:t="purpur-product-card",badgeText:a,badgeVariant:s,bodyText:o,children:d,className:x,colorVariants:H,colorNames:P,colorListAriaLabel:q,ctaText:h,disabled:j,fullHeight:b=!0,footerContent:A,headingTag:K="h2",href:u,onClick:_,linkElement:k,listItems:S,loading:E=!1,overline:L,priceText:D,priceDescription:G,pricePrefix:V,image:y,imageSize:F="sm",title:Z,regularPriceText:M,stockStatus:U,stockStatusText:W,...J},Q)=>{const X=i(x,e),C={title:Z,titleTag:K,variant:"title-200","data-testid":`${t}-product-name`};return r.jsxs(c.Card,{className:X,"data-testid":t,fullHeight:b,ref:Q,...J,children:[r.jsx(c.Card.Badge,{text:a,variant:s,"data-testid":`${t}-badge`}),r.jsxs(c.Card.ContentContainer,{gapSize:"lg",className:i(`${e}__content-container`),fullHeight:b,children:[r.jsxs(c.Card.Content,{children:[r.jsx(f,{"data-testid":`${t}-product-header`,children:{productImage:y?r.jsx("div",{className:i(`${e}__product-image`,`${e}__product-image--${F}`),"data-testid":`${t}-product-image`,children:y}):null,productInformation:r.jsxs(r.Fragment,{children:[r.jsxs("div",{children:[r.jsx(c.Card.Overline,{"data-testid":`${t}-overline`,overline:L}),u&&r.jsx(c.Card.Heading,{href:u,linkElement:k,disabled:j,onClick:_,...C}),_&&!u&&r.jsx(c.Card.Heading,{disabled:j,onClick:_,...C}),!u&&!_&&r.jsx(c.Card.Heading,{...C})]}),r.jsx(R,{colors:H,colorDotAriaLabels:P,"aria-label":q,"data-testid":`${t}-colors`})]})}}),(o||!!S?.length)&&r.jsxs("div",{className:i(`${e}__body`),children:[o&&r.jsx(p.Paragraph,{"data-testid":`${t}-body-text`,children:o}),r.jsx(c.Card.FeatureList,{"data-testid":`${t}-feature-list`,listItems:S})]})]}),d&&r.jsx(c.Card.Content,{className:`${e}__children`,"data-testid":`${t}-default-content`,children:d})]}),r.jsxs("div",{children:[r.jsxs(c.Card.ContentContainer,{isFooter:!0,children:[r.jsx(c.Card.Content,{children:r.jsxs("div",{className:i(`${e}__footer`,{[`${e}-with-cta-text`]:h}),children:[r.jsx(B,{"data-testid":`${t}-price`,pricePrefix:V,regularPriceText:M,priceDescription:G,priceText:D}),(u||_)&&r.jsx(c.Card.Cta,{className:i(`${e}__cta-button`),"data-testid":`${t}-cta-button`,disabled:j,iconPosition:h?u?"right":"left":void 0,loading:E,text:h,linkStyling:!!(u&&!h),children:u?r.jsx(T.i,{size:"sm"}):r.jsx(O,{size:"sm"})})]})}),A&&r.jsx(c.Card.Content,{"data-testid":`${t}-footer-content`,children:A})]}),r.jsx(z,{"data-testid":`${t}-stock-status`,stockStatus:U,stockStatusText:W})]})]})});n.Colors=R;n.Price=B;n.ProductHeader=f;n.StockStatus=z;n.displayName="ProductCard";exports.ProductCard=n;
2
- //# sourceMappingURL=product-card-DOBHGAa2.js.map
1
+ "use strict";const r=require("react/jsx-runtime"),Y=require("react"),c=require("./card-VMa3cGCP.js"),p=require("./paragraph-BsI53OR0.js"),l=require("./bind-DeUYJ6m9.js"),I=require("./color-dot-B9w_ucWb.js"),g=require("./alert-badge-DguuS7Qq.js"),T=require("./arrow-right.es-eH-IgGi9.js"),rr=require("./icon-DNHpBTHs-faYHqTXU.js"),tr={"purpur-colors":"_purpur-colors_1190y_1"},ar=l.c.bind(tr),cr="purpur-colors",R=({["aria-label"]:t,["data-testid"]:a="purpur-colors",colors:s,colorDotAriaLabels:o})=>!!s?.length&&r.jsx("ul",{className:ar(cr),"data-testid":a,"aria-label":t,children:s.map((d,x)=>r.jsx("li",{children:r.jsx(I.ColorDot,{"data-testid":`${a}-color-dot`,withBorder:!0,color:d,size:"xs","aria-label":o&&o[x]})},d))}),sr={"purpur-price":"_purpur-price_1lcgf_1","purpur-price__price-container":"_purpur-price__price-container_1lcgf_7","purpur-price__price-text--discount":"_purpur-price__price-text--discount_1lcgf_12"},$=l.c.bind(sr),m="purpur-price",B=({["data-testid"]:t="purpur-price",regularPriceText:a,priceDescription:s,priceText:o,pricePrefix:d})=>!a&&!o&&!d&&!s?null:r.jsxs("div",{className:$(m),"data-testid":t,children:[a&&r.jsx(p.Paragraph,{"data-testid":`${t}-regular`,variant:"additional-100",children:a}),r.jsxs("div",{className:$(`${m}__price-container`),children:[d&&r.jsx(p.Paragraph,{"data-testid":`${t}-from`,variant:"paragraph-200",children:d}),o&&r.jsx(p.Paragraph,{className:$(`${m}__price-text`,{[`${m}__price-text--discount`]:!!a}),"data-testid":`${t}-actual`,variant:"paragraph-100-bold",children:o})]}),s&&r.jsx(p.Paragraph,{"data-testid":`${t}-description`,variant:"additional-100",children:s})]}),or={"purpur-product-card__content-container":"_purpur-product-card__content-container_71zwa_1","purpur-product-card__product-image":"_purpur-product-card__product-image_71zwa_9","purpur-product-card__product-image--md":"_purpur-product-card__product-image--md_71zwa_17","purpur-product-card__product-image--lg":"_purpur-product-card__product-image--lg_71zwa_20","purpur-product-card__body":"_purpur-product-card__body_71zwa_24","purpur-product-card__footer":"_purpur-product-card__footer_71zwa_29","purpur-product-card-with-cta-text":"_purpur-product-card-with-cta-text_71zwa_34","purpur-product-card__cta-button":"_purpur-product-card__cta-button_71zwa_39"},dr={"purpur-product-header":"_purpur-product-header_1athi_1","purpur-product-header__product-image":"_purpur-product-header__product-image_1athi_7","purpur-product-header__product-information":"_purpur-product-header__product-information_1athi_21"},N=l.c.bind(dr),v="purpur-product-header",f=({["data-testid"]:t="purpur-product-header",children:a})=>a.productImage?r.jsxs("div",{className:N(v),"data-testid":t,children:[r.jsx("div",{className:N(`${v}__product-image`),children:a.productImage}),r.jsx("div",{className:N(`${v}__product-information`),children:r.jsx(c.Card.Content,{children:a.productInformation})})]}):a.productInformation,er={"purpur-stock-status":"_purpur-stock-status_dslay_1"},ur=l.c.bind(er),w={IN_STOCK:"in-stock",BACK_IN_STOCK:"back-in-stock",NOT_IN_STOCK:"not-in-stock"},ir={[w.IN_STOCK]:g.ALERT_BADGE_VARIANT.SUCCESS,[w.BACK_IN_STOCK]:g.ALERT_BADGE_VARIANT.WARNING,[w.NOT_IN_STOCK]:g.ALERT_BADGE_VARIANT.ERROR},pr="purpur-stock-status",z=({["data-testid"]:t="purpur-stock-status",stockStatus:a,stockStatusText:s})=>a&&s&&r.jsxs("div",{className:ur(pr),"data-testid":t,children:[r.jsx(g.AlertBadge,{variant:ir[a]}),r.jsx(p.Paragraph,{variant:"paragraph-100-medium",children:s})]}),nr={name:"cart",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M1.6 3a.9.9 0 0 1 .9-.9H5a.9.9 0 0 1 .88.713L8.275 14.1h10.54l2-7.2H10a.9.9 0 0 1 0-1.8h12a.9.9 0 0 1 .867 1.14l-2.5 9a.9.9 0 0 1-.867.66H8.656l.263 1.236a2.403 2.403 0 0 1 1.806 1.464h5.55a2.4 2.4 0 1 1 0 1.8h-5.55a2.4 2.4 0 1 1-3.567-2.89L4.27 3.9H2.5a.9.9 0 0 1-.9-.9Zm6.9 15.9a.6.6 0 1 0 0 1.2.6.6 0 0 0 0-1.2Zm10 0a.6.6 0 1 0 0 1.2.6.6 0 0 0 0-1.2Z" clip-rule="evenodd"/></svg>',keywords:["cart"],category:"other"},O=t=>r.jsx(rr.b,{...t,svg:nr});O.displayName="IconCart";const i=l.c.bind(or),e="purpur-product-card",n=Y.forwardRef(({["data-testid"]:t="purpur-product-card",badgeText:a,badgeVariant:s,bodyText:o,children:d,className:x,colorVariants:H,colorNames:P,colorListAriaLabel:q,ctaText:h,disabled:j,fullHeight:b=!0,footerContent:A,headingTag:K="h2",href:u,onClick:_,linkElement:k,listItems:S,loading:E=!1,overline:L,priceText:D,priceDescription:G,pricePrefix:V,image:y,imageSize:F="sm",title:Z,regularPriceText:M,stockStatus:U,stockStatusText:W,...J},Q)=>{const X=i(x,e),C={title:Z,titleTag:K,variant:"title-200","data-testid":`${t}-product-name`};return r.jsxs(c.Card,{className:X,"data-testid":t,fullHeight:b,ref:Q,...J,children:[r.jsx(c.Card.Badge,{text:a,variant:s,"data-testid":`${t}-badge`}),r.jsxs(c.Card.ContentContainer,{gapSize:"lg",className:i(`${e}__content-container`),fullHeight:b,children:[r.jsxs(c.Card.Content,{children:[r.jsx(f,{"data-testid":`${t}-product-header`,children:{productImage:y?r.jsx("div",{className:i(`${e}__product-image`,`${e}__product-image--${F}`),"data-testid":`${t}-product-image`,children:y}):null,productInformation:r.jsxs(r.Fragment,{children:[r.jsxs("div",{children:[r.jsx(c.Card.Overline,{"data-testid":`${t}-overline`,overline:L}),u&&r.jsx(c.Card.Heading,{href:u,linkElement:k,disabled:j,onClick:_,...C}),_&&!u&&r.jsx(c.Card.Heading,{disabled:j,onClick:_,...C}),!u&&!_&&r.jsx(c.Card.Heading,{...C})]}),r.jsx(R,{colors:H,colorDotAriaLabels:P,"aria-label":q,"data-testid":`${t}-colors`})]})}}),(o||!!S?.length)&&r.jsxs("div",{className:i(`${e}__body`),children:[o&&r.jsx(p.Paragraph,{"data-testid":`${t}-body-text`,children:o}),r.jsx(c.Card.FeatureList,{"data-testid":`${t}-feature-list`,listItems:S})]})]}),d&&r.jsx(c.Card.Content,{className:`${e}__children`,"data-testid":`${t}-default-content`,children:d})]}),r.jsxs("div",{children:[r.jsxs(c.Card.ContentContainer,{isFooter:!0,children:[r.jsx(c.Card.Content,{children:r.jsxs("div",{className:i(`${e}__footer`,{[`${e}-with-cta-text`]:h}),children:[r.jsx(B,{"data-testid":`${t}-price`,pricePrefix:V,regularPriceText:M,priceDescription:G,priceText:D}),(u||_)&&r.jsx(c.Card.Cta,{className:i(`${e}__cta-button`),"data-testid":`${t}-cta-button`,disabled:j,iconPosition:h?u?"right":"left":void 0,loading:E,text:h,linkStyling:!!(u&&!h),children:u?r.jsx(T.i,{size:"sm"}):r.jsx(O,{size:"sm"})})]})}),A&&r.jsx(c.Card.Content,{"data-testid":`${t}-footer-content`,children:A})]}),r.jsx(z,{"data-testid":`${t}-stock-status`,stockStatus:U,stockStatusText:W})]})]})});n.Colors=R;n.Price=B;n.ProductHeader=f;n.StockStatus=z;n.displayName="ProductCard";exports.ProductCard=n;
2
+ //# sourceMappingURL=product-card-CNBegEBW.js.map