uswds-jekyll 5.0.1 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +52 -93
  3. data/_includes/components/banner.html +11 -9
  4. data/_sass/uswds/components/_header.scss +1 -1
  5. data/_sass/uswds/components/_nav-buttons.scss +4 -4
  6. data/_sass/uswds/src/components/_alerts.scss +8 -9
  7. data/_sass/uswds/src/components/_banner.scss +102 -31
  8. data/_sass/uswds/src/components/_breadcrumb.scss +168 -0
  9. data/_sass/uswds/src/components/_footer.scss +14 -4
  10. data/_sass/uswds/src/components/_header.scss +1 -1
  11. data/_sass/uswds/src/components/_identifier.scss +146 -0
  12. data/_sass/uswds/src/components/_media-block.scss +6 -1
  13. data/_sass/uswds/src/components/_megamenu.scss +4 -1
  14. data/_sass/uswds/src/components/_section.scss +6 -2
  15. data/_sass/uswds/src/components/_skipnav.scss +2 -2
  16. data/_sass/uswds/src/components/_step-indicator.scss +444 -0
  17. data/_sass/uswds/src/components/_tooltip.scss +114 -0
  18. data/_sass/uswds/src/core/_functions.scss +631 -0
  19. data/_sass/uswds/src/core/_notifications.scss +14 -0
  20. data/_sass/uswds/src/core/_properties.scss +120 -108
  21. data/_sass/uswds/src/core/_system-tokens.scss +140 -155
  22. data/_sass/uswds/src/core/_variables.scss +134 -32
  23. data/_sass/uswds/src/core/mixins/_add-link-styles.scss +20 -0
  24. data/_sass/uswds/src/core/mixins/_all.scss +4 -0
  25. data/_sass/uswds/src/core/mixins/_font-face.scss +1 -1
  26. data/_sass/uswds/src/core/mixins/_icon.scss +119 -0
  27. data/_sass/uswds/src/core/mixins/_media-block-img.scss +1 -1
  28. data/_sass/uswds/src/core/mixins/_set-link-from-bg.scss +30 -0
  29. data/_sass/uswds/src/core/mixins/_set-text-from-bg.scss +28 -0
  30. data/_sass/uswds/src/core/mixins/utilities/_align-self.scss +11 -0
  31. data/_sass/uswds/src/core/mixins/utilities/_border.scss +1 -1
  32. data/_sass/uswds/src/core/mixins/utilities/_flex.scss +6 -1
  33. data/_sass/uswds/src/core/mixins/utilities/_text.scss +6 -1
  34. data/_sass/uswds/src/core/placeholders/_list.scss +5 -0
  35. data/_sass/uswds/src/core/system-tokens/_blue-cool.scss +3 -3
  36. data/_sass/uswds/src/core/system-tokens/_blue-warm.scss +3 -3
  37. data/_sass/uswds/src/core/system-tokens/_blue.scss +3 -3
  38. data/_sass/uswds/src/core/system-tokens/_cyan.scss +3 -3
  39. data/_sass/uswds/src/core/system-tokens/_gold.scss +3 -3
  40. data/_sass/uswds/src/core/system-tokens/_gray-cool.scss +2 -2
  41. data/_sass/uswds/src/core/system-tokens/_gray-warm.scss +2 -2
  42. data/_sass/uswds/src/core/system-tokens/_gray.scss +2 -2
  43. data/_sass/uswds/src/core/system-tokens/_green-cool.scss +3 -3
  44. data/_sass/uswds/src/core/system-tokens/_green-warm.scss +3 -3
  45. data/_sass/uswds/src/core/system-tokens/_green.scss +3 -3
  46. data/_sass/uswds/src/core/system-tokens/_indigo-cool.scss +6 -6
  47. data/_sass/uswds/src/core/system-tokens/_indigo-warm.scss +3 -3
  48. data/_sass/uswds/src/core/system-tokens/_indigo.scss +3 -3
  49. data/_sass/uswds/src/core/system-tokens/_magenta.scss +3 -3
  50. data/_sass/uswds/src/core/system-tokens/_mint-cool.scss +3 -3
  51. data/_sass/uswds/src/core/system-tokens/_mint.scss +3 -3
  52. data/_sass/uswds/src/core/system-tokens/_orange-warm.scss +3 -3
  53. data/_sass/uswds/src/core/system-tokens/_orange.scss +3 -3
  54. data/_sass/uswds/src/core/system-tokens/_red-cool.scss +3 -3
  55. data/_sass/uswds/src/core/system-tokens/_red-warm.scss +3 -3
  56. data/_sass/uswds/src/core/system-tokens/_red.scss +3 -3
  57. data/_sass/uswds/src/core/system-tokens/_violet-warm.scss +3 -3
  58. data/_sass/uswds/src/core/system-tokens/_violet.scss +3 -3
  59. data/_sass/uswds/src/core/system-tokens/_yellow.scss +3 -3
  60. data/_sass/uswds/src/elements/_buttons.scss +31 -24
  61. data/_sass/uswds/src/elements/form-controls/_all.scss +2 -0
  62. data/_sass/uswds/src/elements/form-controls/_checkbox-and-radio.scss +4 -2
  63. data/_sass/uswds/src/elements/form-controls/_combo-box.scss +80 -9
  64. data/_sass/uswds/src/elements/form-controls/_date-picker.scss +325 -0
  65. data/_sass/uswds/src/elements/form-controls/_file-input.scss +195 -0
  66. data/_sass/uswds/src/elements/form-controls/_global.scss +10 -3
  67. data/_sass/uswds/src/elements/form-controls/_time-picker.scss +3 -0
  68. data/_sass/uswds/src/packages/_usa-breadcrumb.scss +4 -0
  69. data/_sass/uswds/src/packages/_usa-identifier.scss +1 -0
  70. data/_sass/uswds/src/packages/_usa-step-indicator.scss +2 -0
  71. data/_sass/uswds/src/packages/_usa-tooltip.scss +2 -0
  72. data/_sass/uswds/src/packages/_uswds-components.scss +4 -0
  73. data/_sass/uswds/src/settings/_settings-color.scss +6 -1
  74. data/_sass/uswds/src/settings/_settings-components.scss +45 -1
  75. data/_sass/uswds/src/settings/_settings-general.scss +4 -4
  76. data/_sass/uswds/src/settings/_settings-typography.scss +5 -5
  77. data/_sass/uswds/src/settings/_settings-utilities.scss +89 -75
  78. data/_sass/uswds/src/theme/_uswds-theme-color.scss +4 -1
  79. data/_sass/uswds/src/theme/_uswds-theme-components.scss +45 -1
  80. data/_sass/uswds/src/theme/_uswds-theme-general.scss +4 -4
  81. data/_sass/uswds/src/theme/_uswds-theme-typography.scss +5 -5
  82. data/_sass/uswds/src/theme/_uswds-theme-utilities.scss +90 -77
  83. data/_sass/uswds/src/theme/styles.scss +5 -1
  84. data/_sass/uswds/src/utilities/palettes/_default-palettes.scss +2 -1
  85. data/_sass/uswds/src/utilities/palettes/_font-palettes.scss +478 -478
  86. data/_sass/uswds/src/utilities/palettes/_spacing-palettes.scss +7 -7
  87. data/_sass/uswds/src/utilities/palettes/colors/_all-colors-palettes.scss +2 -2
  88. data/_sass/uswds/src/utilities/palettes/colors/_black-transparent-palettes.scss +2 -2
  89. data/_sass/uswds/src/utilities/palettes/colors/_blue-cool-palettes.scss +7 -7
  90. data/_sass/uswds/src/utilities/palettes/colors/_blue-palettes.scss +7 -7
  91. data/_sass/uswds/src/utilities/palettes/colors/_blue-warm-palettes.scss +7 -7
  92. data/_sass/uswds/src/utilities/palettes/colors/_cyan-palettes.scss +7 -7
  93. data/_sass/uswds/src/utilities/palettes/colors/_gold-palettes.scss +7 -7
  94. data/_sass/uswds/src/utilities/palettes/colors/_gray-cool-palettes.scss +5 -5
  95. data/_sass/uswds/src/utilities/palettes/colors/_gray-palettes.scss +5 -5
  96. data/_sass/uswds/src/utilities/palettes/colors/_gray-warm-palettes.scss +5 -5
  97. data/_sass/uswds/src/utilities/palettes/colors/_green-cool-palettes.scss +7 -7
  98. data/_sass/uswds/src/utilities/palettes/colors/_green-palettes.scss +7 -7
  99. data/_sass/uswds/src/utilities/palettes/colors/_green-warm-palettes.scss +7 -7
  100. data/_sass/uswds/src/utilities/palettes/colors/_indigo-cool-palettes.scss +7 -7
  101. data/_sass/uswds/src/utilities/palettes/colors/_indigo-palettes.scss +7 -7
  102. data/_sass/uswds/src/utilities/palettes/colors/_indigo-warm-palettes.scss +7 -7
  103. data/_sass/uswds/src/utilities/palettes/colors/_magenta-palettes.scss +7 -7
  104. data/_sass/uswds/src/utilities/palettes/colors/_mint-cool-palettes.scss +7 -7
  105. data/_sass/uswds/src/utilities/palettes/colors/_mint-palettes.scss +7 -7
  106. data/_sass/uswds/src/utilities/palettes/colors/_orange-palettes.scss +7 -7
  107. data/_sass/uswds/src/utilities/palettes/colors/_orange-warm-palettes.scss +7 -7
  108. data/_sass/uswds/src/utilities/palettes/colors/_red-cool-palettes.scss +7 -7
  109. data/_sass/uswds/src/utilities/palettes/colors/_red-palettes.scss +7 -7
  110. data/_sass/uswds/src/utilities/palettes/colors/_red-warm-palettes.scss +7 -7
  111. data/_sass/uswds/src/utilities/palettes/colors/_violet-palettes.scss +7 -7
  112. data/_sass/uswds/src/utilities/palettes/colors/_violet-warm-palettes.scss +7 -7
  113. data/_sass/uswds/src/utilities/palettes/colors/_white-transparent-palettes.scss +2 -2
  114. data/_sass/uswds/src/utilities/palettes/colors/_yellow-palettes.scss +7 -7
  115. data/_sass/uswds/src/utilities/rules/_all.scss +1 -0
  116. data/_sass/uswds/src/utilities/rules/_package.scss +1 -0
  117. data/_sass/uswds/src/utilities/rules/add-aspect.scss +13 -13
  118. data/_sass/uswds/src/utilities/rules/add-list-reset.scss +5 -5
  119. data/_sass/uswds/src/utilities/rules/align-items.scss +2 -2
  120. data/_sass/uswds/src/utilities/rules/align-self.scss +27 -0
  121. data/_sass/uswds/src/utilities/rules/background-color.scss +2 -2
  122. data/_sass/uswds/src/utilities/rules/border-color.scss +2 -2
  123. data/_sass/uswds/src/utilities/rules/border-radius.scss +7 -7
  124. data/_sass/uswds/src/utilities/rules/border-style.scss +2 -2
  125. data/_sass/uswds/src/utilities/rules/border-width.scss +5 -5
  126. data/_sass/uswds/src/utilities/rules/border.scss +5 -5
  127. data/_sass/uswds/src/utilities/rules/bottom.scss +2 -2
  128. data/_sass/uswds/src/utilities/rules/box-shadow.scss +2 -2
  129. data/_sass/uswds/src/utilities/rules/circle.scss +4 -4
  130. data/_sass/uswds/src/utilities/rules/clearfix.scss +5 -5
  131. data/_sass/uswds/src/utilities/rules/color.scss +2 -2
  132. data/_sass/uswds/src/utilities/rules/cursor.scss +2 -2
  133. data/_sass/uswds/src/utilities/rules/display.scss +2 -2
  134. data/_sass/uswds/src/utilities/rules/flex-direction.scss +2 -2
  135. data/_sass/uswds/src/utilities/rules/flex-wrap.scss +2 -2
  136. data/_sass/uswds/src/utilities/rules/flex.scss +2 -2
  137. data/_sass/uswds/src/utilities/rules/float.scss +2 -2
  138. data/_sass/uswds/src/utilities/rules/font-family.scss +2 -2
  139. data/_sass/uswds/src/utilities/rules/font-feature.scss +2 -2
  140. data/_sass/uswds/src/utilities/rules/font-style.scss +2 -2
  141. data/_sass/uswds/src/utilities/rules/font-weight.scss +2 -2
  142. data/_sass/uswds/src/utilities/rules/font.scss +2 -2
  143. data/_sass/uswds/src/utilities/rules/height.scss +2 -2
  144. data/_sass/uswds/src/utilities/rules/justify-content.scss +2 -2
  145. data/_sass/uswds/src/utilities/rules/left.scss +2 -2
  146. data/_sass/uswds/src/utilities/rules/letter-spacing.scss +2 -2
  147. data/_sass/uswds/src/utilities/rules/line-height.scss +2 -2
  148. data/_sass/uswds/src/utilities/rules/margin.scss +9 -9
  149. data/_sass/uswds/src/utilities/rules/max-height.scss +2 -2
  150. data/_sass/uswds/src/utilities/rules/max-width.scss +2 -2
  151. data/_sass/uswds/src/utilities/rules/measure.scss +2 -2
  152. data/_sass/uswds/src/utilities/rules/min-height.scss +2 -2
  153. data/_sass/uswds/src/utilities/rules/min-width.scss +2 -2
  154. data/_sass/uswds/src/utilities/rules/opacity.scss +3 -5
  155. data/_sass/uswds/src/utilities/rules/order.scss +2 -2
  156. data/_sass/uswds/src/utilities/rules/outline-color.scss +2 -2
  157. data/_sass/uswds/src/utilities/rules/outline.scss +2 -2
  158. data/_sass/uswds/src/utilities/rules/overflow.scss +3 -3
  159. data/_sass/uswds/src/utilities/rules/padding.scss +5 -5
  160. data/_sass/uswds/src/utilities/rules/pin.scss +19 -19
  161. data/_sass/uswds/src/utilities/rules/position.scss +2 -2
  162. data/_sass/uswds/src/utilities/rules/right.scss +2 -2
  163. data/_sass/uswds/src/utilities/rules/square.scss +4 -4
  164. data/_sass/uswds/src/utilities/rules/text-align.scss +2 -2
  165. data/_sass/uswds/src/utilities/rules/text-decoration-color.scss +2 -2
  166. data/_sass/uswds/src/utilities/rules/text-decoration.scss +2 -2
  167. data/_sass/uswds/src/utilities/rules/text-indent.scss +2 -2
  168. data/_sass/uswds/src/utilities/rules/text-transform.scss +2 -2
  169. data/_sass/uswds/src/utilities/rules/top.scss +2 -2
  170. data/_sass/uswds/src/utilities/rules/vertical-align.scss +2 -2
  171. data/_sass/uswds/src/utilities/rules/whitespace.scss +2 -2
  172. data/_sass/uswds/src/utilities/rules/width.scss +2 -2
  173. data/_sass/uswds/src/utilities/rules/z-index.scss +2 -2
  174. data/assets/uswds/img/angle-arrow-down-gray-90.svg +1 -0
  175. data/assets/uswds/img/angle-arrow-right-white.svg +1 -0
  176. data/assets/uswds/img/angle-arrow-right.svg +1 -0
  177. data/assets/uswds/img/angle-double-left-solid.svg +1 -0
  178. data/assets/uswds/img/angle-double-right-solid.svg +1 -0
  179. data/assets/uswds/img/angle-left-solid.svg +1 -0
  180. data/assets/uswds/img/angle-right-solid.svg +1 -0
  181. data/assets/uswds/img/arrow-down-gray-60.svg +1 -0
  182. data/assets/uswds/img/arrow-left-indigo-cool-50v.svg +1 -0
  183. data/assets/uswds/img/arrow-left-white.svg +1 -0
  184. data/assets/uswds/img/arrow-left.svg +1 -0
  185. data/assets/uswds/img/calendar-alt-solid.svg +1 -0
  186. data/assets/uswds/img/chevron-right-white.svg +1 -0
  187. data/assets/uswds/img/chevron-right.svg +1 -0
  188. data/assets/uswds/img/chevron-white.svg +1 -0
  189. data/assets/uswds/img/chevron.svg +1 -0
  190. data/assets/uswds/img/circle-gray-20.svg +1 -0
  191. data/assets/uswds/img/close-alt-blue-60v.svg +3 -0
  192. data/assets/uswds/img/close-alt.svg +3 -0
  193. data/assets/uswds/img/close-gray-60.svg +1 -0
  194. data/assets/uswds/img/file-excel.svg +1 -0
  195. data/assets/uswds/img/file-pdf.svg +1 -0
  196. data/assets/uswds/img/file-video.svg +1 -0
  197. data/assets/uswds/img/file-word.svg +1 -0
  198. data/assets/uswds/img/file.svg +1 -0
  199. data/assets/uswds/img/loader.gif +0 -0
  200. data/assets/uswds/img/loader.svg +1 -0
  201. data/assets/uswds/img/lock.svg +1 -0
  202. data/assets/uswds/js/uswds.js +3570 -216
  203. data/assets/uswds/js/uswds.min.js +1 -1
  204. data/assets/uswds/js/uswds.min.js.map +1 -1
  205. metadata +59 -2
