@edx/frontend-app-alacarte-checkout 1.51.0 → 1.52.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.
@@ -1,4 +1,8 @@
1
- export declare const CardBrands: () => import("react/jsx-runtime").JSX.Element;
1
+ interface CardBrandsProps {
2
+ /** Stripe-detected network; on narrow screens only its mark is shown. */
3
+ brand?: string | null;
4
+ }
5
+ export declare const CardBrands: ({ brand }?: CardBrandsProps) => import("react/jsx-runtime").JSX.Element;
2
6
  export declare const PayPalWordmark: () => import("react/jsx-runtime").JSX.Element;
3
7
  interface EdxUnlimitedLogoProps {
4
8
  ariaLabel?: string;
@@ -1,10 +1,17 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- const Visa = () => (_jsxs("svg", { width: "34", height: "22", viewBox: "0 0 34 22", role: "img", "aria-label": "Visa", children: [_jsx("rect", { width: "34", height: "22", rx: "3", fill: "#1A1F71" }), _jsx("text", { x: "17", y: "15", textAnchor: "middle", fontFamily: "Arial, sans-serif", fontWeight: "700", fontStyle: "italic", fontSize: "10", fill: "#fff", children: "VISA" })] }));
3
- const Mastercard = () => (_jsxs("svg", { width: "34", height: "22", viewBox: "0 0 34 22", role: "img", "aria-label": "Mastercard", children: [_jsx("rect", { width: "34", height: "22", rx: "3", fill: "#fff", stroke: "#E6E6E6" }), _jsx("circle", { cx: "14", cy: "11", r: "6", fill: "#EB001B" }), _jsx("circle", { cx: "20", cy: "11", r: "6", fill: "#F79E1B", fillOpacity: "0.9" })] }));
4
- const Amex = () => (_jsxs("svg", { width: "34", height: "22", viewBox: "0 0 34 22", role: "img", "aria-label": "American Express", children: [_jsx("rect", { width: "34", height: "22", rx: "3", fill: "#1F72CD" }), _jsx("text", { x: "17", y: "14", textAnchor: "middle", fontFamily: "Arial, sans-serif", fontWeight: "700", fontSize: "6.5", fill: "#fff", children: "AMEX" })] }));
5
- const Discover = () => (_jsxs("svg", { width: "34", height: "22", viewBox: "0 0 34 22", role: "img", "aria-label": "Discover", children: [_jsx("rect", { width: "34", height: "22", rx: "3", fill: "#fff", stroke: "#E6E6E6" }), _jsx("circle", { cx: "25", cy: "11", r: "4", fill: "#F47216" }), _jsx("text", { x: "13", y: "14", textAnchor: "middle", fontFamily: "Arial, sans-serif", fontWeight: "700", fontSize: "5", fill: "#231F20", children: "DISCVR" })] }));
2
+ const Visa = ({ className }) => (_jsxs("svg", { className: className, width: "34", height: "22", viewBox: "0 0 34 22", role: "img", "aria-label": "Visa", children: [_jsx("rect", { width: "34", height: "22", rx: "3", fill: "#1A1F71" }), _jsx("text", { x: "17", y: "15", textAnchor: "middle", fontFamily: "Arial, sans-serif", fontWeight: "700", fontStyle: "italic", fontSize: "10", fill: "#fff", children: "VISA" })] }));
3
+ const Mastercard = ({ className }) => (_jsxs("svg", { className: className, width: "34", height: "22", viewBox: "0 0 34 22", role: "img", "aria-label": "Mastercard", children: [_jsx("rect", { width: "34", height: "22", rx: "3", fill: "#fff", stroke: "#E6E6E6" }), _jsx("circle", { cx: "14", cy: "11", r: "6", fill: "#EB001B" }), _jsx("circle", { cx: "20", cy: "11", r: "6", fill: "#F79E1B", fillOpacity: "0.9" })] }));
4
+ const Amex = ({ className }) => (_jsxs("svg", { className: className, width: "34", height: "22", viewBox: "0 0 34 22", role: "img", "aria-label": "American Express", children: [_jsx("rect", { width: "34", height: "22", rx: "3", fill: "#1F72CD" }), _jsx("text", { x: "17", y: "14", textAnchor: "middle", fontFamily: "Arial, sans-serif", fontWeight: "700", fontSize: "6.5", fill: "#fff", children: "AMEX" })] }));
5
+ const Discover = ({ className }) => (_jsxs("svg", { className: className, width: "34", height: "22", viewBox: "0 0 34 22", role: "img", "aria-label": "Discover", children: [_jsx("rect", { width: "34", height: "22", rx: "3", fill: "#fff", stroke: "#E6E6E6" }), _jsx("circle", { cx: "25", cy: "11", r: "4", fill: "#F47216" }), _jsx("text", { x: "13", y: "14", textAnchor: "middle", fontFamily: "Arial, sans-serif", fontWeight: "700", fontSize: "5", fill: "#231F20", children: "DISCVR" })] }));
6
+ /** Stripe `brand` code → mark, in display order. */
7
+ const CARD_MARKS = [
8
+ ['visa', Visa],
9
+ ['mastercard', Mastercard],
10
+ ['amex', Amex],
11
+ ['discover', Discover],
12
+ ];
6
13
  // Decorative — PaymentFields announces the detected network via a live region.
7
- export const CardBrands = () => (_jsxs("div", { className: "brand-marks__card-brands", "aria-hidden": "true", children: [_jsx(Visa, {}), _jsx(Mastercard, {}), _jsx(Amex, {}), _jsx(Discover, {})] }));
14
+ export const CardBrands = ({ brand = null } = {}) => (_jsx("div", { className: "brand-marks__card-brands", "aria-hidden": "true", children: CARD_MARKS.map(([code, Mark]) => (_jsx(Mark, { className: `brand-marks__card-brand${code === brand ? ' brand-marks__card-brand--active' : ''}` }, code))) }));
8
15
  export const PayPalWordmark = () => (_jsxs("span", { className: "brand-marks__paypal", children: [_jsx("span", { className: "brand-marks__paypal-pay", children: "Pay" }), _jsx("span", { className: "brand-marks__paypal-pal", children: "Pal" })] }));
9
16
  export const EdxUnlimitedLogo = ({ ariaLabel = 'edX Plus', } = {}) => (_jsx("span", { className: "brand-marks__edx-logo", children: _jsxs("svg", { width: "48", height: "25", viewBox: "0 0 48 25", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-label": ariaLabel, children: [_jsxs("g", { clipPath: "url(#clip0_4947_41473)", children: [_jsx("path", { d: "M28.4709 3.95479L29.3304 0H4.13314L0 19.0065H21.0675L19.9082 24.1061H40.0865L44.5391 3.95479H28.4709Z", fill: "#00262B" }), _jsx("path", { d: "M8.58538 16.5826C8.01563 16.5826 7.47552 16.4938 6.96835 16.3131C6.46118 16.1323 6.01658 15.8659 5.64114 15.517C5.2624 15.165 4.966 14.7337 4.74535 14.2199C4.5247 13.7061 4.41602 13.1163 4.41602 12.4503C4.41602 11.54 4.54775 10.7091 4.81122 9.96067C5.07468 9.21221 5.44024 8.57157 5.91119 8.0356C6.38214 7.49963 6.9453 7.08734 7.60067 6.79239C8.25604 6.50062 8.97728 6.35156 9.75781 6.35156C10.2847 6.35156 10.7853 6.44036 11.2563 6.61796C11.7305 6.79556 12.1422 7.05245 12.4979 7.3918C12.8535 7.73114 13.1368 8.1466 13.3442 8.64452C13.555 9.13926 13.6571 9.70695 13.6571 10.3508C13.6571 10.4491 13.6538 10.5632 13.6472 10.6933C13.6406 10.8265 13.6308 10.9597 13.6176 11.096C13.6044 11.2324 13.5912 11.3688 13.5814 11.4988C13.5682 11.6288 13.5517 11.743 13.5353 11.8318H6.13843C6.13184 11.9174 6.12855 11.9999 6.12526 12.0792C6.12196 12.1585 6.12196 12.2409 6.12196 12.3266C6.12196 12.834 6.19771 13.2653 6.3492 13.6237C6.5007 13.9821 6.6983 14.2738 6.9453 14.499C7.189 14.7242 7.46564 14.8891 7.76863 14.9906C8.07162 15.0921 8.38119 15.1428 8.69076 15.1428C9.36919 15.1428 9.91589 15.0286 10.3276 14.8035C10.7392 14.5783 11.0554 14.2707 11.2694 13.8869H13.0116C12.9029 14.2675 12.7251 14.6195 12.4781 14.9494C12.2311 15.2792 11.9182 15.5646 11.5395 15.8056C11.1608 16.0467 10.7228 16.237 10.2255 16.3733C9.73146 16.516 9.18147 16.5826 8.58538 16.5826ZM11.9281 10.5601C11.9347 10.5284 11.938 10.4744 11.9413 10.3888C11.9446 10.3064 11.9446 10.2239 11.9446 10.1446C11.9446 9.82112 11.8952 9.51349 11.7964 9.22172C11.6976 8.93312 11.5494 8.67623 11.3518 8.4574C11.1542 8.23857 10.9105 8.06414 10.6174 7.93411C10.3243 7.80726 9.98505 7.74066 9.59973 7.74066C9.20452 7.74066 8.83896 7.80726 8.49646 7.94363C8.15395 8.07683 7.84108 8.27029 7.56444 8.51766C7.28451 8.76503 7.0441 9.05998 6.83991 9.40566C6.63572 9.75135 6.47435 10.1351 6.35579 10.5569L11.9281 10.5601Z", fill: "white" }), _jsx("path", { d: "M18.3352 16.5837C17.8215 16.5837 17.3373 16.4918 16.8862 16.3046C16.435 16.1175 16.0398 15.8511 15.7006 15.5023C15.3613 15.1534 15.0913 14.7316 14.897 14.2369C14.6994 13.7421 14.6006 13.1903 14.6006 12.5782C14.6006 11.9851 14.6632 11.4174 14.785 10.8783C14.9102 10.3392 15.0847 9.83489 15.3119 9.37503C15.5392 8.912 15.8158 8.49654 16.1353 8.12231C16.4547 7.74808 16.8104 7.43094 17.2023 7.16771C17.5942 6.90448 18.0158 6.7015 18.4703 6.56196C18.9247 6.42242 19.399 6.34947 19.893 6.34947C20.2618 6.34947 20.6109 6.39705 20.9435 6.49536C21.2762 6.59368 21.5792 6.73005 21.8492 6.90448C22.1193 7.07891 22.3498 7.28822 22.5441 7.53559C22.7384 7.78297 22.88 8.05254 22.9689 8.34748H23.1204L24.3884 2.59766H26.0548L23.0085 16.4061H21.4277L21.7241 15.0583H21.5726C21.1971 15.5276 20.7295 15.8987 20.163 16.1714C19.5966 16.4473 18.9873 16.5837 18.3352 16.5837ZM18.8589 15.1629C19.3924 15.1629 19.8864 15.0424 20.3409 14.8014C20.7953 14.5603 21.1905 14.2305 21.5265 13.8119C21.8624 13.3932 22.1259 12.9017 22.3169 12.3372C22.5079 11.7726 22.6034 11.1606 22.6034 10.5072C22.6034 10.0854 22.5441 9.70803 22.4223 9.36869C22.3004 9.03252 22.1291 8.74709 21.9085 8.5124C21.6845 8.27771 21.4178 8.09377 21.0983 7.96691C20.7822 7.83688 20.4232 7.77345 20.0214 7.77345C19.4945 7.77345 19.0071 7.88762 18.5559 8.1128C18.1047 8.33797 17.7161 8.65194 17.3835 9.05789C17.0541 9.46066 16.7939 9.94272 16.6029 10.5009C16.4119 11.0591 16.3164 11.6743 16.3164 12.3403C16.3164 12.7558 16.379 13.1364 16.5041 13.4852C16.6293 13.8341 16.8005 14.1322 17.0245 14.3796C17.2484 14.6269 17.5119 14.8204 17.8248 14.9568C18.131 15.0931 18.4768 15.1629 18.8589 15.1629Z", fill: "white" }), _jsx("path", { d: "M46.6871 6.46441C46.506 6.46441 46.3347 6.43269 46.1766 6.36609C46.0185 6.29949 45.8769 6.21069 45.7584 6.09335C45.6365 5.976 45.5443 5.8428 45.4751 5.69057C45.406 5.53834 45.373 5.37343 45.373 5.199C45.373 5.02457 45.406 4.85966 45.4751 4.70743C45.5443 4.5552 45.6365 4.41882 45.7584 4.30465C45.8802 4.18731 46.0185 4.09851 46.1766 4.03191C46.3347 3.96531 46.506 3.93359 46.6871 3.93359C46.8682 3.93359 47.0395 3.96531 47.1976 4.03191C47.3556 4.09851 47.4972 4.18731 47.6158 4.30465C47.7377 4.422 47.8299 4.5552 47.899 4.70743C47.9682 4.85966 48.0011 5.02457 48.0011 5.199C48.0011 5.37343 47.9682 5.53834 47.899 5.69057C47.8299 5.8428 47.7377 5.97918 47.6158 6.09335C47.494 6.20752 47.3556 6.29949 47.1976 6.36609C47.0395 6.43269 46.8682 6.46441 46.6871 6.46441ZM46.6871 6.22972C46.8847 6.22972 47.0658 6.18215 47.2272 6.09018C47.3886 5.9982 47.517 5.87135 47.6158 5.71595C47.7113 5.56055 47.7607 5.38612 47.7607 5.19583C47.7607 5.00554 47.7113 4.83111 47.6158 4.67571C47.5203 4.52031 47.3886 4.39662 47.2272 4.30148C47.0658 4.20951 46.8847 4.16194 46.6871 4.16194C46.4895 4.16194 46.3084 4.20951 46.147 4.30148C45.9856 4.39345 45.8572 4.52031 45.7584 4.67571C45.6629 4.83111 45.6135 5.00554 45.6135 5.19583C45.6135 5.38612 45.6629 5.56055 45.7584 5.71595C45.8539 5.87135 45.9856 5.99503 46.147 6.09018C46.3084 6.18215 46.4895 6.22972 46.6871 6.22972ZM46.2392 5.76669V4.59643H46.8221C46.8847 4.59643 46.944 4.60911 47 4.63765C47.0592 4.6662 47.1053 4.70743 47.1416 4.76134C47.1811 4.81526 47.1976 4.88186 47.1976 4.96114C47.1976 5.04043 47.1778 5.1102 47.1383 5.16729C47.0988 5.22437 47.0494 5.26877 46.9901 5.30049C46.9308 5.3322 46.8682 5.34489 46.8056 5.34489H46.3545V5.18631H46.7497C46.8056 5.18631 46.855 5.16729 46.9012 5.12923C46.944 5.09117 46.967 5.03409 46.967 4.96431C46.967 4.89137 46.944 4.83746 46.9012 4.80574C46.8583 4.77403 46.8089 4.75817 46.7562 4.75817H46.45V5.76669H46.2392ZM46.9473 5.22437L47.2502 5.76669H47.0131L46.72 5.22437H46.9473Z", fill: "#00262B" }), _jsx("path", { d: "M40.9978 6.55273H37.2796L33.2288 11.386H33.0279L30.8839 6.55273H27.1262L30.3471 13.5743L23.3916 21.5093H27.0571L31.5228 16.4096H31.8225L34.2366 21.5093H37.9251L34.3584 13.9232L40.9978 6.55273Z", fill: "white" })] }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_4947_41473", children: _jsx("rect", { width: "48", height: "24.1061", fill: "white" }) }) })] }) }));
10
17
  //# sourceMappingURL=BrandMarks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BrandMarks.js","sourceRoot":"","sources":["../../../src/components/BrandMarks/BrandMarks.tsx"],"names":[],"mappings":";AAEA,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,CACjB,eAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,KAAK,gBAAY,MAAM,aAC1E,eAAM,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAC,IAAI,EAAC,SAAS,GAAG,EACrD,eACE,CAAC,EAAC,IAAI,EACN,CAAC,EAAC,IAAI,EACN,UAAU,EAAC,QAAQ,EACnB,UAAU,EAAC,mBAAmB,EAC9B,UAAU,EAAC,KAAK,EAChB,SAAS,EAAC,QAAQ,EAClB,QAAQ,EAAC,IAAI,EACb,IAAI,EAAC,MAAM,qBAGN,IACH,CACP,CAAC;AAEF,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,CACvB,eACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OA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y6D,EAC36D,IAAI,EAAC,SAAS,GACd,EACF,eACE,CAAC,EAAC,kMAAkM,EACpM,IAAI,EAAC,OAAO,GACZ,IACA,EACJ,yBACE,mBAAU,EAAE,EAAC,kBAAkB,YAC7B,eAAM,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO,GAAG,GACxC,GACN,IACH,GACD,CACR,CAAC","sourcesContent":["import React from 'react';\n\nconst Visa = () => (\n <svg width=\"34\" height=\"22\" viewBox=\"0 0 34 22\" role=\"img\" aria-label=\"Visa\">\n <rect width=\"34\" height=\"22\" rx=\"3\" fill=\"#1A1F71\" />\n <text\n x=\"17\"\n y=\"15\"\n textAnchor=\"middle\"\n fontFamily=\"Arial, sans-serif\"\n fontWeight=\"700\"\n fontStyle=\"italic\"\n fontSize=\"10\"\n fill=\"#fff\"\n >\n VISA\n </text>\n </svg>\n);\n\nconst Mastercard = () => (\n <svg\n width=\"34\"\n height=\"22\"\n viewBox=\"0 0 34 22\"\n role=\"img\"\n aria-label=\"Mastercard\"\n >\n <rect width=\"34\" height=\"22\" rx=\"3\" fill=\"#fff\" stroke=\"#E6E6E6\" />\n <circle cx=\"14\" cy=\"11\" r=\"6\" fill=\"#EB001B\" />\n <circle cx=\"20\" cy=\"11\" r=\"6\" fill=\"#F79E1B\" fillOpacity=\"0.9\" />\n </svg>\n);\n\nconst Amex = () => (\n <svg\n width=\"34\"\n height=\"22\"\n viewBox=\"0 0 34 22\"\n role=\"img\"\n aria-label=\"American Express\"\n >\n <rect width=\"34\" height=\"22\" rx=\"3\" fill=\"#1F72CD\" />\n <text\n x=\"17\"\n y=\"14\"\n textAnchor=\"middle\"\n fontFamily=\"Arial, sans-serif\"\n fontWeight=\"700\"\n fontSize=\"6.5\"\n fill=\"#fff\"\n >\n AMEX\n </text>\n </svg>\n);\n\nconst Discover = () => (\n <svg\n width=\"34\"\n height=\"22\"\n viewBox=\"0 0 34 22\"\n role=\"img\"\n aria-label=\"Discover\"\n >\n <rect width=\"34\" height=\"22\" rx=\"3\" fill=\"#fff\" stroke=\"#E6E6E6\" />\n <circle cx=\"25\" cy=\"11\" r=\"4\" fill=\"#F47216\" />\n <text\n x=\"13\"\n y=\"14\"\n textAnchor=\"middle\"\n fontFamily=\"Arial, sans-serif\"\n fontWeight=\"700\"\n fontSize=\"5\"\n fill=\"#231F20\"\n >\n DISCVR\n </text>\n </svg>\n);\n\n// Decorative — PaymentFields announces the detected network via a live region.\nexport const CardBrands = () => (\n <div className=\"brand-marks__card-brands\" aria-hidden=\"true\">\n <Visa />\n <Mastercard />\n <Amex />\n <Discover />\n </div>\n);\n\nexport const PayPalWordmark = () => (\n <span className=\"brand-marks__paypal\">\n <span className=\"brand-marks__paypal-pay\">Pay</span>\n <span className=\"brand-marks__paypal-pal\">Pal</span>\n </span>\n);\n\ninterface EdxUnlimitedLogoProps {\n ariaLabel?: string,\n}\n\nexport const EdxUnlimitedLogo = ({\n ariaLabel = 'edX Plus',\n}: EdxUnlimitedLogoProps = {}) => (\n <span className=\"brand-marks__edx-logo\">\n <svg\n width=\"48\"\n height=\"25\"\n viewBox=\"0 0 48 25\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=\"img\"\n aria-label={ariaLabel}\n >\n <g clipPath=\"url(#clip0_4947_41473)\">\n <path\n d=\"M28.4709 3.95479L29.3304 0H4.13314L0 19.0065H21.0675L19.9082 24.1061H40.0865L44.5391 3.95479H28.4709Z\"\n fill=\"#00262B\"\n />\n <path\n d=\"M8.58538 16.5826C8.01563 16.5826 7.47552 16.4938 6.96835 16.3131C6.46118 16.1323 6.01658 15.8659 5.64114 15.517C5.2624 15.165 4.966 14.7337 4.74535 14.2199C4.5247 13.7061 4.41602 13.1163 4.41602 12.4503C4.41602 11.54 4.54775 10.7091 4.81122 9.96067C5.07468 9.21221 5.44024 8.57157 5.91119 8.0356C6.38214 7.49963 6.9453 7.08734 7.60067 6.79239C8.25604 6.50062 8.97728 6.35156 9.75781 6.35156C10.2847 6.35156 10.7853 6.44036 11.2563 6.61796C11.7305 6.79556 12.1422 7.05245 12.4979 7.3918C12.8535 7.73114 13.1368 8.1466 13.3442 8.64452C13.555 9.13926 13.6571 9.70695 13.6571 10.3508C13.6571 10.4491 13.6538 10.5632 13.6472 10.6933C13.6406 10.8265 13.6308 10.9597 13.6176 11.096C13.6044 11.2324 13.5912 11.3688 13.5814 11.4988C13.5682 11.6288 13.5517 11.743 13.5353 11.8318H6.13843C6.13184 11.9174 6.12855 11.9999 6.12526 12.0792C6.12196 12.1585 6.12196 12.2409 6.12196 12.3266C6.12196 12.834 6.19771 13.2653 6.3492 13.6237C6.5007 13.9821 6.6983 14.2738 6.9453 14.499C7.189 14.7242 7.46564 14.8891 7.76863 14.9906C8.07162 15.0921 8.38119 15.1428 8.69076 15.1428C9.36919 15.1428 9.91589 15.0286 10.3276 14.8035C10.7392 14.5783 11.0554 14.2707 11.2694 13.8869H13.0116C12.9029 14.2675 12.7251 14.6195 12.4781 14.9494C12.2311 15.2792 11.9182 15.5646 11.5395 15.8056C11.1608 16.0467 10.7228 16.237 10.2255 16.3733C9.73146 16.516 9.18147 16.5826 8.58538 16.5826ZM11.9281 10.5601C11.9347 10.5284 11.938 10.4744 11.9413 10.3888C11.9446 10.3064 11.9446 10.2239 11.9446 10.1446C11.9446 9.82112 11.8952 9.51349 11.7964 9.22172C11.6976 8.93312 11.5494 8.67623 11.3518 8.4574C11.1542 8.23857 10.9105 8.06414 10.6174 7.93411C10.3243 7.80726 9.98505 7.74066 9.59973 7.74066C9.20452 7.74066 8.83896 7.80726 8.49646 7.94363C8.15395 8.07683 7.84108 8.27029 7.56444 8.51766C7.28451 8.76503 7.0441 9.05998 6.83991 9.40566C6.63572 9.75135 6.47435 10.1351 6.35579 10.5569L11.9281 10.5601Z\"\n fill=\"white\"\n />\n <path\n d=\"M18.3352 16.5837C17.8215 16.5837 17.3373 16.4918 16.8862 16.3046C16.435 16.1175 16.0398 15.8511 15.7006 15.5023C15.3613 15.1534 15.0913 14.7316 14.897 14.2369C14.6994 13.7421 14.6006 13.1903 14.6006 12.5782C14.6006 11.9851 14.6632 11.4174 14.785 10.8783C14.9102 10.3392 15.0847 9.83489 15.3119 9.37503C15.5392 8.912 15.8158 8.49654 16.1353 8.12231C16.4547 7.74808 16.8104 7.43094 17.2023 7.16771C17.5942 6.90448 18.0158 6.7015 18.4703 6.56196C18.9247 6.42242 19.399 6.34947 19.893 6.34947C20.2618 6.34947 20.6109 6.39705 20.9435 6.49536C21.2762 6.59368 21.5792 6.73005 21.8492 6.90448C22.1193 7.07891 22.3498 7.28822 22.5441 7.53559C22.7384 7.78297 22.88 8.05254 22.9689 8.34748H23.1204L24.3884 2.59766H26.0548L23.0085 16.4061H21.4277L21.7241 15.0583H21.5726C21.1971 15.5276 20.7295 15.8987 20.163 16.1714C19.5966 16.4473 18.9873 16.5837 18.3352 16.5837ZM18.8589 15.1629C19.3924 15.1629 19.8864 15.0424 20.3409 14.8014C20.7953 14.5603 21.1905 14.2305 21.5265 13.8119C21.8624 13.3932 22.1259 12.9017 22.3169 12.3372C22.5079 11.7726 22.6034 11.1606 22.6034 10.5072C22.6034 10.0854 22.5441 9.70803 22.4223 9.36869C22.3004 9.03252 22.1291 8.74709 21.9085 8.5124C21.6845 8.27771 21.4178 8.09377 21.0983 7.96691C20.7822 7.83688 20.4232 7.77345 20.0214 7.77345C19.4945 7.77345 19.0071 7.88762 18.5559 8.1128C18.1047 8.33797 17.7161 8.65194 17.3835 9.05789C17.0541 9.46066 16.7939 9.94272 16.6029 10.5009C16.4119 11.0591 16.3164 11.6743 16.3164 12.3403C16.3164 12.7558 16.379 13.1364 16.5041 13.4852C16.6293 13.8341 16.8005 14.1322 17.0245 14.3796C17.2484 14.6269 17.5119 14.8204 17.8248 14.9568C18.131 15.0931 18.4768 15.1629 18.8589 15.1629Z\"\n fill=\"white\"\n />\n <path\n d=\"M46.6871 6.46441C46.506 6.46441 46.3347 6.43269 46.1766 6.36609C46.0185 6.29949 45.8769 6.21069 45.7584 6.09335C45.6365 5.976 45.5443 5.8428 45.4751 5.69057C45.406 5.53834 45.373 5.37343 45.373 5.199C45.373 5.02457 45.406 4.85966 45.4751 4.70743C45.5443 4.5552 45.6365 4.41882 45.7584 4.30465C45.8802 4.18731 46.0185 4.09851 46.1766 4.03191C46.3347 3.96531 46.506 3.93359 46.6871 3.93359C46.8682 3.93359 47.0395 3.96531 47.1976 4.03191C47.3556 4.09851 47.4972 4.18731 47.6158 4.30465C47.7377 4.422 47.8299 4.5552 47.899 4.70743C47.9682 4.85966 48.0011 5.02457 48.0011 5.199C48.0011 5.37343 47.9682 5.53834 47.899 5.69057C47.8299 5.8428 47.7377 5.97918 47.6158 6.09335C47.494 6.20752 47.3556 6.29949 47.1976 6.36609C47.0395 6.43269 46.8682 6.46441 46.6871 6.46441ZM46.6871 6.22972C46.8847 6.22972 47.0658 6.18215 47.2272 6.09018C47.3886 5.9982 47.517 5.87135 47.6158 5.71595C47.7113 5.56055 47.7607 5.38612 47.7607 5.19583C47.7607 5.00554 47.7113 4.83111 47.6158 4.67571C47.5203 4.52031 47.3886 4.39662 47.2272 4.30148C47.0658 4.20951 46.8847 4.16194 46.6871 4.16194C46.4895 4.16194 46.3084 4.20951 46.147 4.30148C45.9856 4.39345 45.8572 4.52031 45.7584 4.67571C45.6629 4.83111 45.6135 5.00554 45.6135 5.19583C45.6135 5.38612 45.6629 5.56055 45.7584 5.71595C45.8539 5.87135 45.9856 5.99503 46.147 6.09018C46.3084 6.18215 46.4895 6.22972 46.6871 6.22972ZM46.2392 5.76669V4.59643H46.8221C46.8847 4.59643 46.944 4.60911 47 4.63765C47.0592 4.6662 47.1053 4.70743 47.1416 4.76134C47.1811 4.81526 47.1976 4.88186 47.1976 4.96114C47.1976 5.04043 47.1778 5.1102 47.1383 5.16729C47.0988 5.22437 47.0494 5.26877 46.9901 5.30049C46.9308 5.3322 46.8682 5.34489 46.8056 5.34489H46.3545V5.18631H46.7497C46.8056 5.18631 46.855 5.16729 46.9012 5.12923C46.944 5.09117 46.967 5.03409 46.967 4.96431C46.967 4.89137 46.944 4.83746 46.9012 4.80574C46.8583 4.77403 46.8089 4.75817 46.7562 4.75817H46.45V5.76669H46.2392ZM46.9473 5.22437L47.2502 5.76669H47.0131L46.72 5.22437H46.9473Z\"\n fill=\"#00262B\"\n />\n <path\n d=\"M40.9978 6.55273H37.2796L33.2288 11.386H33.0279L30.8839 6.55273H27.1262L30.3471 13.5743L23.3916 21.5093H27.0571L31.5228 16.4096H31.8225L34.2366 21.5093H37.9251L34.3584 13.9232L40.9978 6.55273Z\"\n fill=\"white\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_4947_41473\">\n <rect width=\"48\" height=\"24.1061\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n </span>\n);\n"]}
1
+ {"version":3,"file":"BrandMarks.js","sourceRoot":"","sources":["../../../src/components/BrandMarks/BrandMarks.tsx"],"names":[],"mappings":";AAMA,MAAM,IAAI,GAAG,CAAC,EAAE,SAAS,EAAiB,EAAE,EAAE,CAAC,CAC7C,eACE,SAAS,EAAE,SAAS,EACpB,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,KAAK,gBACC,MAAM,aAEjB,eAAM,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAC,IAAI,EAAC,SAAS,GAAG,EACrD,eACE,CAAC,EAAC,IAAI,EACN,CAAC,EAAC,IAAI,EACN,UAAU,EAAC,QAAQ,EACnB,UAAU,EAAC,mBAAmB,EAC9B,UAAU,EAAC,KAAK,EAChB,SAAS,EAAC,QAAQ,EAClB,QAAQ,EAAC,IAAI,EACb,IAAI,EAAC,MAAM,qBAGN,IACH,CACP,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,EAAE,SAAS,EAAiB,EAAE,EAAE,CAAC,CACnD,eACE,SAAS,EAAE,SAAS,EAC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C,MAAM,gBAAgB,GAAG,CAAC,EAC/B,SAAS,GAAG,UAAU,MACG,EAAE,EAAE,EAAE,CAAC,CAChC,eAAM,SAAS,EAAC,uBAAuB,YACrC,eACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,KAAK,gBACE,SAAS,aAErB,aAAG,QAAQ,EAAC,wBAAwB,aAClC,eACE,CAAC,EAAC,uGAAuG,EACzG,IAAI,EAAC,SAAS,GACd,EACF,eACE,CAAC,EAAC,w0DAAw0D,EAC10D,IAAI,EAAC,OAAO,GACZ,EACF,eACE,CAAC,EAAC,qmDAAqmD,EACvmD,IAAI,EAAC,OAAO,GACZ,EACF,eACE,CAAC,EAAC,y6DAAy6D,EAC36D,IAAI,EAAC,SAAS,GACd,EACF,eACE,CAAC,EAAC,kMAAkM,EACpM,IAAI,EAAC,OAAO,GACZ,IACA,EACJ,yBACE,mBAAU,EAAE,EAAC,kBAAkB,YAC7B,eAAM,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO,GAAG,GACxC,GACN,IACH,GACD,CACR,CAAC","sourcesContent":["import React from 'react';\n\ninterface CardMarkProps {\n className: string,\n}\n\nconst Visa = ({ className }: CardMarkProps) => (\n <svg\n className={className}\n width=\"34\"\n height=\"22\"\n viewBox=\"0 0 34 22\"\n role=\"img\"\n aria-label=\"Visa\"\n >\n <rect width=\"34\" height=\"22\" rx=\"3\" fill=\"#1A1F71\" />\n <text\n x=\"17\"\n y=\"15\"\n textAnchor=\"middle\"\n fontFamily=\"Arial, sans-serif\"\n fontWeight=\"700\"\n fontStyle=\"italic\"\n fontSize=\"10\"\n fill=\"#fff\"\n >\n VISA\n </text>\n </svg>\n);\n\nconst Mastercard = ({ className }: CardMarkProps) => (\n <svg\n className={className}\n width=\"34\"\n height=\"22\"\n viewBox=\"0 0 34 22\"\n role=\"img\"\n aria-label=\"Mastercard\"\n >\n <rect width=\"34\" height=\"22\" rx=\"3\" fill=\"#fff\" stroke=\"#E6E6E6\" />\n <circle cx=\"14\" cy=\"11\" r=\"6\" fill=\"#EB001B\" />\n <circle cx=\"20\" cy=\"11\" r=\"6\" fill=\"#F79E1B\" fillOpacity=\"0.9\" />\n </svg>\n);\n\nconst Amex = ({ className }: CardMarkProps) => (\n <svg\n className={className}\n width=\"34\"\n height=\"22\"\n viewBox=\"0 0 34 22\"\n role=\"img\"\n aria-label=\"American Express\"\n >\n <rect width=\"34\" height=\"22\" rx=\"3\" fill=\"#1F72CD\" />\n <text\n x=\"17\"\n y=\"14\"\n textAnchor=\"middle\"\n fontFamily=\"Arial, sans-serif\"\n fontWeight=\"700\"\n fontSize=\"6.5\"\n fill=\"#fff\"\n >\n AMEX\n </text>\n </svg>\n);\n\nconst Discover = ({ className }: CardMarkProps) => (\n <svg\n className={className}\n width=\"34\"\n height=\"22\"\n viewBox=\"0 0 34 22\"\n role=\"img\"\n aria-label=\"Discover\"\n >\n <rect width=\"34\" height=\"22\" rx=\"3\" fill=\"#fff\" stroke=\"#E6E6E6\" />\n <circle cx=\"25\" cy=\"11\" r=\"4\" fill=\"#F47216\" />\n <text\n x=\"13\"\n y=\"14\"\n textAnchor=\"middle\"\n fontFamily=\"Arial, sans-serif\"\n fontWeight=\"700\"\n fontSize=\"5\"\n fill=\"#231F20\"\n >\n DISCVR\n </text>\n </svg>\n);\n\n/** Stripe `brand` code → mark, in display order. */\nconst CARD_MARKS = [\n ['visa', Visa],\n ['mastercard', Mastercard],\n ['amex', Amex],\n ['discover', Discover],\n] as const;\n\ninterface CardBrandsProps {\n /** Stripe-detected network; on narrow screens only its mark is shown. */\n brand?: string | null,\n}\n\n// Decorative — PaymentFields announces the detected network via a live region.\nexport const CardBrands = ({ brand = null }: CardBrandsProps = {}) => (\n <div className=\"brand-marks__card-brands\" aria-hidden=\"true\">\n {CARD_MARKS.map(([code, Mark]) => (\n <Mark\n key={code}\n className={`brand-marks__card-brand${code === brand ? ' brand-marks__card-brand--active' : ''}`}\n />\n ))}\n </div>\n);\n\nexport const PayPalWordmark = () => (\n <span className=\"brand-marks__paypal\">\n <span className=\"brand-marks__paypal-pay\">Pay</span>\n <span className=\"brand-marks__paypal-pal\">Pal</span>\n </span>\n);\n\ninterface EdxUnlimitedLogoProps {\n ariaLabel?: string,\n}\n\nexport const EdxUnlimitedLogo = ({\n ariaLabel = 'edX Plus',\n}: EdxUnlimitedLogoProps = {}) => (\n <span className=\"brand-marks__edx-logo\">\n <svg\n width=\"48\"\n height=\"25\"\n viewBox=\"0 0 48 25\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=\"img\"\n aria-label={ariaLabel}\n >\n <g clipPath=\"url(#clip0_4947_41473)\">\n <path\n d=\"M28.4709 3.95479L29.3304 0H4.13314L0 19.0065H21.0675L19.9082 24.1061H40.0865L44.5391 3.95479H28.4709Z\"\n fill=\"#00262B\"\n />\n <path\n d=\"M8.58538 16.5826C8.01563 16.5826 7.47552 16.4938 6.96835 16.3131C6.46118 16.1323 6.01658 15.8659 5.64114 15.517C5.2624 15.165 4.966 14.7337 4.74535 14.2199C4.5247 13.7061 4.41602 13.1163 4.41602 12.4503C4.41602 11.54 4.54775 10.7091 4.81122 9.96067C5.07468 9.21221 5.44024 8.57157 5.91119 8.0356C6.38214 7.49963 6.9453 7.08734 7.60067 6.79239C8.25604 6.50062 8.97728 6.35156 9.75781 6.35156C10.2847 6.35156 10.7853 6.44036 11.2563 6.61796C11.7305 6.79556 12.1422 7.05245 12.4979 7.3918C12.8535 7.73114 13.1368 8.1466 13.3442 8.64452C13.555 9.13926 13.6571 9.70695 13.6571 10.3508C13.6571 10.4491 13.6538 10.5632 13.6472 10.6933C13.6406 10.8265 13.6308 10.9597 13.6176 11.096C13.6044 11.2324 13.5912 11.3688 13.5814 11.4988C13.5682 11.6288 13.5517 11.743 13.5353 11.8318H6.13843C6.13184 11.9174 6.12855 11.9999 6.12526 12.0792C6.12196 12.1585 6.12196 12.2409 6.12196 12.3266C6.12196 12.834 6.19771 13.2653 6.3492 13.6237C6.5007 13.9821 6.6983 14.2738 6.9453 14.499C7.189 14.7242 7.46564 14.8891 7.76863 14.9906C8.07162 15.0921 8.38119 15.1428 8.69076 15.1428C9.36919 15.1428 9.91589 15.0286 10.3276 14.8035C10.7392 14.5783 11.0554 14.2707 11.2694 13.8869H13.0116C12.9029 14.2675 12.7251 14.6195 12.4781 14.9494C12.2311 15.2792 11.9182 15.5646 11.5395 15.8056C11.1608 16.0467 10.7228 16.237 10.2255 16.3733C9.73146 16.516 9.18147 16.5826 8.58538 16.5826ZM11.9281 10.5601C11.9347 10.5284 11.938 10.4744 11.9413 10.3888C11.9446 10.3064 11.9446 10.2239 11.9446 10.1446C11.9446 9.82112 11.8952 9.51349 11.7964 9.22172C11.6976 8.93312 11.5494 8.67623 11.3518 8.4574C11.1542 8.23857 10.9105 8.06414 10.6174 7.93411C10.3243 7.80726 9.98505 7.74066 9.59973 7.74066C9.20452 7.74066 8.83896 7.80726 8.49646 7.94363C8.15395 8.07683 7.84108 8.27029 7.56444 8.51766C7.28451 8.76503 7.0441 9.05998 6.83991 9.40566C6.63572 9.75135 6.47435 10.1351 6.35579 10.5569L11.9281 10.5601Z\"\n fill=\"white\"\n />\n <path\n d=\"M18.3352 16.5837C17.8215 16.5837 17.3373 16.4918 16.8862 16.3046C16.435 16.1175 16.0398 15.8511 15.7006 15.5023C15.3613 15.1534 15.0913 14.7316 14.897 14.2369C14.6994 13.7421 14.6006 13.1903 14.6006 12.5782C14.6006 11.9851 14.6632 11.4174 14.785 10.8783C14.9102 10.3392 15.0847 9.83489 15.3119 9.37503C15.5392 8.912 15.8158 8.49654 16.1353 8.12231C16.4547 7.74808 16.8104 7.43094 17.2023 7.16771C17.5942 6.90448 18.0158 6.7015 18.4703 6.56196C18.9247 6.42242 19.399 6.34947 19.893 6.34947C20.2618 6.34947 20.6109 6.39705 20.9435 6.49536C21.2762 6.59368 21.5792 6.73005 21.8492 6.90448C22.1193 7.07891 22.3498 7.28822 22.5441 7.53559C22.7384 7.78297 22.88 8.05254 22.9689 8.34748H23.1204L24.3884 2.59766H26.0548L23.0085 16.4061H21.4277L21.7241 15.0583H21.5726C21.1971 15.5276 20.7295 15.8987 20.163 16.1714C19.5966 16.4473 18.9873 16.5837 18.3352 16.5837ZM18.8589 15.1629C19.3924 15.1629 19.8864 15.0424 20.3409 14.8014C20.7953 14.5603 21.1905 14.2305 21.5265 13.8119C21.8624 13.3932 22.1259 12.9017 22.3169 12.3372C22.5079 11.7726 22.6034 11.1606 22.6034 10.5072C22.6034 10.0854 22.5441 9.70803 22.4223 9.36869C22.3004 9.03252 22.1291 8.74709 21.9085 8.5124C21.6845 8.27771 21.4178 8.09377 21.0983 7.96691C20.7822 7.83688 20.4232 7.77345 20.0214 7.77345C19.4945 7.77345 19.0071 7.88762 18.5559 8.1128C18.1047 8.33797 17.7161 8.65194 17.3835 9.05789C17.0541 9.46066 16.7939 9.94272 16.6029 10.5009C16.4119 11.0591 16.3164 11.6743 16.3164 12.3403C16.3164 12.7558 16.379 13.1364 16.5041 13.4852C16.6293 13.8341 16.8005 14.1322 17.0245 14.3796C17.2484 14.6269 17.5119 14.8204 17.8248 14.9568C18.131 15.0931 18.4768 15.1629 18.8589 15.1629Z\"\n fill=\"white\"\n />\n <path\n d=\"M46.6871 6.46441C46.506 6.46441 46.3347 6.43269 46.1766 6.36609C46.0185 6.29949 45.8769 6.21069 45.7584 6.09335C45.6365 5.976 45.5443 5.8428 45.4751 5.69057C45.406 5.53834 45.373 5.37343 45.373 5.199C45.373 5.02457 45.406 4.85966 45.4751 4.70743C45.5443 4.5552 45.6365 4.41882 45.7584 4.30465C45.8802 4.18731 46.0185 4.09851 46.1766 4.03191C46.3347 3.96531 46.506 3.93359 46.6871 3.93359C46.8682 3.93359 47.0395 3.96531 47.1976 4.03191C47.3556 4.09851 47.4972 4.18731 47.6158 4.30465C47.7377 4.422 47.8299 4.5552 47.899 4.70743C47.9682 4.85966 48.0011 5.02457 48.0011 5.199C48.0011 5.37343 47.9682 5.53834 47.899 5.69057C47.8299 5.8428 47.7377 5.97918 47.6158 6.09335C47.494 6.20752 47.3556 6.29949 47.1976 6.36609C47.0395 6.43269 46.8682 6.46441 46.6871 6.46441ZM46.6871 6.22972C46.8847 6.22972 47.0658 6.18215 47.2272 6.09018C47.3886 5.9982 47.517 5.87135 47.6158 5.71595C47.7113 5.56055 47.7607 5.38612 47.7607 5.19583C47.7607 5.00554 47.7113 4.83111 47.6158 4.67571C47.5203 4.52031 47.3886 4.39662 47.2272 4.30148C47.0658 4.20951 46.8847 4.16194 46.6871 4.16194C46.4895 4.16194 46.3084 4.20951 46.147 4.30148C45.9856 4.39345 45.8572 4.52031 45.7584 4.67571C45.6629 4.83111 45.6135 5.00554 45.6135 5.19583C45.6135 5.38612 45.6629 5.56055 45.7584 5.71595C45.8539 5.87135 45.9856 5.99503 46.147 6.09018C46.3084 6.18215 46.4895 6.22972 46.6871 6.22972ZM46.2392 5.76669V4.59643H46.8221C46.8847 4.59643 46.944 4.60911 47 4.63765C47.0592 4.6662 47.1053 4.70743 47.1416 4.76134C47.1811 4.81526 47.1976 4.88186 47.1976 4.96114C47.1976 5.04043 47.1778 5.1102 47.1383 5.16729C47.0988 5.22437 47.0494 5.26877 46.9901 5.30049C46.9308 5.3322 46.8682 5.34489 46.8056 5.34489H46.3545V5.18631H46.7497C46.8056 5.18631 46.855 5.16729 46.9012 5.12923C46.944 5.09117 46.967 5.03409 46.967 4.96431C46.967 4.89137 46.944 4.83746 46.9012 4.80574C46.8583 4.77403 46.8089 4.75817 46.7562 4.75817H46.45V5.76669H46.2392ZM46.9473 5.22437L47.2502 5.76669H47.0131L46.72 5.22437H46.9473Z\"\n fill=\"#00262B\"\n />\n <path\n d=\"M40.9978 6.55273H37.2796L33.2288 11.386H33.0279L30.8839 6.55273H27.1262L30.3471 13.5743L23.3916 21.5093H27.0571L31.5228 16.4096H31.8225L34.2366 21.5093H37.9251L34.3584 13.9232L40.9978 6.55273Z\"\n fill=\"white\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_4947_41473\">\n <rect width=\"48\" height=\"24.1061\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n </span>\n);\n"]}
@@ -20,7 +20,7 @@ const PaymentFields = ({ numberMountRef, expiryMountRef, cvcMountRef, fieldError
20
20
  const { formatMessage } = useIntl();
21
21
  const brandName = cardBrand ? CARD_BRAND_NAMES[cardBrand] : undefined;
22
22
  const focusedError = focusedField ? fieldErrors === null || fieldErrors === void 0 ? void 0 : fieldErrors[focusedField] : undefined;
23
- return (_jsxs("div", { className: "payment--field", children: [_jsxs("div", { className: "d-flex flex-column mb-3 gap-4", children: [_jsxs(Form.Group, { controlId: "cardNumber", className: "mb-0 flex-grow-1", children: [_jsx(Form.Label, { className: "payment--field__label text-gray-900", children: "Card number (16 digits)" }), _jsxs("div", { className: `form-control${(fieldErrors === null || fieldErrors === void 0 ? void 0 : fieldErrors.number) ? ' payment--field__input--error' : ''}`, style: STRIPE_FIELD_STYLE, children: [_jsx("div", { ref: numberMountRef, className: "flex-grow-1" }), _jsx(CardBrands, {})] }), _jsx("span", { className: "sr-only", "aria-live": "polite", "data-testid": "card-brand-status", children: brandName ? formatMessage(messages.cardBrandDetected, { brand: brandName }) : '' }), _jsx(FieldError, { message: fieldErrors === null || fieldErrors === void 0 ? void 0 : fieldErrors.number, announce: announceErrors })] }), _jsxs("div", { className: "d-flex gap-4", children: [_jsxs(Form.Group, { controlId: "cardExpiry", className: "card__expiry mb-0 w-50", children: [_jsx(Form.Label, { className: "payment--field__label text-gray-900", children: "Expiration (MM/YY)" }), _jsx("div", { className: `form-control${(fieldErrors === null || fieldErrors === void 0 ? void 0 : fieldErrors.expiry) ? ' payment--field__input--error' : ''}`, style: STRIPE_FIELD_STYLE, children: _jsx("div", { ref: expiryMountRef, className: "flex-grow-1" }) }), _jsx(FieldError, { message: fieldErrors === null || fieldErrors === void 0 ? void 0 : fieldErrors.expiry, announce: announceErrors })] }), _jsxs(Form.Group, { controlId: "cardCvc", className: "card__cvc mb-0 w-50", children: [_jsx(Form.Label, { className: "payment--field__label text-gray-900", children: "CVC / Security code (3 or 4 digits)" }), _jsxs("div", { className: `form-control${(fieldErrors === null || fieldErrors === void 0 ? void 0 : fieldErrors.cvc) ? ' payment--field__input--error' : ''}`, style: STRIPE_FIELD_STYLE, children: [_jsx("div", { ref: cvcMountRef, className: "flex-grow-1" }), _jsx("img", { src: creditCardCvc, alt: "", "aria-hidden": "true", width: 24, height: 24 })] }), _jsx(FieldError, { message: fieldErrors === null || fieldErrors === void 0 ? void 0 : fieldErrors.cvc, announce: announceErrors })] })] })] }), _jsx("span", { className: "sr-only", "aria-live": "polite", "data-testid": "card-field-error-status", children: focusedError !== null && focusedError !== void 0 ? focusedError : '' })] }));
23
+ return (_jsxs("div", { className: "payment--field", children: [_jsxs("div", { className: "d-flex flex-column mb-3 gap-3", children: [_jsxs(Form.Group, { controlId: "cardNumber", className: "mb-0 flex-grow-1", children: [_jsx(Form.Label, { className: "payment--field__label text-gray-900", children: "Card number (16 digits)" }), _jsxs("div", { className: `form-control payment--field__card-number${(fieldErrors === null || fieldErrors === void 0 ? void 0 : fieldErrors.number) ? ' payment--field__input--error' : ''}`, style: STRIPE_FIELD_STYLE, children: [_jsx("div", { ref: numberMountRef, className: "flex-grow-1" }), _jsx(CardBrands, { brand: cardBrand })] }), _jsx("span", { className: "sr-only", "aria-live": "polite", "data-testid": "card-brand-status", children: brandName ? formatMessage(messages.cardBrandDetected, { brand: brandName }) : '' }), _jsx(FieldError, { message: fieldErrors === null || fieldErrors === void 0 ? void 0 : fieldErrors.number, announce: announceErrors })] }), _jsxs("div", { className: "payment--field__row", children: [_jsxs(Form.Group, { controlId: "cardExpiry", className: "card__expiry mb-0", children: [_jsx(Form.Label, { className: "payment--field__label text-gray-900", children: "Expiration (MM/YY)" }), _jsx("div", { className: `form-control${(fieldErrors === null || fieldErrors === void 0 ? void 0 : fieldErrors.expiry) ? ' payment--field__input--error' : ''}`, style: STRIPE_FIELD_STYLE, children: _jsx("div", { ref: expiryMountRef, className: "flex-grow-1" }) }), _jsx(FieldError, { message: fieldErrors === null || fieldErrors === void 0 ? void 0 : fieldErrors.expiry, announce: announceErrors })] }), _jsxs(Form.Group, { controlId: "cardCvc", className: "card__cvc mb-0", children: [_jsx(Form.Label, { className: "payment--field__label text-gray-900", children: "CVC / Security code (3 or 4 digits)" }), _jsxs("div", { className: `form-control${(fieldErrors === null || fieldErrors === void 0 ? void 0 : fieldErrors.cvc) ? ' payment--field__input--error' : ''}`, style: STRIPE_FIELD_STYLE, children: [_jsx("div", { ref: cvcMountRef, className: "flex-grow-1" }), _jsx("img", { src: creditCardCvc, alt: "", "aria-hidden": "true", width: 24, height: 24 })] }), _jsx(FieldError, { message: fieldErrors === null || fieldErrors === void 0 ? void 0 : fieldErrors.cvc, announce: announceErrors })] })] })] }), _jsx("span", { className: "sr-only", "aria-live": "polite", "data-testid": "card-field-error-status", children: focusedError !== null && focusedError !== void 0 ? focusedError : '' })] }));
24
24
  };
25
25
  export default PaymentFields;
26
26
  //# sourceMappingURL=PaymentFields.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaymentFields.js","sourceRoot":"","sources":["../../../src/components/PaymentFields/PaymentFields.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,wEAAwE;AACxE,MAAM,gBAAgB,GAA2B;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OAAO,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,GAAG,EAAE,QAAQ,EAAE,cAAc,GAAI,IACxD,IACT,IACF,EAGN,eAAM,SAAS,EAAC,SAAS,eAAW,QAAQ,iBAAa,yBAAyB,YAC/E,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,EAAE,GACd,IACH,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import React from 'react';\nimport type { Ref } from 'react';\nimport { Form } from '@openedx/paragon';\nimport { useIntl } from '@openedx/frontend-base';\nimport { STRIPE_FIELD_STYLE } from '../../constants';\nimport type { CardFieldKey } from '../../utils/paymentValidation';\nimport { CardBrands } from '../BrandMarks/BrandMarks';\nimport FieldError from './FieldError';\nimport creditCardCvc from './creditCardCvc.png';\nimport messages from './Messages';\n\n/** Stripe `brand` codes → network names announced to screen readers. */\nconst CARD_BRAND_NAMES: Record<string, string> = {\n visa: 'Visa',\n mastercard: 'Mastercard',\n amex: 'American Express',\n discover: 'Discover',\n diners: 'Diners Club',\n jcb: 'JCB',\n unionpay: 'UnionPay',\n};\n\nexport interface PaymentFieldErrors {\n number?: string,\n expiry?: string,\n cvc?: string,\n}\n\nexport interface PaymentFieldsProps {\n numberMountRef: Ref<HTMLDivElement>,\n expiryMountRef: Ref<HTMLDivElement>,\n cvcMountRef: Ref<HTMLDivElement>,\n fieldErrors?: PaymentFieldErrors,\n /** Announce errors as they appear (blur-time) rather than only on focus. */\n announceErrors?: boolean,\n /** Card field whose Stripe input currently has focus. */\n focusedField?: CardFieldKey | null,\n /** Stripe-detected card network for the number field (e.g. 'visa'). */\n cardBrand?: string | null,\n}\n\nconst PaymentFields = ({\n numberMountRef,\n expiryMountRef,\n cvcMountRef,\n fieldErrors,\n announceErrors = true,\n focusedField = null,\n cardBrand = null,\n}: PaymentFieldsProps) => {\n const { formatMessage } = useIntl();\n const brandName = cardBrand ? CARD_BRAND_NAMES[cardBrand] : undefined;\n const focusedError = focusedField ? fieldErrors?.[focusedField] : undefined;\n\n return (\n <div className=\"payment--field\">\n {/* Single-row wrapper on desktop, stacked on mobile */}\n <div className=\"d-flex flex-column mb-3 gap-4\">\n {/* Card number — grows to fill available space */}\n <Form.Group controlId=\"cardNumber\" className=\"mb-0 flex-grow-1\">\n <Form.Label className=\"payment--field__label text-gray-900\">\n Card number (16 digits)\n </Form.Label>\n <div\n className={`form-control${fieldErrors?.number ? ' payment--field__input--error' : ''}`}\n style={STRIPE_FIELD_STYLE}\n >\n <div ref={numberMountRef} className=\"flex-grow-1\" />\n <CardBrands />\n </div>\n {/* Brand icons are decorative; announce the detected network once instead. */}\n <span className=\"sr-only\" aria-live=\"polite\" data-testid=\"card-brand-status\">\n {brandName ? formatMessage(messages.cardBrandDetected, { brand: brandName }) : ''}\n </span>\n <FieldError message={fieldErrors?.number} announce={announceErrors} />\n </Form.Group>\n\n <div className=\"d-flex gap-4\">\n {/* Expiry — fixed width on desktop */}\n <Form.Group controlId=\"cardExpiry\" className=\"card__expiry mb-0 w-50\">\n <Form.Label className=\"payment--field__label text-gray-900\">\n Expiration (MM/YY)\n </Form.Label>\n <div\n className={`form-control${fieldErrors?.expiry ? ' payment--field__input--error' : ''}`}\n style={STRIPE_FIELD_STYLE}\n >\n <div ref={expiryMountRef} className=\"flex-grow-1\" />\n </div>\n <FieldError message={fieldErrors?.expiry} announce={announceErrors} />\n </Form.Group>\n\n {/* CVC — fixed width on desktop */}\n <Form.Group controlId=\"cardCvc\" className=\"card__cvc mb-0 w-50\">\n <Form.Label className=\"payment--field__label text-gray-900\">\n CVC / Security code (3 or 4 digits)\n </Form.Label>\n <div\n className={`form-control${fieldErrors?.cvc ? ' payment--field__input--error' : ''}`}\n style={STRIPE_FIELD_STYLE}\n >\n <div ref={cvcMountRef} className=\"flex-grow-1\" />\n <img src={creditCardCvc} alt=\"\" aria-hidden=\"true\" width={24} height={24} />\n </div>\n <FieldError message={fieldErrors?.cvc} announce={announceErrors} />\n </Form.Group>\n </div>\n </div>\n {/* Stripe inputs live in cross-origin iframes, out of reach of\n aria-describedby. Read the field's error when it takes focus instead. */}\n <span className=\"sr-only\" aria-live=\"polite\" data-testid=\"card-field-error-status\">\n {focusedError ?? ''}\n </span>\n </div>\n );\n};\n\nexport default PaymentFields;\n"]}
1
+ {"version":3,"file":"PaymentFields.js","sourceRoot":"","sources":["../../../src/components/PaymentFields/PaymentFields.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,wEAAwE;AACxE,MAAM,gBAAgB,GAA2B;IAC/C,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,YAAY;IACxB,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,aAAa;IACrB,GAAG,EAAE,KAAK;IACV,QAAQ,EAAE,UAAU;CACrB,CAAC;AAqBF,MAAM,aAAa,GAAG,CAAC,EACrB,cAAc,EACd,cAAc,EACd,WAAW,EACX,WAAW,EACX,cAAc,GAAG,IAAI,EACrB,YAAY,GAAG,IAAI,EACnB,SAAS,GAAG,IAAI,GACG,EAAE,EAAE;IACvB,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IACpC,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACtE,MAAM,YAAY,GAAG,YAAY,CAAC,CAAC,CAAC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,YAAY,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AAS,EAAC,aAAa,GAAG,GAChD,EACN,KAAC,UAAU,IAAC,OAAO,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAI,IAC3D,EAEb,MAAC,IAAI,CAAC,KAAK,IAAC,SAAS,EAAC,SAAS,EAAC,SAAS,EAAC,gBAAgB,aACxD,KAAC,IAAI,CAAC,KAAK,IAAC,SAAS,EAAC,qCAAqC,oDAE9C,EACb,eACE,SAAS,EAAE,eAAe,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,GAAG,EAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,EAAE,EAAE,EACnF,KAAK,EAAE,kBAAkB,aAEzB,cAAK,GAAG,EAAE,WAAW,EAAE,SAAS,EAAC,aAAa,GAAG,EACjD,cAAK,GAAG,EAAE,aAAa,EAAE,GAAG,EAAC,EAAE,iBAAa,MAAM,EAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,GAAI,IACxE,EACN,KAAC,UAAU,IAAC,OAAO,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,GAAG,EAAE,QAAQ,EAAE,cAAc,GAAI,IACxD,IACT,IACF,EAGN,eAAM,SAAS,EAAC,SAAS,eAAW,QAAQ,iBAAa,yBAAyB,YAC/E,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,EAAE,GACd,IACH,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import React from 'react';\nimport type { Ref } from 'react';\nimport { Form } from '@openedx/paragon';\nimport { useIntl } from '@openedx/frontend-base';\nimport { STRIPE_FIELD_STYLE } from '../../constants';\nimport type { CardFieldKey } from '../../utils/paymentValidation';\nimport { CardBrands } from '../BrandMarks/BrandMarks';\nimport FieldError from './FieldError';\nimport creditCardCvc from './creditCardCvc.png';\nimport messages from './Messages';\n\n/** Stripe `brand` codes → network names announced to screen readers. */\nconst CARD_BRAND_NAMES: Record<string, string> = {\n visa: 'Visa',\n mastercard: 'Mastercard',\n amex: 'American Express',\n discover: 'Discover',\n diners: 'Diners Club',\n jcb: 'JCB',\n unionpay: 'UnionPay',\n};\n\nexport interface PaymentFieldErrors {\n number?: string,\n expiry?: string,\n cvc?: string,\n}\n\nexport interface PaymentFieldsProps {\n numberMountRef: Ref<HTMLDivElement>,\n expiryMountRef: Ref<HTMLDivElement>,\n cvcMountRef: Ref<HTMLDivElement>,\n fieldErrors?: PaymentFieldErrors,\n /** Announce errors as they appear (blur-time) rather than only on focus. */\n announceErrors?: boolean,\n /** Card field whose Stripe input currently has focus. */\n focusedField?: CardFieldKey | null,\n /** Stripe-detected card network for the number field (e.g. 'visa'). */\n cardBrand?: string | null,\n}\n\nconst PaymentFields = ({\n numberMountRef,\n expiryMountRef,\n cvcMountRef,\n fieldErrors,\n announceErrors = true,\n focusedField = null,\n cardBrand = null,\n}: PaymentFieldsProps) => {\n const { formatMessage } = useIntl();\n const brandName = cardBrand ? CARD_BRAND_NAMES[cardBrand] : undefined;\n const focusedError = focusedField ? fieldErrors?.[focusedField] : undefined;\n\n return (\n <div className=\"payment--field\">\n {/* Single-row wrapper on desktop, stacked on mobile */}\n <div className=\"d-flex flex-column mb-3 gap-3\">\n {/* Card number — grows to fill available space */}\n <Form.Group controlId=\"cardNumber\" className=\"mb-0 flex-grow-1\">\n <Form.Label className=\"payment--field__label text-gray-900\">\n Card number (16 digits)\n </Form.Label>\n <div\n className={`form-control payment--field__card-number${fieldErrors?.number ? ' payment--field__input--error' : ''}`}\n style={STRIPE_FIELD_STYLE}\n >\n <div ref={numberMountRef} className=\"flex-grow-1\" />\n <CardBrands brand={cardBrand} />\n </div>\n {/* Brand icons are decorative; announce the detected network once instead. */}\n <span className=\"sr-only\" aria-live=\"polite\" data-testid=\"card-brand-status\">\n {brandName ? formatMessage(messages.cardBrandDetected, { brand: brandName }) : ''}\n </span>\n <FieldError message={fieldErrors?.number} announce={announceErrors} />\n </Form.Group>\n\n {/* Expiry + CVC share label / input / error rows, so the inputs line\n up even when one label wraps to more lines than the other. */}\n <div className=\"payment--field__row\">\n <Form.Group controlId=\"cardExpiry\" className=\"card__expiry mb-0\">\n <Form.Label className=\"payment--field__label text-gray-900\">\n Expiration (MM/YY)\n </Form.Label>\n <div\n className={`form-control${fieldErrors?.expiry ? ' payment--field__input--error' : ''}`}\n style={STRIPE_FIELD_STYLE}\n >\n <div ref={expiryMountRef} className=\"flex-grow-1\" />\n </div>\n <FieldError message={fieldErrors?.expiry} announce={announceErrors} />\n </Form.Group>\n\n <Form.Group controlId=\"cardCvc\" className=\"card__cvc mb-0\">\n <Form.Label className=\"payment--field__label text-gray-900\">\n CVC / Security code (3 or 4 digits)\n </Form.Label>\n <div\n className={`form-control${fieldErrors?.cvc ? ' payment--field__input--error' : ''}`}\n style={STRIPE_FIELD_STYLE}\n >\n <div ref={cvcMountRef} className=\"flex-grow-1\" />\n <img src={creditCardCvc} alt=\"\" aria-hidden=\"true\" width={24} height={24} />\n </div>\n <FieldError message={fieldErrors?.cvc} announce={announceErrors} />\n </Form.Group>\n </div>\n </div>\n {/* Stripe inputs live in cross-origin iframes, out of reach of\n aria-describedby. Read the field's error when it takes focus instead. */}\n <span className=\"sr-only\" aria-live=\"polite\" data-testid=\"card-field-error-status\">\n {focusedError ?? ''}\n </span>\n </div>\n );\n};\n\nexport default PaymentFields;\n"]}
@@ -39,7 +39,7 @@ const messages = defineMessages({
39
39
  // Order total
40
40
  orderDisclaimer: {
41
41
  id: 'checkout.paymentForm.orderDisclaimer',
42
- defaultMessage: 'After you complete your order you will be able to select course dates from your dashboard.',
42
+ defaultMessage: 'The above total includes any applicable taxes. After you complete your order you will be automatically enrolled in the verified track of the course.',
43
43
  description: 'Disclaimer shown above the order total explaining taxes and enrollment',
44
44
  },
45
45
  total: {
@@ -1 +1 @@
1
- {"version":3,"file":"Messages.js","sourceRoot":"","sources":["../../../src/components/PaymentForm/Messages.ts"],"names":[],"mappings":"AAAA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D,WAAW,EAAE,0FAA0F;KACxG;IACD,cAAc,EAAE;QACd,EAAE,EAAE,qCAAqC;QACzC,cAAc,EAAE,8BAA8B;QAC9C,WAAW,EAAE,6FAA6F;KAC3G;IACD,WAAW,EAAE;QACX,EAAE,EAAE,kCAAkC;QACtC,cAAc,EAAE,uCAAuC;QACvD,WAAW,EAAE,0EAA0E;KACxF;IACD,eAAe,EAAE;QACf,EAAE,EAAE,sCAAsC;QAC1C,cAAc,EAAE,2BAA2B;QAC3C,WAAW,EAAE,iFAAiF;KAC/F;IACD,aAAa,EAAE;QACb,EAAE,EAAE,oCAAoC;QACxC,cAAc,EAAE,yBAAyB;QACzC,WAAW,EAAE,qFAAqF;KACnG;IACD,gBAAgB,EAAE;QAChB,EAAE,EAAE,uCAAuC;QAC3C,cAAc,EAAE,4BAA4B;QAC5C,WAAW,EAAE,4FAA4F;KAC1G;IACD,eAAe,EAAE;QACf,EAAE,EAAE,sCAAsC;QAC1C,cAAc,EAAE,4BAA4B;QAC5C,WAAW,EAAE,mGAAmG;KACjH;IACD,kBAAkB,EAAE;QAClB,EAAE,EAAE,yCAAyC;QAC7C,cAAc,EAAE,+BAA+B;QAC/C,WAAW,EAAE,kGAAkG;KAChH;IACD,cAAc,EAAE;QACd,EAAE,EAAE,qCAAqC;QACzC,cAAc,EAAE,wBAAwB;QACxC,WAAW,EAAE,2DAA2D;KACzE;IACD,iBAAiB,EAAE;QACjB,EAAE,EAAE,wCAAwC;QAC5C,cAAc,EAAE,2BAA2B;QAC3C,WAAW,EAAE,oEAAoE;KAClF;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n // Section headings\n selectPaymentMethod: {\n id: 'checkout.paymentForm.selectPaymentMethod',\n defaultMessage: 'Select Payment Method',\n description: 'Heading for the payment method selection section',\n },\n needAssistance: {\n id: 'checkout.paymentForm.needAssistance',\n defaultMessage: 'Need assistance?',\n description: 'Help text heading',\n },\n needAssistanceBody: {\n id: 'checkout.paymentForm.needAssistanceBody',\n defaultMessage: 'Visit the {link} to review purchase and refund policies.',\n description: 'Help text with learner help center link',\n },\n learnerHelpCenter: {\n id: 'checkout.paymentForm.learnerHelpCenter',\n defaultMessage: 'Learner Help Center',\n description: 'Learner help center link text',\n },\n learnerHelpCenterLabel: {\n id: 'checkout.paymentForm.learnerHelpCenterLabel',\n defaultMessage: 'Learner Help Center, opens in a new tab',\n description: 'Accessible label for the Learner Help Center link, which opens in a new tab',\n },\n\n payWithCard: {\n id: 'checkout.paymentForm.payWithCard',\n defaultMessage: 'Pay with card',\n description: 'Heading for the card payment fields',\n },\n allFieldsRequired: {\n id: 'checkout.paymentForm.allFieldsRequired',\n defaultMessage: 'All fields are required',\n description: 'Note under the \"Pay with card\" heading',\n },\n\n // Order total\n orderDisclaimer: {\n id: 'checkout.paymentForm.orderDisclaimer',\n defaultMessage: 'After you complete your order you will be able to select course dates from your dashboard.',\n description: 'Disclaimer shown above the order total explaining taxes and enrollment',\n },\n total: {\n id: 'checkout.paymentForm.total',\n defaultMessage: 'Total:',\n description: 'Label for the order total amount',\n },\n totalAmount: {\n id: 'checkout.paymentForm.totalAmount',\n defaultMessage: '${amount} {currency}',\n description: 'Formatted order total with currency code e.g. $219.00 USD',\n },\n\n // Submit button\n payNow: {\n id: 'checkout.paymentForm.payNow',\n defaultMessage: 'Pay now',\n description: 'Submit button label',\n },\n processing: {\n id: 'checkout.paymentForm.processing',\n defaultMessage: 'Processing...',\n description: 'Submit button label while the order is being placed',\n },\n country: {\n id: 'checkout.paymentForm.country',\n defaultMessage: 'Country',\n description: 'Country selector label',\n },\n countryPlaceholder: {\n id: 'checkout.paymentForm.countryPlaceholder',\n defaultMessage: 'Select your country',\n description: 'Placeholder option shown before a country is selected',\n },\n state: {\n id: 'checkout.paymentForm.state',\n defaultMessage: 'State',\n description: 'State selector label (India)',\n },\n statePlaceholder: {\n id: 'checkout.paymentForm.statePlaceholder',\n defaultMessage: 'Select your state',\n description: 'Placeholder option shown before a state is selected',\n },\n province: {\n id: 'checkout.paymentForm.province',\n defaultMessage: 'Province',\n description: 'Province selector label (Canada)',\n },\n provincePlaceholder: {\n id: 'checkout.paymentForm.provincePlaceholder',\n defaultMessage: 'Select your province',\n description: 'Placeholder option shown before a province is selected',\n },\n zipCode: {\n id: 'checkout.paymentForm.zipCode',\n defaultMessage: 'ZIP Code',\n description: 'ZIP code label (United States)',\n },\n zipCodePlaceholder: {\n id: 'checkout.paymentForm.zipCodePlaceholder',\n defaultMessage: '12345',\n description: 'ZIP code input placeholder (United States)',\n },\n postalCode: {\n id: 'checkout.paymentForm.postalCode',\n defaultMessage: 'Postal code',\n description: 'Postal code label (Canada)',\n },\n postalCodePlaceholder: {\n id: 'checkout.paymentForm.postalCodePlaceholder',\n defaultMessage: 'A1A 1A1',\n description: 'Postal code input placeholder (Canada)',\n },\n cardNumberRequired: {\n id: 'checkout.paymentForm.cardNumberRequired',\n defaultMessage: 'Enter your Card number to proceed.',\n description: 'Error under the card number field when Pay now is clicked without a complete card number',\n },\n expiryRequired: {\n id: 'checkout.paymentForm.expiryRequired',\n defaultMessage: 'Enter Expiration to proceed.',\n description: 'Error under the expiration field when Pay now is clicked without a complete expiration date',\n },\n cvcRequired: {\n id: 'checkout.paymentForm.cvcRequired',\n defaultMessage: 'Enter CVC / Security code to proceed.',\n description: 'Error under the CVC field when Pay now is clicked without a complete CVC',\n },\n countryRequired: {\n id: 'checkout.paymentForm.countryRequired',\n defaultMessage: 'Enter Country to proceed.',\n description: 'Error under the billing country field when Pay now is clicked without a country',\n },\n stateRequired: {\n id: 'checkout.paymentForm.stateRequired',\n defaultMessage: 'Enter State to proceed.',\n description: 'Error under the billing state field (India) when Pay now is clicked without a state',\n },\n provinceRequired: {\n id: 'checkout.paymentForm.provinceRequired',\n defaultMessage: 'Enter Province to proceed.',\n description: 'Error under the billing province field (Canada) when Pay now is clicked without a province',\n },\n zipCodeRequired: {\n id: 'checkout.paymentForm.zipCodeRequired',\n defaultMessage: 'Enter ZIP Code to proceed.',\n description: 'Error under the billing ZIP code field (United States) when Pay now is clicked without a ZIP code',\n },\n postalCodeRequired: {\n id: 'checkout.paymentForm.postalCodeRequired',\n defaultMessage: 'Enter Postal code to proceed.',\n description: 'Error under the billing postal code field (Canada) when Pay now is clicked without a postal code',\n },\n zipCodeInvalid: {\n id: 'checkout.paymentForm.zipCodeInvalid',\n defaultMessage: 'Enter a valid ZIP code',\n description: 'Error text shown when a US ZIP code has an invalid format',\n },\n postalCodeInvalid: {\n id: 'checkout.paymentForm.postalCodeInvalid',\n defaultMessage: 'Enter a valid postal code',\n description: 'Error text shown when a Canadian postal code has an invalid format',\n },\n});\n\nexport default messages;\n"]}
1
+ {"version":3,"file":"Messages.js","sourceRoot":"","sources":["../../../src/components/PaymentForm/Messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,mBAAmB;IACnB,mBAAmB,EAAE;QACnB,EAAE,EAAE,0CAA0C;QAC9C,cAAc,EAAE,uBAAuB;QACvC,WAAW,EAAE,kDAAkD;KAChE;IACD,cAAc,EAAE;QACd,EAAE,EAAE,qCAAqC;QACzC,cAAc,EAAE,kBAAkB;QAClC,WAAW,EAAE,mBAAmB;KACjC;IACD,kBAAkB,EAAE;QAClB,EAAE,EAAE,yCAAyC;QAC7C,cAAc,EAAE,0DAA0D;QAC1E,WAAW,EAAE,yCAAyC;KACvD;IACD,iBAAiB,EAAE;QACjB,EAAE,EAAE,wCAAwC;QAC5C,cAAc,EAAE,qBAAqB;QACrC,WAAW,EAAE,+BAA+B;KAC7C;IACD,sBAAsB,EAAE;QACtB,EAAE,EAAE,6CAA6C;QACjD,cAAc,EAAE,yCAAyC;QACzD,WAAW,EAAE,6EAA6E;KAC3F;IAED,WAAW,EAAE;QACX,EAAE,EAAE,kCAAkC;QACtC,cAAc,EAAE,e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yCAAyC;QAC7C,cAAc,EAAE,+BAA+B;QAC/C,WAAW,EAAE,kGAAkG;KAChH;IACD,cAAc,EAAE;QACd,EAAE,EAAE,qCAAqC;QACzC,cAAc,EAAE,wBAAwB;QACxC,WAAW,EAAE,2DAA2D;KACzE;IACD,iBAAiB,EAAE;QACjB,EAAE,EAAE,wCAAwC;QAC5C,cAAc,EAAE,2BAA2B;QAC3C,WAAW,EAAE,oEAAoE;KAClF;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n // Section headings\n selectPaymentMethod: {\n id: 'checkout.paymentForm.selectPaymentMethod',\n defaultMessage: 'Select Payment Method',\n description: 'Heading for the payment method selection section',\n },\n needAssistance: {\n id: 'checkout.paymentForm.needAssistance',\n defaultMessage: 'Need assistance?',\n description: 'Help text heading',\n },\n needAssistanceBody: {\n id: 'checkout.paymentForm.needAssistanceBody',\n defaultMessage: 'Visit the {link} to review purchase and refund policies.',\n description: 'Help text with learner help center link',\n },\n learnerHelpCenter: {\n id: 'checkout.paymentForm.learnerHelpCenter',\n defaultMessage: 'Learner Help Center',\n description: 'Learner help center link text',\n },\n learnerHelpCenterLabel: {\n id: 'checkout.paymentForm.learnerHelpCenterLabel',\n defaultMessage: 'Learner Help Center, opens in a new tab',\n description: 'Accessible label for the Learner Help Center link, which opens in a new tab',\n },\n\n payWithCard: {\n id: 'checkout.paymentForm.payWithCard',\n defaultMessage: 'Pay with card',\n description: 'Heading for the card payment fields',\n },\n allFieldsRequired: {\n id: 'checkout.paymentForm.allFieldsRequired',\n defaultMessage: 'All fields are required',\n description: 'Note under the \"Pay with card\" heading',\n },\n\n // Order total\n orderDisclaimer: {\n id: 'checkout.paymentForm.orderDisclaimer',\n defaultMessage: 'The above total includes any applicable taxes. After you complete your order you will be automatically enrolled in the verified track of the course.',\n description: 'Disclaimer shown above the order total explaining taxes and enrollment',\n },\n total: {\n id: 'checkout.paymentForm.total',\n defaultMessage: 'Total:',\n description: 'Label for the order total amount',\n },\n totalAmount: {\n id: 'checkout.paymentForm.totalAmount',\n defaultMessage: '${amount} {currency}',\n description: 'Formatted order total with currency code e.g. $219.00 USD',\n },\n\n // Submit button\n payNow: {\n id: 'checkout.paymentForm.payNow',\n defaultMessage: 'Pay now',\n description: 'Submit button label',\n },\n processing: {\n id: 'checkout.paymentForm.processing',\n defaultMessage: 'Processing...',\n description: 'Submit button label while the order is being placed',\n },\n country: {\n id: 'checkout.paymentForm.country',\n defaultMessage: 'Country',\n description: 'Country selector label',\n },\n countryPlaceholder: {\n id: 'checkout.paymentForm.countryPlaceholder',\n defaultMessage: 'Select your country',\n description: 'Placeholder option shown before a country is selected',\n },\n state: {\n id: 'checkout.paymentForm.state',\n defaultMessage: 'State',\n description: 'State selector label (India)',\n },\n statePlaceholder: {\n id: 'checkout.paymentForm.statePlaceholder',\n defaultMessage: 'Select your state',\n description: 'Placeholder option shown before a state is selected',\n },\n province: {\n id: 'checkout.paymentForm.province',\n defaultMessage: 'Province',\n description: 'Province selector label (Canada)',\n },\n provincePlaceholder: {\n id: 'checkout.paymentForm.provincePlaceholder',\n defaultMessage: 'Select your province',\n description: 'Placeholder option shown before a province is selected',\n },\n zipCode: {\n id: 'checkout.paymentForm.zipCode',\n defaultMessage: 'ZIP Code',\n description: 'ZIP code label (United States)',\n },\n zipCodePlaceholder: {\n id: 'checkout.paymentForm.zipCodePlaceholder',\n defaultMessage: '12345',\n description: 'ZIP code input placeholder (United States)',\n },\n postalCode: {\n id: 'checkout.paymentForm.postalCode',\n defaultMessage: 'Postal code',\n description: 'Postal code label (Canada)',\n },\n postalCodePlaceholder: {\n id: 'checkout.paymentForm.postalCodePlaceholder',\n defaultMessage: 'A1A 1A1',\n description: 'Postal code input placeholder (Canada)',\n },\n cardNumberRequired: {\n id: 'checkout.paymentForm.cardNumberRequired',\n defaultMessage: 'Enter your Card number to proceed.',\n description: 'Error under the card number field when Pay now is clicked without a complete card number',\n },\n expiryRequired: {\n id: 'checkout.paymentForm.expiryRequired',\n defaultMessage: 'Enter Expiration to proceed.',\n description: 'Error under the expiration field when Pay now is clicked without a complete expiration date',\n },\n cvcRequired: {\n id: 'checkout.paymentForm.cvcRequired',\n defaultMessage: 'Enter CVC / Security code to proceed.',\n description: 'Error under the CVC field when Pay now is clicked without a complete CVC',\n },\n countryRequired: {\n id: 'checkout.paymentForm.countryRequired',\n defaultMessage: 'Enter Country to proceed.',\n description: 'Error under the billing country field when Pay now is clicked without a country',\n },\n stateRequired: {\n id: 'checkout.paymentForm.stateRequired',\n defaultMessage: 'Enter State to proceed.',\n description: 'Error under the billing state field (India) when Pay now is clicked without a state',\n },\n provinceRequired: {\n id: 'checkout.paymentForm.provinceRequired',\n defaultMessage: 'Enter Province to proceed.',\n description: 'Error under the billing province field (Canada) when Pay now is clicked without a province',\n },\n zipCodeRequired: {\n id: 'checkout.paymentForm.zipCodeRequired',\n defaultMessage: 'Enter ZIP Code to proceed.',\n description: 'Error under the billing ZIP code field (United States) when Pay now is clicked without a ZIP code',\n },\n postalCodeRequired: {\n id: 'checkout.paymentForm.postalCodeRequired',\n defaultMessage: 'Enter Postal code to proceed.',\n description: 'Error under the billing postal code field (Canada) when Pay now is clicked without a postal code',\n },\n zipCodeInvalid: {\n id: 'checkout.paymentForm.zipCodeInvalid',\n defaultMessage: 'Enter a valid ZIP code',\n description: 'Error text shown when a US ZIP code has an invalid format',\n },\n postalCodeInvalid: {\n id: 'checkout.paymentForm.postalCodeInvalid',\n defaultMessage: 'Enter a valid postal code',\n description: 'Error text shown when a Canadian postal code has an invalid format',\n },\n});\n\nexport default messages;\n"]}
@@ -6,6 +6,14 @@
6
6
  gap: 4px;
7
7
  }
8
8
 
9
+ // In a card field under 360px the four marks leave the Stripe input too
10
+ // narrow for a full card number, so only the detected network's mark stays.
11
+ @container (max-width: 359.98px) {
12
+ &__card-brand:not(.brand-marks__card-brand--active) {
13
+ display: none;
14
+ }
15
+ }
16
+
9
17
  &__paypal {
10
18
  font-family: Arial, sans-serif;
11
19
  font-weight: 700;
@@ -5,12 +5,35 @@
5
5
  font-weight: 400;
6
6
  font-size: 14px;
7
7
  line-height: 145%;
8
- margin-bottom: 12px;
8
+ margin-bottom: 8px;
9
9
  }
10
10
 
11
- .card__expiry,
12
- .card__cvc {
13
- width: 10.75rem;
11
+ // Expiry + CVC. Each group spans the row's label / input / error tracks
12
+ // through subgrid, so a label that wraps to more lines pushes both
13
+ // inputs down together. Labels sit on the input like in the design.
14
+ &__row {
15
+ display: grid;
16
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
17
+ grid-template-rows: auto auto auto;
18
+ column-gap: 0.75rem;
19
+ row-gap: 0;
20
+
21
+ .card__expiry,
22
+ .card__cvc {
23
+ display: grid;
24
+ grid-row: span 3;
25
+ grid-template-rows: subgrid;
26
+ row-gap: 0;
27
+ }
28
+
29
+ .payment--field__label {
30
+ align-self: end;
31
+ }
32
+ }
33
+
34
+ // Lets the card brand marks react to the field's own width (brandMarks.scss).
35
+ &__card-number {
36
+ container-type: inline-size;
14
37
  }
15
38
 
16
39
  .form-control {
@@ -134,12 +134,8 @@
134
134
 
135
135
  }
136
136
 
137
- @media (--pgn-size-breakpoint-min-width-lg) {
138
- .payment-form {
139
- max-width: 763px;
140
- padding: 32px;
141
- }
142
-
137
+ // Tablet and up: total on the left, auto-width Pay now on the same row.
138
+ @media (--pgn-size-breakpoint-min-width-md) {
143
139
  .payment-form__total-row {
144
140
  flex-direction: row;
145
141
  align-items: center;
@@ -150,4 +146,11 @@
150
146
  .payment-form__submit {
151
147
  width: auto;
152
148
  }
149
+ }
150
+
151
+ @media (--pgn-size-breakpoint-min-width-lg) {
152
+ .payment-form {
153
+ max-width: 763px;
154
+ padding: 32px;
155
+ }
153
156
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edx/frontend-app-alacarte-checkout",
3
- "version": "1.51.0",
3
+ "version": "1.52.0",
4
4
  "description": "alacarte Checkout Frontend application",
5
5
  "repository": {
6
6
  "type": "git",