@rebilly/instruments 3.12.3-beta.0 → 3.13.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +43 -66
  3. package/dist/index.min.js +43 -66
  4. package/package.json +3 -6
  5. package/src/functions/destroy.js +8 -2
  6. package/src/functions/mount/fetch-data.js +9 -2
  7. package/src/functions/mount/index.js +15 -10
  8. package/src/functions/mount/mount.spec.js +10 -11
  9. package/src/functions/mount/setup-framepay-theme.js +30 -72
  10. package/src/functions/mount/setup-options.js +2 -2
  11. package/src/functions/mount/{setup-styles.js → setup-styles-vars.js} +9 -7
  12. package/src/functions/purchase.js +2 -5
  13. package/src/functions/setup.js +3 -6
  14. package/src/functions/show.js +2 -2
  15. package/src/functions/show.spec.js +4 -4
  16. package/src/functions/update.spec.js +4 -3
  17. package/src/instance.js +4 -1
  18. package/src/loader/index.js +57 -33
  19. package/src/storefront/index.js +2 -5
  20. package/src/storefront/payment-instruments.js +7 -0
  21. package/src/style/base/__snapshots__/theme.spec.js.snap +136 -220
  22. package/src/style/base/default-theme.js +187 -14
  23. package/src/style/base/index.js +487 -79
  24. package/src/style/base/theme.js +3 -4
  25. package/src/style/base/theme.spec.js +2 -3
  26. package/src/style/index.js +4 -24
  27. package/src/style/utils/color-values.js +1 -1
  28. package/src/style/utils/minifyCss.js +14 -0
  29. package/src/views/common/iframe/base-iframe.js +3 -2
  30. package/src/views/common/iframe/event-listeners.js +12 -9
  31. package/src/views/common/iframe/method-iframe.js +3 -1
  32. package/src/views/common/iframe/modal-iframe.js +4 -2
  33. package/src/views/common/iframe/view-iframe.js +3 -1
  34. package/src/views/confirmation.js +12 -7
  35. package/src/views/errors.js +95 -0
  36. package/src/views/method-selector/express-methods.js +51 -0
  37. package/src/views/method-selector/generate-framepay-config.js +54 -0
  38. package/src/views/method-selector/generate-framepay-config.spec.js +195 -0
  39. package/src/views/method-selector/get-payment-methods.js +0 -1
  40. package/src/views/method-selector/index.js +45 -58
  41. package/src/views/method-selector/method-selector.spec.js +1 -1
  42. package/src/views/method-selector/mount-express-methods.js +66 -26
  43. package/src/views/modal.js +1 -1
  44. package/src/views/result.js +3 -3
  45. package/src/views/summary.js +24 -190
  46. package/tests/mocks/storefront-api-mock.js +48 -27
  47. package/src/style/browserslist.js +0 -1
  48. package/src/style/components/accordion.js +0 -140
  49. package/src/style/components/address.js +0 -55
  50. package/src/style/components/button.js +0 -117
  51. package/src/style/components/divider.js +0 -39
  52. package/src/style/components/forms/checkbox.js +0 -75
  53. package/src/style/components/forms/field.js +0 -56
  54. package/src/style/components/forms/form.js +0 -18
  55. package/src/style/components/forms/input.js +0 -77
  56. package/src/style/components/forms/label.js +0 -55
  57. package/src/style/components/forms/radio.js +0 -80
  58. package/src/style/components/forms/select.js +0 -86
  59. package/src/style/components/forms/validation.js +0 -72
  60. package/src/style/components/icons.js +0 -13
  61. package/src/style/components/index.js +0 -39
  62. package/src/style/components/loader.js +0 -41
  63. package/src/style/components/methods.js +0 -97
  64. package/src/style/components/overlay.js +0 -24
  65. package/src/style/helpers/index.js +0 -54
  66. package/src/style/payment-instruments/content.js +0 -8
  67. package/src/style/payment-instruments/index.js +0 -14
  68. package/src/style/payment-instruments/payment-card.js +0 -27
  69. package/src/style/payment-instruments/payment-instrument-list.js +0 -44
  70. package/src/style/payment-instruments/payment-instrument.js +0 -55
  71. package/src/style/utils/remove-empty-null.js +0 -10
  72. package/src/style/vendor/framepay.js +0 -28
  73. package/src/style/vendor/postmate.js +0 -18
  74. package/src/style/views/confirmation.js +0 -26
  75. package/src/style/views/index.js +0 -16
  76. package/src/style/views/method-selector.js +0 -11
  77. package/src/style/views/modal.js +0 -91
  78. package/src/style/views/result.js +0 -52
  79. package/src/style/views/summary.js +0 -118
  80. package/src/views/__snapshots__/summary.spec.js.snap +0 -246
  81. package/src/views/method-selector/express-methods/apple-pay.js +0 -92
  82. package/src/views/method-selector/express-methods/index.js +0 -25
  83. package/src/views/method-selector/mount-methods.js +0 -178
  84. package/src/views/summary.spec.js +0 -145
