jetformbuilder
/
modules
/
blocks-v2
/
phone-field
/
assets
/
src
/
frontend
/
field
Last commit date
PhoneFieldData.js
2 months ago
i18n-loader.js
2 months ago
index.js
4 months ago
style.scss
4 months ago
style.scss
82 lines
| 1 | /* International Phone Field Styles */ |
| 2 | |
| 3 | .jet-form-builder__field-wrap.phone-field-wrap { |
| 4 | position: relative; |
| 5 | width: 100%; |
| 6 | |
| 7 | .iti { |
| 8 | width: 100%; |
| 9 | position: relative; |
| 10 | display: inline-block; |
| 11 | } |
| 12 | |
| 13 | .iti--allow-dropdown .iti__country-container:not(:has(+ input[disabled])):not(:has(+ input[readonly])) .iti__selected-country-primary:hover, |
| 14 | .iti--allow-dropdown .iti__country-container:not(:has(+ input[disabled])):not(:has(+ input[readonly])) .iti__selected-country:has(+ .iti__dropdown-content:hover) .iti__selected-country-primary { |
| 15 | background-color: rgba(0, 0, 0, 0.05); |
| 16 | transition: all 0.3s ease-in-out; |
| 17 | } |
| 18 | |
| 19 | .iti__selected-country { |
| 20 | &:hover { |
| 21 | background-color: transparent; |
| 22 | color: inherit; |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | .intl-tel-input { |
| 27 | width: 100%; |
| 28 | display: block; |
| 29 | } |
| 30 | |
| 31 | .intl-tel-input .iti__selected-flag { |
| 32 | padding: 0 8px; |
| 33 | } |
| 34 | |
| 35 | .intl-tel-input input[type='tel']='tel'] { |
| 36 | width: 100%; |
| 37 | padding-left: 52px; |
| 38 | transition: border-color 0.2s ease, background-color 0.2s ease; |
| 39 | } |
| 40 | |
| 41 | /* Focus state */ |
| 42 | .intl-tel-input input[type='tel']='tel']:focus { |
| 43 | outline: none; |
| 44 | border-color: #2271b1; |
| 45 | box-shadow: 0 0 0 1px #2271b1; |
| 46 | } |
| 47 | |
| 48 | .iti__flag-container { |
| 49 | z-index: 2; |
| 50 | } |
| 51 | |
| 52 | .iti__country-list { |
| 53 | z-index: 10; |
| 54 | max-height: 200px; |
| 55 | overflow-y: auto; |
| 56 | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); |
| 57 | } |
| 58 | |
| 59 | /* Validation states */ |
| 60 | .phone-field-intl.invalid, |
| 61 | input.phone-field-intl.iti__tel-input.invalid { |
| 62 | border-color: #dc3232; |
| 63 | } |
| 64 | |
| 65 | |
| 66 | /* Error state for phone field */ |
| 67 | &.field-has-error { |
| 68 | .phone-field-intl, |
| 69 | input.phone-field-intl.iti__tel-input { |
| 70 | border-color: #dc3232; |
| 71 | background-color: #fff0f0; |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | /* Hide hidden fields */ |
| 76 | .jet-form-builder__field { |
| 77 | &.phone-field { |
| 78 | display: none; |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 |