diff --git a/.github/workflows/run-automation-test.yml b/.github/workflows/run-automation-test.yml index 1fa7b5fc0..657daac00 100644 --- a/.github/workflows/run-automation-test.yml +++ b/.github/workflows/run-automation-test.yml @@ -12,8 +12,6 @@ jobs: runs-on: ubuntu-latest environment: Testing env: - HS_Pub_Key: ${{ secrets.HYPERSWITCH_PUBLISHABLE_KEY }} - HS_Sec_Key: ${{ secrets.HYPERSWITCH_SECRET_KEY }} HS_Prof_Id: ${{ secrets.PROFILE_ID }} HS_Server_Url: "https://sandbox.hyperswitch.io" HS_Client_Url: "http://localhost:9050" @@ -57,7 +55,7 @@ jobs: uses: cypress-io/github-action@v6 with: working-directory: ./cypress-tests - env: - CYPRESS_HYPERSWITCH_PUBLISHABLE_KEY: $HS_Pub_Key - CYPRESS_HYPERSWITCH_SECRET_KEY: $HS_Sec_Key + env: + CYPRESS_HYPERSWITCH_PUBLISHABLE_KEY: ${{ secrets.HYPERSWITCH_PUBLISHABLE_KEY }} + CYPRESS_HYPERSWITCH_SECRET_KEY: ${{ secrets.HYPERSWITCH_SECRET_KEY }} # Runs Cypress tests located in the specified directory diff --git a/CHANGELOG.md b/CHANGELOG.md index 50019493c..627e0d630 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,75 @@ +## [0.92.1](https://github.com/juspay/hyperswitch-web/compare/v0.92.0...v0.92.1) (2024-10-10) + + +### Bug Fixes + +* web package added ([#726](https://github.com/juspay/hyperswitch-web/issues/726)) ([ecf0db3](https://github.com/juspay/hyperswitch-web/commit/ecf0db3d2fdb811f572bdffb5a61e468284a1c51)) + +# [0.92.0](https://github.com/juspay/hyperswitch-web/compare/v0.91.10...v0.92.0) (2024-10-10) + + +### Features + +* added bubblegum theme ([#723](https://github.com/juspay/hyperswitch-web/issues/723)) ([7df22f3](https://github.com/juspay/hyperswitch-web/commit/7df22f3f9c0dd1c8687d67e64faf7a0591e3e59b)) + +## [0.91.10](https://github.com/juspay/hyperswitch-web/compare/v0.91.9...v0.91.10) (2024-10-10) + + +### Bug Fixes + +* fixed applePay for headless fow ([#725](https://github.com/juspay/hyperswitch-web/issues/725)) ([6e513a3](https://github.com/juspay/hyperswitch-web/commit/6e513a3bab9444a75dbc976945ab3113ced76b51)) + +## [0.91.9](https://github.com/juspay/hyperswitch-web/compare/v0.91.8...v0.91.9) (2024-10-07) + + +### Bug Fixes + +* cypress env fix ([#719](https://github.com/juspay/hyperswitch-web/issues/719)) ([95eabc0](https://github.com/juspay/hyperswitch-web/commit/95eabc0242094cedb2c48af19c41e2fa0fa72b33)) + +## [0.91.8](https://github.com/juspay/hyperswitch-web/compare/v0.91.7...v0.91.8) (2024-10-07) + + +### Bug Fixes + +* workflow indentation fix ([#713](https://github.com/juspay/hyperswitch-web/issues/713)) ([bf00bb3](https://github.com/juspay/hyperswitch-web/commit/bf00bb3859ec5b0156b71e543d693e01ee7b1c2d)) + +## [0.91.7](https://github.com/juspay/hyperswitch-web/compare/v0.91.6...v0.91.7) (2024-10-04) + + +### Bug Fixes + +* paypal flow fixed for one click handler ([#711](https://github.com/juspay/hyperswitch-web/issues/711)) ([09a8470](https://github.com/juspay/hyperswitch-web/commit/09a8470a3b16c410636c1544033aa0f2e76a59b1)) + +## [0.91.6](https://github.com/juspay/hyperswitch-web/compare/v0.91.5...v0.91.6) (2024-10-04) + +## [0.91.5](https://github.com/juspay/hyperswitch-web/compare/v0.91.4...v0.91.5) (2024-10-04) + + +### Bug Fixes + +* sentry dependent bot alerts ([#716](https://github.com/juspay/hyperswitch-web/issues/716)) ([6bc1fb4](https://github.com/juspay/hyperswitch-web/commit/6bc1fb4372c27f6fc021585f69791a0dadca62d5)) + +## [0.91.4](https://github.com/juspay/hyperswitch-web/compare/v0.91.3...v0.91.4) (2024-10-04) + + +### Bug Fixes + +* add cross env script support for windows ([#714](https://github.com/juspay/hyperswitch-web/issues/714)) ([318b5c2](https://github.com/juspay/hyperswitch-web/commit/318b5c294cc670988204f40ed427f56c4902d163)) + +## [0.91.3](https://github.com/juspay/hyperswitch-web/compare/v0.91.2...v0.91.3) (2024-10-04) + + +### Bug Fixes + +* sdk pay now redirect fix ([#715](https://github.com/juspay/hyperswitch-web/issues/715)) ([2bdf260](https://github.com/juspay/hyperswitch-web/commit/2bdf260f2c1fbfce6627db7c9eb5a519987cabfa)) + +## [0.91.2](https://github.com/juspay/hyperswitch-web/compare/v0.91.1...v0.91.2) (2024-10-03) + + +### Bug Fixes + +* customer-acceptance for saved pm ([#709](https://github.com/juspay/hyperswitch-web/issues/709)) ([a569dac](https://github.com/juspay/hyperswitch-web/commit/a569dacede738ba4f7464966a323e14d19170028)) + ## [0.91.1](https://github.com/juspay/hyperswitch-web/compare/v0.91.0...v0.91.1) (2024-09-26) diff --git a/cypress-tests/cypress/support/utils.ts b/cypress-tests/cypress/support/utils.ts index ae0982a52..08a516365 100644 --- a/cypress-tests/cypress/support/utils.ts +++ b/cypress-tests/cypress/support/utils.ts @@ -19,7 +19,7 @@ export const createPaymentBody = { ], confirm: false, capture_method: "automatic", - authentication_type: "three_ds", + authentication_type: "no_three_ds", customer_id: "hyperswitch_sdk_demo_id", email: "hyperswitch_sdk_demo_id@gmail.com", request_external_three_ds_authentication: false, @@ -46,7 +46,7 @@ export const createPaymentBody = { new_customer: "true", login_date: "2019-09-10T10:11:12Z", }, - profile_id: "pro_xsQ7wTCP89OLqmWNcnRq", + profile_id: "pro_5fVcCxU8MFTYozgtf0P8", billing: { email: "hyperswitch_sdk_demo_id@gmail.com", address: { diff --git a/package.json b/package.json index d3d624eb6..7780a714e 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { "name": "orca-payment-page", - "version": "0.91.1", + "version": "0.92.1", "main": "index.js", "private": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", "@rescript/core": "^0.7.0", "@rescript/react": "^0.12.1", - "@sentry/react": "^7.64.0", - "@sentry/webpack-plugin": "^2.7.0", + "@sentry/react": "^7.119.0", + "@sentry/webpack-plugin": "^2.22.5", "react": "^18.2.0", "react-datepicker": "^6.9.0", "react-dom": "^18.2.0", @@ -16,13 +16,13 @@ "webpack-merge": "^5.9.0" }, "scripts": { - "build:dev": "sdkEnv=sandbox webpack --config webpack.dev.js", - "build:dev-integ": "sdkEnv=integ webpack --config webpack.dev.js", - "start": "sdkEnv=local webpack serve --config webpack.dev.js", - "build:prod": "sdkEnv=prod webpack --config webpack.common.js", + "build:dev": "cross-env sdkEnv=sandbox webpack --config webpack.dev.js", + "build:dev-integ": "cross-env sdkEnv=integ webpack --config webpack.dev.js", + "start": "cross-env sdkEnv=local webpack serve --config webpack.dev.js", + "build:prod": "cross-env sdkEnv=prod webpack --config webpack.common.js", "build": "webpack --config webpack.common.js", - "build:sandbox": "sdkEnv=sandbox webpack --config webpack.common.js", - "build:integ": "sdkEnv=integ webpack --config webpack.common.js", + "build:sandbox": "cross-env sdkEnv=sandbox webpack --config webpack.common.js", + "build:integ": "cross-env sdkEnv=integ webpack --config webpack.common.js", "test": "cd cypress-tests && npm run cypress:run", "re:build": "rescript", "re:clean": "rescript clean", @@ -68,6 +68,7 @@ "babel-loader": "^9.1.3", "babel-plugin-add-react-displayname": "^0.0.5", "copy-webpack-plugin": "^11.0.0", + "cross-env": "^7.0.3", "css-loader": "^6.7.1", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.57.0", diff --git a/src/BubblegumTheme.res b/src/BubblegumTheme.res new file mode 100644 index 000000000..b380e7d67 --- /dev/null +++ b/src/BubblegumTheme.res @@ -0,0 +1,224 @@ +open CardThemeType +let bubblegum = { + fontFamily: "", + fontSizeBase: "1rem", + colorPrimary: "#f360a6", + colorBackground: "#ffffff", + colorText: "#545454", + colorDanger: "#fd1717", + colorDangerText: "#fd1717", + borderRadius: "2px", + fontVariantLigatures: "", + fontVariationSettings: "", + spacingUnit: "11px", + fontWeightLight: "400", + fontWeightNormal: "500", + fontWeightMedium: "600", + fontWeightBold: "700", + fontLineHeight: "", + fontSize2Xl: "24px", + fontSizeXl: "16px", + fontSizeLg: "14px", + fontSizeSm: "12px", + fontSizeXs: "10px", + fontSize2Xs: "8px", + fontSize3Xs: "6px", + colorSuccess: "", + colorWarning: "", + colorPrimaryText: "#5469d4", + colorBackgroundText: "", + colorSuccessText: "", + colorWarningText: "", + colorTextSecondary: "#6d6e78", + colorTextPlaceholder: "", + spacingTab: "12px", + borderColor: "#e6e6e6", + spacingAccordionItem: "10px", + colorIconCardCvc: "", + colorIconCardCvcError: "#fd1717", + colorIconCardError: "#fd1717", + spacingGridColumn: "20px", + spacingGridRow: "20px", + buttonBackgroundColor: "#006df9", + buttonHeight: "48px", + buttonWidth: "100%", + buttonBorderRadius: "4px", + buttonBorderColor: "#ffffff", + buttonTextColor: "#ffffff", + buttonTextFontSize: "16px", + buttonTextFontWeight: "500", + buttonBorderWidth: "0px", +} +let bubblegumRules = theme => + { + ".Tab": { + "border": "0", + "borderRadius": theme.borderRadius, + "backgroundColor": theme.colorBackground, + "color": theme.colorTextSecondary, + "alignItems": "start", + "transition": "background .15s ease, border .15s ease, box-shadow .15s ease", + "boxShadow": "0px 3px 10px rgba(18, 42, 66, 0.08)" + }, + ".Tab:hover": { + "border": "0", + "color": theme.colorText, + }, + ".Tab:focus":{ + "border": "0" + }, + ".Label": { + "color": theme.colorText, + "opacity": "10", + "textAlign": "left", + }, + ".Tab--selected": { + "color": "#fff", + "backgroundColor": "#f360a6", + "boxShadow": `0px 1px 1px rgba(0, 0, 0, 0.03), 0px 3px 6px rgba(18, 42, 66, 0.02), 0 0 0 2px ${theme.colorPrimary}`, + }, + ".Tab--selected:hover": { + "color": "#fff", + "backgroundColor": "#f360a6", + "boxShadow": `0px 1px 1px rgba(0, 0, 0, 0.03), 0px 3px 6px rgba(18, 42, 66, 0.02), 0 0 0 2px ${theme.colorPrimary}`, + }, + ".Tab--selected:focus": { + "color": "#fff", + "backgroundColor": "#f360a6", + "boxShadow": `0 0 0 2px ${theme.colorPrimary}4c, 0 1px 1px 0 ${theme.colorBackground}, 0 0 0 1px ${theme.colorPrimary}4c`, + }, + ".TabMore:focus": { + "border": `1px solid ${theme.colorPrimary}`, + "boxShadow": `${theme.colorPrimary}4c 0px 0px 0px 3px`, + }, + ".TabMore": { + "border": `1px solid ${theme.borderColor}`, + }, + ".Input": { + "border": `1px solid #e6e6e6`, + "color": theme.colorText, + "fontWeight": theme.fontWeightLight, + "borderRadius": theme.borderRadius, + "boxShadow": "0px 3px 10px rgba(18, 42, 66, 0.08)", + "transition": "background 0.15s ease, border 0.15s ease, box-shadow 0.15s ease, color 0.15s ease", + }, + ".Input-Compressed": { + "border": `1px solid #e6e6e6`, + "color": theme.colorText, + "fontWeight": theme.fontWeightLight, + "boxShadow": `0px 1px 1px rgb(0 0 0 / 3%), 0px 3px 6px rgb(0 0 0 / 2%)`, + "transition": "background 0.15s ease, border 0.15s ease, box-shadow 0.15s ease, color 0.15s ease", + }, + ".Input:-webkit-autofill": { + "transition": "background-color 5000s ease-in-out 0s", + "-webkitTextFillColor": `${theme.colorText} !important`, + }, + ".Input:focus": { + "border": `1px solid ${theme.colorPrimary}`, + "boxShadow": `${theme.colorPrimary}4c 0px 0px 0px 3px`, + }, + ".Input-Compressed:focus": { + "border": `1px solid ${theme.colorPrimary}`, + "boxShadow": `${theme.colorPrimary}4c 0px 0px 0px 2px`, + "position": "relative", + "zIndex": "2", + }, + ".Input--invalid": { + "color": theme.colorDanger, + "border": `1px solid ${theme.colorDanger}`, + "transition": "border 0.15s ease, box-shadow 0.15s ease, color 0.15s ease", + }, + ".Input::placeholder": { + "fontWeight": theme.fontWeightLight, + "color": theme.colorTextPlaceholder, + }, + ".TabLabel": { + "transition": "color .1s ease", + "textAlign": "start", + }, + ".TabIcon": { + "transition": "color .1s ease", + }, + ".Block": { + "backgroundColor": theme.colorBackground, + "borderRadius": theme.borderRadius, + // "border": `1px solid ${theme.borderColor}`, + "borderColor": "transparent", + "boxShadow": "0px 3px 10px rgba(18, 42, 66, 0.08)" + }, + ".BlockDivider": { + "backgroundColor": "#ebebeb", + // "border": `1px solid ${theme.borderColor}`, + }, + ".AccordionItem": { + "backgroundColor": theme.colorBackground, + "color": theme.colorTextSecondary, + "transition": "height 1s ease", + "boxShadow": "0px 1px 1px rgb(0 0 0 / 3%), 0px 3px 6px rgb(0 0 0 / 2%)", + "padding": "20px", + }, + ".AccordionMore": { + "backgroundColor": theme.colorBackground, + "color": theme.colorTextSecondary, + "border": `1px solid ${theme.borderColor}`, + }, + ".AccordionMore:hover": { + "color": theme.colorText, + }, + ".AccordionItem:hover": { + "color": theme.colorText, + }, + ".AccordionItem--selected": { + "color": theme.colorPrimary, + }, + ".AccordionItem--selected:hover": { + "color": theme.colorPrimary, + }, + ".AccordionItemLabel": { + "transition": "color .1s ease", + }, + ".AccordionItemLabel--selected": { + "color": theme.colorPrimary, + }, + ".AccordionItemIcon--selected": { + "color": theme.colorPrimary, + }, + ".PickerItem": { + "backgroundColor": theme.colorBackground, + "borderRadius": theme.borderRadius, + "border": `1px solid ${theme.borderColor}`, + "color": theme.colorTextSecondary, + "padding": theme.spacingUnit, + "transition": "height 1s ease", + "boxShadow": "0px 1px 1px rgb(0 0 0 / 3%), 0px 3px 6px rgb(0 0 0 / 2%)", + }, + ".PickerItem:hover": { + "color": theme.colorText, + }, + ".PickerItem--selected": { + "color": theme.colorPrimary, + "border": `1px solid ${theme.colorPrimary}`, + "boxShadow": `${theme.colorPrimary}4c 0px 0px 0px 3px`, + }, + ".PickerItem--selected:hover": { + "color": theme.colorPrimary, + "border": `1px solid ${theme.colorPrimary}`, + "boxShadow": `${theme.colorPrimary}4c 0px 0px 0px 3px`, + }, + ".Checkbox": { + "fontWeight": theme.fontWeightLight, + "fontSize": theme.fontSizeLg, + }, + ".CheckboxInput":{ + "boxShadow": "0px 3px 10px rgba(18, 42, 66, 0.08)" + }, + ".PaymentMethodsHeaderLabel": { + "color": theme.colorText, + "fontSize": theme.fontSize2Xl, + "fontWeight": theme.fontWeightMedium, + "marginBottom": "1.5rem", + }, + }->Identity.anyTypeToJson + +let default = bubblegum +let defaultRules = bubblegumRules diff --git a/src/CardTheme.res b/src/CardTheme.res index 5c7bf97c3..dc7cd4564 100644 --- a/src/CardTheme.res +++ b/src/CardTheme.res @@ -9,10 +9,11 @@ let getTheme = (val, logger) => { | "midnight" => Midnight | "charcoal" => Charcoal | "soft" => Soft + | "bubblegum" => Bubblegum | "none" => NONE | str => { str->unknownPropValueWarning( - ["default", "midnight", "brutal", "charcoal", "soft", "none"], + ["default", "midnight", "brutal", "charcoal", "soft", "bubblegum", "none"], "appearance.theme", ~logger, ) diff --git a/src/Components/SaveDetailsCheckbox.res b/src/Components/SaveDetailsCheckbox.res index d94ce2d07..fb8b59535 100644 --- a/src/Components/SaveDetailsCheckbox.res +++ b/src/Components/SaveDetailsCheckbox.res @@ -61,7 +61,7 @@ let make = (~isChecked, ~setIsChecked) => {