form.css
176 lines
| 1 | /* ------------------------------ |
| 2 | Form: Base |
| 3 | -------------------------------- */ |
| 4 | |
| 5 | .advads-form { |
| 6 | @apply !outline-0; |
| 7 | |
| 8 | .advads-form-description { |
| 9 | @apply text-xs text-gray-500 mb-8; |
| 10 | } |
| 11 | |
| 12 | .advads-field:last-of-type { |
| 13 | @apply mb-0; |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | .advads-field { |
| 18 | @apply mb-6; |
| 19 | |
| 20 | .notice { |
| 21 | @apply block; |
| 22 | } |
| 23 | |
| 24 | .spinner { |
| 25 | @apply float-none align-top; |
| 26 | } |
| 27 | |
| 28 | &.invalid { |
| 29 | label { @apply text-red-500; } |
| 30 | |
| 31 | input { @apply border-red-300; } |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | .advads-field-label { |
| 36 | @apply block mb-2 font-normal text-sm shrink-0; |
| 37 | } |
| 38 | |
| 39 | .advads-field-input { |
| 40 | @apply flex-1; |
| 41 | |
| 42 | .regular-text, |
| 43 | .large-text { |
| 44 | @apply w-full border-border px-3 py-2 placeholder:text-gray-400; |
| 45 | } |
| 46 | |
| 47 | .regular-text { |
| 48 | @apply leading-0; |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | .advads-field-description { |
| 53 | @apply text-xs text-gray-400 mt-2 italic; |
| 54 | } |
| 55 | |
| 56 | .advads-field-error { |
| 57 | @apply text-sm text-red-600 mt-2 hidden; |
| 58 | } |
| 59 | |
| 60 | .small-input { |
| 61 | @apply w-20; |
| 62 | } |
| 63 | |
| 64 | .advads-field-raw ul { |
| 65 | @apply m-0; |
| 66 | } |
| 67 | |
| 68 | /* ------------------------------ |
| 69 | Form: Bordered |
| 70 | -------------------------------- */ |
| 71 | |
| 72 | .advads-form-bordered { |
| 73 | .advads-field { |
| 74 | @apply border-b border-border mb-4 pb-4; |
| 75 | } |
| 76 | |
| 77 | .advads-field:not(.not-last):last-of-type { |
| 78 | @apply border-0 mb-0 pb-0; |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | /* ------------------------------ |
| 83 | Form: Horizontal |
| 84 | -------------------------------- */ |
| 85 | |
| 86 | .advads-form-horizontal { |
| 87 | .advads-field:not(.hidden) { |
| 88 | @apply flex gap-x-8; |
| 89 | } |
| 90 | |
| 91 | .advads-field-label { |
| 92 | @apply text-[14px] w-40 mb-0; |
| 93 | } |
| 94 | |
| 95 | .advads-field.w-full { |
| 96 | @apply block; |
| 97 | } |
| 98 | |
| 99 | .advads-field.w-full .advads-field-label { |
| 100 | @apply w-full mb-2; |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | /* ------------------------------ |
| 105 | Field: Image Selector |
| 106 | -------------------------------- */ |
| 107 | |
| 108 | .advads-image-selector { |
| 109 | @apply flex flex-wrap gap-x-6 gap-y-6 items-center my-4; |
| 110 | |
| 111 | input { |
| 112 | @apply hidden; |
| 113 | } |
| 114 | |
| 115 | .advads-tooltip-alt { |
| 116 | @apply text-left; |
| 117 | } |
| 118 | |
| 119 | .advads-selector-item-title { |
| 120 | @apply font-bold mb-1; |
| 121 | } |
| 122 | |
| 123 | .advads-selector-item { |
| 124 | @apply w-20 text-center rounded align-middle; |
| 125 | } |
| 126 | |
| 127 | .advads-selector-item img { |
| 128 | @apply w-full h-auto; |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | .advads-selector-item { |
| 133 | @apply block cursor-pointer; |
| 134 | } |
| 135 | |
| 136 | .advads-selector-item-pro { |
| 137 | @apply opacity-50 pointer-events-none relative; |
| 138 | @apply before:absolute before:-bottom-1 before:right-[2px] before:text-xs before:font-bold before:text-black before:content-['ADD-ON'] before:z-10; |
| 139 | } |
| 140 | |
| 141 | .advads-selector-item-tooltip { |
| 142 | @apply hidden; |
| 143 | } |
| 144 | |
| 145 | /* ------------------------------ |
| 146 | Field: Radio Buttons |
| 147 | -------------------------------- */ |
| 148 | |
| 149 | .advads-radio-buttons { |
| 150 | @apply inline-flex items-center outline outline-border bg-gray-50 rounded divide-x divide-border; |
| 151 | |
| 152 | input { |
| 153 | @apply hidden; |
| 154 | } |
| 155 | |
| 156 | label { |
| 157 | @apply px-4 py-1.5 cursor-pointer; |
| 158 | } |
| 159 | |
| 160 | input:checked + label { |
| 161 | @apply bg-wordpress text-white border-transparent; |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | /* ------------------------------ |
| 166 | Field: Group |
| 167 | -------------------------------- */ |
| 168 | |
| 169 | .advads-field-group > .advads-field-input { |
| 170 | @apply flex gap-4 flex-wrap; |
| 171 | } |
| 172 | |
| 173 | .advads-field-group .advads-field { |
| 174 | @apply mb-0; |
| 175 | } |
| 176 |