@cfpb/cfpb-design-system 4.2.3 → 4.3.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 (147) hide show
  1. package/CHANGELOG.md +178 -1
  2. package/dist/base/index.css +1 -1
  3. package/dist/base/index.css.map +2 -2
  4. package/dist/base/index.js.map +1 -1
  5. package/dist/components/cfpb-buttons/index.css +1 -1
  6. package/dist/components/cfpb-buttons/index.css.map +2 -2
  7. package/dist/components/cfpb-buttons/index.js.map +1 -1
  8. package/dist/components/cfpb-expandables/index.css.map +1 -1
  9. package/dist/components/cfpb-expandables/index.js +1 -1
  10. package/dist/components/cfpb-expandables/index.js.map +3 -3
  11. package/dist/components/cfpb-forms/index.css +1 -1
  12. package/dist/components/cfpb-forms/index.css.map +2 -2
  13. package/dist/components/cfpb-forms/index.js +1 -1
  14. package/dist/components/cfpb-forms/index.js.map +2 -2
  15. package/dist/components/cfpb-layout/index.css +1 -1
  16. package/dist/components/cfpb-layout/index.css.map +1 -1
  17. package/dist/components/cfpb-notifications/index.css.map +1 -1
  18. package/dist/components/cfpb-pagination/index.css.map +1 -1
  19. package/dist/components/cfpb-tables/index.css.map +1 -1
  20. package/dist/components/cfpb-typography/index.css +1 -1
  21. package/dist/components/cfpb-typography/index.css.map +2 -2
  22. package/dist/components/cfpb-typography/index.js.map +1 -1
  23. package/dist/elements/cfpb-button/index.js +4 -4
  24. package/dist/elements/cfpb-button/index.js.map +3 -3
  25. package/dist/elements/cfpb-checkbox-icon/index.js +29 -0
  26. package/dist/elements/{cfpb-checkbox → cfpb-checkbox-icon}/index.js.map +4 -4
  27. package/dist/elements/cfpb-expandable/index.css +2 -0
  28. package/dist/elements/cfpb-expandable/index.css.map +7 -0
  29. package/dist/elements/cfpb-expandable/index.js +33 -0
  30. package/dist/elements/cfpb-expandable/index.js.map +7 -0
  31. package/dist/elements/cfpb-file-upload/index.js +4 -4
  32. package/dist/elements/cfpb-file-upload/index.js.map +3 -3
  33. package/dist/elements/cfpb-form-alert/index.js +32 -0
  34. package/dist/elements/cfpb-form-alert/index.js.map +7 -0
  35. package/dist/elements/cfpb-form-choice/index.js +12 -3
  36. package/dist/elements/cfpb-form-choice/index.js.map +4 -4
  37. package/dist/elements/cfpb-form-search/index.js +41 -0
  38. package/dist/elements/cfpb-form-search/index.js.map +7 -0
  39. package/dist/elements/cfpb-form-search-input/index.js +41 -0
  40. package/dist/elements/cfpb-form-search-input/index.js.map +7 -0
  41. package/dist/elements/cfpb-icon-text/index.js +3 -3
  42. package/dist/elements/cfpb-icon-text/index.js.map +3 -3
  43. package/dist/elements/cfpb-label/index.js +3 -3
  44. package/dist/elements/cfpb-label/index.js.map +2 -2
  45. package/dist/elements/cfpb-list/index.js +39 -0
  46. package/dist/elements/cfpb-list/index.js.map +7 -0
  47. package/dist/elements/cfpb-list-item/index.js +39 -0
  48. package/dist/elements/cfpb-list-item/index.js.map +7 -0
  49. package/dist/elements/cfpb-multiselect/index.js +13 -4
  50. package/dist/elements/cfpb-multiselect/index.js.map +4 -4
  51. package/dist/elements/cfpb-pagination/index.js +3 -3
  52. package/dist/elements/cfpb-pagination/index.js.map +2 -2
  53. package/dist/elements/cfpb-select/index.css +2 -0
  54. package/dist/elements/cfpb-select/index.css.map +7 -0
  55. package/dist/elements/cfpb-select/index.js +42 -0
  56. package/dist/elements/cfpb-select/index.js.map +7 -0
  57. package/dist/elements/cfpb-select-list/index.js +39 -0
  58. package/dist/elements/cfpb-select-list/index.js.map +7 -0
  59. package/dist/elements/cfpb-tag-filter/index.js +3 -3
  60. package/dist/elements/cfpb-tag-filter/index.js.map +3 -3
  61. package/dist/elements/cfpb-tag-group/index.js +3 -3
  62. package/dist/elements/cfpb-tag-group/index.js.map +4 -4
  63. package/dist/elements/cfpb-tag-topic/index.js +4 -4
  64. package/dist/elements/cfpb-tag-topic/index.js.map +2 -2
  65. package/dist/elements/index.css +2 -0
  66. package/dist/elements/index.css.map +7 -0
  67. package/dist/elements/index.js +7 -6
  68. package/dist/elements/index.js.map +4 -4
  69. package/dist/index.css +1 -1
  70. package/dist/index.css.map +2 -2
  71. package/dist/index.js +7 -6
  72. package/dist/index.js.map +4 -4
  73. package/dist/utilities/index.css.map +1 -1
  74. package/dist/utilities/index.js +1 -1
  75. package/dist/utilities/index.js.map +3 -3
  76. package/package.json +1 -1
  77. package/src/base/base.scss +1 -1
  78. package/src/components/cfpb-buttons/button-link.scss +0 -1
  79. package/src/components/cfpb-expandables/expandable.js +3 -0
  80. package/src/components/cfpb-forms/multiselect.js +1 -1
  81. package/src/components/cfpb-typography/mixins.scss +3 -0
  82. package/src/elements/abstracts/custom-props.css +123 -0
  83. package/src/elements/abstracts/grid-mixins.scss +83 -0
  84. package/src/elements/abstracts/heading-mixins.scss +346 -0
  85. package/src/elements/abstracts/index.scss +7 -0
  86. package/src/elements/abstracts/media-queries.scss +35 -0
  87. package/src/elements/abstracts/sizing-vars.scss +65 -0
  88. package/src/elements/abstracts/vars-breakpoints.scss +16 -0
  89. package/src/elements/abstracts/vars.css +79 -0
  90. package/src/elements/base/base.scss +375 -0
  91. package/src/elements/base/font.scss +27 -0
  92. package/src/elements/base/index.scss +3 -0
  93. package/src/elements/base/normalize.scss +290 -0
  94. package/src/elements/cfpb-button/cfpb-button-group.scss +10 -0
  95. package/src/elements/cfpb-button/cfpb-button-link.scss +96 -0
  96. package/src/elements/cfpb-button/cfpb-button.component.scss +11 -4
  97. package/src/elements/cfpb-button/cfpb-button.scss +222 -0
  98. package/src/elements/cfpb-button/index.js +28 -29
  99. package/src/elements/cfpb-button/vars.css +30 -0
  100. package/src/elements/cfpb-checkbox-icon/cfpb-checkbox-icon.component.scss +88 -0
  101. package/src/elements/cfpb-checkbox-icon/index.js +104 -0
  102. package/src/elements/cfpb-expandable/cfpb-expandable.component.scss +218 -0
  103. package/src/elements/cfpb-expandable/index.js +127 -0
  104. package/src/elements/cfpb-file-upload/cfpb-file-upload.component.scss +2 -2
  105. package/src/elements/cfpb-file-upload/index.js +16 -18
  106. package/src/elements/cfpb-form-alert/cfpb-form-alert.component.scss +36 -0
  107. package/src/elements/cfpb-form-alert/index.js +55 -0
  108. package/src/elements/cfpb-form-choice/cfpb-form-choice.component.scss +42 -81
  109. package/src/elements/cfpb-form-choice/index.js +58 -18
  110. package/src/elements/cfpb-form-search/cfpb-form-search.component.scss +54 -0
  111. package/src/elements/cfpb-form-search/index.js +194 -0
  112. package/src/elements/cfpb-form-search-input/cfpb-form-search-input.component.scss +217 -0
  113. package/src/elements/cfpb-form-search-input/index.js +136 -0
  114. package/src/elements/cfpb-icon-text/cfpb-icon-text.component.scss +32 -39
  115. package/src/elements/cfpb-icon-text/index.js +32 -104
  116. package/src/elements/cfpb-label/cfpb-label.component.scss +2 -2
  117. package/src/elements/cfpb-label/index.js +6 -9
  118. package/src/elements/cfpb-list/cfpb-list.component.scss +23 -0
  119. package/src/elements/cfpb-list/index.js +357 -0
  120. package/src/elements/cfpb-list/index.spec.js +169 -0
  121. package/src/elements/cfpb-list-item/cfpb-list-item.component.scss +69 -0
  122. package/src/elements/cfpb-list-item/index.js +215 -0
  123. package/src/elements/cfpb-pagination/cfpb-pagination.component.scss +2 -7
  124. package/src/elements/cfpb-pagination/index.js +6 -8
  125. package/src/elements/cfpb-select/cfpb-select.component.scss +241 -0
  126. package/src/elements/cfpb-select/index.js +381 -0
  127. package/src/elements/cfpb-tag-filter/cfpb-tag-filter.component.scss +6 -3
  128. package/src/elements/cfpb-tag-filter/index.js +15 -7
  129. package/src/elements/cfpb-tag-group/cfpb-tag-group.component.scss +2 -2
  130. package/src/elements/cfpb-tag-group/index.js +53 -6
  131. package/src/elements/cfpb-tag-topic/index.js +5 -7
  132. package/src/elements/cfpb-utilities/parse-child-data.js +50 -0
  133. package/src/elements/cfpb-utilities/parse-child-data.spec.js +56 -0
  134. package/src/elements/cfpb-utilities/search-service.js +46 -0
  135. package/src/elements/cfpb-utilities/search-service.spec.js +138 -0
  136. package/src/elements/cfpb-utilities/transition/transition.scss +98 -0
  137. package/src/elements/index.js +7 -1
  138. package/src/index.scss +11 -0
  139. package/src/tokens/abstracts/custom-props.json +1642 -0
  140. package/src/tokens/abstracts/vars.json +1319 -0
  141. package/src/tokens/cfpb-button/vars.json +436 -0
  142. package/src/utilities/transition/max-height-transition.js +74 -0
  143. package/dist/elements/cfpb-checkbox/index.js +0 -29
  144. package/src/elements/cfpb-multiselect/cfpb-multiselect.component.scss +0 -225
  145. package/src/elements/cfpb-multiselect/index.js +0 -444
  146. package/src/elements/cfpb-multiselect/multiselect-model.js +0 -288
  147. package/src/elements/cfpb-multiselect/multiselect-model.spec.js +0 -236
