_FeatureForm.scss 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. @mixin featureForm() {
  2. $group-border-width: 3px;
  3. .esri-feature-form {
  4. background-color: $background-color--offset;
  5. padding: $cap-spacing $side-spacing;
  6. }
  7. .esri-feature-form__form {
  8. display: flex;
  9. flex-direction: column;
  10. }
  11. .esri-feature-form__label {
  12. @include wordbreak();
  13. display: flex;
  14. justify-content: space-between;
  15. flex-direction: column;
  16. margin-bottom: $cap-spacing;
  17. position: relative;
  18. opacity: 1;
  19. transition: opacity 250ms, margin 250ms;
  20. &:last-child {
  21. margin-bottom: 0;
  22. }
  23. }
  24. .esri-feature-form__form-header {
  25. margin-bottom: $cap-spacing;
  26. .esri-feature-form__description-text ~ .esri-widget__heading {
  27. margin-bottom: 0;
  28. }
  29. .esri-feature-form__description-text {
  30. margin-top: 0;
  31. }
  32. }
  33. .esri-feature-form__input {
  34. margin-top: $cap-spacing--third;
  35. width: 100%;
  36. // for textarea
  37. resize: horizontal;
  38. }
  39. .esri-feature-form__input--date,
  40. .esri-feature-form__input--time {
  41. resize: none;
  42. }
  43. .esri-feature-form__input--disabled {
  44. opacity: $opacity--disabled;
  45. }
  46. .esri-feature-form__input--invalid {
  47. border: 1px solid $border-color--error;
  48. }
  49. .esri-feature-form__input-icon--invalid {
  50. position: absolute;
  51. top: 30px;
  52. right: 4px;
  53. color: $font-color--error;
  54. background-color: $background-color;
  55. }
  56. .esri-feature-form__input:focus + .esri-feature-form__input-icon--invalid {
  57. display: none;
  58. }
  59. .esri-feature-form__field-error-message {
  60. padding: $side-spacing--half 0;
  61. font-size: $font-size--small;
  62. }
  63. .esri-feature-form__date-input-container {
  64. display: flex;
  65. }
  66. .esri-feature-form__date-input-part {
  67. width: 50%;
  68. display: flex;
  69. flex-direction: column;
  70. // only want to hide the border if there date/time inputs are side-by-side
  71. &:nth-last-child(2) .esri-feature-form__input {
  72. border-right: none;
  73. }
  74. &--lone {
  75. width: 100%;
  76. }
  77. }
  78. .esri-feature-form__date-format-hint {
  79. color: $interactive-font-color;
  80. font-size: $font-size--small;
  81. padding: 0.5em 0.5em 0 0.5em;
  82. }
  83. .esri-feature-form__input--radio-group {
  84. display: flex;
  85. flex-direction: column;
  86. }
  87. .esri-feature-form__input--radio-label {
  88. display: flex;
  89. align-items: center;
  90. }
  91. .esri-feature-form__input--radio {
  92. margin: $side-spacing--half;
  93. }
  94. .esri-feature-form__group-description {
  95. margin: $cap-spacing--half 0 $cap-spacing--third 0;
  96. }
  97. .esri-feature-form__group {
  98. border: none;
  99. border-bottom: 1px solid $border-color;
  100. padding: 0 0 $cap-spacing 0;
  101. margin: 0 0 $cap-spacing 0;
  102. min-inline-size: unset;
  103. transition: border-color 250ms;
  104. &-label {
  105. margin-bottom: 0;
  106. }
  107. &-header {
  108. align-items: center;
  109. display: flex;
  110. cursor: pointer;
  111. justify-content: space-between;
  112. margin: 0 0 $cap-spacing--half 0;
  113. padding: $cap-spacing--half 0;
  114. // button reset
  115. border: none;
  116. background-color: inherit;
  117. font-family: inherit;
  118. text-align: unset;
  119. width: 100%;
  120. }
  121. &-title {
  122. flex: 0 1 auto;
  123. }
  124. &-toggle-icon {
  125. justify-self: flex-end;
  126. flex: 0 0 16px;
  127. margin: 0 $side-spacing--half;
  128. }
  129. &:last-child {
  130. border-bottom: none;
  131. margin-bottom: 0;
  132. padding-bottom: 0;
  133. }
  134. }
  135. .esri-feature-form__group--sequential {
  136. border-bottom: none;
  137. border-left: $group-border-width solid $border-color;
  138. padding-bottom: 0;
  139. padding-left: $cap-spacing--half;
  140. padding-right: $cap-spacing--half;
  141. .esri-feature-form__group-header {
  142. padding-top: 0;
  143. }
  144. &:not(.esri-feature-form__group--collapsed) {
  145. .esri-feature-form__group-header {
  146. cursor: auto;
  147. }
  148. }
  149. }
  150. .esri-feature-form__group--active {
  151. border-left-color: $border-color--active;
  152. }
  153. .esri-feature-form__group--collapsed {
  154. .esri-feature-form__group-header {
  155. margin-bottom: 0;
  156. }
  157. .esri-feature-form__label {
  158. pointer-events: none;
  159. opacity: 0;
  160. height: 0;
  161. margin: 0;
  162. transition: none;
  163. }
  164. }
  165. .esri-feature-form__description-text {
  166. margin: $cap-spacing--quarter 0 0 0;
  167. font-size: $font-size--small;
  168. color: $interactive-font-color;
  169. }
  170. html[dir="rtl"] {
  171. .esri-feature-form__group {
  172. border-left: none;
  173. border-right: $group-border-width solid $border-color;
  174. }
  175. .esri-feature-form__date-input-part {
  176. &:first-child .esri-feature-form__input {
  177. border-right: 1px solid $border-color;
  178. border-left: none;
  179. }
  180. }
  181. }
  182. }
  183. @if $include_FeatureForm == true {
  184. @include featureForm();
  185. }