-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #326 from mollie/feature/implements-mollie-components
Feature/implements mollie components
- Loading branch information
Showing
55 changed files
with
11,288 additions
and
395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"useBuiltIns": "entry", | ||
"targets": { | ||
"browsers": [ | ||
"latest 2 versions", | ||
"ie 10" | ||
] | ||
} | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
.mollie-components { | ||
display: flex; | ||
flex-wrap: wrap; | ||
} | ||
|
||
.mollie-components .mollie-component-label { | ||
font-weight: 400; | ||
} | ||
|
||
.mollie-components .mollie-component { | ||
width: 100%; | ||
min-height: 34px; | ||
background-color: #FFF; | ||
border-radius: 6px; | ||
color: #222; | ||
transition: all .05s ease; | ||
box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.1), | ||
0px 1px 3px 0px rgba(0, 0, 0, 0.1), | ||
0px 0px 0px 1px rgba(0, 0, 0, 0.05); | ||
border: 2px solid transparent; | ||
} | ||
|
||
.mollie-components .mollie-component iframe { | ||
border-radius: 6px; | ||
} | ||
|
||
.mollie-components div { | ||
flex-grow: 1; | ||
width: 100%; | ||
} | ||
|
||
.mollie-components div + div { | ||
display: block; | ||
margin-top: .63em; | ||
} | ||
|
||
.mollie-components #expiryDate, | ||
.mollie-components #verificationCode { | ||
max-width: 50%; | ||
} | ||
|
||
.mollie-components #expiryDate { | ||
padding-right: 5%; | ||
} | ||
|
||
.mollie-components #verificationCode { | ||
padding-left: 5%; | ||
} | ||
|
||
.mollie-components .mollie-component.is-invalid { | ||
box-shadow: 0px 1px 1px 0px rgba(255, 51, 68, 0.1), | ||
0px 1px 3px 0px rgba(255, 51, 68, 0.1); | ||
border-color: #fff0f0; | ||
} | ||
|
||
.mollie-components .mollie-component.has-focus { | ||
box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.1), | ||
0px 2px 6px 0px rgba(0, 0, 0, 0.1), | ||
0px 0px 0px 1px rgba(0, 0, 0, 0.05); | ||
border-color: #07f; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
|
||
require_once __DIR__ . '/utils.php'; | ||
require_once __DIR__ . '/woocommerce.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
<?php | ||
|
||
return [ | ||
[ | ||
'type' => 'title', | ||
'id' => 'mollie_components_styles', | ||
'title' => _x( | ||
'Base Styles', | ||
'Mollie Components Settings', | ||
'mollie-payments-for-woocommerce' | ||
), | ||
], | ||
Mollie_WC_Components_StylesPropertiesDictionary::BACKGROUND_COLOR => [ | ||
'type' => 'color', | ||
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::BACKGROUND_COLOR, | ||
'title' => _x('Background Color', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
'default' => '#ffffff', | ||
], | ||
Mollie_WC_Components_StylesPropertiesDictionary::TEXT_COLOR => [ | ||
'type' => 'color', | ||
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::TEXT_COLOR, | ||
'title' => _x('Text Color', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
'default' => '#000000', | ||
], | ||
Mollie_WC_Components_StylesPropertiesDictionary::INPUT_PLACEHOLDER => [ | ||
'type' => 'color', | ||
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::INPUT_PLACEHOLDER, | ||
'title' => _x('Placeholder Color', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
'default' => '#cccccc', | ||
], | ||
Mollie_WC_Components_StylesPropertiesDictionary::FONT_SIZE => [ | ||
'type' => 'text', | ||
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::FONT_SIZE, | ||
'title' => _x('Font Size', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
'desc_tip' => _x( | ||
'Font size define the size for the font in the components. `em`, `px`, `rem` units are allowed.', | ||
'Mollie Components Settings', | ||
'mollie-payments-for-woocommerce' | ||
), | ||
'default' => '16px', | ||
], | ||
Mollie_WC_Components_StylesPropertiesDictionary::FONT_WEIGHT => [ | ||
'type' => 'select', | ||
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::FONT_WEIGHT, | ||
'title' => _x('Font Weight', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
'default' => 'normal', | ||
'options' => [ | ||
'lighter' => _x('Lighter', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
'normal' => _x('Normal', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
'bolder' => _x('Bold', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
], | ||
], | ||
Mollie_WC_Components_StylesPropertiesDictionary::LETTER_SPACING => [ | ||
'type' => 'number', | ||
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::LETTER_SPACING, | ||
'title' => _x('Letter Spacing', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
'default' => '0', | ||
], | ||
Mollie_WC_Components_StylesPropertiesDictionary::LINE_HEIGHT => [ | ||
'type' => 'number', | ||
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::LINE_HEIGHT, | ||
'title' => _x('Line Height', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
'default' => '1.2', | ||
'custom_attributes' => [ | ||
'step' => '.1', | ||
], | ||
], | ||
Mollie_WC_Components_StylesPropertiesDictionary::PADDING => [ | ||
'type' => 'text', | ||
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::PADDING, | ||
'title' => _x('Padding', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
'desc_tip' => _x( | ||
'Add padding to the components. Eg. `16px 16px 16px 16px` and `em`, `px`, `rem` units are allowed.', | ||
'Mollie Components Settings', | ||
'mollie-payments-for-woocommerce' | ||
), | ||
'default' => '.63em', | ||
], | ||
Mollie_WC_Components_StylesPropertiesDictionary::TEXT_ALIGN => [ | ||
'type' => 'select', | ||
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::TEXT_ALIGN, | ||
'title' => _x('Text Align', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
'default' => 'left', | ||
'options' => [ | ||
'left' => _x('Left', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
'right' => _x('Right', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
'center' => _x('Center', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
'justify' => _x('Justify', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
], | ||
], | ||
Mollie_WC_Components_StylesPropertiesDictionary::TEXT_TRANSFORM => [ | ||
'type' => 'select', | ||
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::TEXT_TRANSFORM, | ||
'title' => _x('Text Transform', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
'default' => 'none', | ||
'options' => [ | ||
'none' => _x( | ||
'None', | ||
'Mollie Components Settings', | ||
'mollie-payments-for-woocommerce' | ||
), | ||
'capitalize' => _x( | ||
'Capitalize', | ||
'Mollie Components Settings', | ||
'mollie-payments-for-woocommerce' | ||
), | ||
'uppercase' => _x( | ||
'Uppercase', | ||
'Mollie Components Settings', | ||
'mollie-payments-for-woocommerce' | ||
), | ||
'lowercase' => _x( | ||
'Lowercase', | ||
'Mollie Components Settings', | ||
'mollie-payments-for-woocommerce' | ||
), | ||
'full-width' => _x( | ||
'Full Width', | ||
'Mollie Components Settings', | ||
'mollie-payments-for-woocommerce' | ||
), | ||
'full-size-kana' => _x( | ||
'Full Size Kana', | ||
'Mollie Components Settings', | ||
'mollie-payments-for-woocommerce' | ||
), | ||
], | ||
], | ||
[ | ||
'type' => 'sectionend', | ||
'id' => 'mollie_components_styles', | ||
], | ||
[ | ||
'type' => 'title', | ||
'id' => 'mollie_components_invalid_styles', | ||
'title' => _x( | ||
'Invalid Status Styles', | ||
'Mollie Components Settings', | ||
'mollie-payments-for-woocommerce' | ||
), | ||
], | ||
Mollie_WC_Components_StylesPropertiesDictionary::INVALID_TEXT_COLOR => [ | ||
'type' => 'color', | ||
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::INVALID_TEXT_COLOR, | ||
'title' => _x('Text Color', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
'desc_tip' => _x( | ||
'Text Color for invalid input.', | ||
'Mollie Components Settings', | ||
'mollie-payments-for-woocommerce' | ||
), | ||
'default' => '#000000', | ||
], | ||
Mollie_WC_Components_StylesPropertiesDictionary::INVALID_BACKGROUND_COLOR => [ | ||
'type' => 'color', | ||
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::INVALID_BACKGROUND_COLOR, | ||
'title' => _x('Background Color', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'), | ||
'desc_tip' => _x( | ||
'Background Color for invalid input.', | ||
'Mollie Components Settings', | ||
'mollie-payments-for-woocommerce' | ||
), | ||
'default' => '#FFF0F0', | ||
], | ||
[ | ||
'type' => 'sectionend', | ||
'id' => 'mollie_components_invalid_styles', | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
return [ | ||
'mollie_components_enabled' => [ | ||
'type' => 'checkbox', | ||
'title' => __('Enable Mollie Components', 'mollie-payments-for-woocommerce'), | ||
'description' => __( | ||
'Enable the Mollie Components for this Gateway', | ||
'mollie-payments-for-woocommerce' | ||
), | ||
'default' => 'no', | ||
], | ||
]; |
Oops, something went wrong.