@@ -0,0 +1,436 @@
1
+ {
2
+ "cfpb-button": {
3
+ "btn-bg": {
4
+ "$type": "color",
5
+ "$value": "{abstracts-custom-props.pacific}",
6
+ "$extensions": {
7
+ "com.figma": {
8
+ "collectionName": "cfpb-button",
9
+ "collectionID": "VariableCollectionId:8188:6906",
10
+ "modeName": "default",
11
+ "modeID": "8188:0",
12
+ "variableName": "btn-bg",
13
+ "variableID": "VariableID:8191:6981",
14
+ "alias": {
15
+ "type": "VARIABLE_ALIAS",
16
+ "id": "VariableID:296:182"
17
+ }
18
+ }
19
+ }
20
+ },
21
+ "btn-bg-active": {
22
+ "$type": "color",
23
+ "$value": "{abstracts-custom-props.navy}",
24
+ "$extensions": {
25
+ "com.figma": {
26
+ "collectionName": "cfpb-button",
27
+ "collectionID": "VariableCollectionId:8188:6906",
28
+ "modeName": "default",
29
+ "modeID": "8188:0",
30
+ "variableName": "btn-bg-active",
31
+ "variableID": "VariableID:8191:6995",
32
+ "alias": {
33
+ "type": "VARIABLE_ALIAS",
34
+ "id": "VariableID:296:194"
35
+ }
36
+ }
37
+ }
38
+ },
39
+ "btn-bg-hover": {
40
+ "$type": "color",
41
+ "$value": "{abstracts-custom-props.pacific-dark}",
42
+ "$extensions": {
43
+ "com.figma": {
44
+ "collectionName": "cfpb-button",
45
+ "collectionID": "VariableCollectionId:8188:6906",
46
+ "modeName": "default",
47
+ "modeID": "8188:0",
48
+ "variableName": "btn-bg-hover",
49
+ "variableID": "VariableID:8191:6976",
50
+ "alias": {
51
+ "type": "VARIABLE_ALIAS",
52
+ "id": "VariableID:296:180"
53
+ }
54
+ }
55
+ }
56
+ },
57
+ "btn-disabled-bg": {
58
+ "$type": "color",
59
+ "$value": "{abstracts-custom-props.gray-20}",
60
+ "$extensions": {
61
+ "com.figma": {
62
+ "collectionName": "cfpb-button",
63
+ "collectionID": "VariableCollectionId:8188:6906",
64
+ "modeName": "default",
65
+ "modeID": "8188:0",
66
+ "variableName": "btn-disabled-bg",
67
+ "variableID": "VariableID:8191:6974",
68
+ "alias": {
69
+ "type": "VARIABLE_ALIAS",
70
+ "id": "VariableID:296:229"
71
+ }
72
+ }
73
+ }
74
+ },
75
+ "btn-disabled-divider": {
76
+ "$type": "color",
77
+ "$value": "{abstracts-custom-props.gray-60}",
78
+ "$extensions": {
79
+ "com.figma": {
80
+ "collectionName": "cfpb-button",
81
+ "collectionID": "VariableCollectionId:8188:6906",
82
+ "modeName": "default",
83
+ "modeID": "8188:0",
84
+ "variableName": "btn-disabled-divider",
85
+ "variableID": "VariableID:8191:6996",
86
+ "alias": {
87
+ "type": "VARIABLE_ALIAS",
88
+ "id": "VariableID:296:225"
89
+ }
90
+ }
91
+ }
92
+ },
93
+ "btn-disabled-outline": {
94
+ "$type": "color",
95
+ "$value": "{abstracts-custom-props.gray-20}",
96
+ "$extensions": {
97
+ "com.figma": {
98
+ "collectionName": "cfpb-button",
99
+ "collectionID": "VariableCollectionId:8188:6906",
100
+ "modeName": "default",
101
+ "modeID": "8188:0",
102
+ "variableName": "btn-disabled-outline",
103
+ "variableID": "VariableID:8191:6984",
104
+ "alias": {
105
+ "type": "VARIABLE_ALIAS",
106
+ "id": "VariableID:296:229"
107
+ }
108
+ }
109
+ }
110
+ },
111
+ "btn-disabled-text": {
112
+ "$type": "color",
113
+ "$value": "{abstracts-custom-props.gray-dark}",
114
+ "$extensions": {
115
+ "com.figma": {
116
+ "collectionName": "cfpb-button",
117
+ "collectionID": "VariableCollectionId:8188:6906",
118
+ "modeName": "default",
119
+ "modeID": "8188:0",
120
+ "variableName": "btn-disabled-text",
121
+ "variableID": "VariableID:8191:6994",
122
+ "alias": {
123
+ "type": "VARIABLE_ALIAS",
124
+ "id": "VariableID:296:219"
125
+ }
126
+ }
127
+ }
128
+ },
129
+ "btn-divider": {
130
+ "$type": "color",
131
+ "$value": "{abstracts-custom-props.pacific-60}",
132
+ "$extensions": {
133
+ "com.figma": {
134
+ "collectionName": "cfpb-button",
135
+ "collectionID": "VariableCollectionId:8188:6906",
136
+ "modeName": "default",
137
+ "modeID": "8188:0",
138
+ "variableName": "btn-divider",
139
+ "variableID": "VariableID:8191:6991",
140
+ "alias": {
141
+ "type": "VARIABLE_ALIAS",
142
+ "id": "VariableID:296:186"
143
+ }
144
+ }
145
+ }
146
+ },
147
+ "btn-secondary-bg": {
148
+ "$type": "color",
149
+ "$value": "{abstracts-custom-props.white}",
150
+ "$extensions": {
151
+ "com.figma": {
152
+ "collectionName": "cfpb-button",
153
+ "collectionID": "VariableCollectionId:8188:6906",
154
+ "modeName": "default",
155
+ "modeID": "8188:0",
156
+ "variableName": "btn-secondary-bg",
157
+ "variableID": "VariableID:8191:6993",
158
+ "alias": {
159
+ "type": "VARIABLE_ALIAS",
160
+ "id": "VariableID:296:216"
161
+ }
162
+ }
163
+ }
164
+ },
165
+ "btn-secondary-bg-active": {
166
+ "$type": "color",
167
+ "$value": "{abstracts-custom-props.pacific-20}",
168
+ "$extensions": {
169
+ "com.figma": {
170
+ "collectionName": "cfpb-button",
171
+ "collectionID": "VariableCollectionId:8188:6906",
172
+ "modeName": "default",
173
+ "modeID": "8188:0",
174
+ "variableName": "btn-secondary-bg-active",
175
+ "variableID": "VariableID:8191:6986",
176
+ "alias": {
177
+ "type": "VARIABLE_ALIAS",
178
+ "id": "VariableID:296:190"
179
+ }
180
+ }
181
+ }
182
+ },
183
+ "btn-secondary-bg-hover": {
184
+ "$type": "color",
185
+ "$value": "{abstracts-custom-props.pacific-10}",
186
+ "$extensions": {
187
+ "com.figma": {
188
+ "collectionName": "cfpb-button",
189
+ "collectionID": "VariableCollectionId:8188:6906",
190
+ "modeName": "default",
191
+ "modeID": "8188:0",
192
+ "variableName": "btn-secondary-bg-hover",
193
+ "variableID": "VariableID:8191:6990",
194
+ "alias": {
195
+ "type": "VARIABLE_ALIAS",
196
+ "id": "VariableID:296:191"
197
+ }
198
+ }
199
+ }
200
+ },
201
+ "btn-secondary-border": {
202
+ "$type": "color",
203
+ "$value": "{abstracts-custom-props.pacific}",
204
+ "$extensions": {
205
+ "com.figma": {
206
+ "collectionName": "cfpb-button",
207
+ "collectionID": "VariableCollectionId:8188:6906",
208
+ "modeName": "default",
209
+ "modeID": "8188:0",
210
+ "variableName": "btn-secondary-border",
211
+ "variableID": "VariableID:8191:6985",
212
+ "alias": {
213
+ "type": "VARIABLE_ALIAS",
214
+ "id": "VariableID:296:182"
215
+ }
216
+ }
217
+ }
218
+ },
219
+ "btn-secondary-border-active": {
220
+ "$type": "color",
221
+ "$value": "{abstracts-custom-props.navy}",
222
+ "$extensions": {
223
+ "com.figma": {
224
+ "collectionName": "cfpb-button",
225
+ "collectionID": "VariableCollectionId:8188:6906",
226
+ "modeName": "default",
227
+ "modeID": "8188:0",
228
+ "variableName": "btn-secondary-border-active",
229
+ "variableID": "VariableID:8191:6982",
230
+ "alias": {
231
+ "type": "VARIABLE_ALIAS",
232
+ "id": "VariableID:296:194"
233
+ }
234
+ }
235
+ }
236
+ },
237
+ "btn-secondary-border-hover": {
238
+ "$type": "color",
239
+ "$value": "{abstracts-custom-props.pacific-dark}",
240
+ "$extensions": {
241
+ "com.figma": {
242
+ "collectionName": "cfpb-button",
243
+ "collectionID": "VariableCollectionId:8188:6906",
244
+ "modeName": "default",
245
+ "modeID": "8188:0",
246
+ "variableName": "btn-secondary-border-hover",
247
+ "variableID": "VariableID:8191:6989",
248
+ "alias": {
249
+ "type": "VARIABLE_ALIAS",
250
+ "id": "VariableID:296:180"
251
+ }
252
+ }
253
+ }
254
+ },
255
+ "btn-secondary-divider": {
256
+ "$type": "color",
257
+ "$value": "{abstracts-custom-props.pacific-60}",
258
+ "$extensions": {
259
+ "com.figma": {
260
+ "collectionName": "cfpb-button",
261
+ "collectionID": "VariableCollectionId:8188:6906",
262
+ "modeName": "default",
263
+ "modeID": "8188:0",
264
+ "variableName": "btn-secondary-divider",
265
+ "variableID": "VariableID:8191:6975",
266
+ "alias": {
267
+ "type": "VARIABLE_ALIAS",
268
+ "id": "VariableID:296:186"
269
+ }
270
+ }
271
+ }
272
+ },
273
+ "btn-secondary-text": {
274
+ "$type": "color",
275
+ "$value": "{abstracts-custom-props.pacific}",
276
+ "$extensions": {
277
+ "com.figma": {
278
+ "collectionName": "cfpb-button",
279
+ "collectionID": "VariableCollectionId:8188:6906",
280
+ "modeName": "default",
281
+ "modeID": "8188:0",
282
+ "variableName": "btn-secondary-text",
283
+ "variableID": "VariableID:8191:6997",
284
+ "alias": {
285
+ "type": "VARIABLE_ALIAS",
286
+ "id": "VariableID:296:182"
287
+ }
288
+ }
289
+ }
290
+ },
291
+ "btn-secondary-text-active": {
292
+ "$type": "color",
293
+ "$value": "{abstracts-custom-props.navy}",
294
+ "$extensions": {
295
+ "com.figma": {
296
+ "collectionName": "cfpb-button",
297
+ "collectionID": "VariableCollectionId:8188:6906",
298
+ "modeName": "default",
299
+ "modeID": "8188:0",
300
+ "variableName": "btn-secondary-text-active",
301
+ "variableID": "VariableID:8191:6988",
302
+ "alias": {
303
+ "type": "VARIABLE_ALIAS",
304
+ "id": "VariableID:296:194"
305
+ }
306
+ }
307
+ }
308
+ },
309
+ "btn-secondary-text-hover": {
310
+ "$type": "color",
311
+ "$value": "{abstracts-custom-props.pacific-dark}",
312
+ "$extensions": {
313
+ "com.figma": {
314
+ "collectionName": "cfpb-button",
315
+ "collectionID": "VariableCollectionId:8188:6906",
316
+ "modeName": "default",
317
+ "modeID": "8188:0",
318
+ "variableName": "btn-secondary-text-hover",
319
+ "variableID": "VariableID:8191:6987",
320
+ "alias": {
321
+ "type": "VARIABLE_ALIAS",
322
+ "id": "VariableID:296:180"
323
+ }
324
+ }
325
+ }
326
+ },
327
+ "btn-text": {
328
+ "$type": "color",
329
+ "$value": "{abstracts-custom-props.white}",
330
+ "$extensions": {
331
+ "com.figma": {
332
+ "collectionName": "cfpb-button",
333
+ "collectionID": "VariableCollectionId:8188:6906",
334
+ "modeName": "default",
335
+ "modeID": "8188:0",
336
+ "variableName": "btn-text",
337
+ "variableID": "VariableID:8191:6977",
338
+ "alias": {
339
+ "type": "VARIABLE_ALIAS",
340
+ "id": "VariableID:296:216"
341
+ }
342
+ }
343
+ }
344
+ },
345
+ "btn-warning-bg": {
346
+ "$type": "color",
347
+ "$value": "{abstracts-custom-props.red-mid-dark}",
348
+ "$extensions": {
349
+ "com.figma": {
350
+ "collectionName": "cfpb-button",
351
+ "collectionID": "VariableCollectionId:8188:6906",
352
+ "modeName": "default",
353
+ "modeID": "8188:0",
354
+ "variableName": "btn-warning-bg",
355
+ "variableID": "VariableID:8191:6980",
356
+ "alias": {
357
+ "type": "VARIABLE_ALIAS",
358
+ "id": "VariableID:296:258"
359
+ }
360
+ }
361
+ }
362
+ },
363
+ "btn-warning-bg-active": {
364
+ "$type": "color",
365
+ "$value": "{abstracts-custom-props.gray-dark}",
366
+ "$extensions": {
367
+ "com.figma": {
368
+ "collectionName": "cfpb-button",
369
+ "collectionID": "VariableCollectionId:8188:6906",
370
+ "modeName": "default",
371
+ "modeID": "8188:0",
372
+ "variableName": "btn-warning-bg-active",
373
+ "variableID": "VariableID:8191:6979",
374
+ "alias": {
375
+ "type": "VARIABLE_ALIAS",
376
+ "id": "VariableID:296:219"
377
+ }
378
+ }
379
+ }
380
+ },
381
+ "btn-warning-bg-hover": {
382
+ "$type": "color",
383
+ "$value": "{abstracts-custom-props.red-dark}",
384
+ "$extensions": {
385
+ "com.figma": {
386
+ "collectionName": "cfpb-button",
387
+ "collectionID": "VariableCollectionId:8188:6906",
388
+ "modeName": "default",
389
+ "modeID": "8188:0",
390
+ "variableName": "btn-warning-bg-hover",
391
+ "variableID": "VariableID:8191:6983",
392
+ "alias": {
393
+ "type": "VARIABLE_ALIAS",
394
+ "id": "VariableID:296:257"
395
+ }
396
+ }
397
+ }
398
+ },
399
+ "btn-warning-divider": {
400
+ "$type": "color",
401
+ "$value": "{abstracts-custom-props.red-60}",
402
+ "$extensions": {
403
+ "com.figma": {
404
+ "collectionName": "cfpb-button",
405
+ "collectionID": "VariableCollectionId:8188:6906",
406
+ "modeName": "default",
407
+ "modeID": "8188:0",
408
+ "variableName": "btn-warning-divider",
409
+ "variableID": "VariableID:8191:6992",
410
+ "alias": {
411
+ "type": "VARIABLE_ALIAS",
412
+ "id": "VariableID:296:263"
413
+ }
414
+ }
415
+ }
416
+ },
417
+ "btn-warning-text": {
418
+ "$type": "color",
419
+ "$value": "{abstracts-custom-props.white}",
420
+ "$extensions": {
421
+ "com.figma": {
422
+ "collectionName": "cfpb-button",
423
+ "collectionID": "VariableCollectionId:8188:6906",
424
+ "modeName": "default",
425
+ "modeID": "8188:0",
426
+ "variableName": "btn-warning-text",
427
+ "variableID": "VariableID:8191:6978",
428
+ "alias": {
429
+ "type": "VARIABLE_ALIAS",
430
+ "id": "VariableID:296:216"
431
+ }
432
+ }
433
+ }
434
+ }
435
+ }
436
+ }
@@ -1,12 +1,15 @@
1
1
  import { BaseTransition } from '../transition/base-transition.js';