@@ -0,0 +1,325 @@
1
+ // Date Picker
2
+
3
+ .usa-date-picker__wrapper {
4
+ display: none;
5
+ position: relative;
6
+
7
+ &:focus {
8
+ outline: 0;
9
+ }
10
+ }
11
+
12
+ // Date Picker -- initialized
13
+
14
+ %usa-date-picker__button {
15
+ background-color: color("base-lightest");
16
+ border: 0;
17
+ width: 100%;
18
+
19
+ &:not([disabled]) {
20
+ cursor: pointer;
21
+
22
+ &:focus {
23
+ outline-offset: -4px;
24
+ }
25
+
26
+ &:hover {
27
+ background-color: color("base-lighter");
28
+ }
29
+
30
+ &:active {
31
+ background-color: color("base-light");
32
+ }
33
+ }
34
+ }
35
+
36
+ .usa-date-picker--active {
37
+ .usa-date-picker__button {
38
+ background-color: #f0f0f0;
39
+ }
40
+
41
+ .usa-date-picker__calendar {
42
+ z-index: z-index(400);
43
+ }
44
+ }
45
+
46
+ .usa-date-picker__button {
47
+ @extend %usa-date-picker__button;
48
+ @include add-background-svg("calendar-alt-solid");
49
+ align-self: stretch;
50
+ background-color: transparent;
51
+ background-position: center;
52
+ background-size: units(3);
53
+ margin-top: 0.5em;
54
+ width: 3em;
55
+ }
56
+
57
+ .usa-date-picker--initialized {
58
+ .usa-date-picker__wrapper {
59
+ display: flex;
60
+ }
61
+ }
62
+
63
+ // Date Picker - Calendar View
64
+
65
+ .usa-date-picker__calendar {
66
+ background-color: color("base-lightest");
67
+ left: 0;
68
+ position: absolute;
69
+ width: 100%;
70
+ z-index: z-index(100);
71
+ }
72
+
73
+ // Date Picker - Table
74
+
75
+ .usa-date-picker__calendar__table {
76
+ border-spacing: 0;
77
+ border-collapse: collapse;
78
+ table-layout: fixed;
79
+ text-align: center;
80
+ width: 100%;
81
+
82
+ th {
83
+ font-weight: normal;
84
+ }
85
+
86
+ td {
87
+ padding: 0;
88
+ }
89
+ }
90
+
91
+ // Date Picker - Grid
92
+
93
+ .usa-date-picker__calendar__row {
94
+ @include grid-row;
95
+ text-align: center;
96
+ width: 100%;
97
+ }
98
+
99
+ .usa-date-picker__calendar__cell {
100
+ background-color: color("base-lightest");
101
+ flex: 1;
102
+ }
103
+
104
+ .usa-date-picker__calendar__cell--center-items {
105
+ display: flex;
106
+ justify-content: center;
107
+ align-items: center;
108
+ }
109
+
110
+ // Date Picker - Date Selection View
111
+
112
+ .usa-date-picker__calendar__previous-year,
113
+ .usa-date-picker__calendar__previous-month,
114
+ .usa-date-picker__calendar__next-year,
115
+ .usa-date-picker__calendar__next-month {
116
+ @extend %usa-date-picker__button;
117
+ background-position: center;
118
+ background-size: auto units(2.5);
119
+ height: units(3);
120
+ padding: 20px 10px;
121
+ }
122
+
123
+ .usa-date-picker__calendar__previous-year:not([disabled]) {
124
+ @include add-background-svg("angle-double-left-solid");
125
+ }
126
+
127
+ .usa-date-picker__calendar__previous-month:not([disabled]) {
128
+ @include add-background-svg("angle-left-solid");
129
+ }
130
+
131
+ .usa-date-picker__calendar__next-year:not([disabled]) {
132
+ @include add-background-svg("angle-double-right-solid");
133
+ }
134
+
135
+ .usa-date-picker__calendar__next-month:not([disabled]) {
136
+ @include add-background-svg("angle-right-solid");
137
+ }
138
+
139
+ .usa-date-picker__calendar__day-of-week {
140
+ padding: 6px 0px;
141
+ }
142
+
143
+ .usa-date-picker__calendar__date {
144
+ @extend %usa-date-picker__button;
145
+ padding: 10px 0px;
146
+
147
+ &--focused {
148
+ @include focus-outline($width: 2px, $offset: -2px, $color: "blue-warm-80v");
149
+ position: relative;
150
+ z-index: z-index(100);
151
+ }
152
+
153
+ &--next-month:not([disabled]),
154
+ &--previous-month:not([disabled]) {
155
+ color: color("gray-warm-60");
156
+ }
157
+
158
+ &--selected,
159
+ &--range-date {
160
+ background-color: color("primary-vivid");
161
+ color: color("gray-2");
162
+
163
+ &:not([disabled]) {
164
+ background-color: color("primary-vivid");
165
+ color: color("gray-2");
166
+
167
+ &:hover {
168
+ background-color: color("primary-vivid");
169
+ color: color("gray-10");
170
+ }
171
+
172
+ &:focus {
173
+ background-color: color("primary-vivid");
174
+ color: color("gray-2");
175
+ }
176
+
177
+ &:active {
178
+ background-color: color("primary-dark");
179
+ }
180
+ }
181
+ }
182
+
183
+ &--range-date-start {
184
+ border-top-left-radius: 10%;
185
+ border-bottom-left-radius: 10%;
186
+ }
187
+
188
+ &--range-date-end {
189
+ border-top-right-radius: 10%;
190
+ border-bottom-right-radius: 10%;
191
+ }
192
+
193
+ &--within-range {
194
+ background-color: color("blue-10v");
195
+
196
+ &:not([disabled]) {
197
+ background-color: color("blue-10v");
198
+
199
+ &:hover {
200
+ background-color: color("blue-10v");
201
+ }
202
+
203
+ &:focus {
204
+ background-color: color("blue-10v");
205
+ }
206
+
207
+ &:active {
208
+ background-color: color("blue-10v");
209
+ }
210
+ }
211
+ }
212
+ }
213
+
214
+ .usa-date-picker__calendar__month-label {
215
+ flex: 4;
216
+ text-align: center;
217
+ }
218
+
219
+ .usa-date-picker__calendar__year-selection,
220
+ .usa-date-picker__calendar__month-selection {
221
+ @extend %usa-date-picker__button;
222
+ display: inline-block;
223
+ height: 100%;
224
+ padding: 8px 4px;
225
+ width: auto;
226
+ }
227
+
228
+ // Date Picker - Month Selection View
229
+
230
+ .usa-date-picker__calendar__month-picker {
231
+ padding: 20px 5px;
232
+ }
233
+
234
+ .usa-date-picker__calendar__month {
235
+ @extend %usa-date-picker__button;
236
+ padding: 10px 0;
237
+
238
+ &--focused {
239
+ @include focus-outline($width: 2px, $offset: -2px, $color: "blue-warm-80v");
240
+ position: relative;
241
+ z-index: z-index(100);
242
+ }
243
+
244
+ &--selected {
245
+ background-color: color("primary-vivid");
246
+ color: color("gray-2");
247
+
248
+ &:not([disabled]) {
249
+ background-color: color("primary-vivid");
250
+ color: color("gray-2");
251
+
252
+ &:hover {
253
+ background-color: color("primary-vivid");
254
+ color: color("gray-10");
255
+ }
256
+
257
+ &:focus {
258
+ background-color: color("primary-vivid");
259
+ color: color("gray-2");
260
+ }
261
+
262
+ &:active {
263
+ background-color: color("primary-dark");
264
+ }
265
+ }
266
+ }
267
+ }
268
+
269
+ // Date Picker - Year Selection View
270
+
271
+ .usa-date-picker__calendar__year-picker {
272
+ padding: 20px 5px;
273
+ }
274
+
275
+ .usa-date-picker__calendar__previous-year-chunk,
276
+ .usa-date-picker__calendar__next-year-chunk {
277
+ @extend %usa-date-picker__button;
278
+ background-position: center;
279
+ background-size: auto units(4);
280
+ margin: auto;
281
+ padding: 40px 0;
282
+ }
283
+
284
+ .usa-date-picker__calendar__previous-year-chunk:not([disabled]) {
285
+ @include add-background-svg("angle-left-solid");
286
+ }
287
+
288
+ .usa-date-picker__calendar__next-year-chunk:not([disabled]) {
289
+ @include add-background-svg("angle-right-solid");
290
+ }
291
+
292
+ .usa-date-picker__calendar__year {
293
+ @extend %usa-date-picker__button;
294
+ padding: 10px 0;
295
+
296
+ &--focused {
297
+ @include focus-outline($width: 2px, $offset: -2px, $color: "blue-warm-80v");
298
+ position: relative;
299
+ z-index: z-index(100);
300
+ }
301
+
302
+ &--selected {
303
+ background-color: color("primary-vivid");
304
+ color: color("gray-2");
305
+
306
+ &:not([disabled]) {
307
+ background-color: color("primary-vivid");
308
+ color: color("gray-2");
309
+
310
+ &:hover {
311
+ background-color: color("primary-vivid");
312
+ color: color("gray-10");
313
+ }
314
+
315
+ &:focus {
316
+ background-color: color("primary-vivid");
317
+ color: color("gray-2");
318
+ }
319
+
320
+ &:active {
321
+ background-color: color("primary-dark");
322
+ }
323
+ }
324
+ }
325
+ }
@@ -1,4 +1,199 @@
1
1
  [type="file"] {
2
2
  border: none;
3
+ margin-top: units(1);
3
4
  padding-left: 0;
5
+ padding-top: 0.2rem; // keeps input vertically centered on error state
6
+ }
7
+
8
+ .usa-file-input {
9
+ display: block;
10
+ max-width: units($theme-input-max-width);
11
+ width: 100%;
12
+ }
13
+
14
+ .usa-file-input__target {
15
+ border: 1px dashed color("base-light");
16
+ display: block;
17
+ font-size: size("body", "2xs");
18
+ margin-top: units(1);
19
+ position: relative;
20
+ text-align: center;
21
+ width: 100%;
22
+
23
+ &:hover {
24
+ border-color: color("base");
25
+ }
26
+ }
27
+
28
+ .usa-file-input__target.has-invalid-file {
29
+ border-color: color("accent-warm");
30
+ }
31
+
32
+ .usa-file-input__accepted-files-message {
33
+ font-weight: bold;
34
+ margin: units(-3) 0 units(3);
35
+ pointer-events: none;
36
+ position: relative;
37
+ z-index: 3;
38
+ }
39
+
40
+ .has-invalid-file .usa-file-input__accepted-files-message {
41
+ color: color("secondary-dark");
42
+ }
43
+
44
+ .usa-file-input__choose {
45
+ @include typeset-link;
46
+ font-weight: normal;
47
+ }
48
+
49
+ .usa-file-input__instructions {
50
+ display: inline-block;
51
+ padding: units(4) units(2);
52
+ pointer-events: none;
53
+ position: relative;
54
+ z-index: 3;
55
+
56
+ &.display-none {
57
+ display: none;
58
+ }
59
+ }
60
+
61
+ .usa-file-input__box {
62
+ background: white;
63
+ height: 100%;
64
+ left: 0;
65
+ pointer-events: none;
66
+ position: absolute;
67
+ top: 0;
68
+ width: 100%;
69
+ z-index: 2;
70
+ }
71
+
72
+ .usa-file-input .usa-file-input__input[type] {
73
+ cursor: pointer;
74
+ height: 100%;
75
+ left: 0;
76
+ margin: 0;
77
+ max-width: none;
78
+ position: absolute;
79
+ padding: units(1);
80
+ text-indent: -999em;
81
+ top: 0;
82
+ width: 100%;
83
+ z-index: 1;
84
+ }
85
+
86
+ .usa-file-input .usa-file-input__input[type]::-webkit-file-upload-button {
87
+ display: none;
88
+ }
89
+
90
+ .usa-file-input--drag .usa-file-input__target {
91
+ border-color: color("primary");
92
+ }
93
+
94
+ .usa-file-input--drag .usa-file-input__box {
95
+ background-color: color("primary-lighter") !important;
96
+ }
97
+
98
+ .usa-file-input--drag .usa-file-input__preview {
99
+ opacity: 0.1;
100
+ }
101
+
102
+ .usa-file-input__preview-heading {
103
+ align-items: center;
104
+ background: color("primary-lighter");
105
+ display: flex;
106
+ font-weight: bold;
107
+ justify-content: space-between;
108
+ padding: units(1);
109
+ pointer-events: none;
110
+ position: relative;
111
+ z-index: 3;
112
+ }
113
+
114
+ .usa-file-input__preview {
115
+ align-items: center;
116
+ background: color("primary-lighter");
117
+ word-wrap: anywhere;
118
+ display: flex;
119
+ font-size: size("body", "3xs");
120
+ margin-top: units(1px);
121
+ padding: units(0.5) units(1);
122
+ pointer-events: none;
123
+ position: relative;
124
+ text-align: left;
125
+ z-index: 3;
126
+
127
+ &:last-child {
128
+ margin-bottom: units(-3);
129
+ }
130
+ }
131
+
132
+ .usa-file-input__preview-image {
133
+ border: none;
134
+ display: block;
135
+ height: units(5);
136
+ margin-right: units(1);
137
+ object-fit: contain;
138
+ width: units(5);
139
+ }
140
+
141
+ .usa-file-input__preview-image.is-loading {
142
+ @include add-background-svg("loader");
143
+ background-position: center center;
144
+ background-repeat: no-repeat;
145
+ background-size: units(4);
146
+ }
147
+
148
+ .usa-file-input__preview-image--generic,
149
+ .usa-file-input__preview-image--pdf,
150
+ .usa-file-input__preview-image--word,
151
+ .usa-file-input__preview-image--excel,
152
+ .usa-file-input__preview-image--video {
153
+ background-position: center center;
154
+ background-repeat: no-repeat;
155
+ background-size: units(3);
156
+ }
157
+
158
+ .usa-file-input__preview-image--pdf {
159
+ @include add-background-svg("file-pdf");
160
+ }
161
+
162
+ .usa-file-input__preview-image--generic {
163
+ @include add-background-svg("file");
164
+ }
165
+
166
+ .usa-file-input__preview-image--word {
167
+ @include add-background-svg("file-word");
168
+ }
169
+
170
+ .usa-file-input__preview-image--excel {
171
+ @include add-background-svg("file-excel");
172
+ }
173
+
174
+ .usa-file-input__preview-image--video {
175
+ @include add-background-svg("file-video");
176
+ }
177
+
178
+ // Error states
179
+ .usa-form-group--error .usa-file-input__target {
180
+ border-color: color("secondary-dark");
181
+ border-width: 2px;
182
+ }
183
+
184
+ // Disabled state
185
+ .usa-file-input--disabled {
186
+ pointer-events: none;
187
+
188
+ .usa-file-input__instructions {
189
+ opacity: 0.5;
190
+ }
191
+
192
+ .usa-file-input__box {
193
+ background-color: color($theme-color-disabled-light);
194
+ }
195
+
196
+ .usa-file-input__input[type] {
197
+ cursor: default;
198
+ }
4
199
  }