@purpur/library 9.2.3 → 9.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/CHANGELOG.json +39 -0
  2. package/CHANGELOG.md +20 -1
  3. package/dist/LICENSE.txt +1 -1
  4. package/dist/{RichText-Bi51HE6X.mjs → RichText-jZ-sHV-u.mjs} +2 -2
  5. package/dist/{RichText-Bi51HE6X.mjs.map → RichText-jZ-sHV-u.mjs.map} +1 -1
  6. package/dist/{RichText-DNroJJXv.js → RichText-yobCUjTD.js} +2 -2
  7. package/dist/{RichText-DNroJJXv.js.map → RichText-yobCUjTD.js.map} +1 -1
  8. package/dist/{ThemeProvider-bkyFCeo6.mjs → ThemeProvider-CkX-BNWN.mjs} +2 -2
  9. package/dist/ThemeProvider-CkX-BNWN.mjs.map +1 -0
  10. package/dist/{ThemeProvider-5r7lDX-h.js → ThemeProvider-Dy771oix.js} +2 -2
  11. package/dist/ThemeProvider-Dy771oix.js.map +1 -0
  12. package/dist/{accordion-OtFSShSB.mjs → accordion-CIU4U8-4.mjs} +3 -3
  13. package/dist/accordion-CIU4U8-4.mjs.map +1 -0
  14. package/dist/{accordion-OsA0HvdA.js → accordion-DyhOG54L.js} +2 -2
  15. package/dist/accordion-DyhOG54L.js.map +1 -0
  16. package/dist/accordion.cjs.js +1 -1
  17. package/dist/accordion.es.js +3 -3
  18. package/dist/{autocomplete-D9uCJzjY.js → autocomplete-3kV1btuI.js} +2 -2
  19. package/dist/{autocomplete-D9uCJzjY.js.map → autocomplete-3kV1btuI.js.map} +1 -1
  20. package/dist/{autocomplete-BipmyKf0.mjs → autocomplete-BEGRn-Wh.mjs} +2 -2
  21. package/dist/{autocomplete-BipmyKf0.mjs.map → autocomplete-BEGRn-Wh.mjs.map} +1 -1
  22. package/dist/autocomplete.cjs.js +1 -1
  23. package/dist/autocomplete.es.js +1 -1
  24. package/dist/{card-DR2hvxjZ.mjs → card-C2mdp-ur.mjs} +2 -2
  25. package/dist/{card-DR2hvxjZ.mjs.map → card-C2mdp-ur.mjs.map} +1 -1
  26. package/dist/{card-CRHXm5NR.js → card-DFdUs5RG.js} +2 -2
  27. package/dist/{card-CRHXm5NR.js.map → card-DFdUs5RG.js.map} +1 -1
  28. package/dist/card.cjs.js +1 -1
  29. package/dist/card.es.js +1 -1
  30. package/dist/{carousel-BkxojLwn.mjs → carousel-DLkTL9sj.mjs} +29 -29
  31. package/dist/{carousel-BkxojLwn.mjs.map → carousel-DLkTL9sj.mjs.map} +1 -1
  32. package/dist/{carousel-BCw-5u92.js → carousel-DXrtxRz5.js} +2 -2
  33. package/dist/{carousel-BCw-5u92.js.map → carousel-DXrtxRz5.js.map} +1 -1
  34. package/dist/carousel.cjs.js +1 -1
  35. package/dist/carousel.es.js +1 -1
  36. package/dist/checkbox-BHTx89JQ.mjs +236 -0
  37. package/dist/checkbox-BHTx89JQ.mjs.map +1 -0
  38. package/dist/checkbox-CDNcNv6d.js +2 -0
  39. package/dist/checkbox-CDNcNv6d.js.map +1 -0
  40. package/dist/checkbox.cjs.js +1 -1
  41. package/dist/checkbox.es.js +1 -1
  42. package/dist/{comparison-table-D1zJpdLL.mjs → comparison-table-8bOJmz-L.mjs} +116 -116
  43. package/dist/comparison-table-8bOJmz-L.mjs.map +1 -0
  44. package/dist/comparison-table-mKL2IHXW.js +2 -0
  45. package/dist/comparison-table-mKL2IHXW.js.map +1 -0
  46. package/dist/comparison-table.cjs.js +1 -1
  47. package/dist/comparison-table.es.js +1 -1
  48. package/dist/components/accordion/src/accordion.d.ts +1 -1
  49. package/dist/components/accordion/src/accordion.d.ts.map +1 -1
  50. package/dist/components/checkbox/src/checkbox.d.ts +4 -0
  51. package/dist/components/checkbox/src/checkbox.d.ts.map +1 -1
  52. package/dist/components/comparison-table/src/comparison-table.d.ts +1 -1
  53. package/dist/components/comparison-table/src/comparison-table.d.ts.map +1 -1
  54. package/dist/components/dismissable-chip-group/src/dismissable-chip-group-item.d.ts.map +1 -1
  55. package/dist/components/dismissable-chip-group/src/dismissable-chip-group.d.ts +4 -2
  56. package/dist/components/dismissable-chip-group/src/dismissable-chip-group.d.ts.map +1 -1
  57. package/dist/components/drawer/src/drawer-content.d.ts.map +1 -1
  58. package/dist/components/drawer/src/drawer.context.d.ts +1 -0
  59. package/dist/components/drawer/src/drawer.context.d.ts.map +1 -1
  60. package/dist/components/drawer/src/drawer.d.ts +6 -0
  61. package/dist/components/drawer/src/drawer.d.ts.map +1 -1
  62. package/dist/components/dropdown/src/dropdown-combobox.d.ts.map +1 -1
  63. package/dist/components/dropdown/src/dropdown-select.d.ts.map +1 -1
  64. package/dist/components/dropdown/src/dropdown-shared.d.ts +3 -2
  65. package/dist/components/dropdown/src/dropdown-shared.d.ts.map +1 -1
  66. package/dist/components/dropdown/src/useDropdown.d.ts +2 -1
  67. package/dist/components/dropdown/src/useDropdown.d.ts.map +1 -1
  68. package/dist/components/listbox/src/listbox-item.d.ts +2 -2
  69. package/dist/components/listbox/src/listbox-item.d.ts.map +1 -1
  70. package/dist/components/listbox/src/listbox.d.ts +4 -1
  71. package/dist/components/listbox/src/listbox.d.ts.map +1 -1
  72. package/dist/components/toggle/src/toggle.d.ts +1 -0
  73. package/dist/components/toggle/src/toggle.d.ts.map +1 -1
  74. package/dist/components-metadata.js +4 -2
  75. package/dist/{content-block-Dm3L4g8w.mjs → content-block-CakKeJtN.mjs} +2 -2
  76. package/dist/{content-block-Dm3L4g8w.mjs.map → content-block-CakKeJtN.mjs.map} +1 -1
  77. package/dist/{content-block-CDRUH0pg.js → content-block-CrekbIfe.js} +2 -2
  78. package/dist/{content-block-CDRUH0pg.js.map → content-block-CrekbIfe.js.map} +1 -1
  79. package/dist/content-block.cjs.js +1 -1
  80. package/dist/content-block.es.js +1 -1
  81. package/dist/{countdown-DZ4IwkNy.mjs → countdown-BsLsEZBv.mjs} +2 -2
  82. package/dist/{countdown-DZ4IwkNy.mjs.map → countdown-BsLsEZBv.mjs.map} +1 -1
  83. package/dist/{countdown-CqYsZigV.js → countdown-hYrFLmRg.js} +2 -2
  84. package/dist/{countdown-CqYsZigV.js.map → countdown-hYrFLmRg.js.map} +1 -1
  85. package/dist/countdown.cjs.js +1 -1
  86. package/dist/countdown.es.js +1 -1
  87. package/dist/{date-picker-DwFDRL5Z.mjs → date-picker-CbUNbOhn.mjs} +2 -2
  88. package/dist/{date-picker-DwFDRL5Z.mjs.map → date-picker-CbUNbOhn.mjs.map} +1 -1
  89. package/dist/{date-picker-DVrcu2QU.js → date-picker-DYXNB5aU.js} +2 -2
  90. package/dist/{date-picker-DVrcu2QU.js.map → date-picker-DYXNB5aU.js.map} +1 -1
  91. package/dist/date-picker.cjs.js +1 -1
  92. package/dist/date-picker.es.js +1 -1
  93. package/dist/dismissable-chip-group-2updhyuR.js +2 -0
  94. package/dist/dismissable-chip-group-2updhyuR.js.map +1 -0
  95. package/dist/dismissable-chip-group-Cfs2s2BH.mjs +94 -0
  96. package/dist/dismissable-chip-group-Cfs2s2BH.mjs.map +1 -0
  97. package/dist/dismissable-chip-group.cjs.js +1 -1
  98. package/dist/dismissable-chip-group.es.js +6 -5
  99. package/dist/drawer-8Acg4wkV.mjs +574 -0
  100. package/dist/drawer-8Acg4wkV.mjs.map +1 -0
  101. package/dist/drawer-BLHgcEqb.js +2 -0
  102. package/dist/drawer-BLHgcEqb.js.map +1 -0
  103. package/dist/drawer.cjs.js +1 -1
  104. package/dist/drawer.es.js +1 -1
  105. package/dist/dropdown-CMO_VD5e.mjs +916 -0
  106. package/dist/dropdown-CMO_VD5e.mjs.map +1 -0
  107. package/dist/dropdown-DJKNQnuo.js +2 -0
  108. package/dist/dropdown-DJKNQnuo.js.map +1 -0
  109. package/dist/dropdown.cjs.js +1 -1
  110. package/dist/dropdown.es.js +1 -1
  111. package/dist/{footer-BXs8uzTA.mjs → footer-BLPlXaZK.mjs} +4 -4
  112. package/dist/{footer-BXs8uzTA.mjs.map → footer-BLPlXaZK.mjs.map} +1 -1
  113. package/dist/{footer-DF9adlni.js → footer-D9AcPwlH.js} +2 -2
  114. package/dist/{footer-DF9adlni.js.map → footer-D9AcPwlH.js.map} +1 -1
  115. package/dist/footer.cjs.js +1 -1
  116. package/dist/footer.es.js +1 -1
  117. package/dist/{hero-banner-BfxclVFT.js → hero-banner-D1A-_qou.js} +2 -2
  118. package/dist/{hero-banner-BfxclVFT.js.map → hero-banner-D1A-_qou.js.map} +1 -1
  119. package/dist/{hero-banner-CxPvhXD2.mjs → hero-banner-DkC_BqM7.mjs} +3 -3
  120. package/dist/{hero-banner-CxPvhXD2.mjs.map → hero-banner-DkC_BqM7.mjs.map} +1 -1
  121. package/dist/hero-banner.cjs.js +1 -1
  122. package/dist/hero-banner.es.js +1 -1
  123. package/dist/{index-CKCTy3ZL.mjs → index-3NV-ckDX.mjs} +4 -4
  124. package/dist/{index-CKCTy3ZL.mjs.map → index-3NV-ckDX.mjs.map} +1 -1
  125. package/dist/libraries/theme/src/theme-props.d.ts +1 -0
  126. package/dist/libraries/theme/src/theme-props.d.ts.map +1 -1
  127. package/dist/libraries/tokens/dist/color/variables.d.ts +1 -0
  128. package/dist/libraries/tokens/dist/color/variables.dark.d.ts +1 -0
  129. package/dist/library.cjs.js +1 -1
  130. package/dist/library.es.js +593 -590
  131. package/dist/listbox-ATP4hOWF.js +2 -0
  132. package/dist/listbox-ATP4hOWF.js.map +1 -0
  133. package/dist/listbox-i6BQQ-NZ.mjs +73 -0
  134. package/dist/listbox-i6BQQ-NZ.mjs.map +1 -0
  135. package/dist/listbox.cjs.js +1 -1
  136. package/dist/listbox.es.js +3 -2
  137. package/dist/{modal-COF_UhvY.js → modal-Baisuc6m.js} +2 -2
  138. package/dist/{modal-COF_UhvY.js.map → modal-Baisuc6m.js.map} +1 -1
  139. package/dist/{modal-BMg43Fvd.mjs → modal-fp37VbrH.mjs} +3 -3
  140. package/dist/{modal-BMg43Fvd.mjs.map → modal-fp37VbrH.mjs.map} +1 -1
  141. package/dist/modal.cjs.js +1 -1
  142. package/dist/modal.es.js +1 -1
  143. package/dist/{notification-BqjaT4E7.js → notification-B5bNNq86.js} +2 -2
  144. package/dist/{notification-BqjaT4E7.js.map → notification-B5bNNq86.js.map} +1 -1
  145. package/dist/{notification-DdRS5BF2.mjs → notification-BbQCmsnY.mjs} +2 -2
  146. package/dist/{notification-DdRS5BF2.mjs.map → notification-BbQCmsnY.mjs.map} +1 -1
  147. package/dist/notification.cjs.js +1 -1
  148. package/dist/notification.es.js +1 -1
  149. package/dist/{pagination-CVYUacXN.mjs → pagination-Cc_4zCQA.mjs} +2 -2
  150. package/dist/{pagination-CVYUacXN.mjs.map → pagination-Cc_4zCQA.mjs.map} +1 -1
  151. package/dist/{pagination-Bwlkvqye.js → pagination-rFRdkHII.js} +2 -2
  152. package/dist/{pagination-Bwlkvqye.js.map → pagination-rFRdkHII.js.map} +1 -1
  153. package/dist/pagination.cjs.js +1 -1
  154. package/dist/pagination.es.js +1 -1
  155. package/dist/paragraph-By4jMjnH.js +2 -0
  156. package/dist/{paragraph-BsI53OR0.js.map → paragraph-By4jMjnH.js.map} +1 -1
  157. package/dist/{paragraph-Ci50OF1u.mjs → paragraph-DSxXmX_0.mjs} +23 -23
  158. package/dist/{paragraph-Ci50OF1u.mjs.map → paragraph-DSxXmX_0.mjs.map} +1 -1
  159. package/dist/paragraph.cjs.js +1 -1
  160. package/dist/paragraph.es.js +1 -1
  161. package/dist/{popover-XCUa2GfC.js → popover-B0XJZ5mj.js} +2 -2
  162. package/dist/{popover-XCUa2GfC.js.map → popover-B0XJZ5mj.js.map} +1 -1
  163. package/dist/{popover-Dwqs1wGH.mjs → popover-_xJATlhN.mjs} +2 -2
  164. package/dist/{popover-Dwqs1wGH.mjs.map → popover-_xJATlhN.mjs.map} +1 -1
  165. package/dist/popover.cjs.js +1 -1
  166. package/dist/popover.es.js +1 -1
  167. package/dist/{product-card-BfB82XpS.mjs → product-card-C3_N0t-R.mjs} +3 -3
  168. package/dist/{product-card-BfB82XpS.mjs.map → product-card-C3_N0t-R.mjs.map} +1 -1
  169. package/dist/{product-card-bVQ7JhHj.js → product-card-CoY1KggV.js} +2 -2
  170. package/dist/{product-card-bVQ7JhHj.js.map → product-card-CoY1KggV.js.map} +1 -1
  171. package/dist/product-card.cjs.js +1 -1
  172. package/dist/product-card.es.js +1 -1
  173. package/dist/{promotion-card-DqBBt2sz.js → promotion-card-Bag64gqP.js} +2 -2
  174. package/dist/{promotion-card-DqBBt2sz.js.map → promotion-card-Bag64gqP.js.map} +1 -1
  175. package/dist/{promotion-card-BhNw94sC.mjs → promotion-card-BiHnQvhn.mjs} +4 -4
  176. package/dist/{promotion-card-BhNw94sC.mjs.map → promotion-card-BiHnQvhn.mjs.map} +1 -1
  177. package/dist/promotion-card.cjs.js +1 -1
  178. package/dist/promotion-card.es.js +1 -1
  179. package/dist/purpur.css +1 -1
  180. package/dist/quantity-selector-CDSfcTb1.js +2 -0
  181. package/dist/{quantity-selector-8AkKNDik.js.map → quantity-selector-CDSfcTb1.js.map} +1 -1
  182. package/dist/{quantity-selector-C23kU1hF.mjs → quantity-selector-CvBvnMeB.mjs} +35 -35
  183. package/dist/{quantity-selector-C23kU1hF.mjs.map → quantity-selector-CvBvnMeB.mjs.map} +1 -1
  184. package/dist/quantity-selector.cjs.js +1 -1
  185. package/dist/quantity-selector.es.js +1 -1
  186. package/dist/{radio-card-group-BlRZBa-9.mjs → radio-card-group-CneOprGY.mjs} +2 -2
  187. package/dist/{radio-card-group-BlRZBa-9.mjs.map → radio-card-group-CneOprGY.mjs.map} +1 -1
  188. package/dist/{radio-card-group-sYcfDPJq.js → radio-card-group-Ctuvg61o.js} +2 -2
  189. package/dist/{radio-card-group-sYcfDPJq.js.map → radio-card-group-Ctuvg61o.js.map} +1 -1
  190. package/dist/radio-card-group.cjs.js +1 -1
  191. package/dist/radio-card-group.es.js +1 -1
  192. package/dist/rich-text.cjs.js +1 -1
  193. package/dist/rich-text.es.js +1 -1
  194. package/dist/{search-field-CZ9mIyZ-.mjs → search-field-CpkHGIYi.mjs} +3 -3
  195. package/dist/{search-field-CZ9mIyZ-.mjs.map → search-field-CpkHGIYi.mjs.map} +1 -1
  196. package/dist/{search-field-DD9UkOca.js → search-field-Z0PqDARl.js} +2 -2
  197. package/dist/{search-field-DD9UkOca.js.map → search-field-Z0PqDARl.js.map} +1 -1
  198. package/dist/search-field.cjs.js +1 -1
  199. package/dist/search-field.es.js +1 -1
  200. package/dist/{stepper-uBfDdIju.mjs → stepper-CNnx_NiR.mjs} +2 -2
  201. package/dist/{stepper-uBfDdIju.mjs.map → stepper-CNnx_NiR.mjs.map} +1 -1
  202. package/dist/{stepper-w-raIwqJ.js → stepper-Df4X7DDR.js} +2 -2
  203. package/dist/{stepper-w-raIwqJ.js.map → stepper-Df4X7DDR.js.map} +1 -1
  204. package/dist/stepper.cjs.js +1 -1
  205. package/dist/stepper.es.js +1 -1
  206. package/dist/{table-Dx_dhGT6.mjs → table-D_sdSJyr.mjs} +6 -6
  207. package/dist/{table-Dx_dhGT6.mjs.map → table-D_sdSJyr.mjs.map} +1 -1
  208. package/dist/{table-DsgqX7Vv.js → table-gnGUejtb.js} +2 -2
  209. package/dist/{table-DsgqX7Vv.js.map → table-gnGUejtb.js.map} +1 -1
  210. package/dist/table.cjs.js +1 -1
  211. package/dist/table.es.js +1 -1
  212. package/dist/{text-area-DDZ_GQPW.mjs → text-area-kJvg6cFp.mjs} +3 -3
  213. package/dist/{text-area-DDZ_GQPW.mjs.map → text-area-kJvg6cFp.mjs.map} +1 -1
  214. package/dist/{text-area-C6W0fDiQ.js → text-area-peNKG7g4.js} +2 -2
  215. package/dist/{text-area-C6W0fDiQ.js.map → text-area-peNKG7g4.js.map} +1 -1
  216. package/dist/text-area.cjs.js +1 -1
  217. package/dist/text-area.es.js +1 -1
  218. package/dist/theme.cjs.js +1 -1
  219. package/dist/theme.es.js +2 -2
  220. package/dist/toggle-B8ZLUVar.js +2 -0
  221. package/dist/{toggle-C8IwTbX8.js.map → toggle-B8ZLUVar.js.map} +1 -1
  222. package/dist/toggle-CY3J8BRX.mjs +302 -0
  223. package/dist/{toggle-D23x1wWk.mjs.map → toggle-CY3J8BRX.mjs.map} +1 -1
  224. package/dist/toggle.cjs.js +1 -1
  225. package/dist/toggle.es.js +1 -1
  226. package/dist/tokens/color/variables.css +1 -0
  227. package/dist/tokens/color/variables.d.ts +1 -0
  228. package/dist/tokens/color/variables.dark.css +1 -0
  229. package/dist/tokens/color/variables.dark.d.ts +1 -0
  230. package/dist/tokens/color/variables.dark.js +1 -0
  231. package/dist/tokens/color/variables.dark.json +2 -1
  232. package/dist/tokens/color/variables.dark.scss +1 -0
  233. package/dist/tokens/color/variables.js +1 -0
  234. package/dist/tokens/color/variables.json +2 -1
  235. package/dist/tokens/color/variables.scss +1 -0
  236. package/dist/tokens.cjs.js +1 -1
  237. package/dist/tokens.es.js +76 -75
  238. package/dist/{tooltip-0pLBlDG3.js → tooltip-C8Zxnqdb.js} +2 -2
  239. package/dist/{tooltip-0pLBlDG3.js.map → tooltip-C8Zxnqdb.js.map} +1 -1
  240. package/dist/{tooltip-Kom0VfOC.mjs → tooltip-VlURN8H3.mjs} +2 -2
  241. package/dist/{tooltip-Kom0VfOC.mjs.map → tooltip-VlURN8H3.mjs.map} +1 -1
  242. package/dist/tooltip.cjs.js +1 -1
  243. package/dist/tooltip.es.js +1 -1
  244. package/dist/use-autocomplete.es-BwAzMcau.js +2 -0
  245. package/dist/use-autocomplete.es-BwAzMcau.js.map +1 -0
  246. package/dist/{use-autocomplete.es-CVv3z8t6.mjs → use-autocomplete.es-CKb0RHKG.mjs} +37 -35
  247. package/dist/use-autocomplete.es-CKb0RHKG.mjs.map +1 -0
  248. package/dist/useColorScheme-DNyjsWX9.js +2 -0
  249. package/dist/{useColorScheme-0GMDl2GF.js.map → useColorScheme-DNyjsWX9.js.map} +1 -1
  250. package/dist/{useColorScheme-Di_Q0JR4.mjs → useColorScheme-tAkY9LHt.mjs} +2 -2
  251. package/dist/{useColorScheme-Di_Q0JR4.mjs.map → useColorScheme-tAkY9LHt.mjs.map} +1 -1
  252. package/dist/{variables-CKp4o9Tn.mjs → variables-B5hbV0Uy.mjs} +128 -127
  253. package/dist/variables-B5hbV0Uy.mjs.map +1 -0
  254. package/dist/variables-DoI78zZc.js +2 -0
  255. package/dist/variables-DoI78zZc.js.map +1 -0
  256. package/package.json +21 -21
  257. package/tokens/color/variables.css +1 -0
  258. package/tokens/color/variables.d.ts +1 -0
  259. package/tokens/color/variables.dark.css +1 -0
  260. package/tokens/color/variables.dark.d.ts +1 -0
  261. package/tokens/color/variables.dark.js +1 -0
  262. package/tokens/color/variables.dark.json +2 -1
  263. package/tokens/color/variables.dark.scss +1 -0
  264. package/tokens/color/variables.js +1 -0
  265. package/tokens/color/variables.json +2 -1
  266. package/tokens/color/variables.scss +1 -0
  267. package/dist/ThemeProvider-5r7lDX-h.js.map +0 -1
  268. package/dist/ThemeProvider-bkyFCeo6.mjs.map +0 -1
  269. package/dist/accordion-OsA0HvdA.js.map +0 -1
  270. package/dist/accordion-OtFSShSB.mjs.map +0 -1
  271. package/dist/checkbox-D6qWgpWR.mjs +0 -231
  272. package/dist/checkbox-D6qWgpWR.mjs.map +0 -1
  273. package/dist/checkbox-Dk3bZkZ3.js +0 -2
  274. package/dist/checkbox-Dk3bZkZ3.js.map +0 -1
  275. package/dist/comparison-table-B8w65g43.js +0 -2
  276. package/dist/comparison-table-B8w65g43.js.map +0 -1
  277. package/dist/comparison-table-D1zJpdLL.mjs.map +0 -1
  278. package/dist/dismissable-chip-group-Cd23yjBa.js +0 -2
  279. package/dist/dismissable-chip-group-Cd23yjBa.js.map +0 -1
  280. package/dist/dismissable-chip-group-D-gD93ON.mjs +0 -89
  281. package/dist/dismissable-chip-group-D-gD93ON.mjs.map +0 -1
  282. package/dist/drawer-Db2Mujc6.mjs +0 -565
  283. package/dist/drawer-Db2Mujc6.mjs.map +0 -1
  284. package/dist/drawer-DlwagnO4.js +0 -2
  285. package/dist/drawer-DlwagnO4.js.map +0 -1
  286. package/dist/dropdown-BsqVnd7z.js +0 -2
  287. package/dist/dropdown-BsqVnd7z.js.map +0 -1
  288. package/dist/dropdown-TO3Mh0bk.mjs +0 -910
  289. package/dist/dropdown-TO3Mh0bk.mjs.map +0 -1
  290. package/dist/listbox-COBHLRtB.js +0 -2
  291. package/dist/listbox-COBHLRtB.js.map +0 -1
  292. package/dist/listbox-DG4KmQP_.mjs +0 -66
  293. package/dist/listbox-DG4KmQP_.mjs.map +0 -1
  294. package/dist/paragraph-BsI53OR0.js +0 -2
  295. package/dist/quantity-selector-8AkKNDik.js +0 -2
  296. package/dist/toggle-C8IwTbX8.js +0 -2
  297. package/dist/toggle-D23x1wWk.mjs +0 -287
  298. package/dist/use-autocomplete.es-BHDgQLae.js +0 -2
  299. package/dist/use-autocomplete.es-BHDgQLae.js.map +0 -1
  300. package/dist/use-autocomplete.es-CVv3z8t6.mjs.map +0 -1
  301. package/dist/useColorScheme-0GMDl2GF.js +0 -2
  302. package/dist/variables-CKp4o9Tn.mjs.map +0 -1
  303. package/dist/variables-DH61hVNE.js +0 -2
  304. package/dist/variables-DH61hVNE.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete-BipmyKf0.mjs","sources":["../../../components/autocomplete/src/utils.ts","../../../components/autocomplete/src/useAutocomplete.ts","../../../components/autocomplete/src/autocomplete.tsx"],"sourcesContent":["import { type RefObject, useCallback, useEffect, useRef } from \"react\";\n\n// Used to \"merge\" \"intersection types\". Used to get comments on the props to the docs.\nexport type Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\n\nexport const useRefObject = <T>(value: T): RefObject<T> => {\n return useRef<T>(value) as RefObject<T>;\n};\n\nexport const useOnClickOutside = (element: HTMLElement | null, callback: () => void) => {\n const handleClickOutside = useCallback(\n (event: MouseEvent) => {\n if (element && !element.contains(event.target as Node)) {\n callback();\n }\n },\n [callback, element]\n );\n\n useEffect(() => {\n document.addEventListener(\"mousedown\", handleClickOutside);\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [handleClickOutside]);\n};\n","import type { CSSProperties, ReactNode } from \"react\";\nimport { useRef, useState } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport type { ListboxItemProps, ListboxProps } from \"@purpur/listbox\";\n\nimport { useOnClickOutside, useRefObject } from \"./utils\";\n\nexport type AutocompleteOption = {\n label: string;\n id: string;\n value?: string;\n disabled?: boolean;\n};\n\nexport type InputProps = Omit<BaseProps<\"input\">, \"onFocus\" | \"onMouseDown\"> & {\n onFocus: (event: React.FocusEvent<HTMLInputElement> | undefined) => void;\n onMouseDown: (event: React.MouseEvent<HTMLInputElement> | undefined) => void;\n};\n\ntype ComboboxProps = {\n /*\n * Set to get combobox features. Use in combination with `noOptionsText`, `comboboxButtonAriaLabel` and Purpur TextField.\n */\n combobox: true;\n /**\n * An accessible label for the button that toggles the list of options for a combobox.\n * */\n comboboxButtonAriaLabel: string;\n /*\n * Shown when there are no options to show. Will be displayed inside a listbox item.\n */\n noOptionsText: ReactNode;\n};\n\ntype NoComboboxProps = {\n combobox?: never;\n comboboxButtonAriaLabel?: never;\n /*\n * Shown when there are no options to show. Will be displayed inside a listbox item.\n */\n noOptionsText?: ReactNode;\n};\n\nexport type UseAutocompleteResult<T extends AutocompleteOption> = {\n /*\n * Set to highlight the first option in the listbox when the input is focused.\n */\n highlightFirstOption?: boolean;\n /*\n * The default input value. Only to use when the input is uncontrolled.\n */\n defaultInputValue?: string;\n /*\n * The input value. Use this to control the input value.\n */\n inputValue?: string;\n /*\n * Invoked for each option. Use to control which options are shown.\n */\n filterOption?: (inputValue: string | undefined, option: T) => boolean;\n /*\n * Id will be used to prefix id:s of all elements.\n */\n id: string;\n /*\n * The label of the listbox (dropdown) displaying the options.\n */\n listboxLabel: string;\n /*\n * The height of the listbox. Number will be interpreted as px value. defaults to `calc(2 * var(--purpur-spacing-1200))`.\n */\n listboxMaxHeight?: string | number;\n /*\n * NOTE! Always use this instead of onBlur directly on the input element. Event handler invoked on input blur.\n */\n onInputBlur?: React.FocusEventHandler<HTMLInputElement>;\n /*\n * NOTE! Always use this instead of onChange directly on the input element. Event handler invoked when the input value changes.\n */\n onInputChange?: (value: string) => void;\n /*\n * NOTE! Always use this instead of onFocus directly on the input element. Event handler invoked on input focus.\n */\n onInputFocus?: (event: React.FocusEvent<HTMLInputElement> | undefined) => undefined;\n /*\n * NOTE! Always use this instead of onKeyDown directly on the input element. Event handler invoked on input key down.\n */\n onInputKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;\n /*\n * NOTE! Always use this instead of onMouseDown directly on the input element. Event handler invoked on input mouse down.\n */\n onInputMouseDown?: (event: React.MouseEvent<HTMLInputElement> | undefined) => undefined;\n /*\n * Set to open the listbox when input gets focus.\n */\n openOnFocus?: boolean;\n /*\n * Event handler invoked when an option is selected.\n */\n onSelect?: (option: T | undefined) => void;\n /*\n * The list of options. Could include custom props.\n */\n options: T[];\n /*\n * The selected option.\n */\n selectedOption?: T;\n [\"data-testid\"]?: string;\n} & (ComboboxProps | NoComboboxProps);\n\nexport const useAutocomplete = <T extends AutocompleteOption>({\n combobox,\n comboboxButtonAriaLabel,\n highlightFirstOption,\n defaultInputValue,\n inputValue,\n filterOption,\n id,\n listboxLabel,\n listboxMaxHeight,\n onInputBlur,\n onInputChange,\n onInputFocus,\n onInputKeyDown,\n onInputMouseDown,\n openOnFocus,\n noOptionsText,\n onSelect,\n options,\n selectedOption,\n [\"data-testid\"]: dataTestid,\n}: UseAutocompleteResult<T>) => {\n const [internalInputValue, setInternalInputValue] = useState(\n ((typeof inputValue === \"string\" ? inputValue : defaultInputValue) || selectedOption?.label) ??\n \"\"\n );\n const definiteInputValue = typeof inputValue === \"string\" ? inputValue : internalInputValue;\n const [highlightedOption, setHighlightedOption] = useState<\n (T & { isSetByClickEvent?: false }) | undefined\n >(highlightFirstOption ? options[0] : undefined);\n const inputRef = useRef<HTMLInputElement>(null);\n const internalRef = useRefObject<HTMLDivElement | null>(null);\n const listboxRef = useRef<HTMLUListElement>(null);\n const optionRefs = useRef<Record<string, HTMLLIElement>>({});\n const [listboxIsOpen, setListboxIsOpen] = useState(false);\n\n function getTestId(name: string) {\n return dataTestid ? `${dataTestid}-${name}` : undefined;\n }\n\n const closeListbox = () => {\n setListboxIsOpen(false);\n setHighlightedOption(undefined);\n };\n\n useOnClickOutside(internalRef.current, closeListbox);\n\n const openListbox = ({ eventType }: { eventType: \"CLICK\" | \"KEYBOARD\" }) => {\n setListboxIsOpen(true);\n if (selectedOption) {\n requestAnimationFrame(() => {\n const isSetByClickEvent = eventType === \"CLICK\";\n setHighlightedOption({ ...selectedOption, isSetByClickEvent });\n scrollOptionIntoView(optionRefs.current[selectedOption.id]);\n });\n }\n };\n\n const filterOptions = (searchTerm: string | undefined) => {\n if (filterOption) {\n return options.filter((option) => filterOption(searchTerm, option));\n }\n\n if (!searchTerm) {\n return options;\n }\n\n const searchTermChunks = searchTerm.toUpperCase().split(\" \") || [];\n return options.filter((option) =>\n searchTermChunks.every((chunk) =>\n (option.value || option.label).toUpperCase().includes(chunk)\n )\n );\n };\n\n const getOptionsToShow = (searchTerm: string | undefined): (T | undefined)[] => {\n return selectedOption && selectedOption?.label === searchTerm\n ? options\n : filterOptions(searchTerm);\n };\n\n const optionsToShow = getOptionsToShow(definiteInputValue);\n\n const populateInputField = (value: string) => {\n onInputChange?.(value);\n setInternalInputValue(value);\n };\n\n const scrollOptionIntoView = (option: HTMLLIElement | undefined) => {\n if (option) {\n const optionRect = option.getBoundingClientRect();\n const listboxRect = listboxRef.current?.getBoundingClientRect() || { top: 0, bottom: 0 };\n const isOptionOutsideView =\n optionRect.top < listboxRect.top || optionRect.bottom > listboxRect.bottom;\n if (isOptionOutsideView) {\n option.scrollIntoView({ block: \"nearest\" });\n }\n }\n };\n\n const selectOption = (option: T | undefined) => {\n if (option) {\n inputRef.current?.focus();\n populateInputField(option.label);\n onSelect?.(option);\n }\n closeListbox();\n };\n\n const findNextOption = (key: \"ArrowUp\" | \"ArrowDown\"): T | undefined => {\n const index =\n highlightFirstOption && !highlightedOption\n ? 0\n : optionsToShow.findIndex((option) => option && highlightedOption?.id === option.id);\n\n const optionsLength = optionsToShow.length;\n\n return key === \"ArrowDown\"\n ? optionsToShow[(index ?? -1) + 1] || optionsToShow[0]\n : optionsToShow[(index ?? optionsLength) - 1] || optionsToShow[optionsLength - 1];\n };\n\n const showListbox = listboxIsOpen && (!!optionsToShow.length || !!noOptionsText);\n\n const highlightNextOption = (key: \"ArrowUp\" | \"ArrowDown\") => {\n !showListbox && openListbox({ eventType: \"KEYBOARD\" });\n const nextOption = findNextOption(key);\n\n setHighlightedOption(nextOption);\n nextOption && scrollOptionIntoView(optionRefs.current[nextOption.id]);\n };\n\n const handleOnKeyDown: React.KeyboardEventHandler<HTMLInputElement> = (event) => {\n onInputKeyDown?.(event);\n switch (event.key) {\n case \"ArrowUp\":\n case \"ArrowDown\":\n event.preventDefault(); // Preventing default to not move cursor in input\n highlightNextOption(event.key);\n break;\n case \"Enter\": {\n const optionToSelect = highlightedOption || (highlightFirstOption ? options[0] : undefined);\n showListbox && selectOption(optionToSelect);\n !showListbox && openListbox({ eventType: \"KEYBOARD\" });\n break;\n }\n case \"Escape\":\n case \"Tab\":\n closeListbox();\n break;\n }\n };\n\n const handleOnChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {\n const nextOptionsToShow = getOptionsToShow(e.target.value);\n populateInputField(e.target.value);\n setHighlightedOption(undefined);\n !showListbox && openListbox({ eventType: \"KEYBOARD\" });\n highlightFirstOption &&\n nextOptionsToShow[0] &&\n scrollOptionIntoView(optionRefs.current[nextOptionsToShow[0].id]);\n };\n\n const handleOnMouseDown = (event: React.MouseEvent<HTMLInputElement> | undefined) => {\n onInputMouseDown?.(event);\n showListbox ? closeListbox() : openListbox({ eventType: \"CLICK\" });\n };\n\n const handleOnFocus = (event: React.FocusEvent<HTMLInputElement> | undefined) => {\n onInputFocus?.(event);\n !listboxIsOpen && openOnFocus && openListbox({ eventType: \"KEYBOARD\" });\n inputRef.current?.select();\n };\n\n const handleOnBlur: React.FocusEventHandler<HTMLInputElement> = (event) => {\n onInputBlur?.(event);\n // Use a timeout to allow click events on the listbox to fire before this check\n setTimeout(() => {\n if (\n !inputRef.current?.contains(document.activeElement) &&\n !listboxRef.current?.contains(document.activeElement)\n ) {\n closeListbox();\n\n // If the blur happened due to a click inside the listbox for a combobox, don't reset the value\n if (combobox) {\n populateInputField(selectedOption ? selectedOption.label : \"\");\n }\n }\n });\n };\n\n const listboxStyle: CSSProperties = {\n maxHeight: typeof listboxMaxHeight === \"number\" ? `${listboxMaxHeight}px` : listboxMaxHeight,\n };\n\n const listboxProps: ListboxProps = {\n \"aria-label\": listboxLabel,\n \"aria-expanded\": showListbox,\n \"data-testid\": getTestId(\"listbox\"),\n id: `${id}-listbox`,\n ref: listboxRef,\n onMouseLeave: () => setHighlightedOption(undefined),\n style: listboxMaxHeight ? listboxStyle : undefined,\n };\n\n const createListboxItemId = (option: T) => `${id}-listbox-item-${option.id}`;\n\n const getListBoxItemProps = (option: T, index: number): ListboxItemProps => {\n const handleOnMouseMove = () =>\n option.id !== highlightedOption?.id &&\n setHighlightedOption({ ...option, isSetByClickEvent: true });\n\n const highlighted =\n (option.id === highlightedOption?.id ||\n (!!highlightFirstOption && !highlightedOption && index === 0)) &&\n !highlightedOption?.isSetByClickEvent;\n\n return {\n \"data-testid\": getTestId(`listbox-item-${option.id}`),\n id: createListboxItemId(option),\n key: option.id,\n onMouseMove: handleOnMouseMove,\n onMouseUp: () => selectOption(option),\n ref: (el) => {\n if (el) {\n optionRefs.current[option.id] = el;\n }\n },\n tabIndex: -1,\n selected: option.id === selectedOption?.id,\n disabled: option.disabled,\n highlighted,\n hovered: option.id === highlightedOption?.id && !!highlightedOption?.isSetByClickEvent,\n };\n };\n\n const inputProps: InputProps = {\n \"aria-activedescendant\": highlightedOption ? createListboxItemId(highlightedOption) : undefined,\n \"aria-autocomplete\": \"list\",\n \"aria-controls\": listboxProps.id,\n \"data-testid\": getTestId(\"input\"),\n autoComplete: \"off\",\n id: `${id}-input`,\n onChange: handleOnChange,\n onMouseDown: handleOnMouseDown,\n onFocus: handleOnFocus,\n onKeyDown: handleOnKeyDown,\n onBlur: handleOnBlur,\n ref: inputRef,\n role: \"combobox\",\n value: definiteInputValue,\n };\n\n return {\n id,\n inputProps,\n internalRef,\n optionsToShow,\n showListbox,\n noOptionsText,\n combobox,\n comboboxButtonAriaLabel,\n getListBoxItemProps,\n listboxProps,\n };\n};\n","import type { ComponentPropsWithRef, ForwardedRef, ReactNode } from \"react\";\nimport React, { cloneElement, forwardRef } from \"react\";\nimport { IconChevronDown } from \"@purpur/icon/chevron-down\";\nimport { Listbox } from \"@purpur/listbox\";\nimport { isTextField } from \"@purpur/text-field\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./autocomplete.module.scss\";\nimport type { AutocompleteOption, UseAutocompleteResult } from \"./useAutocomplete\";\nimport { useAutocomplete } from \"./useAutocomplete\";\nimport type { Prettify } from \"./utils\";\n\nconst cx = c.bind(styles);\n\ntype AutocompleteProps<T extends AutocompleteOption> = Prettify<\n UseAutocompleteResult<T> & {\n className?: string;\n /**\n * Render the input. `props` are native input props\n */\n renderInput: (props: ComponentPropsWithRef<\"input\">) => ReactNode;\n /**\n * Invoked for each given option. Use to customize the rendering of the options\n */\n renderOption?: (option: T) => ReactNode;\n }\n>;\n\nconst rootClassName = \"purpur-autocomplete\";\n\nconst AutocompleteComponent = <T extends AutocompleteOption>(\n { className, renderInput, renderOption, ...useAutocompleteProps }: AutocompleteProps<T>,\n ref: ForwardedRef<HTMLDivElement>\n) => {\n const {\n id,\n inputProps,\n internalRef,\n optionsToShow,\n showListbox,\n noOptionsText,\n combobox,\n comboboxButtonAriaLabel,\n getListBoxItemProps,\n listboxProps,\n } = useAutocomplete(useAutocompleteProps);\n\n const renderListboxItem = (option: T, index: number) => {\n const { key, ...listboxItemProps } = getListBoxItemProps(option, index);\n\n return (\n <Listbox.Item key={key} {...listboxItemProps}>\n {renderOption ? renderOption?.(option) : option.label}\n </Listbox.Item>\n );\n };\n\n const setRootRef = (node: HTMLDivElement | null) => {\n internalRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n };\n\n const getInputComponent = () => {\n const input = renderInput(inputProps);\n const isCombobox =\n combobox && comboboxButtonAriaLabel && noOptionsText && input && isTextField(input);\n\n if (isCombobox) {\n const endAdornment = (\n <>\n {input.props.endAdornment}\n <button\n data-testid=\"chevron button\"\n type=\"button\"\n className={cx(`${rootClassName}__chevron-button`)}\n onClick={() => {\n inputProps.onFocus(undefined);\n inputProps.onMouseDown(undefined);\n }}\n aria-label={comboboxButtonAriaLabel}\n aria-expanded={showListbox}\n aria-controls={listboxProps.id}\n >\n <IconChevronDown\n size=\"sm\"\n className={cx(`${rootClassName}__chevron-icon`, {\n [`${rootClassName}__chevron-icon--up`]: showListbox,\n })}\n />\n </button>\n </>\n );\n\n return cloneElement(input, { endAdornment });\n }\n\n return input;\n };\n\n return (\n <div id={id} ref={setRootRef} className={cx([rootClassName, className])}>\n {getInputComponent()}\n {showListbox && (\n <Listbox {...listboxProps} className={cx(`${rootClassName}__listbox`)}>\n {!optionsToShow.length ? (\n <Listbox.Item noninteractive>{noOptionsText}</Listbox.Item>\n ) : (\n optionsToShow.filter((option): option is T => !!option).map(renderListboxItem)\n )}\n </Listbox>\n )}\n </div>\n );\n};\n\n/* @deprecated use `Dropdown` or `SearchField` instead, this is only exported for backwards compatibility and will be removed in a future release */\nexport const Autocomplete = forwardRef(AutocompleteComponent);\nAutocomplete.displayName = \"Autocomplete\";\n\nexport type {\n AutocompleteOption,\n UseAutocompleteResult as UseAutocompleteOptions,\n} from \"./useAutocomplete\";\nexport { useAutocomplete } from \"./useAutocomplete\";\n"],"names":["useRefObject","value","useRef","useOnClickOutside","element","callback","handleClickOutside","useCallback","event","useEffect","useAutocomplete","combobox","comboboxButtonAriaLabel","highlightFirstOption","defaultInputValue","inputValue","filterOption","id","listboxLabel","listboxMaxHeight","onInputBlur","onInputChange","onInputFocus","onInputKeyDown","onInputMouseDown","openOnFocus","noOptionsText","onSelect","options","selectedOption","dataTestid","internalInputValue","setInternalInputValue","useState","definiteInputValue","highlightedOption","setHighlightedOption","inputRef","internalRef","listboxRef","optionRefs","listboxIsOpen","setListboxIsOpen","getTestId","name","closeListbox","openListbox","eventType","scrollOptionIntoView","filterOptions","searchTerm","option","searchTermChunks","chunk","getOptionsToShow","optionsToShow","populateInputField","optionRect","listboxRect","selectOption","findNextOption","key","index","optionsLength","showListbox","highlightNextOption","nextOption","handleOnKeyDown","optionToSelect","handleOnChange","nextOptionsToShow","handleOnMouseDown","handleOnFocus","handleOnBlur","listboxStyle","listboxProps","createListboxItemId","getListBoxItemProps","handleOnMouseMove","highlighted","el","inputProps","cx","c","styles","rootClassName","AutocompleteComponent","className","renderInput","renderOption","useAutocompleteProps","ref","renderListboxItem","listboxItemProps","jsx","Listbox","setRootRef","node","getInputComponent","input","isTextField","endAdornment","jsxs","Fragment","IconChevronDown","cloneElement","Autocomplete","forwardRef"],"mappings":";;;;;;;;;;;;GAOaA,KAAe,CAAIC,MACvBC,EAAUD,CAAK,GAGXE,KAAoB,CAACC,GAA6BC,MAAyB;AACtF,QAAMC,IAAqBC;AAAA,IACzB,CAACC,MAAsB;AACrB,MAAIJ,KAAW,CAACA,EAAQ,SAASI,EAAM,MAAc,KACnDH,EAAA;AAAA,IAEJ;AAAA,IACA,CAACA,GAAUD,CAAO;AAAA,EAAA;AAGpB,EAAAK,GAAU,OACR,SAAS,iBAAiB,aAAaH,CAAkB,GAClD,MAAM;AACX,aAAS,oBAAoB,aAAaA,CAAkB;AAAA,EAC9D,IACC,CAACA,CAAkB,CAAC;AACzB,GCoFaI,KAAkB,CAA+B;AAAA,EAC5D,UAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC;AAAA,E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AA,IAAAW,EAAA;AAAA,IACAlC,KACC,gBAAA8B,EAACC,GAAA,EAAS,GAAGpB,GAAc,WAAWO,EAAG,GAAGG,CAAa,WAAW,GACjE,UAAC9B,EAAc,SAGdA,EAAc,OAAO,CAACJ,MAAwB,CAAC,CAACA,CAAM,EAAE,IAAIyC,CAAiB,IAF7E,gBAAAE,EAACC,EAAQ,MAAR,EAAa,gBAAc,IAAE,UAAArE,EAAA,CAAc,EAEiC,CAEjF;AAAA,EAAA,GAEJ;AAEJ,GAGagF,KAAeC,GAAWrB,EAAqB;AAC5DoB,GAAa,cAAc;"}