2
2
  import { EventObserver } from '../event-observer.js';
3
3
 
4
+ const DIR_EVENT = 'transitiondir';
5
+
4
6
  // Exported constants.
5
7
  const CLASSES = {
6
8
  CSS_PROPERTY: 'max-height',
7
9
  BASE_CLASS: 'u-max-height-transition',
8
10
  MH_DEFAULT: 'u-max-height-default',
9
11
  MH_SUMMARY: 'u-max-height-summary',
12
+ MH_DYNAMIC: 'u-max-height-dynamic',
10
13
  MH_ZERO: 'u-max-height-zero',
11
14
  };
12
15
 
@@ -18,6 +21,7 @@ const CLASSES = {
18
21
  * @returns {MaxHeightTransition} An instance.
19
22
  */
20
23
  function MaxHeightTransition(element) {
24
+ const that = this;
21
25
  const eventObserver = new EventObserver();
22
26
  const _baseTransition = new BaseTransition(element, CLASSES, this);
23
27
  let _previousHeight = 0;
@@ -30,6 +34,28 @@ function MaxHeightTransition(element) {
30
34
  const elmHeight = element.scrollHeight;
31
35
  const newHeight = elmHeight + 'px';
32
36
  element.style.maxHeight = newHeight;
37
+
38
+ // Revert to default value to clear any value used in "up" direction.
39
+ element.style.bottom = 'auto';
40
+ element.style.top = 'auto';
41
+ }
42
+
43
+ /**
44
+ * @returns {{rect: number, distanceToBottom: number, distanceToTop: number, dir: string}}
45
+ * Useful metrics for presenting a popup.
46
+ */
47
+ function calcPosition() {
48
+ const rect = element.getBoundingClientRect();
49
+ const distanceToBottom = window.innerHeight - rect.bottom;
50
+ const distanceToTop = rect.top;
51
+ const dir = distanceToBottom <= 140 ? 'up' : 'down';
52
+
53
+ return {
54
+ rect,
55
+ distanceToBottom,
56
+ distanceToTop,
57
+ dir,
58
+ };
33
59
  }
34
60
 
35
61
  /**
@@ -85,6 +111,7 @@ function MaxHeightTransition(element) {
85
111
  * @returns {MaxHeightTransition} An instance.
86
112
  */
87
113
  function maxHeightSummary() {
114
+ refresh();
88
115
  _baseTransition.applyClass(CLASSES.MH_SUMMARY);
89
116
 
90
117
  _previousHeight = element.scrollHeight;
@@ -92,6 +119,52 @@ function MaxHeightTransition(element) {
92
119
  return this;
93
120
  }
94
121
 
122
+ /**
123
+ * Collapses the max-height to just a summary height.
124
+ * @returns {MaxHeightTransition} An instance.
125
+ */
126
+ function maxHeightDynamic() {
127
+ refresh();
128
+
129
+ // Assume direction is down to begin.
130
+ element.style.top = '100%';
131
+
132
+ const position = calcPosition();
133
+
134
+ let minHeight = 30;
135
+ const borderWidth = 2;
136
+
137
+ let newHeight =
138
+ element.scrollHeight + minHeight < position.distanceToBottom
139
+ ? `${element.scrollHeight + borderWidth}px`
140
+ : `${position.distanceToBottom - minHeight}px`;
141
+
142
+ if (position.dir === 'up') {
143
+ const parentHeight = element.parentElement.offsetHeight;
144
+ minHeight += parentHeight;
145
+ element.style.bottom = `${parentHeight - borderWidth}px`;
146
+ newHeight =
147
+ element.scrollHeight + minHeight < position.distanceToTop
148
+ ? `${element.scrollHeight + borderWidth}px`
149
+ : `${position.distanceToTop - minHeight}px`;
150
+ element.style.top = 'unset';
151
+ }
152
+
153
+ element.style.maxHeight = newHeight;
154
+
155
+ _baseTransition.applyClass(CLASSES.MH_DYNAMIC);
156
+
157
+ that.dispatchEvent(DIR_EVENT, {
158
+ target: that,
159
+ type: DIR_EVENT,
160
+ dir: position.dir,
161
+ });
162
+
163
+ _previousHeight = element.scrollHeight;
164
+
165
+ return this;
166
+ }
167
+
95
168
  /**
96
169
  * Collapses thte max-height completely.
97
170
  * @returns {MaxHeightTransition} An instance.
@@ -132,6 +205,7 @@ function MaxHeightTransition(element) {
132
205
  this.maxHeightDefault = maxHeightDefault;
133
206
  this.maxHeightSummary = maxHeightSummary;
134
207
  this.maxHeightZero = maxHeightZero;
208
+ this.maxHeightDynamic = maxHeightDynamic;
135
209
 
136
210
  return this;
137
211
  }
@@ -1,29 +0,0 @@
1
- (()=>{var Me=Object.defineProperty;var oe=r=>{throw TypeError(r)};var Re=(r,e,t)=>e in r?Me(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var ie=(r,e,t)=>Re(r,typeof e!="symbol"?e+"":e,t),Te=(r,e,t)=>e.has(r)||oe("Cannot "+t);var re=(r,e,t)=>(Te(r,e,"read from private field"),t?t.call(r):e.get(r)),se=(r,e,t)=>e.has(r)?oe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t);var ae=(r,e,t)=>new Promise((o,i)=>{var a=n=>{try{c(t.next(n))}catch(l){i(l)}},s=n=>{try{c(t.throw(n))}catch(l){i(l)}},c=n=>n.done?o(n.value):Promise.resolve(n.value).then(a,s);c((t=t.apply(r,e)).next())});var T=globalThis,N=T.ShadowRoot&&(T.ShadyCSS===void 0||T.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,D=Symbol(),ne=new WeakMap,S=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==D)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(N&&e===void 0){let o=t!==void 0&&t.length===1;o&&(e=ne.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&ne.set(t,e))}return e}toString(){return this.cssText}},L=r=>new S(typeof r=="string"?r:r+"",void 0,D),I=(r,...e)=>{let t=r.length===1?r[0]:e.reduce(((o,i,a)=>o+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[a+1]),r[0]);return new S(t,r,D)},ce=(r,e)=>{if(N)r.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(let t of e){let o=document.createElement("style"),i=T.litNonce;i!==void 0&&o.setAttribute("nonce",i),o.textContent=t.cssText,r.appendChild(o)}},V=N?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(let o of e.cssRules)t+=o.cssText;return L(t)})(r):r;var{is:Ne,defineProperty:Le,getOwnPropertyDescriptor:ze,getOwnPropertyNames:je,getOwnPropertySymbols:Be,getPrototypeOf:De}=Object,b=globalThis,le=b.trustedTypes,Ie=le?le.emptyScript:"",W=b.reactiveElementPolyfillSupport,E=(r,e)=>r,q={toAttribute(r,e){switch(e){case Boolean:r=r?Ie:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch(o){t=null}}return t}},fe=(r,e)=>!Ne(r,e),he={attribute:!0,type:String,converter:q,reflect:!1,useDefault:!1,hasChanged:fe},de,pe;(de=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(pe=b.litPropertyMetadata)!=null||(b.litPropertyMetadata=new WeakMap);var f=class extends HTMLElement{static addInitializer(e){var t;this._$Ei(),((t=this.l)!=null?t:this.l=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=he){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let o=Symbol(),i=this.getPropertyDescriptor(e,o,t);i!==void 0&&Le(this.prototype,e,i)}}static getPropertyDescriptor(e,t,o){var s;let{get:i,set:a}=(s=ze(this.prototype,e))!=null?s:{get(){return this[t]},set(c){this[t]=c}};return{get:i,set(c){let n=i==null?void 0:i.call(this);a==null||a.call(this,c),this.requestUpdate(e,n,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){var t;return(t=this.elementProperties.get(e))!=null?t:he}static _$Ei(){if(this.hasOwnProperty(E("elementProperties")))return;let e=De(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(E("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E("properties"))){let t=this.properties,o=[...je(t),...Be(t)];for(let i of o)this.createProperty(i,t[i])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[o,i]of t)this.elementProperties.set(o,i)}this._$Eh=new Map;for(let[t,o]of this.elementProperties){let i=this._$Eu(t,o);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let o=new Set(e.flat(1/0).reverse());for(let i of o)t.unshift(V(i))}else e!==void 0&&t.push(V(e));return t}static _$Eu(e,t){let o=t.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach((t=>t(this)))}addController(e){var t,o;((t=this._$EO)!=null?t:this._$EO=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&((o=e.hostConnected)==null||o.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let o of t.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);e.size>0&&(this._$Ep=e)}createRenderRoot(){var t;let e=(t=this.shadowRoot)!=null?t:this.attachShadow(this.constructor.shadowRootOptions);return ce(e,this.constructor.elementStyles),e}connectedCallback(){var e,t;(e=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach((o=>{var i;return(i=o.hostConnected)==null?void 0:i.call(o)}))}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach((t=>{var o;return(o=t.hostDisconnected)==null?void 0:o.call(t)}))}attributeChangedCallback(e,t,o){this._$AK(e,o)}_$ET(e,t){var a;let o=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,o);if(i!==void 0&&o.reflect===!0){let s=(((a=o.converter)==null?void 0:a.toAttribute)!==void 0?o.converter:q).toAttribute(t,o.type);this._$Em=e,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(e,t){var a,s,c,n;let o=this.constructor,i=o._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let l=o.getPropertyOptions(i),d=typeof l.converter=="function"?{fromAttribute:l.converter}:((a=l.converter)==null?void 0:a.fromAttribute)!==void 0?l.converter:q;this._$Em=i,this[i]=(n=(c=d.fromAttribute(t,l.type))!=null?c:(s=this._$Ej)==null?void 0:s.get(i))!=null?n:null,this._$Em=null}}requestUpdate(e,t,o){var i,a;if(e!==void 0){let s=this.constructor,c=this[e];if(o!=null||(o=s.getPropertyOptions(e)),!(((i=o.hasChanged)!=null?i:fe)(c,t)||o.useDefault&&o.reflect&&c===((a=this._$Ej)==null?void 0:a.get(e))&&!this.hasAttribute(s._$Eu(e,o))))return;this.C(e,t,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:o,reflect:i,wrapped:a},s){var c,n,l;o&&!((c=this._$Ej)!=null?c:this._$Ej=new Map).has(e)&&(this._$Ej.set(e,(n=s!=null?s:t)!=null?n:this[e]),a!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||o||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&((l=this._$Eq)!=null?l:this._$Eq=new Set).add(e))}_$EP(){return ae(this,null,function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&(yield e),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var o,i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((o=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[s,c]of this._$Ep)this[s]=c;this._$Ep=void 0}let a=this.constructor.elementProperties;if(a.size>0)for(let[s,c]of a){let{wrapped:n}=c,l=this[s];n!==!0||this._$AL.has(s)||l===void 0||this.C(s,void 0,c,l)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach((a=>{var s;return(s=a.hostUpdate)==null?void 0:s.call(a)})),this.update(t)):this._$EM()}catch(a){throw e=!1,this._$EM(),a}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach((o=>{var i;return(i=o.hostUpdated)==null?void 0:i.call(o)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach((t=>this._$ET(t,this[t])))),this._$EM()}updated(e){}firstUpdated(e){}},ue;f.elementStyles=[],f.shadowRootOptions={mode:"open"},f[E("elementProperties")]=new Map,f[E("finalized")]=new Map,W==null||W({ReactiveElement:f}),((ue=b.reactiveElementVersions)!=null?ue:b.reactiveElementVersions=[]).push("2.1.0");var P=globalThis,z=P.trustedTypes,me=z?z.createPolicy("lit-html",{createHTML:r=>r}):void 0,ye="$lit$",g=`lit$${Math.random().toFixed(9).slice(2)}$`,we="?"+g,Ve=`<${we}>`,_=document,U=()=>_.createComment(""),O=r=>r===null||typeof r!="object"&&typeof r!="function",Y=Array.isArray,We=r=>Y(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",K=`[
2
- \f\r]`,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,be=/-->/g,ge=/>/g,$=RegExp(`>|${K}(?:([^\\s"'>=/]+)(${K}*=${K}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),ve=/'/g,$e=/"/g,Ae=/^(?:script|style|textarea|title)$/i,ee=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),ke=ee(1),Ye=ee(2),et=ee(3),y=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),xe=new WeakMap,x=_.createTreeWalker(_,129);function Se(r,e){if(!Y(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return me!==void 0?me.createHTML(e):e}var qe=(r,e)=>{let t=r.length-1,o=[],i,a=e===2?"<svg>":e===3?"<math>":"",s=C;for(let c=0;c<t;c++){let n=r[c],l,d,h=-1,u=0;for(;u<n.length&&(s.lastIndex=u,d=s.exec(n),d!==null);)u=s.lastIndex,s===C?d[1]==="!--"?s=be:d[1]!==void 0?s=ge:d[2]!==void 0?(Ae.test(d[2])&&(i=RegExp("</"+d[2],"g")),s=$):d[3]!==void 0&&(s=$):s===$?d[0]===">"?(s=i!=null?i:C,h=-1):d[1]===void 0?h=-2:(h=s.lastIndex-d[2].length,l=d[1],s=d[3]===void 0?$:d[3]==='"'?$e:ve):s===$e||s===ve?s=$:s===be||s===ge?s=C:(s=$,i=void 0);let m=s===$&&r[c+1].startsWith("/>")?" ":"";a+=s===C?n+Ve:h>=0?(o.push(l),n.slice(0,h)+ye+n.slice(h)+g+m):n+g+(h===-2?c:m)}return[Se(r,a+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),o]},H=class r{constructor({strings:e,_$litType$:t},o){let i;this.parts=[];let a=0,s=0,c=e.length-1,n=this.parts,[l,d]=qe(e,t);if(this.el=r.createElement(l,o),x.currentNode=this.el.content,t===2||t===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=x.nextNode())!==null&&n.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(let h of i.getAttributeNames())if(h.endsWith(ye)){let u=d[s++],m=i.getAttribute(h).split(g),R=/([.?@])?(.*)/.exec(u);n.push({type:1,index:a,name:R[2],strings:m,ctor:R[1]==="."?J:R[1]==="?"?G:R[1]==="@"?Q:k}),i.removeAttribute(h)}else h.startsWith(g)&&(n.push({type:6,index:a}),i.removeAttribute(h));if(Ae.test(i.tagName)){let h=i.textContent.split(g),u=h.length-1;if(u>0){i.textContent=z?z.emptyScript:"";for(let m=0;m<u;m++)i.append(h[m],U()),x.nextNode(),n.push({type:2,index:++a});i.append(h[u],U())}}}else if(i.nodeType===8)if(i.data===we)n.push({type:2,index:a});else{let h=-1;for(;(h=i.data.indexOf(g,h+1))!==-1;)n.push({type:7,index:a}),h+=g.length-1}a++}}static createElement(e,t){let o=_.createElement("template");return o.innerHTML=e,o}};function A(r,e,t=r,o){var s,c,n;if(e===y)return e;let i=o!==void 0?(s=t._$Co)==null?void 0:s[o]:t._$Cl,a=O(e)?void 0:e._$litDirective$;return(i==null?void 0:i.constructor)!==a&&((c=i==null?void 0:i._$AO)==null||c.call(i,!1),a===void 0?i=void 0:(i=new a(r),i._$AT(r,t,o)),o!==void 0?((n=t._$Co)!=null?n:t._$Co=[])[o]=i:t._$Cl=i),i!==void 0&&(e=A(r,i._$AS(r,e.values),i,o)),e}var F=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var l;let{el:{content:t},parts:o}=this._$AD,i=((l=e==null?void 0:e.creationScope)!=null?l:_).importNode(t,!0);x.currentNode=i;let a=x.nextNode(),s=0,c=0,n=o[0];for(;n!==void 0;){if(s===n.index){let d;n.type===2?d=new M(a,a.nextSibling,this,e):n.type===1?d=new n.ctor(a,n.name,n.strings,this,e):n.type===6&&(d=new X(a,this,e)),this._$AV.push(d),n=o[++c]}s!==(n==null?void 0:n.index)&&(a=x.nextNode(),s++)}return x.currentNode=_,i}p(e){let t=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(e,o,t),t+=o.strings.length-2):o._$AI(e[t])),t++}},M=class r{get _$AU(){var e,t;return(t=(e=this._$AM)==null?void 0:e._$AU)!=null?t:this._$Cv}constructor(e,t,o,i){var a;this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=o,this.options=i,this._$Cv=(a=i==null?void 0:i.isConnected)!=null?a:!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=A(this,e,t),O(e)?e===p||e==null||e===""?(this._$AH!==p&&this._$AR(),this._$AH=p):e!==this._$AH&&e!==y&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):We(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==p&&O(this._$AH)?this._$AA.nextSibling.data=e:this.T(_.createTextNode(e)),this._$AH=e}$(e){var a;let{values:t,_$litType$:o}=e,i=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=H.createElement(Se(o.h,o.h[0]),this.options)),o);if(((a=this._$AH)==null?void 0:a._$AD)===i)this._$AH.p(t);else{let s=new F(i,this),c=s.u(this.options);s.p(t),this.T(c),this._$AH=s}}_$AC(e){let t=xe.get(e.strings);return t===void 0&&xe.set(e.strings,t=new H(e)),t}k(e){Y(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,o,i=0;for(let a of e)i===t.length?t.push(o=new r(this.O(U()),this.O(U()),this,this.options)):o=t[i],o._$AI(a),i++;i<t.length&&(this._$AR(o&&o._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var o;for((o=this._$AP)==null?void 0:o.call(this,!1,!0,t);e&&e!==this._$AB;){let i=e.nextSibling;e.remove(),e=i}}setConnected(e){var t;this._$AM===void 0&&(this._$Cv=e,(t=this._$AP)==null||t.call(this,e))}},k=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,o,i,a){this.type=1,this._$AH=p,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=a,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=p}_$AI(e,t=this,o,i){let a=this.strings,s=!1;if(a===void 0)e=A(this,e,t,0),s=!O(e)||e!==this._$AH&&e!==y,s&&(this._$AH=e);else{let c=e,n,l;for(e=a[0],n=0;n<a.length-1;n++)l=A(this,c[o+n],t,n),l===y&&(l=this._$AH[n]),s||(s=!O(l)||l!==this._$AH[n]),l===p?e=p:e!==p&&(e+=(l!=null?l:"")+a[n+1]),this._$AH[n]=l}s&&!i&&this.j(e)}j(e){e===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}},J=class extends k{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===p?void 0:e}},G=class extends k{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==p)}},Q=class extends k{constructor(e,t,o,i,a){super(e,t,o,i,a),this.type=5}_$AI(e,t=this){var s;if((e=(s=A(this,e,t,0))!=null?s:p)===y)return;let o=this._$AH,i=e===p&&o!==p||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,a=e!==p&&(o===p||i);i&&this.element.removeEventListener(this.name,this,o),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,o;typeof this._$AH=="function"?this._$AH.call((o=(t=this.options)==null?void 0:t.host)!=null?o:this.element,e):this._$AH.handleEvent(e)}},X=class{constructor(e,t,o){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(e){A(this,e)}};var Z=P.litHtmlPolyfillSupport,_e;Z==null||Z(H,M),((_e=P.litHtmlVersions)!=null?_e:P.litHtmlVersions=[]).push("3.3.0");var Ee=(r,e,t)=>{var a,s;let o=(a=t==null?void 0:t.renderBefore)!=null?a:e,i=o._$litPart$;if(i===void 0){let c=(s=t==null?void 0:t.renderBefore)!=null?s:null;o._$litPart$=i=new M(e.insertBefore(U(),c),c,void 0,t!=null?t:{})}return i._$AI(r),i};var w=globalThis,v=class extends f{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,o;let e=super.createRenderRoot();return(o=(t=this.renderOptions).renderBefore)!=null||(t.renderBefore=e.firstChild),e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ee(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return y}},Ce;v._$litElement$=!0,v.finalized=!0,(Ce=w.litElementHydrateSupport)==null||Ce.call(w,{LitElement:v});var te=w.litElementPolyfillSupport;te==null||te({LitElement:v});var Pe;((Pe=w.litElementVersions)!=null?Pe:w.litElementVersions=[]).push("4.2.0");var Ue=`:root{--input-text-default:var(--black);--input-text-disabled-default:var(--gray-dark);--input-text-placeholder-default:var(--gray-dark);--input-border-default:var(--gray-60);--input-border-disabled:var(--gray-60);--input-border-success:var(--green);--input-border-warning:var(--gold);--input-border-error:var(--red);--input-border-hover-default:var(--pacific);--input-border-focus-default:var(--pacific);--input-bg-default:var(--white);--input-bg-disabled-default:var(--gray-10);--form-alert-icon-color-default:var(--gray);--form-alert-icon-color-success:var(--green);--form-alert-icon-color-warning:var(--gold);--form-alert-icon-color-error:var(--red);--select-border-default:var(--gray-60);--select-border-width-default:1px;--select-border-error:var(--red);--select-border-width-error:2px;--select-border-hover-default:var(--pacific);--select-border-focus-default:var(--pacific);--select-bg-disabled-default:var(--gray-10);--select-icon-bg-default:var(--gray-10);--select-text-disabled-default:var(--gray-dark);--choice-border-default:var(--gray-60);--choice-border-disabled:var(--gray-60);--choice-border-success:var(--green);--choice-border-warning:var(--gold);--choice-border-error:var(--red);--choice-border-hover-default:var(--pacific);--choice-border-focus-default:var(--pacific);--choice-outline-focus-default:var(--pacific);--choice-bg-default:var(--white);--choice-bg-disabled:var(--gray-10);--choice-bg-selected-default:var(--pacific);--choice-bg-selected-disabled:var(--gray-40);--choice-bg-selected-focus-default:var(--pacific);--choice-label-disabled-default:var(--gray-dark)}.no-js .u-js-only,.u-hide-if-js{display:none!important}.no-js .u-hide-if-js{display:block!important}@media screen{.u-print-only{display:none}}@media print{.u-screen-only{display:none}}.u-clearfix:after{clear:both;content:"";display:table}.u-visually-hidden{border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0 0 0 0)}@media only screen and (max-width:37.5em){.u-hide-on-mobile{display:none}}@media only screen and (min-width:37.5625em){.u-show-on-mobile{display:none}}.u-hidden{display:none!important}.u-invisible{visibility:hidden}.u-right{float:right}.u-nowrap{white-space:nowrap}.u-flexible-container{height:0;padding-bottom:56.25%;position:relative}.u-flexible-container__inner{height:100%;left:0;position:absolute;top:0;width:100%}.u-flexible-container--4-3{height:0;padding-bottom:75%;position:relative}.u-mt0{margin-top:0!important}.u-mb0{margin-bottom:0!important}.u-mt5{margin-top:5px!important}.u-mb5{margin-bottom:5px!important}.u-mt10{margin-top:10px!important}.u-mb10{margin-bottom:10px!important}.u-mt15{margin-top:15px!important}.u-mb15{margin-bottom:15px!important}.u-mt20{margin-top:20px!important}.u-mb20{margin-bottom:20px!important}.u-mt30{margin-top:30px!important}.u-mb30{margin-bottom:30px!important}.u-mt45{margin-top:45px!important}.u-mb45{margin-bottom:45px!important}.u-mt60{margin-top:60px!important}.u-mb60{margin-bottom:60px!important}.u-w100pct{width:100%}.u-w90pct{width:90%}.u-w80pct{width:80%}.u-w70pct{width:70%}.u-w60pct{width:60%}.u-w50pct{width:50%}.u-w40pct{width:40%}.u-w30pct{width:30%}.u-w20pct{width:20%}.u-w10pct{width:10%}.u-w75pct{width:75%}.u-w65pct{width:65%}.u-w25pct{width:25%}.u-w15pct{width:15%}.u-w66pct{width:66.6666666667%}.u-w33pct{width:33.3333333333%}.u-small-text,small{font-size:.875em}.u-small-text--subtle,small--subtle{color:var(--gray)}.u-no-animation{transition-duration:0s!important}.u-move-transition{transition:transform .25s ease-out}.u-move-to-origin{transform:translateZ(0)}.u-move-left{transform:translate3d(-100%,0,0)}.u-move-left-2x{transform:translate3d(-200%,0,0)}.u-move-left-3x{transform:translate3d(-300%,0,0)}.u-move-right{transform:translate3d(100%,0,0)}.u-move-up{transform:translate3d(0,-100%,0)}.u-alpha-transition{transition:opacity .25s linear}.u-alpha-100{opacity:1}.u-alpha-0{opacity:0}.u-max-height-transition{contain:paint;overflow:hidden;transition:max-height .2s ease-out}.u-max-height-zero{max-height:0!important}.u-max-height-summary{max-height:88px!important}:host .m-form-field{--choice-border:var(--choice-border-default);--choice-border-hover:var(--choice-border-hover-default);--choice-border-focus:var(--choice-border-focus-default);--choice-outline-focus:var(--choice-outline-focus-default);--choice-bg:var(--choice-bg-default);--choice-bg-selected:var(--choice-bg-selected-default);--choice-bg-selected-focus:var(--choice-bg-selected-focus-default);--choice-label-disabled:var(--choice-label-disabled-default);--choice-border-width-addendum:0}:host .m-form-field .a-text-input--full{width:100%}:host .m-form-field .a-label+.a-text-input{margin-top:.3125em}:host .m-form-field--checkbox .a-label{cursor:pointer;display:inline-grid;grid-template-columns:1.875em auto;overflow-wrap:anywhere;vertical-align:top}:host .m-form-field--checkbox .a-label:before{background-color:var(--choice-bg);border:1px solid var(--choice-border);content:"";display:inline-block;grid-row-end:3;grid-row-start:1;height:1.125em;left:1px;margin-right:10px;outline:var(--choice-border-width-addendum) solid var(--choice-border);position:relative;top:1px;vertical-align:top;width:1.125em}:host .m-form-field--checkbox .a-label.hover:before,:host .m-form-field--checkbox .a-label:hover:before{border-color:var(--choice-border-hover)}:host .m-form-field--checkbox .a-checkbox{border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0 0 0 0)}:host .m-form-field--checkbox .a-checkbox.focus+.a-label,:host .m-form-field--checkbox .a-checkbox:focus+.a-label{outline:1px dotted var(--choice-outline-focus);outline-offset:1px}:host .m-form-field--checkbox .a-checkbox:disabled.focus+.a-label:before,:host .m-form-field--checkbox .a-checkbox:disabled.hover+.a-label:before,:host .m-form-field--checkbox .a-checkbox:disabled:checked+.a-label:before,:host .m-form-field--checkbox .a-checkbox:disabled:focus+.a-label:before,:host .m-form-field--checkbox .a-checkbox:disabled:hover+.a-label:before{border-color:var(--choice-border);box-shadow:none;outline:none}:host .m-form-field--checkbox .a-checkbox:disabled+.a-label{color:var(--choice-label-disabled);cursor:not-allowed}:host .m-form-field--checkbox .a-checkbox:disabled+.a-label:before{outline:none}:host .m-form-field--checkbox:has(.a-checkbox:disabled){--choice-border:var(--choice-border-disabled);--choice-bg:var(--choice-bg-disabled);--choice-bg-selected:var(--choice-bg-selected-disabled)}:host .m-form-field--checkbox-error,:host .m-form-field--checkbox-success,:host .m-form-field--checkbox-warning{--choice-border-width-addendum:1px}:host .m-form-field--checkbox-success{--choice-border:var(--choice-border-success)}:host .m-form-field--checkbox-warning{--choice-border:var(--choice-border-warning)}:host .m-form-field--checkbox-error{--choice-border:var(--choice-border-error)}:host .m-form-field--checkbox .a-checkbox.focus+.a-label:before,:host .m-form-field--checkbox .a-checkbox:focus+.a-label:before{border-color:var(--choice-border-focus);box-shadow:0 0 0 1px var(--choice-border-focus);outline-color:var(--choice-border-focus)}:host .m-form-field--checkbox .a-checkbox.hover+.a-label:before,:host .m-form-field--checkbox .a-checkbox:hover+.a-label:before{border-color:var(--choice-border-hover);box-shadow:0 0 0 1px var(--choice-border-hover);outline-color:var(--choice-border-hover)}:host .m-form-field--checkbox .a-checkbox:checked+.a-label:before{background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" class="cf-icon-svg cf-icon-svg--approved" viewBox="0 0 12 19"><path d="M4.63 15.638a1.03 1.03 0 0 1-.79-.37L.36 11.09a1.03 1.03 0 1 1 1.58-1.316l2.535 3.043L9.958 3.32a1.029 1.029 0 0 1 1.783 1.03L5.52 15.122a1.03 1.03 0 0 1-.803.511l-.088.004z"/></svg>');background-position:center 0;background-repeat:no-repeat;background-size:auto 1.1875em}:host .m-form-field--checkbox .a-checkbox:disabled:checked+.a-label:before{background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" fill="%235a5d61" aria-hidden="true" viewBox="0 0 12 19"><path d="M4.63 15.638a1.03 1.03 0 0 1-.79-.37L.36 11.09a1.03 1.03 0 1 1 1.58-1.316l2.535 3.043L9.958 3.32a1.029 1.029 0 0 1 1.783 1.03L5.52 15.122a1.03 1.03 0 0 1-.803.511l-.088.004z"/></svg>')}:host .m-form-field--lg-target{display:block}:host .m-form-field--lg-target .a-label{background-color:var(--gray-10);box-sizing:border-box;padding:15px;width:100%}:host .m-form-field--lg-target .a-checkbox:checked+.a-label{background-color:var(--pacific-20);box-shadow:inset 0 0 0 1px var(--pacific)}:host .m-form-field--lg-target .a-checkbox.focus+.a-label,:host .m-form-field--lg-target .a-checkbox.hover+.a-label,:host .m-form-field--lg-target .a-checkbox:focus+.a-label,:host .m-form-field--lg-target .a-checkbox:hover+.a-label{box-shadow:inset 0 0 0 2px var(--pacific)}:host .m-form-field--lg-target .a-checkbox.focus+.a-label,:host .m-form-field--lg-target .a-checkbox:checked+.a-label,:host .m-form-field--lg-target .a-checkbox:focus+.a-label{outline-offset:1px}:host .m-form-field--lg-target .a-checkbox:checked:disabled+.a-label,:host .m-form-field--lg-target .a-checkbox:disabled+.a-label,:host .m-form-field--lg-target .a-checkbox:hover:disabled+.a-label{background-color:var(--gray-20);box-shadow:none;color:var(--choice-label-disabled)}:host .m-form-field--lg-target .a-checkbox:checked:disabled+.a-label,:host .m-form-field--lg-target .a-checkbox:checked:disabled+.a-label:before{border:1px solid var(--form-field-border-disabled)}`;var j,He,B=class B extends v{constructor(){super();se(this,j);this.disabled=!1,this.validation="",this.type=""}static get properties(){return{disabled:{type:Boolean},validation:{type:String},type:{type:String}}}render(){return ke`<div class="${re(this,j,He)}"><input class="a-checkbox" type="checkbox" id="checkbox" ?disabled="${this.disabled}"> <label class="a-label" for="checkbox"><slot></slot></label></div>`}static init(){window.customElements.get("cfpb-checkbox")||window.customElements.define("cfpb-checkbox",B)}};j=new WeakSet,He=function(){let t="m-form-field m-form-field--checkbox";switch(this.type){case"success":t+=" m-form-field--checkbox-success";break;case"warning":t+=" m-form-field--checkbox-warning";break;case"error":t+=" m-form-field--checkbox-error";break;case"large":t+=" m-form-field--lg-target";break}return t},ie(B,"styles",I`${L(Ue)}`);var Oe=B;})();
4
- /*! Bundled license information:
5
-
6
- @lit/reactive-element/css-tag.js:
7
- (**
8
- * @license
9
- * Copyright 2019 Google LLC
10
- * SPDX-License-Identifier: BSD-3-Clause
11
- *)
12
-
13
- @lit/reactive-element/reactive-element.js:
14
- lit-html/lit-html.js:
15
- lit-element/lit-element.js:
16
- (**
17
- * @license
18
- * Copyright 2017 Google LLC
19
- * SPDX-License-Identifier: BSD-3-Clause
20
- *)
21
-
22
- lit-html/is-server.js:
23
- (**
24
- * @license
25
- * Copyright 2022 Google LLC
26
- * SPDX-License-Identifier: BSD-3-Clause
27
- *)
28
- */
29
- //# sourceMappingURL=index.js.map