@rebilly/instruments 3.13.4-beta.0 → 3.14.3-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 +17 -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 +48 -59
  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,140 +0,0 @@
1
- // -----------------------------------------------------------------------------
2
- // This file contains all styles related to the accordion component.
3
- // -----------------------------------------------------------------------------
4
-
5
- export const accordion = () => `
6
- /* ACCORDION CLOSED */
7
- .rebilly-instruments-accordion {
8
- border: 1px solid var(--rebilly-colorMutedBorder);
9
- padding: 0 calc(var(--rebilly-spacings-m) - var(--rebilly-spacings-2xs));
10
- background: var(--rebilly-colorBackground);
11
- transition: border 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
12
- margin: var(--rebilly-spacings-s) 0;
13
- border-radius: var(--rebilly-borderRadius);
14
- overflow: hidden;
15
- opacity: 0.7;
16
- }
17
-
18
- .rebilly-instruments-accordion:hover {
19
- opacity: 1;
20
- }
21
-
22
- .rebilly-instruments-accordion:first-of-type {
23
- margin-top: 0;
24
- }
25
-
26
- .rebilly-instruments-accordion:last-of-type {
27
- margin-bottom: 0;
28
- }
29
-
30
- .rebilly-instruments-accordion .rebilly-instruments-accordion-summary::-webkit-details-marker {
31
- display: none;
32
- }
33
-
34
- .rebilly-instruments-accordion .rebilly-instruments-accordion-summary {
35
- cursor: pointer;
36
- display: flex;
37
- align-items: center;
38
- list-style: none;
39
- padding: calc(var(--rebilly-spacings-m) - var(--rebilly-spacings-s)) calc(var(--rebilly-spacings-m) - var(--rebilly-spacings-2xs));
40
- margin: 0px calc(-1 * calc(var(--rebilly-spacings-m) - var(--rebilly-spacings-2xs)));
41
- background: var(--rebilly-colorBackground);
42
- }
43
-
44
- .rebilly-instruments-accordion-summary .rebilly-instruments-accordion-summary-checkmark {
45
- position: relative;
46
- width: calc(var(--rebilly-spacings-m) - var(--rebilly-spacings-2xs));
47
- height: calc(var(--rebilly-spacings-m) - var(--rebilly-spacings-2xs));
48
- border-radius: 50%;
49
- opacity: 0;
50
- background: var(--rebilly-colorText);
51
- margin-left: var(--rebilly-spacings-m);
52
- transition: all 0.2s ease;
53
- }
54
-
55
- .rebilly-instruments-accordion-summary .rebilly-instruments-accordion-summary-checkmark::after {
56
- content: '';
57
- position: absolute;
58
- border: solid var(--rebilly-colorBackground);
59
- width: calc(var(--rebilly-spacings-xs) + var(--rebilly-spacings-2xs));
60
- height: calc(var(--rebilly-spacings-xs) - var(--rebilly-spacings-2xs) + 2px);
61
- border-width: 2px 2px 0 0;
62
- border-radius: 2px;
63
- top: 50%;
64
- left: 50%;
65
- transform: translateY(-60%) translateX(-50%) rotate(135deg);
66
- transition: all 0.2s ease;
67
- }
68
-
69
- .rebilly-instruments-accordion-summary:hover .rebilly-instruments-accordion-summary-checkmark {
70
- opacity: 0.5;
71
- }
72
-
73
- .rebilly-instruments-accordion .rebilly-instruments-accordion-summary > img {
74
- margin-right: var(--rebilly-spacings-s);
75
- height: auto;
76
- max-width: 40px;
77
- width: 100%;
78
- }
79
-
80
- .rebilly-instruments-accordion-summary .rebilly-instruments-accordion-title {
81
- margin: 0;
82
- font-weight: 500;
83
- flex: 2;
84
- }
85
-
86
- .rebilly-instruments-accordion-summary .rebilly-instruments-accordion-brands {
87
- display: inline-flex;
88
- justify-content: flex-end;
89
- align-items: center;
90
- }
91
-
92
- .rebilly-instruments-accordion-summary .rebilly-instruments-accordion-brands figure {
93
- margin: auto;
94
- padding: 0;
95
- height: 26px;
96
- }
97
-
98
- .rebilly-instruments-accordion-summary .rebilly-instruments-accordion-brands figure img {
99
- width: auto;
100
- height: 100%;
101
- border-radius: var(--rebilly-borderRadius);
102
- margin-right: var(--rebilly-spacings-xs);
103
- }
104
-
105
- .rebilly-instruments-accordion-summary .rebilly-instruments-accordion-brands span {
106
- color: var(--rebilly-colorMutedText);
107
- margin: 0 0 0 var(--rebilly-spacings-xs);
108
- font-size: calc(var(--rebilly-fontSizeBase) * 0.875);
109
- line-height: 1;
110
- }
111
-
112
- /* ACCORDION OPENED */
113
- .rebilly-instruments-accordion[open] {
114
- padding: 0 calc(var(--rebilly-spacings-m) - var(--rebilly-spacings-2xs)) calc(var(--rebilly-spacings-m) - var(--rebilly-spacings-2xs));
115
- opacity: 1;
116
- }
117
-
118
- .rebilly-instruments-accordion[open] .rebilly-instruments-accordion-summary {
119
- border-bottom: 1px solid var(--rebilly-colorMutedBorder);
120
- margin-bottom: calc(var(--rebilly-spacings-m) - var(--rebilly-spacings-2xs));
121
- }
122
-
123
- .rebilly-instruments-accordion[open] .rebilly-instruments-accordion-summary .rebilly-instruments-accordion-summary-checkmark {
124
- background: var(--rebilly-colorText);
125
- opacity: 1;
126
- }
127
-
128
- @media screen and (max-width: 600px) {
129
- .rebilly-instruments-accordion-summary .rebilly-instruments-accordion-brands figure:nth-child(2),
130
- .rebilly-instruments-accordion-summary .rebilly-instruments-accordion-brands figure:nth-child(3) {
131
- display: none;
132
- }
133
- }
134
-
135
- @media screen and (max-width: 480px) {
136
- .rebilly-instruments-accordion-summary .rebilly-instruments-accordion-brands {
137
- display: none;
138
- }
139
- }
140
- `;
@@ -1,55 +0,0 @@
1
- // -----------------------------------------------------------------------------
2
- // This file contains all styles related to the address component.
3
- // -----------------------------------------------------------------------------
4
- export const address = () => `
5
- /**
6
- * Address
7
- */
8
- .rebilly-instruments-address {
9
- margin: 0 0 var(--rebilly-spacings-base);
10
- color: var(--rebilly-colorMutedText);
11
- font-style: normal;
12
- }
13
-
14
- /**
15
- * Address Name: Default
16
- */
17
- .rebilly-instruments-address-name-default {
18
- /* No style changes */
19
- }
20
-
21
- /**
22
- * Address Name: Combined
23
- */
24
- .rebilly-instruments-address-name-combined {
25
- /* No style changes */
26
- }
27
-
28
- /**
29
- * Address Name: Stacked
30
- */
31
- .rebilly-instruments-address-name-stacked {
32
- /* No style changes */
33
- }
34
-
35
- /**
36
- * Address Region: Default
37
- */
38
- .rebilly-instruments-address-region-default {
39
- /* No style changes */
40
- }
41
-
42
- /**
43
- * Address Region: Split
44
- */
45
- .rebilly-instruments-address-region-split {
46
- /* No style changes */
47
- }
48
-
49
- /**
50
- * Address Name: Stacked
51
- */
52
- .rebilly-instruments-address-region-stacked {
53
- /* No style changes */
54
- }
55
- `;
@@ -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
- `;