1
+ {"version":3,"file":"autocomplete-BEGRn-Wh.mjs","sources":["../../../components/autocomplete/src/utils.ts","../../../components/autocomplete/src/useAutocomplete.ts","../../../components/autocomplete/src/autocomplete.tsx"],"sourcesContent":["import { type RefObject, useCallback, useEffect, useRef } from \"react\";\n\n// Used to \"merge\" \"intersection types\". Used to get comments on the props to the docs.\nexport type Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\n\nexport const useRefObject = <T>(value: T): RefObject<T> => {\n return useRef<T>(value) as RefObject<T>;\n};\n\nexport const useOnClickOutside = (element: HTMLElement | null, callback: () => void) => {\n const handleClickOutside = useCallback(\n (event: MouseEvent) => {\n if (element && !element.contains(event.target as Node)) {\n callback();\n }\n },\n [callback, element]\n );\n\n useEffect(() => {\n document.addEventListener(\"mousedown\", handleClickOutside);\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [handleClickOutside]);\n};\n","import type { CSSProperties, ReactNode } from \"react\";\nimport { useRef, useState } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport type { ListboxItemProps, ListboxProps } from \"@purpur/listbox\";\n\nimport { useOnClickOutside, useRefObject } from \"./utils\";\n\nexport type AutocompleteOption = {\n label: string;\n id: string;\n value?: string;\n disabled?: boolean;\n};\n\nexport type InputProps = Omit<BaseProps<\"input\">, \"onFocus\" | \"onMouseDown\"> & {\n onFocus: (event: React.FocusEvent<HTMLInputElement> | undefined) => void;\n onMouseDown: (event: React.MouseEvent<HTMLInputElement> | undefined) => void;\n};\n\ntype ComboboxProps = {\n /*\n * Set to get combobox features. Use in combination with `noOptionsText`, `comboboxButtonAriaLabel` and Purpur TextField.\n */\n combobox: true;\n /**\n * An accessible label for the button that toggles the list of options for a combobox.\n * */\n comboboxButtonAriaLabel: string;\n /*\n * Shown when there are no options to show. Will be displayed inside a listbox item.\n */\n noOptionsText: ReactNode;\n};\n\ntype NoComboboxProps = {\n combobox?: never;\n comboboxButtonAriaLabel?: never;\n /*\n * Shown when there are no options to show. Will be displayed inside a listbox item.\n */\n noOptionsText?: ReactNode;\n};\n\nexport type UseAutocompleteResult<T extends AutocompleteOption> = {\n /*\n * Set to highlight the first option in the listbox when the input is focused.\n */\n highlightFirstOption?: boolean;\n /*\n * The default input value. Only to use when the input is uncontrolled.\n */\n defaultInputValue?: string;\n /*\n * The input value. Use this to control the input value.\n */\n inputValue?: string;\n /*\n * Invoked for each option. Use to control which options are shown.\n */\n filterOption?: (inputValue: string | undefined, option: T) => boolean;\n /*\n * Id will be used to prefix id:s of all elements.\n */\n id: string;\n /*\n * The label of the listbox (dropdown) displaying the options.\n */\n listboxLabel: string;\n /*\n * The height of the listbox. Number will be interpreted as px value. defaults to `calc(2 * var(--purpur-spacing-1200))`.\n */\n listboxMaxHeight?: string | number;\n /*\n * NOTE! Always use this instead of onBlur directly on the input element. Event handler invoked on input blur.\n */\n onInputBlur?: React.FocusEventHandler<HTMLInputElement>;\n /*\n * NOTE! Always use this instead of onChange directly on the input element. Event handler invoked when the input value changes.\n */\n onInputChange?: (value: string) => void;\n /*\n * NOTE! Always use this instead of onFocus directly on the input element. Event handler invoked on input focus.\n */\n onInputFocus?: (event: React.FocusEvent<HTMLInputElement> | undefined) => undefined;\n /*\n * NOTE! Always use this instead of onKeyDown directly on the input element. Event handler invoked on input key down.\n */\n onInputKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;\n /*\n * NOTE! Always use this instead of onMouseDown directly on the input element. Event handler invoked on input mouse down.\n */\n onInputMouseDown?: (event: React.MouseEvent<HTMLInputElement> | undefined) => undefined;\n /*\n * Set to open the listbox when input gets focus.\n */\n openOnFocus?: boolean;\n /*\n * Event handler invoked when an option is selected.\n */\n onSelect?: (option: T | undefined) => void;\n /*\n * The list of options. Could include custom props.\n */\n options: T[];\n /*\n * The selected option.\n */\n selectedOption?: T;\n [\"data-testid\"]?: string;\n} & (ComboboxProps | NoComboboxProps);\n\nexport const useAutocomplete = <T extends AutocompleteOption>({\n combobox,\n comboboxButtonAriaLabel,\n highlightFirstOption,\n defaultInputValue,\n inputValue,\n filterOption,\n id,\n listboxLabel,\n listboxMaxHeight,\n onInputBlur,\n onInputChange,\n onInputFocus,\n onInputKeyDown,\n onInputMouseDown,\n openOnFocus,\n noOptionsText,\n onSelect,\n options,\n selectedOption,\n [\"data-testid\"]: dataTestid,\n}: UseAutocompleteResult<T>) => {\n const [internalInputValue, setInternalInputValue] = useState(\n ((typeof inputValue === \"string\" ? inputValue : defaultInputValue) || selectedOption?.label) ??\n \"\"\n );\n const definiteInputValue = typeof inputValue === \"string\" ? inputValue : internalInputValue;\n const [highlightedOption, setHighlightedOption] = useState<\n (T & { isSetByClickEvent?: false }) | undefined\n >(highlightFirstOption ? options[0] : undefined);\n const inputRef = useRef<HTMLInputElement>(null);\n const internalRef = useRefObject<HTMLDivElement | null>(null);\n const listboxRef = useRef<HTMLUListElement>(null);\n const optionRefs = useRef<Record<string, HTMLLIElement>>({});\n const [listboxIsOpen, setListboxIsOpen] = useState(false);\n\n function getTestId(name: string) {\n return dataTestid ? `${dataTestid}-${name}` : undefined;\n }\n\n const closeListbox = () => {\n setListboxIsOpen(false);\n setHighlightedOption(undefined);\n };\n\n useOnClickOutside(internalRef.current, closeListbox);\n\n const openListbox = ({ eventType }: { eventType: \"CLICK\" | \"KEYBOARD\" }) => {\n setListboxIsOpen(true);\n if (selectedOption) {\n requestAnimationFrame(() => {\n const isSetByClickEvent = eventType === \"CLICK\";\n setHighlightedOption({ ...selectedOption, isSetByClickEvent });\n scrollOptionIntoView(optionRefs.current[selectedOption.id]);\n });\n }\n };\n\n const filterOptions = (searchTerm: string | undefined) => {\n if (filterOption) {\n return options.filter((option) => filterOption(searchTerm, option));\n }\n\n if (!searchTerm) {\n return options;\n }\n\n const searchTermChunks = searchTerm.toUpperCase().split(\" \") || [];\n return options.filter((option) =>\n searchTermChunks.every((chunk) =>\n (option.value || option.label).toUpperCase().includes(chunk)\n )\n );\n };\n\n const getOptionsToShow = (searchTerm: string | undefined): (T | undefined)[] => {\n return selectedOption && selectedOption?.label === searchTerm\n ? options\n : filterOptions(searchTerm);\n };\n\n const optionsToShow = getOptionsToShow(definiteInputValue);\n\n const populateInputField = (value: string) => {\n onInputChange?.(value);\n setInternalInputValue(value);\n };\n\n const scrollOptionIntoView = (option: HTMLLIElement | undefined) => {\n if (option) {\n const optionRect = option.getBoundingClientRect();\n const listboxRect = listboxRef.current?.getBoundingClientRect() || { top: 0, bottom: 0 };\n const isOptionOutsideView =\n optionRect.top < listboxRect.top || optionRect.bottom > listboxRect.bottom;\n if (isOptionOutsideView) {\n option.scrollIntoView({ block: \"nearest\" });\n }\n }\n };\n\n const selectOption = (option: T | undefined) => {\n if (option) {\n inputRef.current?.focus();\n populateInputField(option.label);\n onSelect?.(option);\n }\n closeListbox();\n };\n\n const findNextOption = (key: \"ArrowUp\" | \"ArrowDown\"): T | undefined => {\n const index =\n highlightFirstOption && !highlightedOption\n ? 0\n : optionsToShow.findIndex((option) => option && highlightedOption?.id === option.id);\n\n const optionsLength = optionsToShow.length;\n\n return key === \"ArrowDown\"\n ? optionsToShow[(index ?? -1) + 1] || optionsToShow[0]\n : optionsToShow[(index ?? optionsLength) - 1] || optionsToShow[optionsLength - 1];\n };\n\n const showListbox = listboxIsOpen && (!!optionsToShow.length || !!noOptionsText);\n\n const highlightNextOption = (key: \"ArrowUp\" | \"ArrowDown\") => {\n !showListbox && openListbox({ eventType: \"KEYBOARD\" });\n const nextOption = findNextOption(key);\n\n setHighlightedOption(nextOption);\n nextOption && scrollOptionIntoView(optionRefs.current[nextOption.id]);\n };\n\n const handleOnKeyDown: React.KeyboardEventHandler<HTMLInputElement> = (event) => {\n onInputKeyDown?.(event);\n switch (event.key) {\n case \"ArrowUp\":\n case \"ArrowDown\":\n event.preventDefault(); // Preventing default to not move cursor in input\n highlightNextOption(event.key);\n break;\n case \"Enter\": {\n const optionToSelect = highlightedOption || (highlightFirstOption ? options[0] : undefined);\n showListbox && selectOption(optionToSelect);\n !showListbox && openListbox({ eventType: \"KEYBOARD\" });\n break;\n }\n case \"Escape\":\n case \"Tab\":\n closeListbox();\n break;\n }\n };\n\n const handleOnChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {\n const nextOptionsToShow = getOptionsToShow(e.target.value);\n populateInputField(e.target.value);\n setHighlightedOption(undefined);\n !showListbox && openListbox({ eventType: \"KEYBOARD\" });\n highlightFirstOption &&\n nextOptionsToShow[0] &&\n scrollOptionIntoView(optionRefs.current[nextOptionsToShow[0].id]);\n };\n\n const handleOnMouseDown = (event: React.MouseEvent<HTMLInputElement> | undefined) => {\n onInputMouseDown?.(event);\n showListbox ? closeListbox() : openListbox({ eventType: \"CLICK\" });\n };\n\n const handleOnFocus = (event: React.FocusEvent<HTMLInputElement> | undefined) => {\n onInputFocus?.(event);\n !listboxIsOpen && openOnFocus && openListbox({ eventType: \"KEYBOARD\" });\n inputRef.current?.select();\n };\n\n const handleOnBlur: React.FocusEventHandler<HTMLInputElement> = (event) => {\n onInputBlur?.(event);\n // Use a timeout to allow click events on the listbox to fire before this check\n setTimeout(() => {\n if (\n !inputRef.current?.contains(document.activeElement) &&\n !listboxRef.current?.contains(document.activeElement)\n ) {\n closeListbox();\n\n // If the blur happened due to a click inside the listbox for a combobox, don't reset the value\n if (combobox) {\n populateInputField(selectedOption ? selectedOption.label : \"\");\n }\n }\n });\n };\n\n const listboxStyle: CSSProperties = {\n maxHeight: typeof listboxMaxHeight === \"number\" ? `${listboxMaxHeight}px` : listboxMaxHeight,\n };\n\n const listboxProps: ListboxProps = {\n \"aria-label\": listboxLabel,\n \"aria-expanded\": showListbox,\n \"data-testid\": getTestId(\"listbox\"),\n id: `${id}-listbox`,\n ref: listboxRef,\n onMouseLeave: () => setHighlightedOption(undefined),\n style: listboxMaxHeight ? listboxStyle : undefined,\n };\n\n const createListboxItemId = (option: T) => `${id}-listbox-item-${option.id}`;\n\n const getListBoxItemProps = (option: T, index: number): ListboxItemProps => {\n const handleOnMouseMove = () =>\n option.id !== highlightedOption?.id &&\n setHighlightedOption({ ...option, isSetByClickEvent: true });\n\n const highlighted =\n (option.id === highlightedOption?.id ||\n (!!highlightFirstOption && !highlightedOption && index === 0)) &&\n !highlightedOption?.isSetByClickEvent;\n\n return {\n \"data-testid\": getTestId(`listbox-item-${option.id}`),\n id: createListboxItemId(option),\n key: option.id,\n onMouseMove: handleOnMouseMove,\n onMouseUp: () => selectOption(option),\n ref: (el) => {\n if (el) {\n optionRefs.current[option.id] = el;\n }\n },\n tabIndex: -1,\n selected: option.id === selectedOption?.id,\n disabled: option.disabled,\n highlighted,\n hovered: option.id === highlightedOption?.id && !!highlightedOption?.isSetByClickEvent,\n };\n };\n\n const inputProps: InputProps = {\n \"aria-activedescendant\": highlightedOption ? createListboxItemId(highlightedOption) : undefined,\n \"aria-autocomplete\": \"list\",\n \"aria-controls\": listboxProps.id,\n \"data-testid\": getTestId(\"input\"),\n autoComplete: \"off\",\n id: `${id}-input`,\n onChange: handleOnChange,\n onMouseDown: handleOnMouseDown,\n onFocus: handleOnFocus,\n onKeyDown: handleOnKeyDown,\n onBlur: handleOnBlur,\n ref: inputRef,\n role: \"combobox\",\n value: definiteInputValue,\n };\n\n return {\n id,\n inputProps,\n internalRef,\n optionsToShow,\n showListbox,\n noOptionsText,\n combobox,\n comboboxButtonAriaLabel,\n getListBoxItemProps,\n listboxProps,\n };\n};\n","import type { ComponentPropsWithRef, ForwardedRef, ReactNode } from \"react\";\nimport React, { cloneElement, forwardRef } from \"react\";\nimport { IconChevronDown } from \"@purpur/icon/chevron-down\";\nimport { Listbox } from \"@purpur/listbox\";\nimport { isTextField } from \"@purpur/text-field\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./autocomplete.module.scss\";\nimport type { AutocompleteOption, UseAutocompleteResult } from \"./useAutocomplete\";\nimport { useAutocomplete } from \"./useAutocomplete\";\nimport type { Prettify } from \"./utils\";\n\nconst cx = c.bind(styles);\n\ntype AutocompleteProps<T extends AutocompleteOption> = Prettify<\n UseAutocompleteResult<T> & {\n className?: string;\n /**\n * Render the input. `props` are native input props\n */\n renderInput: (props: ComponentPropsWithRef<\"input\">) => ReactNode;\n /**\n * Invoked for each given option. Use to customize the rendering of the options\n */\n renderOption?: (option: T) => ReactNode;\n }\n>;\n\nconst rootClassName = \"purpur-autocomplete\";\n\nconst AutocompleteComponent = <T extends AutocompleteOption>(\n { className, renderInput, renderOption, ...useAutocompleteProps }: AutocompleteProps<T>,\n ref: ForwardedRef<HTMLDivElement>\n) => {\n const {\n id,\n inputProps,\n internalRef,\n optionsToShow,\n showListbox,\n noOptionsText,\n combobox,\n comboboxButtonAriaLabel,\n getListBoxItemProps,\n listboxProps,\n } = useAutocomplete(useAutocompleteProps);\n\n const renderListboxItem = (option: T, index: number) => {\n const { key, ...listboxItemProps } = getListBoxItemProps(option, index);\n\n return (\n <Listbox.Item key={key} {...listboxItemProps}>\n {renderOption ? renderOption?.(option) : option.label}\n </Listbox.Item>\n );\n };\n\n const setRootRef = (node: HTMLDivElement | null) => {\n internalRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n };\n\n const getInputComponent = () => {\n const input = renderInput(inputProps);\n const isCombobox =\n combobox && comboboxButtonAriaLabel && noOptionsText && input && isTextField(input);\n\n if (isCombobox) {\n const endAdornment = (\n <>\n {input.props.endAdornment}\n <button\n data-testid=\"chevron button\"\n type=\"button\"\n className={cx(`${rootClassName}__chevron-button`)}\n onClick={() => {\n inputProps.onFocus(undefined);\n inputProps.onMouseDown(undefined);\n }}\n aria-label={comboboxButtonAriaLabel}\n aria-expanded={showListbox}\n aria-controls={listboxProps.id}\n >\n <IconChevronDown\n size=\"sm\"\n className={cx(`${rootClassName}__chevron-icon`, {\n [`${rootClassName}__chevron-icon--up`]: showListbox,\n })}\n />\n </button>\n </>\n );\n\n return cloneElement(input, { endAdornment });\n }\n\n return input;\n };\n\n return (\n <div id={id} ref={setRootRef} className={cx([rootClassName, className])}>\n {getInputComponent()}\n {showListbox && (\n <Listbox {...listboxProps} className={cx(`${rootClassName}__listbox`)}>\n {!optionsToShow.length ? (\n <Listbox.Item noninteractive>{noOptionsText}</Listbox.Item>\n ) : (\n optionsToShow.filter((option): option is T => !!option).map(renderListboxItem)\n )}\n </Listbox>\n )}\n </div>\n );\n};\n\n/* @deprecated use `Dropdown` or `SearchField` instead, this is only exported for backwards compatibility and will be removed in a future release */\nexport const Autocomplete = forwardRef(AutocompleteComponent);\nAutocomplete.displayName = \"Autocomplete\";\n\nexport type {\n AutocompleteOption,\n UseAutocompleteResult as UseAutocompleteOptions,\n} from \"./useAutocomplete\";\nexport { useAutocomplete } from \"./useAutocomplete\";\n"],"names":["useRefObject","value","useRef","useOnClickOutside","element","callback","handleClickOutside","useCallback","event","useEffect","useAutocomplete","combobox","comboboxButtonAriaLabel","highlightFirstOption","defaultInputValue","inputValue","filterOption","id","listboxLabel","listboxMaxHeight","onInputBlur","onInputChange","onInputFocus","onInputKeyDown","onInputMouseDown","openOnFocus","noOptionsText","onSelect","options","selectedOption","dataTestid","internalInputValue","setInternalInputValue","useState","definiteInputValue","highlightedOption","setHighlightedOption","inputRef","internalRef","listboxRef","optionRefs","listboxIsOpen","setListboxIsOpen","getTestId","name","closeListbox","openListbox","eventType","scrollOptionIntoView","filterOptions","searchTerm","option","searchTermChunks","chunk","getOptionsToShow","optionsToShow","populateInputField","optionRect","listboxRect","selectOption","findNextOption","key","index","optionsLength","showListbox","highlightNextOption","nextOption","handleOnKeyDown","optionToSelect","handleOnChange","nextOptionsToShow","handleOnMouseDown","handleOnFocus","handleOnBlur","listboxStyle","listboxProps","createListboxItemId","getListBoxItemProps","handleOnMouseMove","highlighted","el","inputProps","cx","c","styles","rootClassName","AutocompleteComponent","className","renderInput","renderOption","useAutocompleteProps","ref","renderListboxItem","listboxItemProps","jsx","Listbox","setRootRef","node","getInputComponent","input","isTextField","endAdornment","jsxs","Fragment","IconChevronDown","cloneElement","Autocomplete","forwardRef"],"mappings":";;;;;;;;;;;;GAOaA,KAAe,CAAIC,MACvBC,EAAUD,CAAK,GAGXE,KAAoB,CAACC,GAA6BC,MAAyB;AACtF,QAAMC,IAAqBC;AAAA,IACzB,CAACC,MAAsB;AACrB,MAAIJ,KAAW,CAACA,EAAQ,SAASI,EAAM,MAAc,KACnDH,EAAA;AAAA,IAEJ;AAAA,IACA,CAACA,GAAUD,CAAO;AAAA,EAAA;AAGpB,EAAAK,GAAU,OACR,SAAS,iBAAiB,aAAaH,CAAkB,GAClD,MAAM;AACX,aAAS,oBAAoB,aAAaA,CAAkB;AAAA,EAC9D,IACC,CAACA,CAAkB,CAAC;AACzB,GCoFaI,KAAkB,CAA+B;AAAA,EAC5D,UAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC;AAAA,EACA,IAAAC;AAAA,EACA,cAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,CAAC,gBAAgBC;AACnB,MAAgC;AAC9B,QAAM,CAACC,GAAoBC,CAAqB,IAAIC;AAAA,MAChD,OAAOlB,KAAe,WAAW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B;AAC5DoB,GAAa,cAAc;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./autocomplete-D9uCJzjY.js");exports.Autocomplete=e.Autocomplete;exports.useAutocomplete=e.useAutocomplete;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./autocomplete-3kV1btuI.js");exports.Autocomplete=e.Autocomplete;exports.useAutocomplete=e.useAutocomplete;
2
2
  //# sourceMappingURL=autocomplete.cjs.js.map