@@ -1,117 +0,0 @@
1
- // -----------------------------------------------------------------------------
2
- // This file contains all styles related to the button component.
3
- // -----------------------------------------------------------------------------
4
- export const button = () => `
5
- /**
6
- * Buttons
7
- */
8
- .rebilly-instruments-button {
9
- font-size: var(--rebilly-buttonFontSize);
10
- font-family: var(--rebilly-buttonFontFamily);
11
- line-height: var(--rebilly-buttonFontLineHeight);
12
- padding: var(--rebilly-spacings-button-py) var(--rebilly-spacings-button-px);
13
- box-sizing: border-box;
14
- background: var(--rebilly-buttonColorBackground);
15
- color: var(--rebilly-buttonColorText);
16
- border-radius: var(--rebilly-buttonBorderRadius);
17
- font-weight: var(--rebilly-buttonFontWeight);
18
- border: var(--rebilly-buttonBorder);
19
- box-shadow: var(--rebilly-buttonBoxShadow);
20
- margin: calc(var(--rebilly-spacings-2xs) + var(--rebilly-spacings-s) / 2) 0;
21
- width: 100%;
22
- cursor: pointer;
23
- min-height: 44px;
24
- transition: all 0.2s ease;
25
- outline: none;
26
- }
27
-
28
- .rebilly-instruments-button:not([disabled]):hover {
29
- background: var(--rebilly-buttonHoverColorBackground);
30
- color: var(--rebilly-buttonHoverColorText);
31
- font-family: var(--rebilly-buttonHoverFontFamily);
32
- font-size: var(--rebilly-buttonHoverFontSize);
33
- line-height: var(--rebilly-buttonHoverFontLineHeight);
34
- font-weight: var(--rebilly-buttonHoverFontWeight);
35
- border: var(--rebilly-buttonHoverBorder);
36
- border-radius: var(--rebilly-buttonHoverBorderRadius);
37
- box-shadow: var(--rebilly-buttonHoverBoxShadow);
38
- }
39
-
40
- .rebilly-instruments-button:not([disabled]):active {
41
- background: var(--rebilly-buttonActiveColorBackground);
42
- color: var(--rebilly-buttonActiveColorText);
43
- font-family: var(--rebilly-buttonActiveFontFamily);
44
- font-size: var(--rebilly-buttonActiveFontSize);
45
- line-height: var(--rebilly-buttonActiveFontLineHeight);
46
- font-weight: var(--rebilly-buttonActiveFontWeight);
47
- border: var(--rebilly-buttonActiveBorder);
48
- border-radius: var(--rebilly-buttonActiveBorderRadius);
49
- box-shadow: var(--rebilly-buttonActiveBoxShadow);
50
- }
51
-
52
- .rebilly-instruments-button.rebilly-instruments-button-secondary {
53
- font-size: var(--rebilly-buttonFontSize);
54
- font-family: var(--rebilly-buttonFontFamily);
55
- line-height: var(--rebilly-buttonFontLineHeight);
56
- background: var(--rebilly-colorBackground);
57
- color: var(--rebilly-buttonColorBackground);
58
- border-color: var(--rebilly-buttonColorBackground);
59
- }
60
-
61
- .rebilly-instruments-button.rebilly-instruments-button-secondary:not([disabled]):hover,
62
- .rebilly-instruments-button.rebilly-instruments-button-secondary:not([disabled]):active {
63
- color: var(--rebilly-buttonColorBackground);
64
- background: var(--rebilly-colorBackground);
65
- }
66
-
67
- .rebilly-instruments-button:focus {
68
- box-shadow: 0 0 0 1px var(--rebilly-colorPrimary);
69
- }
70
-
71
- .rebilly-instruments-button:disabled,
72
- .rebilly-instruments-button:disabled:hover {
73
- cursor: not-allowed;
74
- opacity: 0.6;
75
- }
76
-
77
- .rebilly-instruments-button::first-letter { text-transform: uppercase; }
78
-
79
- .rebilly-instruments-button:first-of-type { margin-top: 0; }
80
-
81
- .rebilly-instruments-button:last-of-type { margin-bottom: 0; }
82
-
83
- .rebilly-instruments-button-group {
84
- display: flex;
85
- align-items: stretch;
86
- }
87
-
88
- .rebilly-instruments-button-group .rebilly-instruments-button {
89
- margin: 0 var(--rebilly-spacings-xs);
90
- }
91
-
92
- .rebilly-instruments-button-group .rebilly-instruments-button:first-of-type {
93
- margin-left: 0;
94
- }
95
-
96
- .rebilly-instruments-button-group .rebilly-instruments-button:last-of-type {
97
- margin-right: 0;
98
- }
99
-
100
- @media screen and (max-width: 480px) {
101
- .rebilly-instruments-button-group {
102
- flex-direction: column-reverse;
103
- }
104
-
105
- .rebilly-instruments-button-group .rebilly-instruments-button:first-of-type {
106
- margin: 0;
107
- }
108
-
109
- .rebilly-instruments-button-group .rebilly-instruments-button:last-of-type {
110
- margin: 0;
111
- }
112
-
113
- .rebilly-instruments-button-group .rebilly-instruments-button + .rebilly-instruments-button {
114
- margin-bottom: var(--rebilly-spacings-s);
115
- }
116
- }
117
- `;
@@ -1,39 +0,0 @@
1
- // -----------------------------------------------------------------------------
2
- // This file contains all styles related to the divider component.
3
- // -----------------------------------------------------------------------------
4
- export const divider = () => `
5
- /**
6
- * Divider
7
- */
8
- .rebilly-instruments-divider {
9
- line-height: var(--rebilly-fontLineHeightBase, calc(var(--rebilly-fontSizeBase) * 1.5));
10
- padding: var(--rebilly-spacings-base) 0;
11
- margin: 0;
12
- position: relative;
13
- outline: 0;
14
- border: 0;
15
- text-align: center;
16
- }
17
-
18
- .rebilly-instruments-divider::before {
19
- background: var(--rebilly-colorMutedBorder);
20
- content: '';
21
- position: absolute;
22
- left: 0;
23
- top: 50%;
24
- width: 100%;
25
- height: 1px;
26
- }
27
-
28
- .rebilly-instruments-divider .rebilly-instruments-divider-label {
29
- color: var(--rebilly-colorMutedText);
30
- font-weight: 500;
31
- text-transform: uppercase;
32
- padding: 0 var(--rebilly-spacings-s);
33
- line-height: calc(var(--rebilly-fontSizeBase) * 0.875);
34
- background-color: var(--rebilly-colorBackground);
35
- font-size: calc(var(--rebilly-fontSizeBase) * 0.875);
36
- position: relative;
37
- display: inline-block;
38
- }
39
- `;
@@ -1,75 +0,0 @@
1
- // -----------------------------------------------------------------------------
2
- // This file contains all styles related to the checkbox component.
3
- // -----------------------------------------------------------------------------
4
- export const checkbox = () => `
5
- /**
6
- * Checkbox
7
- */
8
- .rebilly-instruments-form-field-checkbox {
9
- position: relative;
10
- opacity: 1;
11
- align-items: center;
12
- display: flex;
13
- flex-direction: row-reverse;
14
- justify-content: start;
15
- cursor: pointer;
16
- transform: none;
17
- }
18
-
19
- .rebilly-instruments-form-field-checkbox > * {
20
- cursor: pointer;
21
- }
22
-
23
- .rebilly-instruments-form-field-checkbox input[type="checkbox"] {
24
- position: absolute;
25
- opacity: 0;
26
- cursor: pointer;
27
- height: 0;
28
- width: 0;
29
- }
30
-
31
- .rebilly-instruments-form-field-checkbox span {
32
- position: relative;
33
- top: 0;
34
- left: 0;
35
- width: calc(var(--rebilly-spacings-m) - var(--rebilly-spacings-2xs));
36
- height: calc(var(--rebilly-spacings-m) - var(--rebilly-spacings-2xs));
37
- min-width: calc(var(--rebilly-spacings-m) - var(--rebilly-spacings-2xs));
38
- border-radius: 4px;
39
- box-shadow: inset 0 0 0 2px var(--rebilly-colorMutedBorder);
40
- margin-right: var(--rebilly-spacings-s);
41
- background-color: transparent;
42
- transition: all 200ms;
43
- }
44
-
45
- .rebilly-instruments-form-field-checkbox span:after {
46
- content: '';
47
- position: absolute;
48
- border: solid var(--rebilly-colorPrimary);
49
- width: calc(var(--rebilly-spacings-xs) + var(--rebilly-spacings-2xs));
50
- height: calc(var(--rebilly-spacings-xs) - var(--rebilly-spacings-2xs) + 2px);
51
- border-width: 2px 2px 0 0;
52
- border-radius: 2px;
53
- top: 50%;
54
- left: 50%;
55
- opacity: 0;
56
- transform: translateY(-60%) translateX(-50%) rotate(135deg);
57
- transition: all 0.2s ease;
58
- }
59
-
60
- .rebilly-instruments-form-field-checkbox input[type="checkbox"]:focus ~ span {
61
- box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);
62
- }
63
-
64
- .rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span {
65
- box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);
66
- }
67
-
68
- .rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span:after {
69
- opacity: 1;
70
- }
71
-
72
- .rebilly-instruments-form-field-checkbox input[type="checkbox"]:disabled ~ span {
73
- opacity: 0.6;
74
- }
75
- `;
@@ -1,56 +0,0 @@
1
- // -----------------------------------------------------------------------------
2
- // This file contains all styles related to the field component.
3
- // -----------------------------------------------------------------------------
4
- export const field = () => `
5
- /**
6
- * Field
7
- */
8
- .rebilly-instruments-form-field {
9
- margin: calc(var(--rebilly-spacings-xs) + var(--rebilly-spacings-s)) 0;
10
- position: relative;
11
- }
12
-
13
- .rebilly-instruments-form-field.is-compact {
14
- margin-top: calc(var(--rebilly-spacings-2xs) + var(--rebilly-spacings-s));
15
- margin-bottom: calc(var(--rebilly-spacings-2xs) + var(--rebilly-spacings-s));
16
- }
17
-
18
- .rebilly-instruments-form-field > div {
19
- display: flex;
20
- flex-wrap: wrap;
21
- flex-direction: column;
22
- position: relative;
23
- }
24
-
25
- /* Field group */
26
- .rebilly-instruments-form-field-group {
27
- margin: calc(calc(var(--rebilly-spacings-xs) * -1) - var(--rebilly-spacings-s)) 0;
28
- display: flex;
29
- }
30
-
31
- .rebilly-instruments-form-field-group > * {
32
- flex: 1 0;
33
- margin-left: var(--rebilly-spacings-xs);
34
- margin-right: var(--rebilly-spacings-xs);
35
- }
36
-
37
- .rebilly-instruments-form-field-group > *:first-child {
38
- margin-left: 0;
39
- }
40
-
41
- .rebilly-instruments-form-field-group > *:last-child {
42
- margin-right: 0;
43
- }
44
-
45
- @media (max-width: 480px) {
46
- .rebilly-instruments-form-field-group {
47
- display: block;
48
- margin: calc(var(--rebilly-spacings-2xs) + var(--rebilly-spacings-s)) 0;
49
- }
50
-
51
- .rebilly-instruments-form-field-group > * {
52
- margin-left: 0;
53
- margin-right: 0;
54
- }
55
- }
56
- `;
@@ -1,18 +0,0 @@
1
- // -----------------------------------------------------------------------------
2
- // This file contains all styles related to the form component.
3
- // -----------------------------------------------------------------------------
4
- export const form = () => `
5
- /**
6
- * Form
7
- */
8
- /* Chrome autocomplete styles */
9
- .rebilly-instruments-form input:-webkit-autofill,
10
- .rebilly-instruments-form input:-webkit-autofill:hover,
11
- .rebilly-instruments-form input:-webkit-autofill:focus,
12
- .rebilly-instruments-form select:-webkit-autofill,
13
- .rebilly-instruments-form select:-webkit-autofill:hover,
14
- .rebilly-instruments-form select:-webkit-autofill:focus {
15
- -webkit-text-fill-color: var(--rebilly-colorText);
16
- transition: background-color 5000s ease-in-out 0s, box-shadow 200ms, border 200ms;
17
- }
18
- `;
@@ -1,77 +0,0 @@
1
- // -----------------------------------------------------------------------------
2
- // This file contains all styles related to the input component.
3
- // -----------------------------------------------------------------------------
4
- export const input = () => `
5
- /**
6
- * Input
7
- */
8
- .rebilly-instruments-form-field-input {
9
- font-size: var(--rebilly-inputFontSize);
10
- font-family: var(--rebilly-inputFontFamily);
11
- font-weight: var(--rebilly-inputFontWeight);
12
- line-height: var(--rebilly-inputFontLineHeight);
13
- padding: var(--rebilly-spacings-input-py) var(--rebilly-spacings-input-px);
14
- min-height: var(--rebilly-spacings-form-element-min-height);
15
- border: var(--rebilly-inputBorder);
16
- border-radius: var(--rebilly-inputBorderRadius);
17
- color: var(--rebilly-inputColorText);
18
- background: var(--rebilly-inputColorBackground);
19
- box-sizing: border-box;
20
- box-shadow: var(--rebilly-inputBoxShadow);
21
- width: 100%;
22
- transition: all 200ms;
23
- order: 1;
24
- }
25
-
26
- .rebilly-instruments-form-field-input:hover {
27
- background: var(--rebilly-inputHoverColorBackground);
28
- color: var(--rebilly-inputHoverColorText);
29
- font-family: var(--rebilly-inputHoverFontFamily);
30
- font-size: var(--rebilly-inputHoverFontSize);
31
- line-height: var(--rebilly-inputHoverFontLineHeight);
32
- font-weight: var(--rebilly-inputHoverFontWeight);
33
- border: var(--rebilly-inputHoverBorder);
34
- border-radius: var(--rebilly-inputHoverBorderRadius);
35
- box-shadow: var(--rebilly-inputHoverBoxShadow);
36
- }
37
-
38
- .rebilly-instruments-form-field-input:focus {
39
- outline: none;
40
- background: var(--rebilly-inputFocusColorBackground);
41
- color: var(--rebilly-inputFocusColorText);
42
- font-family: var(--rebilly-inputFocusFontFamily);
43
- font-size: var(--rebilly-inputFocusFontSize);
44
- line-height: var(--rebilly-inputFocusFontLineHeight);
45
- font-weight: var(--rebilly-inputFocusFontWeight);
46
- border: var(--rebilly-inputFocusBorder);
47
- border-radius: var(--rebilly-inputFocusBorderRadius);
48
- box-shadow: var(--rebilly-inputFocusBoxShadow);
49
- }
50
-
51
- .rebilly-instruments-form-field-input::placeholder {
52
- color: var(--rebilly-inputPlaceholderColorText);
53
- font-family: var(--rebilly-inputPlaceholderFontFamily);
54
- font-size: var(--rebilly-inputPlaceholderFontSize);
55
- line-height: var(--rebilly-inputPlaceholderFontLineHeight);
56
- font-weight: var(--rebilly-inputPlaceholderFontWeight);
57
- opacity: 1;
58
- }
59
-
60
- .rebilly-instruments-form-field-input::selection {
61
- color: var(--rebilly-inputSelectionColorText);
62
- background: var(--rebilly-inputSelectionColorBackground);
63
- }
64
-
65
- .rebilly-instruments-form-field-input:disabled {
66
- opacity: 0.6;
67
- }
68
-
69
- /* Floating Labels */
70
- .is-floating .rebilly-instruments-form-field-input::placeholder {
71
- opacity: 0;
72
- }
73
-
74
- .is-floating .rebilly-instruments-form-field-input:focus::placeholder {
75
- opacity: 1;
76
- }
77
- `;
@@ -1,55 +0,0 @@
1
- // -----------------------------------------------------------------------------
2
- // This file contains all styles related to the label component.
3
- // -----------------------------------------------------------------------------
4
- export const label = () => `
5
- /**
6
- * Label
7
- */
8
- .rebilly-instruments-form-field-label {
9
- font-size: calc(var(--rebilly-fontSizeBase) * 0.92);
10
- line-height: calc(var(--rebilly-fontSizeBase) * 0.92);
11
- margin-bottom: var(--rebilly-spacings-2xs);
12
- }
13
-
14
- /* Floating Labels */
15
- .is-floating .rebilly-instruments-form-field-label {
16
- font-size: var(--rebilly-fontSizeBase);
17
- left: var(--rebilly-spacings-label-offset-left);
18
- color: var(--rebilly-colorText);
19
- top: 50%;
20
- background: transparent;
21
- opacity: 1;
22
- position: absolute;
23
- transform: translateY(-50%) scale(1);
24
- transition: transform 0.35s cubic-bezier(0.19, 1, 0.22, 1), background 0.35s cubic-bezier(0.19, 1, 0.22, 1);
25
- cursor: text;
26
- pointer-events: none;
27
- transform-origin: left top;
28
- }
29
-
30
- /* Includes Google autocomplete fix */
31
- .is-floating input:-webkit-autofill + .rebilly-instruments-form-field-label,
32
- .is-floating input:-webkit-autofill:hover + .rebilly-instruments-form-field-label,
33
- .is-floating input:-webkit-autofill:focus + .rebilly-instruments-form-field-label,
34
- .is-floating select:-webkit-autofill + .rebilly-instruments-form-field-label,
35
- .is-floating select:-webkit-autofill:hover + .rebilly-instruments-form-field-label,
36
- .is-floating select:-webkit-autofill:focus + .rebilly-instruments-form-field-label {
37
- padding: 0 var(--rebilly-spacings-2xs);
38
- left: calc(var(--rebilly-spacings-label-offset-left) - var(--rebilly-spacings-2xs));
39
- line-height: 1;
40
- background: var(--rebilly-colorBackground);
41
- opacity: 1!important;
42
- transform: translateY(-175%) scale(0.875);
43
- }
44
-
45
- .is-floating .rebilly-instruments-form-field-input:focus + .rebilly-instruments-form-field-label,
46
- .is-floating .rebilly-instruments-form-field-select:focus + .rebilly-instruments-form-field-label,
47
- .is-floating .rebilly-instruments-form-field-label.is-active {
48
- padding: 0 var(--rebilly-spacings-2xs);
49
- left: calc(var(--rebilly-spacings-label-offset-left) - var(--rebilly-spacings-2xs));
50
- line-height: 1;
51
- background: var(--rebilly-colorBackground);
52
- opacity: 1;
53
- transform: translateY(-175%) scale(0.875);
54
- }
55
- `;
@@ -1,80 +0,0 @@
1
- // -----------------------------------------------------------------------------
2
- // This file contains all styles related to the radio component.
3
- // -----------------------------------------------------------------------------
4
- export const radio = () => `
5
- /**
6
- * Checkbox
7
- */
8
- .rebilly-instruments-form-field-radio {
9
- position: relative;
10
- opacity: 1;
11
- align-items: center;
12
- display: flex;
13
- flex-direction: row-reverse;
14
- justify-content: start;
15
- cursor: pointer;
16
- transform: none;
17
- }
18
-
19
- .rebilly-instruments-form-field-radio > * {
20
- cursor: pointer;
21
- }
22
-
23
- .rebilly-instruments-form-field-radio input[type="radio"] {
24
- position: absolute;
25
- opacity: 0;
26
- cursor: pointer;
27
- height: 0;
28
- width: 0;
29
- }
30
-
31
- .rebilly-instruments-form-field-radio > span {
32
- position: relative;
33
- top: 0;
34
- left: 0;
35
- height: calc(var(--rebilly-spacings-m) - var(--rebilly-spacings-2xs));
36
- width: calc(var(--rebilly-spacings-m) - var(--rebilly-spacings-2xs));
37
- min-width: calc(var(--rebilly-spacings-m) - var(--rebilly-spacings-2xs));
38
- border-radius: 50%;
39
- box-shadow: inset 0 0 0 2px var(--rebilly-colorMutedBorder);
40
- margin-right: var(--rebilly-spacings-s);
41
- background-color: transparent;
42
- transition: all 200ms;
43
- }
44
-
45
- .rebilly-instruments-form-field-radio > span:after {
46
- content: '';
47
- position: absolute;
48
- left: 50%;
49
- top: 50%;
50
- transform: translateX(-50%) translateY(-50%);
51
- opacity: 0;
52
- width: calc(var(--rebilly-spacings-xs) + 4px);
53
- height: calc(var(--rebilly-spacings-xs) + 4px);
54
- border-radius: 50%;
55
- background: var(--rebilly-colorMutedBorder);
56
- transition: all 200ms;
57
- }
58
-
59
- .rebilly-instruments-form-field-radio:hover > span:after {
60
- opacity: 1;
61
- }
62
-
63
- .rebilly-instruments-form-field-radio input[type="radio"]:checked ~ span {
64
- box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);
65
- }
66
-
67
- .rebilly-instruments-form-field-radio input[type="radio"]:checked ~ span:after {
68
- background: var(--rebilly-colorPrimary);
69
- opacity: 1;
70
- }
71
-
72
- .rebilly-instruments-form-field-radio input[type="radio"]:focus ~ span {
73
- opacity: 1;
74
- box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);
75
- }
76
-
77
- .rebilly-instruments-form-field-radio input[type="radio"]:disabled ~ span {
78
- opacity: 0.6;
79
- }
80
- `;
@@ -1,86 +0,0 @@
1
- // -----------------------------------------------------------------------------
2
- // This file contains all styles related to the select component.
3
- // -----------------------------------------------------------------------------
4
- export const select = () => `
5
- /**
6
- * Select
7
- */
8
- .rebilly-instruments-form-field-select {
9
- font-size: var(--rebilly-inputFontSize);
10
- font-family: var(--rebilly-inputFontFamily);
11
- font-weight: var(--rebilly-inputFontWeight);
12
- line-height: var(--rebilly-inputFontLineHeight);
13
- padding: var(--rebilly-spacings-input-py) var(--rebilly-spacings-input-px);
14
- min-height: var(--rebilly-spacings-form-element-min-height);
15
- border: var(--rebilly-inputBorder);
16
- border-radius: var(--rebilly-inputBorderRadius);
17
- color: var(--rebilly-inputColorText);
18
- background: var(--rebilly-inputColorBackground);
19
- box-sizing: border-box;
20
- box-shadow: var(--rebilly-inputBoxShadow);
21
- width: 100%;
22
- transition: all 200ms;
23
- order: 1;
24
- }
25
-
26
- .rebilly-instruments-form-field-select:hover {
27
- background: var(--rebilly-inputHoverColorBackground);
28
- color: var(--rebilly-inputHoverColorText);
29
- font-family: var(--rebilly-inputHoverFontFamily);
30
- font-size: var(--rebilly-inputHoverFontSize);
31
- line-height: var(--rebilly-inputHoverFontLineHeight);
32
- font-weight: var(--rebilly-inputHoverFontWeight);
33
- border: var(--rebilly-inputHoverBorder);
34
- border-radius: var(--rebilly-inputHoverBorderRadius);
35
- box-shadow: var(--rebilly-inputHoverBoxShadow);
36
- }
37
-
38
- .rebilly-instruments-form-field-select:focus {
39
- outline: none;
40
- background: var(--rebilly-inputFocusColorBackground);
41
- color: var(--rebilly-inputFocusColorText);
42
- font-family: var(--rebilly-inputFocusFontFamily);
43
- font-size: var(--rebilly-inputFocusFontSize);
44
- line-height: var(--rebilly-inputFocusFontLineHeight);
45
- font-weight: var(--rebilly-inputFocusFontWeight);
46
- border: var(--rebilly-inputFocusBorder);
47
- border-radius: var(--rebilly-inputFocusBorderRadius);
48
- box-shadow: var(--rebilly-inputFocusBoxShadow);
49
- }
50
-
51
- .rebilly-instruments-form-field-select::selection {
52
- color: var(--rebilly-inputSelectionColorText);
53
- background: var(--rebilly-inputSelectionColorBackground);
54
- }
55
-
56
-
57
- .rebilly-instruments-form-field-select:disabled {
58
- opacity: 0.6;
59
- }
60
-
61
- .rebilly-instruments-form-field-select {
62
- -webkit-appearance: none;
63
- -moz-appearance: none;
64
- }
65
-
66
- .rebilly-instruments-form-field-select::-ms-expand { display: none; }
67
-
68
- .rebilly-instruments-form-field-select-arrow {
69
- border: solid var(--rebilly-inputColorText);
70
- position: absolute;
71
- width: var(--rebilly-spacings-xs);
72
- height: var(--rebilly-spacings-xs);
73
- border-width: 0 2px 2px 0;
74
- border-radius: 1px;
75
- right: var(--rebilly-spacings-s);
76
- top: 50%;
77
- margin-top: calc(var(--rebilly-inputFontSize) * 0.875 - var(--rebilly-spacings-xs));
78
- transform: translateY(-50%) rotate(45deg);
79
- }
80
-
81
- .is-floating .rebilly-instruments-form-field-select-arrow {
82
- top: 50%;
83
- margin-top: 0;
84
- transform: translateY(-50%) rotate(45deg);
85
- }
86
- `;
@@ -1,72 +0,0 @@
1
- // -----------------------------------------------------------------------------
2
- // This file contains all styles related to the form validations.
3
- // -----------------------------------------------------------------------------
4
- export const validation = () => `
5
- /**
6
- * Validations
7
- */
8
- .rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-input,
9
- .rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-select {
10
- font-family: var(--rebilly-inputErrorFontFamily);
11
- font-size: var(--rebilly-inputErrorFontSize);
12
- font-weight: var(--rebilly-inputErrorFontWeight);
13
- line-height: var(--rebilly-inputErrorFontLineHeight);
14
- background: var(--rebilly-inputErrorColorBackground);
15
- color: var(--rebilly-inputErrorColorText);
16
- border: var(--rebilly-inputErrorBorder);
17
- border-radius: var(--rebilly-inputErrorBorderRadius);
18
- box-shadow: var(--rebilly-inputErrorBoxShadow);
19
- }
20
-
21
- .rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-input:hover,
22
- .rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-select:hover {
23
- font-family: var(--rebilly-inputErrorHoverFontFamily);
24
- font-size: var(--rebilly-inputErrorHoverFontSize);
25
- font-weight: var(--rebilly-inputErrorHoverFontWeight);
26
- line-height: var(--rebilly-inputErrorHoverFontLineHeight);
27
- background: var(--rebilly-inputErrorHoverColorBackground);
28
- color: var(--rebilly-inputErrorHoverColorText);
29
- border: var(--rebilly-inputErrorHoverBorder);
30
- border-radius: var(--rebilly-inputErrorHoverBorderRadius);
31
- box-shadow: var(--rebilly-inputErrorHoverBoxShadow);
32
- }
33
-
34
- .rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-input:focus,
35
- .rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-select:focus {
36
- font-family: var(--rebilly-inputErrorFocusFontFamily);
37
- font-size: var(--rebilly-inputErrorFocusFontSize);
38
- font-weight: var(--rebilly-inputErrorFocusFontWeight);
39
- line-height: var(--rebilly-inputErrorFocusFontLineHeight);
40
- background: var(--rebilly-inputErrorFocusColorBackground);
41
- color: var(--rebilly-inputErrorFocusColorText);
42
- border: var(--rebilly-inputErrorFocusBorder);
43
- border-radius: var(--rebilly-inputErrorFocusBorderRadius);
44
- box-shadow: var(--rebilly-inputErrorFocusBoxShadow);
45
- }
46
-
47
- .rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-input::placeholder {
48
- color: var(--rebilly-inputErrorPlaceholderColorText);
49
- font-family: var(--rebilly-inputErrorPlaceholderFontFamily);
50
- font-size: var(--rebilly-inputErrorPlaceholderFontSize);
51
- line-height: var(--rebilly-inputErrorPlaceholderFontLineHeight);
52
- font-weight: var(--rebilly-inputErrorPlaceholderFontWeight);
53
- }
54
-
55
- .rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-input::selection,
56
- .rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-select::selection {
57
- color: var(--rebilly-inputErrorSelectionColorText);
58
- background: var(--rebilly-inputErrorSelectionColorBackground);
59
- }
60
-
61
- .rebilly-instruments-form-field-error-wrapper {
62
- margin-top: var(--rebilly-spacings-2xs);
63
- margin-bottom: 0;
64
- padding: 0;
65
- list-style: none;
66
- }
67
-
68
- .rebilly-instruments-form-field-error-wrapper > li {
69
- color: var(--rebilly-colorDanger);
70
- padding: 0;
71
- }
72
- `;