@@ -1,4 +1,4 @@
1
- import { A as t, u } from "./autocomplete-BipmyKf0.mjs";
1
+ import { A as t, u } from "./autocomplete-BEGRn-Wh.mjs";
2
2
  export {
3
3
  t as Autocomplete,
4
4
  u as useAutocomplete
@@ -3,7 +3,7 @@ import { c as p } from "./bind-CU-R61T-.mjs";
3
3
  import { a as L } from "./badge-DalD-yqG.mjs";
4
4
  import { a as M } from "./spinner-DRQN6YdK.mjs";
5
5
  import { a as R } from "./checkmark.es-DdgIZN2R.mjs";
6
- import { P as q } from "./paragraph-Ci50OF1u.mjs";
6
+ import { P as q } from "./paragraph-DSxXmX_0.mjs";
7
7
  import { H as O } from "./heading-xwBuT_-9.mjs";
8
8
  import { forwardRef as D } from "react";
9
9
  const E = {
@@ -322,4 +322,4 @@ i.displayName = "Card";
322
322
  export {
323
323
  i as C
324
324
  };
325
- //# sourceMappingURL=card-DR2hvxjZ.mjs.map
325
+ //# sourceMappingURL=card-C2mdp-ur.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"card-DR2hvxjZ.mjs","sources":["../../../components/card/src/card-badge.tsx","../../../components/card/src/card-content.tsx","../../../components/card/src/card-content-container.tsx","../../../components/card/src/card-cta.tsx","../../../components/card/src/card-feature-list.tsx","../../../components/card/src/card-trigger-item.tsx","../../../components/card/src/card-heading.tsx","../../../components/card/src/card-media.tsx","../../../components/card/src/card-media-layout.tsx","../../../components/card/src/card-overline.tsx","../../../components/card/src/card-root.tsx","../../../components/card/src/card.tsx"],"sourcesContent":["import React from \"react\";\nimport { Badge, type BadgeVariant } from \"@purpur/badge\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-badge.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardBadgeProps = {\n /**\n * Use this to set a testid on the badge\n */\n [\"data-testid\"]?: string;\n /**\n * The variant (color) of the badge in the top right corner of the card. This is coupled with the text prop. Both needs to be set for the badge to be displayed.\n * `BadgeVariant = \"attention\" | \"special\" | \"neutral\" | \"information\" | \"success\" | \"warning\" | \"error\"`\n */\n variant?: BadgeVariant;\n /**\n * The text that will be in the badge in the top right corner of the card. This is coupled with the variant prop. Both needs to be set for the badge to be displayed.\n */\n text?: string;\n};\n\nconst rootClassName = \"purpur-card-badge\";\n\nexport const CardBadge = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-badge\",\n variant,\n text,\n}: CardBadgeProps) => {\n return variant && text ? (\n <Badge\n className={cx(rootClassName)}\n variant={variant}\n showIcon={false}\n data-testid={dataTestId}\n >\n {text}\n </Badge>\n ) : null;\n};\n","import React, { type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-content.module.scss\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-card-content\";\n\ntype CardContentProps = Omit<BaseProps, \"children\"> & {\n /**\n * The child elements of the content (React.ReactNode)\n */\n children: ReactNode;\n};\n\nexport const CardContent = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-content\",\n children,\n className,\n ...props\n}: CardContentProps) => {\n return (\n <div className={cx(rootClassName, className)} data-testid={dataTestId} {...props}>\n {children}\n </div>\n );\n};\n","import React, { type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-content-container.module.scss\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-card-content-container\";\n\ntype CardContentContainerProps = Omit<BaseProps, \"children\"> & {\n /**\n * The child elements of the content container (React.ReactNode)\n */\n children: ReactNode;\n /**\n * Flag to remove the top padding\n */\n isFooter?: boolean;\n fullHeight?: boolean;\n gapSize?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n};\n\nexport const CardContentContainer = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-content-container\",\n children,\n className,\n isFooter = false,\n fullHeight = false,\n gapSize = \"md\",\n ...props\n}: CardContentContainerProps) => (\n <div\n className={cx([\n rootClassName,\n className,\n `${rootClassName}--gap-size--${gapSize}`,\n {\n [`${rootClassName}--full-height`]: fullHeight,\n [`${rootClassName}--footer`]: isFooter,\n },\n ])}\n data-testid={dataTestId}\n {...props}\n >\n {children}\n </div>\n);\n","import React from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport { Spinner } from \"@purpur/spinner\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-cta.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardCtaProps = BaseProps & {\n disabled?: boolean;\n /**\n * The position of the icon.\n * `\"left\" | \"right\"`\n */\n iconPosition?: \"left\" | \"right\";\n loading?: boolean;\n /**\n * Use this to style the cta as a link (no border)\n */\n linkStyling?: boolean;\n text?: string;\n};\n\nconst rootClassName = \"purpur-card-cta\";\n\nexport const CardCta = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-cta\",\n className,\n children,\n disabled = false,\n iconPosition = \"right\",\n loading = false,\n text,\n linkStyling = false,\n ...props\n}: CardCtaProps) => {\n return (\n <div\n className={`${cx([\n rootClassName,\n className,\n\n {\n [`${rootClassName}--disabled`]: disabled,\n [`${rootClassName}--text`]: !!text,\n [`${rootClassName}--cta-styling`]: linkStyling,\n [`${rootClassName}--button-styling`]: !linkStyling,\n [`${rootClassName}--button-styling--md`]: !linkStyling,\n [`${rootClassName}--button-styling--secondary`]: !linkStyling,\n [`${rootClassName}--button-styling--icon-only`]: !linkStyling && !text,\n },\n ])} ${rootClassName}`}\n data-testid={dataTestId}\n {...props}\n >\n {!loading ? (\n <>\n {iconPosition === \"left\" && children}\n {text}\n {iconPosition === \"right\" && children}\n </>\n ) : (\n <Spinner data-testid={`${dataTestId}-spinner`} size=\"xs\" disabled={disabled} />\n )}\n </div>\n );\n};\n","import React from \"react\";\nimport { IconCheckmark } from \"@purpur/icon/checkmark\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-feature-list.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardFeatureListProps = {\n /**\n * Use this to set a testid on the feature list\n */\n [\"data-testid\"]?: string;\n /**\n * This is the feature list where each entry is preceded by a checkmark. If the feature list provided is falsy or empty nothing will be rendered.\n */\n listItems?: string[];\n};\n\nconst rootClassName = \"purpur-card-feature-list\";\n\nexport const CardFeatureList = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-feature-list\",\n listItems,\n}: CardFeatureListProps) => {\n return listItems && listItems.length > 0 ? (\n <ul className={cx(rootClassName)} data-testid={dataTestId}>\n {listItems.map((listItem: string) => (\n <li\n className={cx(`${rootClassName}__list-item`)}\n data-testid={`${dataTestId}-item`}\n key={listItem}\n >\n <IconCheckmark size=\"xs\" className={cx(`${rootClassName}__icon`)} />\n <Paragraph>{listItem}</Paragraph>\n </li>\n ))}\n </ul>\n ) : null;\n};\n","import React, {\n type AnchorHTMLAttributes,\n type ForwardRefExoticComponent,\n type MouseEvent,\n type ReactNode,\n} from \"react\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-trigger-item.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardTriggerItemProps = {\n [\"data-testid\"]?: string;\n [\"aria-label\"]?: string;\n disabled?: boolean;\n href?: string;\n onClick?: () => unknown;\n children: ReactNode;\n linkElement?: ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement>> | \"a\";\n};\n\nconst rootClassName = \"purpur-card-trigger-item\";\n\nexport const CardTriggerItem = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-trigger-item\",\n [\"aria-label\"]: ariaLabel,\n disabled = false,\n href,\n onClick,\n children,\n linkElement: LinkElement = \"a\",\n}: CardTriggerItemProps) => {\n const handleClick = (e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>): void => {\n if (disabled) {\n e.preventDefault();\n } else if (onClick) {\n onClick();\n }\n };\n\n const additionalNonHashedClasses = `${rootClassName} ${\n disabled ? `${rootClassName}--disabled` : \"\"\n }`;\n\n return href ? (\n <LinkElement\n aria-disabled={disabled}\n aria-label={ariaLabel}\n className={`${cx([\n rootClassName,\n `${rootClassName}--link`,\n {\n [`${rootClassName}--disabled`]: disabled,\n },\n ])} ${additionalNonHashedClasses}`}\n data-testid={dataTestId}\n href={disabled ? undefined : href}\n tabIndex={disabled ? 0 : undefined}\n onClick={handleClick}\n >\n {children}\n </LinkElement>\n ) : (\n <button\n aria-disabled={disabled}\n aria-label={ariaLabel}\n className={`${cx([\n rootClassName,\n `${rootClassName}--button`,\n {\n [`${rootClassName}--disabled`]: disabled,\n },\n ])} ${additionalNonHashedClasses}`}\n data-testid={dataTestId}\n type=\"button\"\n onClick={handleClick}\n >\n {children}\n </button>\n );\n};\n","import React, {\n type AnchorHTMLAttributes,\n type ForwardRefExoticComponent,\n type ReactNode,\n} from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport { Heading, type HeadingTagType,type HeadingVariant } from \"@purpur/heading\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-heading.module.scss\";\nimport { CardTriggerItem } from \"./card-trigger-item\";\n\nconst cx = c.bind(styles);\n\nexport type CardHeadingDefaultProps = {\n /**\n * Use this to set a testid on the feature list\n */\n [\"data-testid\"]?: string;\n title: string;\n /**\n * Use when you want an icon to the left of the title\n */\n icon?: ReactNode;\n /**\n * Use for the CTA, it will positioned to the right\n */\n children?: ReactNode;\n titleTag?: HeadingTagType;\n variant?: HeadingVariant;\n enableHyphenation?: boolean;\n};\n\nexport type CardHeadingNonInteractiveProps = {\n disabled?: never;\n href?: never;\n /**\n * If the href prop is not provided the clickable element will be a button and use this clickHandler when the user presses the card.\n */\n onClick?: never;\n linkElement?: never;\n};\n\nexport type CardHeadingLinkProps = {\n /**\n * Use this to disable the card. Can be used both with a link card and a button card. In the case of the button the clickHandler will not be called and if a anchor tag the href will be removed.\n */\n disabled?: boolean;\n /**\n * Makes the card become a link to the provided href.\n */\n href: string;\n /**\n * If the href prop is not provided the clickable element will be a button and use this clickHandler when the user presses the card.\n */\n onClick?: () => void;\n linkElement?: ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement>> | \"a\";\n};\n\nexport type CardHeadingButtonProps = {\n /**\n * Use this to disable the card. Can be used both with a link card and a button card. In the case of the button the clickHandler will not be called and if a anchor tag the href will be removed.\n */\n disabled?: boolean;\n /**\n * Makes the card become a link to the provided href.\n */\n href?: never;\n /**\n * If the href prop is not provided the clickable element will be a button and use this clickHandler when the user presses the card.\n */\n onClick: () => void;\n linkElement?: never;\n};\n\nexport type CardHeadingProps<T extends HeadingTagType = \"h2\"> = BaseProps<T> &\n CardHeadingDefaultProps;\n\nconst rootClassName = \"purpur-card-heading\";\n\nexport const CardHeading = <T extends HeadingTagType = \"h2\">({\n [\"data-testid\"]: dataTestId = \"purpur-card-heading\",\n [\"aria-label\"]: ariaLabel,\n title,\n icon,\n children,\n titleTag = \"h2\" as T,\n enableHyphenation,\n onClick = undefined,\n href = undefined,\n disabled = false,\n linkElement = \"a\",\n variant = \"title-100\",\n ...props\n}: CardHeadingProps &\n (CardHeadingLinkProps | CardHeadingButtonProps | CardHeadingNonInteractiveProps)) => {\n const classes = cx(rootClassName, {\n [`${rootClassName}--is-interactive`]: onClick || href,\n [`${rootClassName}--disabled`]: disabled,\n });\n\n return (\n <div className={classes} data-testid={dataTestId}>\n <div className={cx(`${rootClassName}__header`)}>\n {icon && <div className={cx(`${rootClassName}__icon`)}>{icon}</div>}\n <Heading\n tag={titleTag}\n className={cx(`${rootClassName}__heading`)}\n variant={variant}\n enableHyphenation={enableHyphenation}\n {...props}\n >\n {onClick || href ? (\n <CardTriggerItem\n aria-label={ariaLabel}\n disabled={disabled}\n href={href}\n onClick={onClick}\n linkElement={linkElement}\n >\n {title}\n </CardTriggerItem>\n ) : (\n title\n )}\n </Heading>\n </div>\n {children}\n </div>\n );\n};\n","import React from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-media.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardMediaProps = BaseProps;\n\nconst rootClassName = \"purpur-card-media\";\n\nexport const CardMedia = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-media\",\n className,\n children,\n ...props\n}: CardMediaProps) => (\n <div {...props} className={cx([rootClassName, className])} data-testid={dataTestId}>\n {children}\n </div>\n);\n","import React from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-media-layout.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardMediaLayoutProps = BaseProps & {\n imageTop?: boolean;\n};\n\nconst rootClassName = \"purpur-card-media-layout\";\n\nexport const CardMediaLayout = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-media-layout\",\n className,\n children,\n imageTop = false,\n ...props\n}: CardMediaLayoutProps) => (\n <div\n {...props}\n className={cx(rootClassName, className, { [`${rootClassName}--image-top`]: imageTop })}\n data-testid={dataTestId}\n >\n {children}\n </div>\n);\n","import React from \"react\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-overline.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardOverlineProps = {\n /**\n * Use this to set a testid on the overline\n */\n [\"data-testid\"]?: string;\n /**\n * The text displayed in the overline\n */\n overline?: string;\n};\n\nconst rootClassName = \"purpur-card-overline\";\n\nexport const CardOverline = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-overline\",\n overline,\n}: CardOverlineProps) => {\n return overline ? (\n <Paragraph variant=\"overline-100\" className={cx(rootClassName)} data-testid={dataTestId}>\n {overline}\n </Paragraph>\n ) : null;\n};\n","import React, { forwardRef, type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-root.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardRootProps = Omit<BaseProps, \"children\"> & {\n children: ReactNode;\n fullHeight?: boolean;\n /** Use the prop useMediaQueries when the cards are used beside each other in different sized grid items for example. */\n useMediaQueries?: boolean;\n variant?: \"primary\" | \"secondary\";\n};\n\nconst rootClassName = \"purpur-card-root\";\n\nexport const CardRoot = forwardRef<HTMLDivElement, CardRootProps>(\n (\n {\n [\"data-testid\"]: dataTestId = \"purpur-card-root\",\n children,\n className,\n fullHeight = true,\n variant,\n ...props\n },\n ref\n ) => {\n const classes = cx([\n rootClassName,\n {\n [`${rootClassName}--${variant}`]: variant,\n [`${rootClassName}--full-height`]: fullHeight,\n },\n className,\n ]);\n\n return (\n <div className={classes} data-testid={dataTestId} ref={ref} {...props}>\n {children}\n </div>\n );\n }\n);\n\nCardRoot.displayName = \"CardRoot\";\n","import React, { type FunctionComponent } from \"react\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card.module.scss\";\nimport { CardBadge } from \"./card-badge\";\nimport { CardContent } from \"./card-content\";\nimport { CardContentContainer } from \"./card-content-container\";\nimport { CardCta } from \"./card-cta\";\nimport { CardFeatureList } from \"./card-feature-list\";\nimport { CardHeading } from \"./card-heading\";\nimport { CardMedia } from \"./card-media\";\nimport { CardMediaLayout } from \"./card-media-layout\";\nimport { CardOverline } from \"./card-overline\";\nimport type { CardRootProps } from \"./card-root\";\nimport { CardRoot } from \"./card-root\";\nexport type {\n CardHeadingButtonProps,\n CardHeadingDefaultProps,\n CardHeadingLinkProps,\n CardHeadingNonInteractiveProps,\n} from \"./card-heading\";\n\nconst cx = c.bind(styles);\n\ntype CardCmp<P> = FunctionComponent<P> & {\n Badge: typeof CardBadge;\n Content: typeof CardContent;\n ContentContainer: typeof CardContentContainer;\n Cta: typeof CardCta;\n FeatureList: typeof CardFeatureList;\n Overline: typeof CardOverline;\n Heading: typeof CardHeading;\n Media: typeof CardMedia;\n MediaLayout: typeof CardMediaLayout;\n};\n\nexport type CardProps = CardRootProps;\n\nconst rootClassName = \"purpur-card\";\n\nexport const Card: CardCmp<CardProps> = ({ children, className, useMediaQueries, ...props }) => {\n const classes = cx([rootClassName, className]);\n return (\n <div\n className={cx(`${rootClassName}__container`, {\n [`${rootClassName}__container--full-height`]: props.fullHeight,\n [`${rootClassName}__container--use-container-queries`]: !useMediaQueries,\n [`${rootClassName}__container--use-media-queries`]: useMediaQueries,\n })}\n >\n <CardRoot className={cx(classes)} {...props}>\n {children}\n </CardRoot>\n </div>\n );\n};\n\nCard.Badge = CardBadge;\nCard.Content = CardContent;\nCard.ContentContainer = CardContentContainer;\nCard.Cta = CardCta;\nCard.FeatureList = CardFeatureList;\nCard.Overline = CardOverline;\nCard.Heading = CardHeading;\nCard.Media = CardMedia;\nCard.MediaLayout = CardMediaLayout;\n\nCard.displayName = \"Card\";\n"],"names":["cx","c","styles","rootClassName","CardBadge","dataTestId","variant","text","jsx","Badge","CardContent","children","className","props","CardContentContainer","isFooter","fullHeight","gapSize","CardCta","disabled","iconPosition","loading","linkStyling","Spinner","jsxs","Fragment","CardFeatureList","listItems","listItem","IconCheckmark","Paragraph","CardTriggerItem","ariaLabel","href","onClick","LinkElement","handleClick","e","additionalNonHashedClasses","CardHeading","title","icon","titleTag","enableHyphenation","linkElement","classes","Heading","CardMedia","CardMediaLayout","imageTop","CardOverline","overline","CardRoot","forwardRef","ref","Card","useMediaQueries"],"mappings":";;;;;;;;;;;;;;;GAMMA,IAAKC,EAAE,KAAKC,CAAM,GAkBlBC,IAAgB,qBAETC,IAAY,CAAC;AAAA,EACxB,CAAC,gBAAgBC,IAAa;AAAA,EAC9B,SAAAC;AAAA,EACA,MAAAC;AACF,MACSD,KAAWC,IAChB,gBAAAC;AAA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EAAK,MAAMrC;AACXqC,EAAK,cAAc7B;AACnB6B,EAAK,WAAWL;AAChBK,EAAK,UAAUhB;AACfgB,EAAK,QAAQR;AACbQ,EAAK,cAAcP;AAEnBO,EAAK,cAAc;"}
1
+ {"version":3,"file":"card-C2mdp-ur.mjs","sources":["../../../components/card/src/card-badge.tsx","../../../components/card/src/card-content.tsx","../../../components/card/src/card-content-container.tsx","../../../components/card/src/card-cta.tsx","../../../components/card/src/card-feature-list.tsx","../../../components/card/src/card-trigger-item.tsx","../../../components/card/src/card-heading.tsx","../../../components/card/src/card-media.tsx","../../../components/card/src/card-media-layout.tsx","../../../components/card/src/card-overline.tsx","../../../components/card/src/card-root.tsx","../../../components/card/src/card.tsx"],"sourcesContent":["import React from \"react\";\nimport { Badge, type BadgeVariant } from \"@purpur/badge\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-badge.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardBadgeProps = {\n /**\n * Use this to set a testid on the badge\n */\n [\"data-testid\"]?: string;\n /**\n * The variant (color) of the badge in the top right corner of the card. This is coupled with the text prop. Both needs to be set for the badge to be displayed.\n * `BadgeVariant = \"attention\" | \"special\" | \"neutral\" | \"information\" | \"success\" | \"warning\" | \"error\"`\n */\n variant?: BadgeVariant;\n /**\n * The text that will be in the badge in the top right corner of the card. This is coupled with the variant prop. Both needs to be set for the badge to be displayed.\n */\n text?: string;\n};\n\nconst rootClassName = \"purpur-card-badge\";\n\nexport const CardBadge = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-badge\",\n variant,\n text,\n}: CardBadgeProps) => {\n return variant && text ? (\n <Badge\n className={cx(rootClassName)}\n variant={variant}\n showIcon={false}\n data-testid={dataTestId}\n >\n {text}\n </Badge>\n ) : null;\n};\n","import React, { type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-content.module.scss\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-card-content\";\n\ntype CardContentProps = Omit<BaseProps, \"children\"> & {\n /**\n * The child elements of the content (React.ReactNode)\n */\n children: ReactNode;\n};\n\nexport const CardContent = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-content\",\n children,\n className,\n ...props\n}: CardContentProps) => {\n return (\n <div className={cx(rootClassName, className)} data-testid={dataTestId} {...props}>\n {children}\n </div>\n );\n};\n","import React, { type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-content-container.module.scss\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-card-content-container\";\n\ntype CardContentContainerProps = Omit<BaseProps, \"children\"> & {\n /**\n * The child elements of the content container (React.ReactNode)\n */\n children: ReactNode;\n /**\n * Flag to remove the top padding\n */\n isFooter?: boolean;\n fullHeight?: boolean;\n gapSize?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n};\n\nexport const CardContentContainer = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-content-container\",\n children,\n className,\n isFooter = false,\n fullHeight = false,\n gapSize = \"md\",\n ...props\n}: CardContentContainerProps) => (\n <div\n className={cx([\n rootClassName,\n className,\n `${rootClassName}--gap-size--${gapSize}`,\n {\n [`${rootClassName}--full-height`]: fullHeight,\n [`${rootClassName}--footer`]: isFooter,\n },\n ])}\n data-testid={dataTestId}\n {...props}\n >\n {children}\n </div>\n);\n","import React from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport { Spinner } from \"@purpur/spinner\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-cta.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardCtaProps = BaseProps & {\n disabled?: boolean;\n /**\n * The position of the icon.\n * `\"left\" | \"right\"`\n */\n iconPosition?: \"left\" | \"right\";\n loading?: boolean;\n /**\n * Use this to style the cta as a link (no border)\n */\n linkStyling?: boolean;\n text?: string;\n};\n\nconst rootClassName = \"purpur-card-cta\";\n\nexport const CardCta = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-cta\",\n className,\n children,\n disabled = false,\n iconPosition = \"right\",\n loading = false,\n text,\n linkStyling = false,\n ...props\n}: CardCtaProps) => {\n return (\n <div\n className={`${cx([\n rootClassName,\n className,\n\n {\n [`${rootClassName}--disabled`]: disabled,\n [`${rootClassName}--text`]: !!text,\n [`${rootClassName}--cta-styling`]: linkStyling,\n [`${rootClassName}--button-styling`]: !linkStyling,\n [`${rootClassName}--button-styling--md`]: !linkStyling,\n [`${rootClassName}--button-styling--secondary`]: !linkStyling,\n [`${rootClassName}--button-styling--icon-only`]: !linkStyling && !text,\n },\n ])} ${rootClassName}`}\n data-testid={dataTestId}\n {...props}\n >\n {!loading ? (\n <>\n {iconPosition === \"left\" && children}\n {text}\n {iconPosition === \"right\" && children}\n </>\n ) : (\n <Spinner data-testid={`${dataTestId}-spinner`} size=\"xs\" disabled={disabled} />\n )}\n </div>\n );\n};\n","import React from \"react\";\nimport { IconCheckmark } from \"@purpur/icon/checkmark\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-feature-list.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardFeatureListProps = {\n /**\n * Use this to set a testid on the feature list\n */\n [\"data-testid\"]?: string;\n /**\n * This is the feature list where each entry is preceded by a checkmark. If the feature list provided is falsy or empty nothing will be rendered.\n */\n listItems?: string[];\n};\n\nconst rootClassName = \"purpur-card-feature-list\";\n\nexport const CardFeatureList = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-feature-list\",\n listItems,\n}: CardFeatureListProps) => {\n return listItems && listItems.length > 0 ? (\n <ul className={cx(rootClassName)} data-testid={dataTestId}>\n {listItems.map((listItem: string) => (\n <li\n className={cx(`${rootClassName}__list-item`)}\n data-testid={`${dataTestId}-item`}\n key={listItem}\n >\n <IconCheckmark size=\"xs\" className={cx(`${rootClassName}__icon`)} />\n <Paragraph>{listItem}</Paragraph>\n </li>\n ))}\n </ul>\n ) : null;\n};\n","import React, {\n type AnchorHTMLAttributes,\n type ForwardRefExoticComponent,\n type MouseEvent,\n type ReactNode,\n} from \"react\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-trigger-item.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardTriggerItemProps = {\n [\"data-testid\"]?: string;\n [\"aria-label\"]?: string;\n disabled?: boolean;\n href?: string;\n onClick?: () => unknown;\n children: ReactNode;\n linkElement?: ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement>> | \"a\";\n};\n\nconst rootClassName = \"purpur-card-trigger-item\";\n\nexport const CardTriggerItem = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-trigger-item\",\n [\"aria-label\"]: ariaLabel,\n disabled = false,\n href,\n onClick,\n children,\n linkElement: LinkElement = \"a\",\n}: CardTriggerItemProps) => {\n const handleClick = (e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>): void => {\n if (disabled) {\n e.preventDefault();\n } else if (onClick) {\n onClick();\n }\n };\n\n const additionalNonHashedClasses = `${rootClassName} ${\n disabled ? `${rootClassName}--disabled` : \"\"\n }`;\n\n return href ? (\n <LinkElement\n aria-disabled={disabled}\n aria-label={ariaLabel}\n className={`${cx([\n rootClassName,\n `${rootClassName}--link`,\n {\n [`${rootClassName}--disabled`]: disabled,\n },\n ])} ${additionalNonHashedClasses}`}\n data-testid={dataTestId}\n href={disabled ? undefined : href}\n tabIndex={disabled ? 0 : undefined}\n onClick={handleClick}\n >\n {children}\n </LinkElement>\n ) : (\n <button\n aria-disabled={disabled}\n aria-label={ariaLabel}\n className={`${cx([\n rootClassName,\n `${rootClassName}--button`,\n {\n [`${rootClassName}--disabled`]: disabled,\n },\n ])} ${additionalNonHashedClasses}`}\n data-testid={dataTestId}\n type=\"button\"\n onClick={handleClick}\n >\n {children}\n </button>\n );\n};\n","import React, {\n type AnchorHTMLAttributes,\n type ForwardRefExoticComponent,\n type ReactNode,\n} from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport { Heading, type HeadingTagType,type HeadingVariant } from \"@purpur/heading\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-heading.module.scss\";\nimport { CardTriggerItem } from \"./card-trigger-item\";\n\nconst cx = c.bind(styles);\n\nexport type CardHeadingDefaultProps = {\n /**\n * Use this to set a testid on the feature list\n */\n [\"data-testid\"]?: string;\n title: string;\n /**\n * Use when you want an icon to the left of the title\n */\n icon?: ReactNode;\n /**\n * Use for the CTA, it will positioned to the right\n */\n children?: ReactNode;\n titleTag?: HeadingTagType;\n variant?: HeadingVariant;\n enableHyphenation?: boolean;\n};\n\nexport type CardHeadingNonInteractiveProps = {\n disabled?: never;\n href?: never;\n /**\n * If the href prop is not provided the clickable element will be a button and use this clickHandler when the user presses the card.\n */\n onClick?: never;\n linkElement?: never;\n};\n\nexport type CardHeadingLinkProps = {\n /**\n * Use this to disable the card. Can be used both with a link card and a button card. In the case of the button the clickHandler will not be called and if a anchor tag the href will be removed.\n */\n disabled?: boolean;\n /**\n * Makes the card become a link to the provided href.\n */\n href: string;\n /**\n * If the href prop is not provided the clickable element will be a button and use this clickHandler when the user presses the card.\n */\n onClick?: () => void;\n linkElement?: ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement>> | \"a\";\n};\n\nexport type CardHeadingButtonProps = {\n /**\n * Use this to disable the card. Can be used both with a link card and a button card. In the case of the button the clickHandler will not be called and if a anchor tag the href will be removed.\n */\n disabled?: boolean;\n /**\n * Makes the card become a link to the provided href.\n */\n href?: never;\n /**\n * If the href prop is not provided the clickable element will be a button and use this clickHandler when the user presses the card.\n */\n onClick: () => void;\n linkElement?: never;\n};\n\nexport type CardHeadingProps<T extends HeadingTagType = \"h2\"> = BaseProps<T> &\n CardHeadingDefaultProps;\n\nconst rootClassName = \"purpur-card-heading\";\n\nexport const CardHeading = <T extends HeadingTagType = \"h2\">({\n [\"data-testid\"]: dataTestId = \"purpur-card-heading\",\n [\"aria-label\"]: ariaLabel,\n title,\n icon,\n children,\n titleTag = \"h2\" as T,\n enableHyphenation,\n onClick = undefined,\n href = undefined,\n disabled = false,\n linkElement = \"a\",\n variant = \"title-100\",\n ...props\n}: CardHeadingProps &\n (CardHeadingLinkProps | CardHeadingButtonProps | CardHeadingNonInteractiveProps)) => {\n const classes = cx(rootClassName, {\n [`${rootClassName}--is-interactive`]: onClick || href,\n [`${rootClassName}--disabled`]: disabled,\n });\n\n return (\n <div className={classes} data-testid={dataTestId}>\n <div className={cx(`${rootClassName}__header`)}>\n {icon && <div className={cx(`${rootClassName}__icon`)}>{icon}</div>}\n <Heading\n tag={titleTag}\n className={cx(`${rootClassName}__heading`)}\n variant={variant}\n enableHyphenation={enableHyphenation}\n {...props}\n >\n {onClick || href ? (\n <CardTriggerItem\n aria-label={ariaLabel}\n disabled={disabled}\n href={href}\n onClick={onClick}\n linkElement={linkElement}\n >\n {title}\n </CardTriggerItem>\n ) : (\n title\n )}\n </Heading>\n </div>\n {children}\n </div>\n );\n};\n","import React from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-media.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardMediaProps = BaseProps;\n\nconst rootClassName = \"purpur-card-media\";\n\nexport const CardMedia = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-media\",\n className,\n children,\n ...props\n}: CardMediaProps) => (\n <div {...props} className={cx([rootClassName, className])} data-testid={dataTestId}>\n {children}\n </div>\n);\n","import React from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-media-layout.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardMediaLayoutProps = BaseProps & {\n imageTop?: boolean;\n};\n\nconst rootClassName = \"purpur-card-media-layout\";\n\nexport const CardMediaLayout = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-media-layout\",\n className,\n children,\n imageTop = false,\n ...props\n}: CardMediaLayoutProps) => (\n <div\n {...props}\n className={cx(rootClassName, className, { [`${rootClassName}--image-top`]: imageTop })}\n data-testid={dataTestId}\n >\n {children}\n </div>\n);\n","import React from \"react\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-overline.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardOverlineProps = {\n /**\n * Use this to set a testid on the overline\n */\n [\"data-testid\"]?: string;\n /**\n * The text displayed in the overline\n */\n overline?: string;\n};\n\nconst rootClassName = \"purpur-card-overline\";\n\nexport const CardOverline = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-overline\",\n overline,\n}: CardOverlineProps) => {\n return overline ? (\n <Paragraph variant=\"overline-100\" className={cx(rootClassName)} data-testid={dataTestId}>\n {overline}\n </Paragraph>\n ) : null;\n};\n","import React, { forwardRef, type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-root.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardRootProps = Omit<BaseProps, \"children\"> & {\n children: ReactNode;\n fullHeight?: boolean;\n /** Use the prop useMediaQueries when the cards are used beside each other in different sized grid items for example. */\n useMediaQueries?: boolean;\n variant?: \"primary\" | \"secondary\";\n};\n\nconst rootClassName = \"purpur-card-root\";\n\nexport const CardRoot = forwardRef<HTMLDivElement, CardRootProps>(\n (\n {\n [\"data-testid\"]: dataTestId = \"purpur-card-root\",\n children,\n className,\n fullHeight = true,\n variant,\n ...props\n },\n ref\n ) => {\n const classes = cx([\n rootClassName,\n {\n [`${rootClassName}--${variant}`]: variant,\n [`${rootClassName}--full-height`]: fullHeight,\n },\n className,\n ]);\n\n return (\n <div className={classes} data-testid={dataTestId} ref={ref} {...props}>\n {children}\n </div>\n );\n }\n);\n\nCardRoot.displayName = \"CardRoot\";\n","import React, { type FunctionComponent } from \"react\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card.module.scss\";\nimport { CardBadge } from \"./card-badge\";\nimport { CardContent } from \"./card-content\";\nimport { CardContentContainer } from \"./card-content-container\";\nimport { CardCta } from \"./card-cta\";\nimport { CardFeatureList } from \"./card-feature-list\";\nimport { CardHeading } from \"./card-heading\";\nimport { CardMedia } from \"./card-media\";\nimport { CardMediaLayout } from \"./card-media-layout\";\nimport { CardOverline } from \"./card-overline\";\nimport type { CardRootProps } from \"./card-root\";\nimport { CardRoot } from \"./card-root\";\nexport type {\n CardHeadingButtonProps,\n CardHeadingDefaultProps,\n CardHeadingLinkProps,\n CardHeadingNonInteractiveProps,\n} from \"./card-heading\";\n\nconst cx = c.bind(styles);\n\ntype CardCmp<P> = FunctionComponent<P> & {\n Badge: typeof CardBadge;\n Content: typeof CardContent;\n ContentContainer: typeof CardContentContainer;\n Cta: typeof CardCta;\n FeatureList: typeof CardFeatureList;\n Overline: typeof CardOverline;\n Heading: typeof CardHeading;\n Media: typeof CardMedia;\n MediaLayout: typeof CardMediaLayout;\n};\n\nexport type CardProps = CardRootProps;\n\nconst rootClassName = \"purpur-card\";\n\nexport const Card: CardCmp<CardProps> = ({ children, className, useMediaQueries, ...props }) => {\n const classes = cx([rootClassName, className]);\n return (\n <div\n className={cx(`${rootClassName}__container`, {\n [`${rootClassName}__container--full-height`]: props.fullHeight,\n [`${rootClassName}__container--use-container-queries`]: !useMediaQueries,\n [`${rootClassName}__container--use-media-queries`]: useMediaQueries,\n })}\n >\n <CardRoot className={cx(classes)} {...props}>\n {children}\n </CardRoot>\n </div>\n );\n};\n\nCard.Badge = CardBadge;\nCard.Content = CardContent;\nCard.ContentContainer = CardContentContainer;\nCard.Cta = CardCta;\nCard.FeatureList = CardFeatureList;\nCard.Overline = CardOverline;\nCard.Heading = CardHeading;\nCard.Media = CardMedia;\nCard.MediaLayout = CardMediaLayout;\n\nCard.displayName = \"Card\";\n"],"names":["cx","c","styles","rootClassName","CardBadge","dataTestId","variant","text","jsx","Badge","CardContent","children","className","props","CardContentContainer","isFooter","fullHeight","gapSize","CardCta","disabled","iconPosition","loading","linkStyling","Spinner","jsxs","Fragment","CardFeatureList","listItems","listItem","IconCheckmark","Paragraph","CardTriggerItem","ariaLabel","href","onClick","LinkElement","handleClick","e","additionalNonHashedClasses","CardHeading","title","icon","titleTag","enableHyphenation","linkElement","classes","Heading","CardMedia","CardMediaLayout","imageTop","CardOverline","overline","CardRoot","forwardRef","ref","Card","useMediaQueries"],"mappings":";;;;;;;;;;;;;;;GAMMA,IAAKC,EAAE,KAAKC,CAAM,GAkBlBC,IAAgB,qBAETC,IAAY,CAAC;AAAA,EACxB,CAAC,gBAAgBC,IAAa;AAAA,EAC9B,SAAAC;AAAA,EACA,MAAAC;AACF,MACSD,KAAWC,IAChB,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,WAAWT,EAAGG,CAAa;AAAA,IAC3B,SAAAG;AAAA,IACA,UAAU;AAAA,IACV,eAAaD;AAAA,IAEZ,UAAAE;AAAA,EAAA;AAAA,IAED;;GClCAP,IAAKC,EAAE,KAAKC,CAAM,GAElBC,IAAgB,uBASTO,IAAc,CAAC;AAAA,EAC1B,CAAC,gBAAgBL,IAAa;AAAA,EAC9B,UAAAM;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,MAEI,gBAAAL,EAAC,OAAA,EAAI,WAAWR,EAAGG,GAAeS,CAAS,GAAG,eAAaP,GAAa,GAAGQ,GACxE,UAAAF,EAAA,CACH;;;;;;;;GCpBEX,IAAKC,EAAE,KAAKC,CAAM,GAElBC,IAAgB,iCAeTW,IAAuB,CAAC;AAAA,EACnC,CAAC,gBAAgBT,IAAa;AAAA,EAC9B,UAAAM;AAAA,EACA,WAAAC;AAAA,EACA,UAAAG,IAAW;AAAA,EACX,YAAAC,IAAa;AAAA,EACb,SAAAC,IAAU;AAAA,EACV,GAAGJ;AACL,MACE,gBAAAL;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWR,EAAG;AAAA,MACZG;AAAAA,MACAS;AAAA,MACA,GAAGT,CAAa,eAAec,CAAO;AAAA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AA;AAAA,MACC,WAAWR,EAAG,GAAGG,CAAa,eAAe;AAAA,QAC3C,CAAC,GAAGA,CAAa,0BAA0B,GAAGU,EAAM;AAAA,QACpD,CAAC,GAAGV,CAAa,oCAAoC,GAAG,CAACqD;AAAA,QACzD,CAAC,GAAGrD,CAAa,gCAAgC,GAAGqD;AAAA,MAAA,CACrD;AAAA,MAED,UAAA,gBAAAhD,EAAC4C,KAAS,WAAWpD,EAAG6C,CAAO,GAAI,GAAGhC,GACnC,UAAAF,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN;AAEA4C,EAAK,QAAQnD;AACbmD,EAAK,UAAU7C;AACf6C,EAAK,mBAAmBzC;AACxByC,EAAK,MAAMrC;AACXqC,EAAK,cAAc7B;AACnB6B,EAAK,WAAWL;AAChBK,EAAK,UAAUhB;AACfgB,EAAK,QAAQR;AACbQ,EAAK,cAAcP;AAEnBO,EAAK,cAAc;"}
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("react/jsx-runtime"),s=require("./bind-DeUYJ6m9.js"),R=require("./badge-CQ0SS_t8.js"),B=require("./spinner-tKunS_o-.js"),F=require("./checkmark.es-lYntWFA3.js"),j=require("./paragraph-BsI53OR0.js"),L=require("./heading-drD5ugCC.js"),M=require("react"),O={"purpur-card__container--full-height":"_purpur-card__container--full-height_1a0g7_1","purpur-card__container--use-container-queries":"_purpur-card__container--use-container-queries_1a0g7_4","purpur-card":"_purpur-card_1a0g7_1","purpur-card__container--use-media-queries":"_purpur-card__container--use-media-queries_1a0g7_25"},D={"purpur-card-badge":"_purpur-card-badge_k9ziu_1"},E=s.c.bind(D),P="purpur-card-badge",A=({["data-testid"]:a="purpur-card-badge",variant:t,text:r})=>t&&r?e.jsx(R.Badge,{className:E(P),variant:t,showIcon:!1,"data-testid":a,children:r}):null,G={"purpur-card-content":"_purpur-card-content_2uc00_1"},J=s.c.bind(G),K="purpur-card-content",U=({["data-testid"]:a="purpur-card-content",children:t,className:r,...u})=>e.jsx("div",{className:J(K,r),"data-testid":a,...u,children:t}),V={"purpur-card-content-container":"_purpur-card-content-container_1soww_1","purpur-card-content-container--full-height":"_purpur-card-content-container--full-height_1soww_6","purpur-card-content-container--footer":"_purpur-card-content-container--footer_1soww_31","purpur-card-content-container--gap-size--sm":"_purpur-card-content-container--gap-size--sm_1soww_46","purpur-card-content-container--gap-size--md":"_purpur-card-content-container--gap-size--md_1soww_49","purpur-card-content-container--gap-size--lg":"_purpur-card-content-container--gap-size--lg_1soww_52","purpur-card-content-container--gap-size--xl":"_purpur-card-content-container--gap-size--xl_1soww_55"},W=s.c.bind(V),$="purpur-card-content-container",X=({["data-testid"]:a="purpur-card-content-container",children:t,className:r,isFooter:u=!1,fullHeight:c=!1,gapSize:i="md",...p})=>e.jsx("div",{className:W([$,r,`${$}--gap-size--${i}`,{[`${$}--full-height`]:c,[`${$}--footer`]:u}]),"data-testid":a,...p,children:t}),Y={"purpur-card-cta--button-styling":"_purpur-card-cta--button-styling_pwqk1_1","purpur-card-cta--button-styling--xs":"_purpur-card-cta--button-styling--xs_pwqk1_23","purpur-card-cta--button-styling--icon-only":"_purpur-card-cta--button-styling--icon-only_pwqk1_26","purpur-card-cta--button-styling--sm":"_purpur-card-cta--button-styling--sm_pwqk1_29","purpur-card-cta--button-styling--md":"_purpur-card-cta--button-styling--md_pwqk1_35","purpur-card-cta--button-styling--lg":"_purpur-card-cta--button-styling--lg_pwqk1_41","purpur-card-cta--button-styling--full-width":"_purpur-card-cta--button-styling--full-width_pwqk1_47","purpur-card-cta--button-styling--primary":"_purpur-card-cta--button-styling--primary_pwqk1_65","purpur-card-cta--button-styling--disabled":"_purpur-card-cta--button-styling--disabled_pwqk1_69","purpur-card-cta--button-styling--primary-negative":"_purpur-card-cta--button-styling--primary-negative_pwqk1_75","purpur-card-cta--button-styling--secondary":"_purpur-card-cta--button-styling--secondary_pwqk1_87","purpur-card-cta--button-styling--secondary-negative":"_purpur-card-cta--button-styling--secondary-negative_pwqk1_98","purpur-card-cta--button-styling--expressive":"_purpur-card-cta--button-styling--expressive_pwqk1_109","purpur-card-cta--button-styling--expressive-negative":"_purpur-card-cta--button-styling--expressive-negative_pwqk1_119","purpur-card-cta--cta-styling":"_purpur-card-cta--cta-styling_pwqk1_131","purpur-card-cta--secondary":"_purpur-card-cta--secondary_pwqk1_136","purpur-card-cta--disabled":"_purpur-card-cta--disabled_pwqk1_136","purpur-card-cta--text":"_purpur-card-cta--text_pwqk1_144"},Z=s.c.bind(Y),o="purpur-card-cta",Q=({["data-testid"]:a="purpur-card-cta",className:t,children:r,disabled:u=!1,iconPosition:c="right",loading:i=!1,text:p,linkStyling:n=!1,..._})=>e.jsx("div",{className:`${Z([o,t,{[`${o}--disabled`]:u,[`${o}--text`]:!!p,[`${o}--cta-styling`]:n,[`${o}--button-styling`]:!n,[`${o}--button-styling--md`]:!n,[`${o}--button-styling--secondary`]:!n,[`${o}--button-styling--icon-only`]:!n&&!p}])} ${o}`,"data-testid":a,..._,children:i?e.jsx(B.Spinner,{"data-testid":`${a}-spinner`,size:"xs",disabled:u}):e.jsxs(e.Fragment,{children:[c==="left"&&r,p,c==="right"&&r]})}),T={"purpur-card-feature-list":"_purpur-card-feature-list_1hnss_1","purpur-card-feature-list__list-item":"_purpur-card-feature-list__list-item_1hnss_7","purpur-card-feature-list__icon":"_purpur-card-feature-list__icon_1hnss_12"},h=s.c.bind(T),x="purpur-card-feature-list",I=({["data-testid"]:a="purpur-card-feature-list",listItems:t})=>t&&t.length>0?e.jsx("ul",{className:h(x),"data-testid":a,children:t.map(r=>e.jsxs("li",{className:h(`${x}__list-item`),"data-testid":`${a}-item`,children:[e.jsx(F.a,{size:"xs",className:h(`${x}__icon`)}),e.jsx(j.Paragraph,{children:r})]},r))}):null,S={"purpur-card-heading":"_purpur-card-heading_j3j6u_1","purpur-card-heading__header":"_purpur-card-heading__header_j3j6u_6","purpur-card-heading__heading":"_purpur-card-heading__heading_j3j6u_11","purpur-card-heading__icon":"_purpur-card-heading__icon_j3j6u_14"},rr={"purpur-card-trigger-item--link":"_purpur-card-trigger-item--link_t6ena_1","purpur-card-trigger-item--button":"_purpur-card-trigger-item--button_t6ena_5","purpur-card-trigger-item--disabled":"_purpur-card-trigger-item--disabled_t6ena_18","purpur-card-trigger-item":"_purpur-card-trigger-item_t6ena_1"},C=s.c.bind(rr),l="purpur-card-trigger-item",tr=({["data-testid"]:a="purpur-card-trigger-item",["aria-label"]:t,disabled:r=!1,href:u,onClick:c,children:i,linkElement:p="a"})=>{const n=y=>{r?y.preventDefault():c&&c()},_=`${l} ${r?`${l}--disabled`:""}`;return u?e.jsx(p,{"aria-disabled":r,"aria-label":t,className:`${C([l,`${l}--link`,{[`${l}--disabled`]:r}])} ${_}`,"data-testid":a,href:r?void 0:u,tabIndex:r?0:void 0,onClick:n,children:i}):e.jsx("button",{"aria-disabled":r,"aria-label":t,className:`${C([l,`${l}--button`,{[`${l}--disabled`]:r}])} ${_}`,"data-testid":a,type:"button",onClick:n,children:i})},b=s.c.bind(S),g="purpur-card-heading",ar=({["data-testid"]:a="purpur-card-heading",["aria-label"]:t,title:r,icon:u,children:c,titleTag:i="h2",enableHyphenation:p,onClick:n=void 0,href:_=void 0,disabled:y=!1,linkElement:v="a",variant:k="title-100",...z})=>{const H=b(g,{[`${g}--is-interactive`]:n||_,[`${g}--disabled`]:y});return e.jsxs("div",{className:H,"data-testid":a,children:[e.jsxs("div",{className:b(`${g}__header`),children:[u&&e.jsx("div",{className:b(`${g}__icon`),children:u}),e.jsx(L.Heading,{tag:i,className:b(`${g}__heading`),variant:k,enableHyphenation:p,...z,children:n||_?e.jsx(tr,{"aria-label":t,disabled:y,href:_,onClick:n,linkElement:v,children:r}):r})]}),c]})},er={"purpur-card-media":"_purpur-card-media_1om4o_1"},ur=s.c.bind(er),cr="purpur-card-media",nr=({["data-testid"]:a="purpur-card-media",className:t,children:r,...u})=>e.jsx("div",{...u,className:ur([cr,t]),"data-testid":a,children:r}),sr={"purpur-card-media-layout":"_purpur-card-media-layout_1c4sy_1","purpur-card-media-layout--image-top":"_purpur-card-media-layout--image-top_1c4sy_11"},pr=s.c.bind(sr),N="purpur-card-media-layout",dr=({["data-testid"]:a="purpur-card-media-layout",className:t,children:r,imageTop:u=!1,...c})=>e.jsx("div",{...c,className:pr(N,t,{[`${N}--image-top`]:u}),"data-testid":a,children:r}),ir={"purpur-card-overline":"_purpur-card-overline_qhfj0_1"},or=s.c.bind(ir),_r="purpur-card-overline",lr=({["data-testid"]:a="purpur-card-overline",overline:t})=>t?e.jsx(j.Paragraph,{variant:"overline-100",className:or(_r),"data-testid":a,children:t}):null,gr={"purpur-card-root":"_purpur-card-root_eupww_1","purpur-card-root--primary":"_purpur-card-root--primary_eupww_7","purpur-card-root--secondary":"_purpur-card-root--secondary_eupww_10","purpur-card-root--full-height":"_purpur-card-root--full-height_eupww_13"},mr=s.c.bind(gr),w="purpur-card-root",q=M.forwardRef(({["data-testid"]:a="purpur-card-root",children:t,className:r,fullHeight:u=!0,variant:c,...i},p)=>{const n=mr([w,{[`${w}--${c}`]:c,[`${w}--full-height`]:u},r]);return e.jsx("div",{className:n,"data-testid":a,ref:p,...i,children:t})});q.displayName="CardRoot";const f=s.c.bind(O),m="purpur-card",d=({children:a,className:t,useMediaQueries:r,...u})=>{const c=f([m,t]);return e.jsx("div",{className:f(`${m}__container`,{[`${m}__container--full-height`]:u.fullHeight,[`${m}__container--use-container-queries`]:!r,[`${m}__container--use-media-queries`]:r}),children:e.jsx(q,{className:f(c),...u,children:a})})};d.Badge=A;d.Content=U;d.ContentContainer=X;d.Cta=Q;d.FeatureList=I;d.Overline=lr;d.Heading=ar;d.Media=nr;d.MediaLayout=dr;d.displayName="Card";exports.Card=d;
2
- //# sourceMappingURL=card-CRHXm5NR.js.map
1
+ "use strict";const e=require("react/jsx-runtime"),s=require("./bind-DeUYJ6m9.js"),R=require("./badge-CQ0SS_t8.js"),B=require("./spinner-tKunS_o-.js"),F=require("./checkmark.es-lYntWFA3.js"),j=require("./paragraph-By4jMjnH.js"),L=require("./heading-drD5ugCC.js"),M=require("react"),O={"purpur-card__container--full-height":"_purpur-card__container--full-height_1a0g7_1","purpur-card__container--use-container-queries":"_purpur-card__container--use-container-queries_1a0g7_4","purpur-card":"_purpur-card_1a0g7_1","purpur-card__container--use-media-queries":"_purpur-card__container--use-media-queries_1a0g7_25"},D={"purpur-card-badge":"_purpur-card-badge_k9ziu_1"},E=s.c.bind(D),P="purpur-card-badge",A=({["data-testid"]:a="purpur-card-badge",variant:t,text:r})=>t&&r?e.jsx(R.Badge,{className:E(P),variant:t,showIcon:!1,"data-testid":a,children:r}):null,G={"purpur-card-content":"_purpur-card-content_2uc00_1"},J=s.c.bind(G),K="purpur-card-content",U=({["data-testid"]:a="purpur-card-content",children:t,className:r,...u})=>e.jsx("div",{className:J(K,r),"data-testid":a,...u,children:t}),V={"purpur-card-content-container":"_purpur-card-content-container_1soww_1","purpur-card-content-container--full-height":"_purpur-card-content-container--full-height_1soww_6","purpur-card-content-container--footer":"_purpur-card-content-container--footer_1soww_31","purpur-card-content-container--gap-size--sm":"_purpur-card-content-container--gap-size--sm_1soww_46","purpur-card-content-container--gap-size--md":"_purpur-card-content-container--gap-size--md_1soww_49","purpur-card-content-container--gap-size--lg":"_purpur-card-content-container--gap-size--lg_1soww_52","purpur-card-content-container--gap-size--xl":"_purpur-card-content-container--gap-size--xl_1soww_55"},W=s.c.bind(V),$="purpur-card-content-container",X=({["data-testid"]:a="purpur-card-content-container",children:t,className:r,isFooter:u=!1,fullHeight:c=!1,gapSize:i="md",...p})=>e.jsx("div",{className:W([$,r,`${$}--gap-size--${i}`,{[`${$}--full-height`]:c,[`${$}--footer`]:u}]),"data-testid":a,...p,children:t}),Y={"purpur-card-cta--button-styling":"_purpur-card-cta--button-styling_pwqk1_1","purpur-card-cta--button-styling--xs":"_purpur-card-cta--button-styling--xs_pwqk1_23","purpur-card-cta--button-styling--icon-only":"_purpur-card-cta--button-styling--icon-only_pwqk1_26","purpur-card-cta--button-styling--sm":"_purpur-card-cta--button-styling--sm_pwqk1_29","purpur-card-cta--button-styling--md":"_purpur-card-cta--button-styling--md_pwqk1_35","purpur-card-cta--button-styling--lg":"_purpur-card-cta--button-styling--lg_pwqk1_41","purpur-card-cta--button-styling--full-width":"_purpur-card-cta--button-styling--full-width_pwqk1_47","purpur-card-cta--button-styling--primary":"_purpur-card-cta--button-styling--primary_pwqk1_65","purpur-card-cta--button-styling--disabled":"_purpur-card-cta--button-styling--disabled_pwqk1_69","purpur-card-cta--button-styling--primary-negative":"_purpur-card-cta--button-styling--primary-negative_pwqk1_75","purpur-card-cta--button-styling--secondary":"_purpur-card-cta--button-styling--secondary_pwqk1_87","purpur-card-cta--button-styling--secondary-negative":"_purpur-card-cta--button-styling--secondary-negative_pwqk1_98","purpur-card-cta--button-styling--expressive":"_purpur-card-cta--button-styling--expressive_pwqk1_109","purpur-card-cta--button-styling--expressive-negative":"_purpur-card-cta--button-styling--expressive-negative_pwqk1_119","purpur-card-cta--cta-styling":"_purpur-card-cta--cta-styling_pwqk1_131","purpur-card-cta--secondary":"_purpur-card-cta--secondary_pwqk1_136","purpur-card-cta--disabled":"_purpur-card-cta--disabled_pwqk1_136","purpur-card-cta--text":"_purpur-card-cta--text_pwqk1_144"},Z=s.c.bind(Y),o="purpur-card-cta",Q=({["data-testid"]:a="purpur-card-cta",className:t,children:r,disabled:u=!1,iconPosition:c="right",loading:i=!1,text:p,linkStyling:n=!1,..._})=>e.jsx("div",{className:`${Z([o,t,{[`${o}--disabled`]:u,[`${o}--text`]:!!p,[`${o}--cta-styling`]:n,[`${o}--button-styling`]:!n,[`${o}--button-styling--md`]:!n,[`${o}--button-styling--secondary`]:!n,[`${o}--button-styling--icon-only`]:!n&&!p}])} ${o}`,"data-testid":a,..._,children:i?e.jsx(B.Spinner,{"data-testid":`${a}-spinner`,size:"xs",disabled:u}):e.jsxs(e.Fragment,{children:[c==="left"&&r,p,c==="right"&&r]})}),T={"purpur-card-feature-list":"_purpur-card-feature-list_1hnss_1","purpur-card-feature-list__list-item":"_purpur-card-feature-list__list-item_1hnss_7","purpur-card-feature-list__icon":"_purpur-card-feature-list__icon_1hnss_12"},h=s.c.bind(T),x="purpur-card-feature-list",I=({["data-testid"]:a="purpur-card-feature-list",listItems:t})=>t&&t.length>0?e.jsx("ul",{className:h(x),"data-testid":a,children:t.map(r=>e.jsxs("li",{className:h(`${x}__list-item`),"data-testid":`${a}-item`,children:[e.jsx(F.a,{size:"xs",className:h(`${x}__icon`)}),e.jsx(j.Paragraph,{children:r})]},r))}):null,S={"purpur-card-heading":"_purpur-card-heading_j3j6u_1","purpur-card-heading__header":"_purpur-card-heading__header_j3j6u_6","purpur-card-heading__heading":"_purpur-card-heading__heading_j3j6u_11","purpur-card-heading__icon":"_purpur-card-heading__icon_j3j6u_14"},rr={"purpur-card-trigger-item--link":"_purpur-card-trigger-item--link_t6ena_1","purpur-card-trigger-item--button":"_purpur-card-trigger-item--button_t6ena_5","purpur-card-trigger-item--disabled":"_purpur-card-trigger-item--disabled_t6ena_18","purpur-card-trigger-item":"_purpur-card-trigger-item_t6ena_1"},C=s.c.bind(rr),l="purpur-card-trigger-item",tr=({["data-testid"]:a="purpur-card-trigger-item",["aria-label"]:t,disabled:r=!1,href:u,onClick:c,children:i,linkElement:p="a"})=>{const n=y=>{r?y.preventDefault():c&&c()},_=`${l} ${r?`${l}--disabled`:""}`;return u?e.jsx(p,{"aria-disabled":r,"aria-label":t,className:`${C([l,`${l}--link`,{[`${l}--disabled`]:r}])} ${_}`,"data-testid":a,href:r?void 0:u,tabIndex:r?0:void 0,onClick:n,children:i}):e.jsx("button",{"aria-disabled":r,"aria-label":t,className:`${C([l,`${l}--button`,{[`${l}--disabled`]:r}])} ${_}`,"data-testid":a,type:"button",onClick:n,children:i})},b=s.c.bind(S),g="purpur-card-heading",ar=({["data-testid"]:a="purpur-card-heading",["aria-label"]:t,title:r,icon:u,children:c,titleTag:i="h2",enableHyphenation:p,onClick:n=void 0,href:_=void 0,disabled:y=!1,linkElement:v="a",variant:k="title-100",...z})=>{const H=b(g,{[`${g}--is-interactive`]:n||_,[`${g}--disabled`]:y});return e.jsxs("div",{className:H,"data-testid":a,children:[e.jsxs("div",{className:b(`${g}__header`),children:[u&&e.jsx("div",{className:b(`${g}__icon`),children:u}),e.jsx(L.Heading,{tag:i,className:b(`${g}__heading`),variant:k,enableHyphenation:p,...z,children:n||_?e.jsx(tr,{"aria-label":t,disabled:y,href:_,onClick:n,linkElement:v,children:r}):r})]}),c]})},er={"purpur-card-media":"_purpur-card-media_1om4o_1"},ur=s.c.bind(er),cr="purpur-card-media",nr=({["data-testid"]:a="purpur-card-media",className:t,children:r,...u})=>e.jsx("div",{...u,className:ur([cr,t]),"data-testid":a,children:r}),sr={"purpur-card-media-layout":"_purpur-card-media-layout_1c4sy_1","purpur-card-media-layout--image-top":"_purpur-card-media-layout--image-top_1c4sy_11"},pr=s.c.bind(sr),N="purpur-card-media-layout",dr=({["data-testid"]:a="purpur-card-media-layout",className:t,children:r,imageTop:u=!1,...c})=>e.jsx("div",{...c,className:pr(N,t,{[`${N}--image-top`]:u}),"data-testid":a,children:r}),ir={"purpur-card-overline":"_purpur-card-overline_qhfj0_1"},or=s.c.bind(ir),_r="purpur-card-overline",lr=({["data-testid"]:a="purpur-card-overline",overline:t})=>t?e.jsx(j.Paragraph,{variant:"overline-100",className:or(_r),"data-testid":a,children:t}):null,gr={"purpur-card-root":"_purpur-card-root_eupww_1","purpur-card-root--primary":"_purpur-card-root--primary_eupww_7","purpur-card-root--secondary":"_purpur-card-root--secondary_eupww_10","purpur-card-root--full-height":"_purpur-card-root--full-height_eupww_13"},mr=s.c.bind(gr),w="purpur-card-root",q=M.forwardRef(({["data-testid"]:a="purpur-card-root",children:t,className:r,fullHeight:u=!0,variant:c,...i},p)=>{const n=mr([w,{[`${w}--${c}`]:c,[`${w}--full-height`]:u},r]);return e.jsx("div",{className:n,"data-testid":a,ref:p,...i,children:t})});q.displayName="CardRoot";const f=s.c.bind(O),m="purpur-card",d=({children:a,className:t,useMediaQueries:r,...u})=>{const c=f([m,t]);return e.jsx("div",{className:f(`${m}__container`,{[`${m}__container--full-height`]:u.fullHeight,[`${m}__container--use-container-queries`]:!r,[`${m}__container--use-media-queries`]:r}),children:e.jsx(q,{className:f(c),...u,children:a})})};d.Badge=A;d.Content=U;d.ContentContainer=X;d.Cta=Q;d.FeatureList=I;d.Overline=lr;d.Heading=ar;d.Media=nr;d.MediaLayout=dr;d.displayName="Card";exports.Card=d;
2
+ //# sourceMappingURL=card-DFdUs5RG.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"card-CRHXm5NR.js","sources":["../../../components/card/src/card-badge.tsx","../../../components/card/src/card-content.tsx","../../../components/card/src/card-content-container.tsx","../../../components/card/src/card-cta.tsx","../../../components/card/src/card-feature-list.tsx","../../../components/card/src/card-trigger-item.tsx","../../../components/card/src/card-heading.tsx","../../../components/card/src/card-media.tsx","../../../components/card/src/card-media-layout.tsx","../../../components/card/src/card-overline.tsx","../../../components/card/src/card-root.tsx","../../../components/card/src/card.tsx"],"sourcesContent":["import React from \"react\";\nimport { Badge, type BadgeVariant } from \"@purpur/badge\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-badge.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardBadgeProps = {\n /**\n * Use this to set a testid on the badge\n */\n [\"data-testid\"]?: string;\n /**\n * The variant (color) of the badge in the top right corner of the card. This is coupled with the text prop. Both needs to be set for the badge to be displayed.\n * `BadgeVariant = \"attention\" | \"special\" | \"neutral\" | \"information\" | \"success\" | \"warning\" | \"error\"`\n */\n variant?: BadgeVariant;\n /**\n * The text that will be in the badge in the top right corner of the card. This is coupled with the variant prop. Both needs to be set for the badge to be displayed.\n */\n text?: string;\n};\n\nconst rootClassName = \"purpur-card-badge\";\n\nexport const CardBadge = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-badge\",\n variant,\n text,\n}: CardBadgeProps) => {\n return variant && text ? (\n <Badge\n className={cx(rootClassName)}\n variant={variant}\n showIcon={false}\n data-testid={dataTestId}\n >\n {text}\n </Badge>\n ) : null;\n};\n","import React, { type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-content.module.scss\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-card-content\";\n\ntype CardContentProps = Omit<BaseProps, \"children\"> & {\n /**\n * The child elements of the content (React.ReactNode)\n */\n children: ReactNode;\n};\n\nexport const CardContent = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-content\",\n children,\n className,\n ...props\n}: CardContentProps) => {\n return (\n <div className={cx(rootClassName, className)} data-testid={dataTestId} {...props}>\n {children}\n </div>\n );\n};\n","import React, { type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-content-container.module.scss\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-card-content-container\";\n\ntype CardContentContainerProps = Omit<BaseProps, \"children\"> & {\n /**\n * The child elements of the content container (React.ReactNode)\n */\n children: ReactNode;\n /**\n * Flag to remove the top padding\n */\n isFooter?: boolean;\n fullHeight?: boolean;\n gapSize?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n};\n\nexport const CardContentContainer = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-content-container\",\n children,\n className,\n isFooter = false,\n fullHeight = false,\n gapSize = \"md\",\n ...props\n}: CardContentContainerProps) => (\n <div\n className={cx([\n rootClassName,\n className,\n `${rootClassName}--gap-size--${gapSize}`,\n {\n [`${rootClassName}--full-height`]: fullHeight,\n [`${rootClassName}--footer`]: isFooter,\n },\n ])}\n data-testid={dataTestId}\n {...props}\n >\n {children}\n </div>\n);\n","import React from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport { Spinner } from \"@purpur/spinner\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-cta.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardCtaProps = BaseProps & {\n disabled?: boolean;\n /**\n * The position of the icon.\n * `\"left\" | \"right\"`\n */\n iconPosition?: \"left\" | \"right\";\n loading?: boolean;\n /**\n * Use this to style the cta as a link (no border)\n */\n linkStyling?: boolean;\n text?: string;\n};\n\nconst rootClassName = \"purpur-card-cta\";\n\nexport const CardCta = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-cta\",\n className,\n children,\n disabled = false,\n iconPosition = \"right\",\n loading = false,\n text,\n linkStyling = false,\n ...props\n}: CardCtaProps) => {\n return (\n <div\n className={`${cx([\n rootClassName,\n className,\n\n {\n [`${rootClassName}--disabled`]: disabled,\n [`${rootClassName}--text`]: !!text,\n [`${rootClassName}--cta-styling`]: linkStyling,\n [`${rootClassName}--button-styling`]: !linkStyling,\n [`${rootClassName}--button-styling--md`]: !linkStyling,\n [`${rootClassName}--button-styling--secondary`]: !linkStyling,\n [`${rootClassName}--button-styling--icon-only`]: !linkStyling && !text,\n },\n ])} ${rootClassName}`}\n data-testid={dataTestId}\n {...props}\n >\n {!loading ? (\n <>\n {iconPosition === \"left\" && children}\n {text}\n {iconPosition === \"right\" && children}\n </>\n ) : (\n <Spinner data-testid={`${dataTestId}-spinner`} size=\"xs\" disabled={disabled} />\n )}\n </div>\n );\n};\n","import React from \"react\";\nimport { IconCheckmark } from \"@purpur/icon/checkmark\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-feature-list.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardFeatureListProps = {\n /**\n * Use this to set a testid on the feature list\n */\n [\"data-testid\"]?: string;\n /**\n * This is the feature list where each entry is preceded by a checkmark. If the feature list provided is falsy or empty nothing will be rendered.\n */\n listItems?: string[];\n};\n\nconst rootClassName = \"purpur-card-feature-list\";\n\nexport const CardFeatureList = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-feature-list\",\n listItems,\n}: CardFeatureListProps) => {\n return listItems && listItems.length > 0 ? (\n <ul className={cx(rootClassName)} data-testid={dataTestId}>\n {listItems.map((listItem: string) => (\n <li\n className={cx(`${rootClassName}__list-item`)}\n data-testid={`${dataTestId}-item`}\n key={listItem}\n >\n <IconCheckmark size=\"xs\" className={cx(`${rootClassName}__icon`)} />\n <Paragraph>{listItem}</Paragraph>\n </li>\n ))}\n </ul>\n ) : null;\n};\n","import React, {\n type AnchorHTMLAttributes,\n type ForwardRefExoticComponent,\n type MouseEvent,\n type ReactNode,\n} from \"react\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-trigger-item.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardTriggerItemProps = {\n [\"data-testid\"]?: string;\n [\"aria-label\"]?: string;\n disabled?: boolean;\n href?: string;\n onClick?: () => unknown;\n children: ReactNode;\n linkElement?: ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement>> | \"a\";\n};\n\nconst rootClassName = \"purpur-card-trigger-item\";\n\nexport const CardTriggerItem = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-trigger-item\",\n [\"aria-label\"]: ariaLabel,\n disabled = false,\n href,\n onClick,\n children,\n linkElement: LinkElement = \"a\",\n}: CardTriggerItemProps) => {\n const handleClick = (e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>): void => {\n if (disabled) {\n e.preventDefault();\n } else if (onClick) {\n onClick();\n }\n };\n\n const additionalNonHashedClasses = `${rootClassName} ${\n disabled ? `${rootClassName}--disabled` : \"\"\n }`;\n\n return href ? (\n <LinkElement\n aria-disabled={disabled}\n aria-label={ariaLabel}\n className={`${cx([\n rootClassName,\n `${rootClassName}--link`,\n {\n [`${rootClassName}--disabled`]: disabled,\n },\n ])} ${additionalNonHashedClasses}`}\n data-testid={dataTestId}\n href={disabled ? undefined : href}\n tabIndex={disabled ? 0 : undefined}\n onClick={handleClick}\n >\n {children}\n </LinkElement>\n ) : (\n <button\n aria-disabled={disabled}\n aria-label={ariaLabel}\n className={`${cx([\n rootClassName,\n `${rootClassName}--button`,\n {\n [`${rootClassName}--disabled`]: disabled,\n },\n ])} ${additionalNonHashedClasses}`}\n data-testid={dataTestId}\n type=\"button\"\n onClick={handleClick}\n >\n {children}\n </button>\n );\n};\n","import React, {\n type AnchorHTMLAttributes,\n type ForwardRefExoticComponent,\n type ReactNode,\n} from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport { Heading, type HeadingTagType,type HeadingVariant } from \"@purpur/heading\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-heading.module.scss\";\nimport { CardTriggerItem } from \"./card-trigger-item\";\n\nconst cx = c.bind(styles);\n\nexport type CardHeadingDefaultProps = {\n /**\n * Use this to set a testid on the feature list\n */\n [\"data-testid\"]?: string;\n title: string;\n /**\n * Use when you want an icon to the left of the title\n */\n icon?: ReactNode;\n /**\n * Use for the CTA, it will positioned to the right\n */\n children?: ReactNode;\n titleTag?: HeadingTagType;\n variant?: HeadingVariant;\n enableHyphenation?: boolean;\n};\n\nexport type CardHeadingNonInteractiveProps = {\n disabled?: never;\n href?: never;\n /**\n * If the href prop is not provided the clickable element will be a button and use this clickHandler when the user presses the card.\n */\n onClick?: never;\n linkElement?: never;\n};\n\nexport type CardHeadingLinkProps = {\n /**\n * Use this to disable the card. Can be used both with a link card and a button card. In the case of the button the clickHandler will not be called and if a anchor tag the href will be removed.\n */\n disabled?: boolean;\n /**\n * Makes the card become a link to the provided href.\n */\n href: string;\n /**\n * If the href prop is not provided the clickable element will be a button and use this clickHandler when the user presses the card.\n */\n onClick?: () => void;\n linkElement?: ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement>> | \"a\";\n};\n\nexport type CardHeadingButtonProps = {\n /**\n * Use this to disable the card. Can be used both with a link card and a button card. In the case of the button the clickHandler will not be called and if a anchor tag the href will be removed.\n */\n disabled?: boolean;\n /**\n * Makes the card become a link to the provided href.\n */\n href?: never;\n /**\n * If the href prop is not provided the clickable element will be a button and use this clickHandler when the user presses the card.\n */\n onClick: () => void;\n linkElement?: never;\n};\n\nexport type CardHeadingProps<T extends HeadingTagType = \"h2\"> = BaseProps<T> &\n CardHeadingDefaultProps;\n\nconst rootClassName = \"purpur-card-heading\";\n\nexport const CardHeading = <T extends HeadingTagType = \"h2\">({\n [\"data-testid\"]: dataTestId = \"purpur-card-heading\",\n [\"aria-label\"]: ariaLabel,\n title,\n icon,\n children,\n titleTag = \"h2\" as T,\n enableHyphenation,\n onClick = undefined,\n href = undefined,\n disabled = false,\n linkElement = \"a\",\n variant = \"title-100\",\n ...props\n}: CardHeadingProps &\n (CardHeadingLinkProps | CardHeadingButtonProps | CardHeadingNonInteractiveProps)) => {\n const classes = cx(rootClassName, {\n [`${rootClassName}--is-interactive`]: onClick || href,\n [`${rootClassName}--disabled`]: disabled,\n });\n\n return (\n <div className={classes} data-testid={dataTestId}>\n <div className={cx(`${rootClassName}__header`)}>\n {icon && <div className={cx(`${rootClassName}__icon`)}>{icon}</div>}\n <Heading\n tag={titleTag}\n className={cx(`${rootClassName}__heading`)}\n variant={variant}\n enableHyphenation={enableHyphenation}\n {...props}\n >\n {onClick || href ? (\n <CardTriggerItem\n aria-label={ariaLabel}\n disabled={disabled}\n href={href}\n onClick={onClick}\n linkElement={linkElement}\n >\n {title}\n </CardTriggerItem>\n ) : (\n title\n )}\n </Heading>\n </div>\n {children}\n </div>\n );\n};\n","import React from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-media.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardMediaProps = BaseProps;\n\nconst rootClassName = \"purpur-card-media\";\n\nexport const CardMedia = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-media\",\n className,\n children,\n ...props\n}: CardMediaProps) => (\n <div {...props} className={cx([rootClassName, className])} data-testid={dataTestId}>\n {children}\n </div>\n);\n","import React from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-media-layout.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardMediaLayoutProps = BaseProps & {\n imageTop?: boolean;\n};\n\nconst rootClassName = \"purpur-card-media-layout\";\n\nexport const CardMediaLayout = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-media-layout\",\n className,\n children,\n imageTop = false,\n ...props\n}: CardMediaLayoutProps) => (\n <div\n {...props}\n className={cx(rootClassName, className, { [`${rootClassName}--image-top`]: imageTop })}\n data-testid={dataTestId}\n >\n {children}\n </div>\n);\n","import React from \"react\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-overline.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardOverlineProps = {\n /**\n * Use this to set a testid on the overline\n */\n [\"data-testid\"]?: string;\n /**\n * The text displayed in the overline\n */\n overline?: string;\n};\n\nconst rootClassName = \"purpur-card-overline\";\n\nexport const CardOverline = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-overline\",\n overline,\n}: CardOverlineProps) => {\n return overline ? (\n <Paragraph variant=\"overline-100\" className={cx(rootClassName)} data-testid={dataTestId}>\n {overline}\n </Paragraph>\n ) : null;\n};\n","import React, { forwardRef, type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-root.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardRootProps = Omit<BaseProps, \"children\"> & {\n children: ReactNode;\n fullHeight?: boolean;\n /** Use the prop useMediaQueries when the cards are used beside each other in different sized grid items for example. */\n useMediaQueries?: boolean;\n variant?: \"primary\" | \"secondary\";\n};\n\nconst rootClassName = \"purpur-card-root\";\n\nexport const CardRoot = forwardRef<HTMLDivElement, CardRootProps>(\n (\n {\n [\"data-testid\"]: dataTestId = \"purpur-card-root\",\n children,\n className,\n fullHeight = true,\n variant,\n ...props\n },\n ref\n ) => {\n const classes = cx([\n rootClassName,\n {\n [`${rootClassName}--${variant}`]: variant,\n [`${rootClassName}--full-height`]: fullHeight,\n },\n className,\n ]);\n\n return (\n <div className={classes} data-testid={dataTestId} ref={ref} {...props}>\n {children}\n </div>\n );\n }\n);\n\nCardRoot.displayName = \"CardRoot\";\n","import React, { type FunctionComponent } from \"react\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card.module.scss\";\nimport { CardBadge } from \"./card-badge\";\nimport { CardContent } from \"./card-content\";\nimport { CardContentContainer } from \"./card-content-container\";\nimport { CardCta } from \"./card-cta\";\nimport { CardFeatureList } from \"./card-feature-list\";\nimport { CardHeading } from \"./card-heading\";\nimport { CardMedia } from \"./card-media\";\nimport { CardMediaLayout } from \"./card-media-layout\";\nimport { CardOverline } from \"./card-overline\";\nimport type { CardRootProps } from \"./card-root\";\nimport { CardRoot } from \"./card-root\";\nexport type {\n CardHeadingButtonProps,\n CardHeadingDefaultProps,\n CardHeadingLinkProps,\n CardHeadingNonInteractiveProps,\n} from \"./card-heading\";\n\nconst cx = c.bind(styles);\n\ntype CardCmp<P> = FunctionComponent<P> & {\n Badge: typeof CardBadge;\n Content: typeof CardContent;\n ContentContainer: typeof CardContentContainer;\n Cta: typeof CardCta;\n FeatureList: typeof CardFeatureList;\n Overline: typeof CardOverline;\n Heading: typeof CardHeading;\n Media: typeof CardMedia;\n MediaLayout: typeof CardMediaLayout;\n};\n\nexport type CardProps = CardRootProps;\n\nconst rootClassName = \"purpur-card\";\n\nexport const Card: CardCmp<CardProps> = ({ children, className, useMediaQueries, ...props }) => {\n const classes = cx([rootClassName, className]);\n return (\n <div\n className={cx(`${rootClassName}__container`, {\n [`${rootClassName}__container--full-height`]: props.fullHeight,\n [`${rootClassName}__container--use-container-queries`]: !useMediaQueries,\n [`${rootClassName}__container--use-media-queries`]: useMediaQueries,\n })}\n >\n <CardRoot className={cx(classes)} {...props}>\n {children}\n </CardRoot>\n </div>\n );\n};\n\nCard.Badge = CardBadge;\nCard.Content = CardContent;\nCard.ContentContainer = CardContentContainer;\nCard.Cta = CardCta;\nCard.FeatureList = CardFeatureList;\nCard.Overline = CardOverline;\nCard.Heading = CardHeading;\nCard.Media = CardMedia;\nCard.MediaLayout = CardMediaLayout;\n\nCard.displayName = \"Card\";\n"],"names":["cx","c","styles","rootClassName","CardBadge","dataTestId","variant","text","jsx","Badge","CardContent","children","className","props","CardContentContainer","isFooter","fullHeight","gapSize","CardCta","disabled","iconPosition","loading","linkStyling","Spinner","jsxs","Fragment","CardFeatureList","listItems","listItem","IconCheckmark","Paragraph","CardTriggerItem","ariaLabel","href","onClick","LinkElement","handleClick","e","additionalNonHashedClasses","CardHeading","title","icon","titleTag","enableHyphenation","linkElement","classes","Heading","CardMedia","CardMediaLayout","imageTop","CardOverline","overline","CardRoot","forwardRef","ref","Card","useMediaQueries"],"mappings":"upBAMMA,EAAKC,EAAAA,EAAE,KAAKC,CAAM,EAkBlBC,EAAgB,oBAETC,EAAY,CAAC,CACxB,CAAC,eAAgBC,EAAa,oBAC9B,QAAAC,EACA,KAAAC,CACF,IACSD,GAAWC,EAChBC,EAAAA,IAACC,EAAAA,MAAA,CACC,UAAWT,EAAGG,CAAa,EAC3B,QAAAG,EACA,SAAU,GACV,cAAaD,EAEZ,SAAAE,CAAA,CAAA,EAED,8DClCAP,EAAKC,EAAAA,EAAE,KAAKC,CAAM,EAElBC,EAAgB,sBASTO,EAAc,CAAC,CAC1B,CAAC,eAAgBL,EAAa,sBAC9B,SAAAM,EACA,UAAAC,EACA,GAAGC,CACL,IAEIL,EAAAA,IAAC,MAAA,CAAI,UAAWR,EAAGG,EAAeS,CAAS,EAAG,cAAaP,EAAa,GAAGQ,EACxE,SAAAF,CAAA,CACH,oqBCpBEX,EAAKC,EAAAA,EAAE,KAAKC,CAAM,EAElBC,EAAgB,gCAeTW,EAAuB,CAAC,CACnC,CAAC,eAAgBT,EAAa,gCAC9B,SAAAM,EACA,UAAAC,EACA,SAAAG,EAAW,GACX,WAAAC,EAAa,GACb,QAAAC,EAAU,KACV,GAAGJ,CACL,IACEL,EAAAA,IAAC,MAAA,CACC,UAAWR,EAAG,CACZG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AEJ,CACF,EAEAyC,EAAS,YAAc,WCzBvB,MAAMpD,EAAKC,EAAAA,EAAE,KAAKC,CAAM,EAgBlBC,EAAgB,cAEToD,EAA2B,CAAC,CAAE,SAAA5C,EAAU,UAAAC,EAAW,gBAAA4C,EAAiB,GAAG3C,KAAY,CAC9F,MAAMgC,EAAU7C,EAAG,CAACG,EAAeS,CAAS,CAAC,EAC7C,OACEJ,EAAAA,IAAC,MAAA,CACC,UAAWR,EAAG,GAAGG,CAAa,cAAe,CAC3C,CAAC,GAAGA,CAAa,0BAA0B,EAAGU,EAAM,WACpD,CAAC,GAAGV,CAAa,oCAAoC,EAAG,CAACqD,EACzD,CAAC,GAAGrD,CAAa,gCAAgC,EAAGqD,CAAA,CACrD,EAED,SAAAhD,EAAAA,IAAC4C,GAAS,UAAWpD,EAAG6C,CAAO,EAAI,GAAGhC,EACnC,SAAAF,CAAA,CACH,CAAA,CAAA,CAGN,EAEA4C,EAAK,MAAQnD,EACbmD,EAAK,QAAU7C,EACf6C,EAAK,iBAAmBzC,EACxByC,EAAK,IAAMrC,EACXqC,EAAK,YAAc7B,EACnB6B,EAAK,SAAWL,GAChBK,EAAK,QAAUhB,GACfgB,EAAK,MAAQR,GACbQ,EAAK,YAAcP,GAEnBO,EAAK,YAAc"}
1
+ {"version":3,"file":"card-DFdUs5RG.js","sources":["../../../components/card/src/card-badge.tsx","../../../components/card/src/card-content.tsx","../../../components/card/src/card-content-container.tsx","../../../components/card/src/card-cta.tsx","../../../components/card/src/card-feature-list.tsx","../../../components/card/src/card-trigger-item.tsx","../../../components/card/src/card-heading.tsx","../../../components/card/src/card-media.tsx","../../../components/card/src/card-media-layout.tsx","../../../components/card/src/card-overline.tsx","../../../components/card/src/card-root.tsx","../../../components/card/src/card.tsx"],"sourcesContent":["import React from \"react\";\nimport { Badge, type BadgeVariant } from \"@purpur/badge\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-badge.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardBadgeProps = {\n /**\n * Use this to set a testid on the badge\n */\n [\"data-testid\"]?: string;\n /**\n * The variant (color) of the badge in the top right corner of the card. This is coupled with the text prop. Both needs to be set for the badge to be displayed.\n * `BadgeVariant = \"attention\" | \"special\" | \"neutral\" | \"information\" | \"success\" | \"warning\" | \"error\"`\n */\n variant?: BadgeVariant;\n /**\n * The text that will be in the badge in the top right corner of the card. This is coupled with the variant prop. Both needs to be set for the badge to be displayed.\n */\n text?: string;\n};\n\nconst rootClassName = \"purpur-card-badge\";\n\nexport const CardBadge = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-badge\",\n variant,\n text,\n}: CardBadgeProps) => {\n return variant && text ? (\n <Badge\n className={cx(rootClassName)}\n variant={variant}\n showIcon={false}\n data-testid={dataTestId}\n >\n {text}\n </Badge>\n ) : null;\n};\n","import React, { type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-content.module.scss\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-card-content\";\n\ntype CardContentProps = Omit<BaseProps, \"children\"> & {\n /**\n * The child elements of the content (React.ReactNode)\n */\n children: ReactNode;\n};\n\nexport const CardContent = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-content\",\n children,\n className,\n ...props\n}: CardContentProps) => {\n return (\n <div className={cx(rootClassName, className)} data-testid={dataTestId} {...props}>\n {children}\n </div>\n );\n};\n","import React, { type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-content-container.module.scss\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-card-content-container\";\n\ntype CardContentContainerProps = Omit<BaseProps, \"children\"> & {\n /**\n * The child elements of the content container (React.ReactNode)\n */\n children: ReactNode;\n /**\n * Flag to remove the top padding\n */\n isFooter?: boolean;\n fullHeight?: boolean;\n gapSize?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n};\n\nexport const CardContentContainer = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-content-container\",\n children,\n className,\n isFooter = false,\n fullHeight = false,\n gapSize = \"md\",\n ...props\n}: CardContentContainerProps) => (\n <div\n className={cx([\n rootClassName,\n className,\n `${rootClassName}--gap-size--${gapSize}`,\n {\n [`${rootClassName}--full-height`]: fullHeight,\n [`${rootClassName}--footer`]: isFooter,\n },\n ])}\n data-testid={dataTestId}\n {...props}\n >\n {children}\n </div>\n);\n","import React from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport { Spinner } from \"@purpur/spinner\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-cta.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardCtaProps = BaseProps & {\n disabled?: boolean;\n /**\n * The position of the icon.\n * `\"left\" | \"right\"`\n */\n iconPosition?: \"left\" | \"right\";\n loading?: boolean;\n /**\n * Use this to style the cta as a link (no border)\n */\n linkStyling?: boolean;\n text?: string;\n};\n\nconst rootClassName = \"purpur-card-cta\";\n\nexport const CardCta = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-cta\",\n className,\n children,\n disabled = false,\n iconPosition = \"right\",\n loading = false,\n text,\n linkStyling = false,\n ...props\n}: CardCtaProps) => {\n return (\n <div\n className={`${cx([\n rootClassName,\n className,\n\n {\n [`${rootClassName}--disabled`]: disabled,\n [`${rootClassName}--text`]: !!text,\n [`${rootClassName}--cta-styling`]: linkStyling,\n [`${rootClassName}--button-styling`]: !linkStyling,\n [`${rootClassName}--button-styling--md`]: !linkStyling,\n [`${rootClassName}--button-styling--secondary`]: !linkStyling,\n [`${rootClassName}--button-styling--icon-only`]: !linkStyling && !text,\n },\n ])} ${rootClassName}`}\n data-testid={dataTestId}\n {...props}\n >\n {!loading ? (\n <>\n {iconPosition === \"left\" && children}\n {text}\n {iconPosition === \"right\" && children}\n </>\n ) : (\n <Spinner data-testid={`${dataTestId}-spinner`} size=\"xs\" disabled={disabled} />\n )}\n </div>\n );\n};\n","import React from \"react\";\nimport { IconCheckmark } from \"@purpur/icon/checkmark\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-feature-list.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardFeatureListProps = {\n /**\n * Use this to set a testid on the feature list\n */\n [\"data-testid\"]?: string;\n /**\n * This is the feature list where each entry is preceded by a checkmark. If the feature list provided is falsy or empty nothing will be rendered.\n */\n listItems?: string[];\n};\n\nconst rootClassName = \"purpur-card-feature-list\";\n\nexport const CardFeatureList = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-feature-list\",\n listItems,\n}: CardFeatureListProps) => {\n return listItems && listItems.length > 0 ? (\n <ul className={cx(rootClassName)} data-testid={dataTestId}>\n {listItems.map((listItem: string) => (\n <li\n className={cx(`${rootClassName}__list-item`)}\n data-testid={`${dataTestId}-item`}\n key={listItem}\n >\n <IconCheckmark size=\"xs\" className={cx(`${rootClassName}__icon`)} />\n <Paragraph>{listItem}</Paragraph>\n </li>\n ))}\n </ul>\n ) : null;\n};\n","import React, {\n type AnchorHTMLAttributes,\n type ForwardRefExoticComponent,\n type MouseEvent,\n type ReactNode,\n} from \"react\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-trigger-item.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardTriggerItemProps = {\n [\"data-testid\"]?: string;\n [\"aria-label\"]?: string;\n disabled?: boolean;\n href?: string;\n onClick?: () => unknown;\n children: ReactNode;\n linkElement?: ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement>> | \"a\";\n};\n\nconst rootClassName = \"purpur-card-trigger-item\";\n\nexport const CardTriggerItem = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-trigger-item\",\n [\"aria-label\"]: ariaLabel,\n disabled = false,\n href,\n onClick,\n children,\n linkElement: LinkElement = \"a\",\n}: CardTriggerItemProps) => {\n const handleClick = (e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>): void => {\n if (disabled) {\n e.preventDefault();\n } else if (onClick) {\n onClick();\n }\n };\n\n const additionalNonHashedClasses = `${rootClassName} ${\n disabled ? `${rootClassName}--disabled` : \"\"\n }`;\n\n return href ? (\n <LinkElement\n aria-disabled={disabled}\n aria-label={ariaLabel}\n className={`${cx([\n rootClassName,\n `${rootClassName}--link`,\n {\n [`${rootClassName}--disabled`]: disabled,\n },\n ])} ${additionalNonHashedClasses}`}\n data-testid={dataTestId}\n href={disabled ? undefined : href}\n tabIndex={disabled ? 0 : undefined}\n onClick={handleClick}\n >\n {children}\n </LinkElement>\n ) : (\n <button\n aria-disabled={disabled}\n aria-label={ariaLabel}\n className={`${cx([\n rootClassName,\n `${rootClassName}--button`,\n {\n [`${rootClassName}--disabled`]: disabled,\n },\n ])} ${additionalNonHashedClasses}`}\n data-testid={dataTestId}\n type=\"button\"\n onClick={handleClick}\n >\n {children}\n </button>\n );\n};\n","import React, {\n type AnchorHTMLAttributes,\n type ForwardRefExoticComponent,\n type ReactNode,\n} from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport { Heading, type HeadingTagType,type HeadingVariant } from \"@purpur/heading\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-heading.module.scss\";\nimport { CardTriggerItem } from \"./card-trigger-item\";\n\nconst cx = c.bind(styles);\n\nexport type CardHeadingDefaultProps = {\n /**\n * Use this to set a testid on the feature list\n */\n [\"data-testid\"]?: string;\n title: string;\n /**\n * Use when you want an icon to the left of the title\n */\n icon?: ReactNode;\n /**\n * Use for the CTA, it will positioned to the right\n */\n children?: ReactNode;\n titleTag?: HeadingTagType;\n variant?: HeadingVariant;\n enableHyphenation?: boolean;\n};\n\nexport type CardHeadingNonInteractiveProps = {\n disabled?: never;\n href?: never;\n /**\n * If the href prop is not provided the clickable element will be a button and use this clickHandler when the user presses the card.\n */\n onClick?: never;\n linkElement?: never;\n};\n\nexport type CardHeadingLinkProps = {\n /**\n * Use this to disable the card. Can be used both with a link card and a button card. In the case of the button the clickHandler will not be called and if a anchor tag the href will be removed.\n */\n disabled?: boolean;\n /**\n * Makes the card become a link to the provided href.\n */\n href: string;\n /**\n * If the href prop is not provided the clickable element will be a button and use this clickHandler when the user presses the card.\n */\n onClick?: () => void;\n linkElement?: ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement>> | \"a\";\n};\n\nexport type CardHeadingButtonProps = {\n /**\n * Use this to disable the card. Can be used both with a link card and a button card. In the case of the button the clickHandler will not be called and if a anchor tag the href will be removed.\n */\n disabled?: boolean;\n /**\n * Makes the card become a link to the provided href.\n */\n href?: never;\n /**\n * If the href prop is not provided the clickable element will be a button and use this clickHandler when the user presses the card.\n */\n onClick: () => void;\n linkElement?: never;\n};\n\nexport type CardHeadingProps<T extends HeadingTagType = \"h2\"> = BaseProps<T> &\n CardHeadingDefaultProps;\n\nconst rootClassName = \"purpur-card-heading\";\n\nexport const CardHeading = <T extends HeadingTagType = \"h2\">({\n [\"data-testid\"]: dataTestId = \"purpur-card-heading\",\n [\"aria-label\"]: ariaLabel,\n title,\n icon,\n children,\n titleTag = \"h2\" as T,\n enableHyphenation,\n onClick = undefined,\n href = undefined,\n disabled = false,\n linkElement = \"a\",\n variant = \"title-100\",\n ...props\n}: CardHeadingProps &\n (CardHeadingLinkProps | CardHeadingButtonProps | CardHeadingNonInteractiveProps)) => {\n const classes = cx(rootClassName, {\n [`${rootClassName}--is-interactive`]: onClick || href,\n [`${rootClassName}--disabled`]: disabled,\n });\n\n return (\n <div className={classes} data-testid={dataTestId}>\n <div className={cx(`${rootClassName}__header`)}>\n {icon && <div className={cx(`${rootClassName}__icon`)}>{icon}</div>}\n <Heading\n tag={titleTag}\n className={cx(`${rootClassName}__heading`)}\n variant={variant}\n enableHyphenation={enableHyphenation}\n {...props}\n >\n {onClick || href ? (\n <CardTriggerItem\n aria-label={ariaLabel}\n disabled={disabled}\n href={href}\n onClick={onClick}\n linkElement={linkElement}\n >\n {title}\n </CardTriggerItem>\n ) : (\n title\n )}\n </Heading>\n </div>\n {children}\n </div>\n );\n};\n","import React from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-media.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardMediaProps = BaseProps;\n\nconst rootClassName = \"purpur-card-media\";\n\nexport const CardMedia = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-media\",\n className,\n children,\n ...props\n}: CardMediaProps) => (\n <div {...props} className={cx([rootClassName, className])} data-testid={dataTestId}>\n {children}\n </div>\n);\n","import React from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-media-layout.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardMediaLayoutProps = BaseProps & {\n imageTop?: boolean;\n};\n\nconst rootClassName = \"purpur-card-media-layout\";\n\nexport const CardMediaLayout = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-media-layout\",\n className,\n children,\n imageTop = false,\n ...props\n}: CardMediaLayoutProps) => (\n <div\n {...props}\n className={cx(rootClassName, className, { [`${rootClassName}--image-top`]: imageTop })}\n data-testid={dataTestId}\n >\n {children}\n </div>\n);\n","import React from \"react\";\nimport { Paragraph } from \"@purpur/paragraph\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-overline.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardOverlineProps = {\n /**\n * Use this to set a testid on the overline\n */\n [\"data-testid\"]?: string;\n /**\n * The text displayed in the overline\n */\n overline?: string;\n};\n\nconst rootClassName = \"purpur-card-overline\";\n\nexport const CardOverline = ({\n [\"data-testid\"]: dataTestId = \"purpur-card-overline\",\n overline,\n}: CardOverlineProps) => {\n return overline ? (\n <Paragraph variant=\"overline-100\" className={cx(rootClassName)} data-testid={dataTestId}>\n {overline}\n </Paragraph>\n ) : null;\n};\n","import React, { forwardRef, type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card-root.module.scss\";\n\nconst cx = c.bind(styles);\n\nexport type CardRootProps = Omit<BaseProps, \"children\"> & {\n children: ReactNode;\n fullHeight?: boolean;\n /** Use the prop useMediaQueries when the cards are used beside each other in different sized grid items for example. */\n useMediaQueries?: boolean;\n variant?: \"primary\" | \"secondary\";\n};\n\nconst rootClassName = \"purpur-card-root\";\n\nexport const CardRoot = forwardRef<HTMLDivElement, CardRootProps>(\n (\n {\n [\"data-testid\"]: dataTestId = \"purpur-card-root\",\n children,\n className,\n fullHeight = true,\n variant,\n ...props\n },\n ref\n ) => {\n const classes = cx([\n rootClassName,\n {\n [`${rootClassName}--${variant}`]: variant,\n [`${rootClassName}--full-height`]: fullHeight,\n },\n className,\n ]);\n\n return (\n <div className={classes} data-testid={dataTestId} ref={ref} {...props}>\n {children}\n </div>\n );\n }\n);\n\nCardRoot.displayName = \"CardRoot\";\n","import React, { type FunctionComponent } from \"react\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./card.module.scss\";\nimport { CardBadge } from \"./card-badge\";\nimport { CardContent } from \"./card-content\";\nimport { CardContentContainer } from \"./card-content-container\";\nimport { CardCta } from \"./card-cta\";\nimport { CardFeatureList } from \"./card-feature-list\";\nimport { CardHeading } from \"./card-heading\";\nimport { CardMedia } from \"./card-media\";\nimport { CardMediaLayout } from \"./card-media-layout\";\nimport { CardOverline } from \"./card-overline\";\nimport type { CardRootProps } from \"./card-root\";\nimport { CardRoot } from \"./card-root\";\nexport type {\n CardHeadingButtonProps,\n CardHeadingDefaultProps,\n CardHeadingLinkProps,\n CardHeadingNonInteractiveProps,\n} from \"./card-heading\";\n\nconst cx = c.bind(styles);\n\ntype CardCmp<P> = FunctionComponent<P> & {\n Badge: typeof CardBadge;\n Content: typeof CardContent;\n ContentContainer: typeof CardContentContainer;\n Cta: typeof CardCta;\n FeatureList: typeof CardFeatureList;\n Overline: typeof CardOverline;\n Heading: typeof CardHeading;\n Media: typeof CardMedia;\n MediaLayout: typeof CardMediaLayout;\n};\n\nexport type CardProps = CardRootProps;\n\nconst rootClassName = \"purpur-card\";\n\nexport const Card: CardCmp<CardProps> = ({ children, className, useMediaQueries, ...props }) => {\n const classes = cx([rootClassName, className]);\n return (\n <div\n className={cx(`${rootClassName}__container`, {\n [`${rootClassName}__container--full-height`]: props.fullHeight,\n [`${rootClassName}__container--use-container-queries`]: !useMediaQueries,\n [`${rootClassName}__container--use-media-queries`]: useMediaQueries,\n })}\n >\n <CardRoot className={cx(classes)} {...props}>\n {children}\n </CardRoot>\n </div>\n );\n};\n\nCard.Badge = CardBadge;\nCard.Content = CardContent;\nCard.ContentContainer = CardContentContainer;\nCard.Cta = CardCta;\nCard.FeatureList = CardFeatureList;\nCard.Overline = CardOverline;\nCard.Heading = CardHeading;\nCard.Media = CardMedia;\nCard.MediaLayout = CardMediaLayout;\n\nCard.displayName = \"Card\";\n"],"names":["cx","c","styles","rootClassName","CardBadge","dataTestId","variant","text","jsx","Badge","CardContent","children","className","props","CardContentContainer","isFooter","fullHeight","gapSize","CardCta","disabled","iconPosition","loading","linkStyling","Spinner","jsxs","Fragment","CardFeatureList","listItems","listItem","IconCheckmark","Paragraph","CardTriggerItem","ariaLabel","href","onClick","LinkElement","handleClick","e","additionalNonHashedClasses","CardHeading","title","icon","titleTag","enableHyphenation","linkElement","classes","Heading","CardMedia","CardMediaLayout","imageTop","CardOverline","overline","CardRoot","forwardRef","ref","Card","useMediaQueries"],"mappings":"upBAMMA,EAAKC,EAAAA,EAAE,KAAKC,CAAM,EAkBlBC,EAAgB,oBAETC,EAAY,CAAC,CACxB,CAAC,eAAgBC,EAAa,oBAC9B,QAAAC,EACA,KAAAC,CACF,IACSD,GAAWC,EAChBC,EAAAA,IAACC,EAAAA,MAAA,CACC,UAAWT,EAAGG,CAAa,EAC3B,QAAAG,EACA,SAAU,GACV,cAAaD,EAEZ,SAAAE,CAAA,CAAA,EAED,8DClCAP,EAAKC,EAAAA,EAAE,KAAKC,CAAM,EAElBC,EAAgB,sBASTO,EAAc,CA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c"}
package/dist/card.cjs.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./card-CRHXm5NR.js");exports.Card=e.Card;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./card-DFdUs5RG.js");exports.Card=e.Card;
2
2
  //# sourceMappingURL=card.cjs.js.map
package/dist/card.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as o } from "./card-DR2hvxjZ.mjs";
1
+ import { C as o } from "./card-C2mdp-ur.mjs";
2
2
  export {
3
3
  o as Card
4
4
  };