@gov-design-system-ce/components 0.0.26 → 0.0.27

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 (149) hide show
  1. package/dist/cjs/gov-accordion-item.cjs.entry.js +1 -1
  2. package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
  3. package/dist/cjs/gov-button.cjs.entry.js +1 -1
  4. package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
  5. package/dist/cjs/gov-icon.cjs.entry.js +1 -1
  6. package/dist/cjs/gov-skeleton.cjs.entry.js.map +1 -1
  7. package/dist/collection/components/gov-accordion/gov-accordion-item.js +1 -1
  8. package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
  9. package/dist/collection/components/gov-button/gov-button.css +15 -1
  10. package/dist/collection/components/gov-icon/list.js +15 -1
  11. package/dist/collection/components/gov-icon/list.js.map +1 -1
  12. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js.map +1 -1
  13. package/dist/components/gov-accordion-item.js +2 -1
  14. package/dist/components/gov-accordion-item.js.map +1 -1
  15. package/dist/components/gov-accordion.js +1 -0
  16. package/dist/components/gov-accordion.js.map +1 -1
  17. package/dist/components/gov-alert.js +1 -0
  18. package/dist/components/gov-alert.js.map +1 -1
  19. package/dist/components/gov-app.js +1 -0
  20. package/dist/components/gov-app.js.map +1 -1
  21. package/dist/components/gov-attachments-item2.js +1 -0
  22. package/dist/components/gov-attachments-item2.js.map +1 -1
  23. package/dist/components/gov-attachments2.js +1 -0
  24. package/dist/components/gov-attachments2.js.map +1 -1
  25. package/dist/components/gov-backdrop2.js +1 -0
  26. package/dist/components/gov-backdrop2.js.map +1 -1
  27. package/dist/components/gov-badge2.js +1 -0
  28. package/dist/components/gov-badge2.js.map +1 -1
  29. package/dist/components/gov-breadcrumbs.js +1 -0
  30. package/dist/components/gov-breadcrumbs.js.map +1 -1
  31. package/dist/components/gov-button2.js +2 -1
  32. package/dist/components/gov-button2.js.map +1 -1
  33. package/dist/components/gov-card.js +1 -0
  34. package/dist/components/gov-card.js.map +1 -1
  35. package/dist/components/gov-container.js +1 -0
  36. package/dist/components/gov-container.js.map +1 -1
  37. package/dist/components/gov-cookiebar.js +1 -0
  38. package/dist/components/gov-cookiebar.js.map +1 -1
  39. package/dist/components/gov-empty.js +1 -0
  40. package/dist/components/gov-empty.js.map +1 -1
  41. package/dist/components/gov-error-code.js +1 -0
  42. package/dist/components/gov-error-code.js.map +1 -1
  43. package/dist/components/gov-form-autocomplete2.js +1 -0
  44. package/dist/components/gov-form-autocomplete2.js.map +1 -1
  45. package/dist/components/gov-form-checkbox.js +1 -0
  46. package/dist/components/gov-form-checkbox.js.map +1 -1
  47. package/dist/components/gov-form-control.js +1 -0
  48. package/dist/components/gov-form-control.js.map +1 -1
  49. package/dist/components/gov-form-file.js +1 -0
  50. package/dist/components/gov-form-file.js.map +1 -1
  51. package/dist/components/gov-form-group.js +1 -0
  52. package/dist/components/gov-form-group.js.map +1 -1
  53. package/dist/components/gov-form-input2.js +1 -0
  54. package/dist/components/gov-form-input2.js.map +1 -1
  55. package/dist/components/gov-form-label.js +1 -0
  56. package/dist/components/gov-form-label.js.map +1 -1
  57. package/dist/components/gov-form-message2.js +1 -0
  58. package/dist/components/gov-form-message2.js.map +1 -1
  59. package/dist/components/gov-form-multi-select.js +1 -0
  60. package/dist/components/gov-form-multi-select.js.map +1 -1
  61. package/dist/components/gov-form-password-power.js +1 -0
  62. package/dist/components/gov-form-password-power.js.map +1 -1
  63. package/dist/components/gov-form-radio.js +1 -0
  64. package/dist/components/gov-form-radio.js.map +1 -1
  65. package/dist/components/gov-form-search.js +1 -0
  66. package/dist/components/gov-form-search.js.map +1 -1
  67. package/dist/components/gov-form-select2.js +1 -0
  68. package/dist/components/gov-form-select2.js.map +1 -1
  69. package/dist/components/gov-form-switch.js +1 -0
  70. package/dist/components/gov-form-switch.js.map +1 -1
  71. package/dist/components/gov-grid-item.js +1 -0
  72. package/dist/components/gov-grid-item.js.map +1 -1
  73. package/dist/components/gov-grid.js +1 -0
  74. package/dist/components/gov-grid.js.map +1 -1
  75. package/dist/components/gov-icon2.js +2 -1
  76. package/dist/components/gov-icon2.js.map +1 -1
  77. package/dist/components/gov-layout-column.js +1 -0
  78. package/dist/components/gov-layout-column.js.map +1 -1
  79. package/dist/components/gov-layout.js +1 -0
  80. package/dist/components/gov-layout.js.map +1 -1
  81. package/dist/components/gov-loading.js +1 -0
  82. package/dist/components/gov-loading.js.map +1 -1
  83. package/dist/components/gov-message.js +1 -0
  84. package/dist/components/gov-message.js.map +1 -1
  85. package/dist/components/gov-modal.js +1 -0
  86. package/dist/components/gov-modal.js.map +1 -1
  87. package/dist/components/gov-nav-item.js +1 -0
  88. package/dist/components/gov-nav-item.js.map +1 -1
  89. package/dist/components/gov-nav.js +1 -0
  90. package/dist/components/gov-nav.js.map +1 -1
  91. package/dist/components/gov-pagination.js +1 -0
  92. package/dist/components/gov-pagination.js.map +1 -1
  93. package/dist/components/gov-prompt.js +1 -0
  94. package/dist/components/gov-prompt.js.map +1 -1
  95. package/dist/components/gov-side-nav-item.js +1 -0
  96. package/dist/components/gov-side-nav-item.js.map +1 -1
  97. package/dist/components/gov-side-nav.js +1 -0
  98. package/dist/components/gov-side-nav.js.map +1 -1
  99. package/dist/components/gov-skeleton.js +1 -0
  100. package/dist/components/gov-skeleton.js.map +1 -1
  101. package/dist/components/gov-spacer.js +1 -0
  102. package/dist/components/gov-spacer.js.map +1 -1
  103. package/dist/components/gov-statsbar-item.js +1 -0
  104. package/dist/components/gov-statsbar-item.js.map +1 -1
  105. package/dist/components/gov-statsbar.js +1 -0
  106. package/dist/components/gov-statsbar.js.map +1 -1
  107. package/dist/components/gov-stepper-item.js +1 -0
  108. package/dist/components/gov-stepper-item.js.map +1 -1
  109. package/dist/components/gov-stepper.js +1 -0
  110. package/dist/components/gov-stepper.js.map +1 -1
  111. package/dist/components/gov-tabs-item.js +1 -0
  112. package/dist/components/gov-tabs-item.js.map +1 -1
  113. package/dist/components/gov-tabs.js +1 -0
  114. package/dist/components/gov-tabs.js.map +1 -1
  115. package/dist/components/gov-tile.js +1 -0
  116. package/dist/components/gov-tile.js.map +1 -1
  117. package/dist/components/gov-tiles.js +1 -0
  118. package/dist/components/gov-tiles.js.map +1 -1
  119. package/dist/components/gov-toast.js +1 -0
  120. package/dist/components/gov-toast.js.map +1 -1
  121. package/dist/components/gov-tooltip-content.js +1 -0
  122. package/dist/components/gov-tooltip-content.js.map +1 -1
  123. package/dist/components/gov-tooltip.js +1 -0
  124. package/dist/components/gov-tooltip.js.map +1 -1
  125. package/dist/components/gov-wizzard-item.js +1 -0
  126. package/dist/components/gov-wizzard-item.js.map +1 -1
  127. package/dist/components/gov-wizzard.js +1 -0
  128. package/dist/components/gov-wizzard.js.map +1 -1
  129. package/dist/core/core.esm.js +1 -1
  130. package/dist/core/p-005bfb42.entry.js.map +1 -1
  131. package/dist/core/{p-1ba7bd9f.entry.js → p-266c3826.entry.js} +2 -2
  132. package/dist/core/p-266c3826.entry.js.map +1 -0
  133. package/dist/core/{p-edcfb1f7.entry.js → p-5957ba08.entry.js} +2 -2
  134. package/dist/core/p-5957ba08.entry.js.map +1 -0
  135. package/dist/core/{p-c8796c7a.entry.js → p-93de0637.entry.js} +2 -2
  136. package/dist/custom-elements/index.js +1 -1
  137. package/dist/custom-elements/index.js.map +1 -1
  138. package/dist/esm/gov-accordion-item.entry.js +1 -1
  139. package/dist/esm/gov-accordion-item.entry.js.map +1 -1
  140. package/dist/esm/gov-button.entry.js +1 -1
  141. package/dist/esm/gov-button.entry.js.map +1 -1
  142. package/dist/esm/gov-icon.entry.js +1 -1
  143. package/dist/esm/gov-skeleton.entry.js.map +1 -1
  144. package/dist/hydrate/index.js +2 -2
  145. package/package.json +1 -1
  146. package/dist/core/critical.css +0 -480
  147. package/dist/core/p-1ba7bd9f.entry.js.map +0 -1
  148. package/dist/core/p-edcfb1f7.entry.js.map +0 -1
  149. /package/dist/core/{p-c8796c7a.entry.js.map → p-93de0637.entry.js.map} +0 -0
@@ -1,480 +0,0 @@
1
- gov-breadcrumbs ul {
2
- margin: 0;
3
- padding: 0;
4
- }
5
-
6
- /* stylelint-disable */
7
- /* stylelint-enable */
8
- /* stylelint-disable */
9
- /* stylelint-enable */
10
- /* stylelint-disable */
11
- /* stylelint-enable */
12
- /* stylelint-disable */
13
- /* stylelint-enable */
14
- /* [Core] - Buttons
15
- ------------------------------------------------------------------ */
16
- /*
17
- * Gets color from theme-colors or from palette-colors
18
- */
19
- /*
20
- * Converts hex value to rgb colors value
21
- */
22
- /* stylelint-disable order/order */
23
- /* stylelint-enable order/order */
24
- /*
25
- * Generates list of utility classes for margin, padding
26
- *
27
- * Make sure $list of definitions is sorted so that last item is defined last
28
- * So largest views are mentioned last.
29
- */
30
- /*
31
- - Variables - Sizes
32
- */
33
- /* "Constants" for general usage */
34
- /*
35
- - Variables - Layout
36
- */
37
- /**
38
- * Utilities - Offset
39
- */
40
- /* stylelint-disable order/order */
41
- /* stylelint-enable order/order */
42
- /* stylelint-disable order/order */
43
- /* stylelint-enable order/order */
44
- /* stylelint-disable order/order */
45
- /* stylelint-enable order/order */
46
- /**
47
- * Generates CSS3 var with default value
48
- */
49
- /*
50
- - Variables - General
51
- */
52
- /*
53
- - Variables - Typography
54
- */
55
- /*
56
- - Variables - Variants
57
- */
58
- /*
59
- - Variables - Container
60
- */
61
- /*
62
- - Variables - Sizes
63
- */
64
- /* "Constants" for general usage */
65
- /*
66
- - Variables - Accordion
67
- */
68
- /*
69
- - Variables - Attachments
70
- */
71
- /*
72
- - Variables - Alert
73
- */
74
- /*
75
- - Variables - Backdrop
76
- */
77
- /*
78
- - Variables - Buttons (&& Badges)
79
- */
80
- /*
81
- - Variables - Breadcrumbs
82
- */
83
- /*
84
- - Variables - Classes
85
- */
86
- /*
87
- - Variables - Colors
88
- */
89
- /*
90
- - Variables - Cookiebar
91
- */
92
- /*
93
- - Variables - Card
94
- */
95
- /*
96
- - Variables - Message
97
- */
98
- /*
99
- - Variables - Empty
100
- */
101
- /*
102
- - Variables - Error code
103
- */
104
- /*
105
- - Variables - Grid
106
- */
107
- /*
108
- - Variables - Tiles
109
- */
110
- /*
111
- - Variables - Modal & Prompt
112
- */
113
- /**
114
- * Utilities - Offset
115
- */
116
- /*
117
- - Variables - shadows
118
- */
119
- /* "Constants" for general usage */
120
- /*
121
- - Variables - Statsbar
122
- */
123
- /*
124
- - Variables - Tabs
125
- */
126
- /*
127
- - Variables - Tooltip
128
- */
129
- /*
130
- - Variables - Loading
131
- */
132
- /*
133
- - Variables - Forms
134
- */
135
- /*
136
- - Variables - Form Autocomplete
137
- */
138
- /*
139
- - Variables - Form Message
140
- */
141
- /*
142
- - Variables - Form label
143
- */
144
- /*
145
- - Variables - Form switch
146
- */
147
- /*
148
- - Variables - Form select
149
- */
150
- /*
151
- - Variables - Form input
152
- */
153
- /*
154
- - Variables - Form multiselect
155
- */
156
- /*
157
- - Variables - Form password power
158
- */
159
- /*
160
- - Variables - Form checkbox & radio
161
- */
162
- /*
163
- - Variables - Form group
164
- */
165
- /*
166
- - Variables - Form file
167
- */
168
- /*
169
- - Variables - Toast Message
170
- */
171
- /*
172
- - Variables - Wizzard
173
- */
174
- /*
175
- - Variables - Stepper
176
- */
177
- /*
178
- - Variables - Side nav
179
- */
180
- /*
181
- - Variables - Grid & Tile
182
- */
183
- /*
184
- - Variables - Pagination
185
- */
186
- /*
187
- - Variables - Nav
188
- */
189
- /*
190
- - Variables - Layout
191
- */
192
- .gov-spin-animation,
193
- .gov-pseudo-spin-animation::before {
194
- animation: spin 4s linear infinite;
195
- }
196
-
197
- @keyframes spin {
198
- 100% {
199
- transform: rotate(360deg);
200
- }
201
- }
202
- @keyframes countdown {
203
- to {
204
- transform: scaleX(0);
205
- }
206
- }
207
- @keyframes progress {
208
- 0% {
209
- background-position: -200px 0;
210
- }
211
- 100% {
212
- background-position: calc(200px + 100%) 0;
213
- }
214
- }
215
- @keyframes pulse {
216
- 0% {
217
- opacity: 1;
218
- }
219
- 50% {
220
- opacity: 0.4;
221
- }
222
- 100% {
223
- opacity: 1;
224
- }
225
- }
226
- /*
227
- - Variables - Accordion
228
- */
229
- /*
230
- - Variables - Buttons (&& Badges)
231
- */
232
- /*
233
- - Variables - Form input
234
- */
235
- /*
236
- - Variables - Form switch
237
- */
238
- /*
239
- - Variables - Form select
240
- */
241
- /*
242
- - Variables - Loading
243
- */
244
- /*
245
- - Variables - Message
246
- */
247
- gov-accordion-item[size=xs] {
248
- min-height: var(--gov-accordion-s-min-height, 3rem);
249
- }
250
-
251
- gov-accordion-item[size=s] {
252
- min-height: var(--gov-accordion-s-min-height, 3rem);
253
- }
254
-
255
- gov-accordion-item[size=m] {
256
- min-height: var(--gov-accordion-m-min-height, 4.5rem);
257
- }
258
-
259
- gov-accordion-item[size=l] {
260
- min-height: var(--gov-accordion-l-min-height, 5.5rem);
261
- }
262
-
263
- gov-button[size=xs] {
264
- min-height: var(--gov-button-xs-min-height, 1.5rem);
265
- }
266
-
267
- gov-button[size=s] {
268
- min-height: var(--gov-button-s-min-height, 2rem);
269
- }
270
-
271
- gov-button[size=m] {
272
- min-height: var(--gov-button-m-min-height, 2.5rem);
273
- }
274
-
275
- gov-button[size=l] {
276
- min-height: var(--gov-button-l-min-height, 3rem);
277
- }
278
-
279
- gov-button[size=xl] {
280
- min-height: var(--gov-button-xl-min-height, 3.5rem);
281
- }
282
-
283
- gov-badge[size=xs] {
284
- min-height: var(--gov-button-xs-min-height, 1.5rem);
285
- }
286
-
287
- gov-badge[size=s] {
288
- min-height: var(--gov-button-s-min-height, 2rem);
289
- }
290
-
291
- gov-badge[size=m] {
292
- min-height: var(--gov-button-m-min-height, 2.5rem);
293
- }
294
-
295
- gov-badge[size=l] {
296
- min-height: var(--gov-button-l-min-height, 3rem);
297
- }
298
-
299
- gov-badge[size=xl] {
300
- min-height: var(--gov-button-xl-min-height, 3.5rem);
301
- }
302
-
303
- gov-form-input[size=m] {
304
- min-height: var(--gov-form-input-core-m-height, 2.5rem);
305
- }
306
-
307
- gov-form-input[size=l] {
308
- min-height: var(--gov-form-input-core-l-height, 3rem);
309
- }
310
-
311
- gov-form-input[size=xl] {
312
- min-height: var(--gov-form-input-core-xl-height, 3.5rem);
313
- }
314
-
315
- gov-form-select[size=m] {
316
- min-height: var(--gov-form-input-core-m-height, 2.5rem);
317
- }
318
-
319
- gov-form-select[size=l] {
320
- min-height: var(--gov-form-input-core-l-height, 3rem);
321
- }
322
-
323
- gov-form-select[size=xl] {
324
- min-height: var(--gov-form-input-core-xl-height, 3.5rem);
325
- }
326
-
327
- gov-form-switch[size=xs] {
328
- min-height: var(--gov-form-switch-xs-indicator-height, 1.25rem);
329
- }
330
-
331
- gov-form-switch[size=s] {
332
- min-height: var(--gov-form-switch-s-indicator-height, 1.375rem);
333
- }
334
-
335
- gov-form-switch[size=m] {
336
- min-height: var(--gov-form-switch-m-indicator-height, 1.5rem);
337
- }
338
-
339
- gov-form-switch[size=l] {
340
- min-height: var(--gov-form-switch-l-indicator-height, 2rem);
341
- }
342
-
343
- gov-breadcrumbs {
344
- min-height: 1.5rem;
345
- }
346
- gov-breadcrumbs ul {
347
- position: relative;
348
- display: flex;
349
- width: 100%;
350
- }
351
-
352
- gov-skeleton {
353
- min-height: var(--gov-skeleton-height, 20px);
354
- }
355
- gov-skeleton[shape=circle] {
356
- min-height: var(--gov-skeleton-circle-size, 60px);
357
- }
358
-
359
- gov-message {
360
- min-height: var(--gov-message-box-min-height, 3rem);
361
- }
362
-
363
- gov-form-file,
364
- gov-form-multi-select,
365
- gov-modal,
366
- gov-pagination,
367
- gov-prompt,
368
- gov-tabs,
369
- gov-alert,
370
- gov-loading,
371
- gov-side-nav-item,
372
- gov-toast,
373
- gov-accordion-item,
374
- gov-card,
375
- gov-form-checkbox,
376
- gov-tile,
377
- gov-wizzard-item,
378
- gov-accordion,
379
- gov-app,
380
- gov-breadcrumbs,
381
- gov-container,
382
- gov-cookiebar,
383
- gov-empty,
384
- gov-error-code,
385
- gov-form-control,
386
- gov-form-group,
387
- gov-form-label,
388
- gov-form-password-power,
389
- gov-form-radio,
390
- gov-form-search,
391
- gov-form-switch,
392
- gov-grid,
393
- gov-grid-item,
394
- gov-layout,
395
- gov-layout-column,
396
- gov-message,
397
- gov-nav,
398
- gov-nav-item,
399
- gov-side-nav,
400
- gov-skeleton,
401
- gov-spacer,
402
- gov-statsbar,
403
- gov-statsbar-item,
404
- gov-stepper,
405
- gov-stepper-item,
406
- gov-tabs-item,
407
- gov-tiles,
408
- gov-tooltip,
409
- gov-wizzard,
410
- gov-attachments-item,
411
- gov-form-autocomplete,
412
- gov-attachments,
413
- gov-form-message,
414
- gov-form-input,
415
- gov-form-select,
416
- gov-badge,
417
- gov-backdrop,
418
- gov-icon,
419
- gov-button {
420
- visibility: hidden;
421
- }
422
- gov-form-file.hydrated,
423
- gov-form-multi-select.hydrated,
424
- gov-modal.hydrated,
425
- gov-pagination.hydrated,
426
- gov-prompt.hydrated,
427
- gov-tabs.hydrated,
428
- gov-alert.hydrated,
429
- gov-loading.hydrated,
430
- gov-side-nav-item.hydrated,
431
- gov-toast.hydrated,
432
- gov-accordion-item.hydrated,
433
- gov-card.hydrated,
434
- gov-form-checkbox.hydrated,
435
- gov-tile.hydrated,
436
- gov-wizzard-item.hydrated,
437
- gov-accordion.hydrated,
438
- gov-app.hydrated,
439
- gov-breadcrumbs.hydrated,
440
- gov-container.hydrated,
441
- gov-cookiebar.hydrated,
442
- gov-empty.hydrated,
443
- gov-error-code.hydrated,
444
- gov-form-control.hydrated,
445
- gov-form-group.hydrated,
446
- gov-form-label.hydrated,
447
- gov-form-password-power.hydrated,
448
- gov-form-radio.hydrated,
449
- gov-form-search.hydrated,
450
- gov-form-switch.hydrated,
451
- gov-grid.hydrated,
452
- gov-grid-item.hydrated,
453
- gov-layout.hydrated,
454
- gov-layout-column.hydrated,
455
- gov-message.hydrated,
456
- gov-nav.hydrated,
457
- gov-nav-item.hydrated,
458
- gov-side-nav.hydrated,
459
- gov-skeleton.hydrated,
460
- gov-spacer.hydrated,
461
- gov-statsbar.hydrated,
462
- gov-statsbar-item.hydrated,
463
- gov-stepper.hydrated,
464
- gov-stepper-item.hydrated,
465
- gov-tabs-item.hydrated,
466
- gov-tiles.hydrated,
467
- gov-tooltip.hydrated,
468
- gov-wizzard.hydrated,
469
- gov-attachments-item.hydrated,
470
- gov-form-autocomplete.hydrated,
471
- gov-attachments.hydrated,
472
- gov-form-message.hydrated,
473
- gov-form-input.hydrated,
474
- gov-form-select.hydrated,
475
- gov-badge.hydrated,
476
- gov-backdrop.hydrated,
477
- gov-icon.hydrated,
478
- gov-button.hydrated {
479
- visibility: inherit;
480
- }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../packages/core/src/utils/bool.utils.ts","../../../packages/core/src/components/gov-button/gov-button.scss?tag=gov-button","../../../packages/core/src/components/gov-button/gov-button.tsx"],"names":["toBool","value","indexOf","govButtonCss","Tags","GovButton","[object Object]","hostRef","this","h","govHost","host","newValue","validateProp","ButtonVariants","ButtonClass","root","Type","Sizes","NativeType","validateVariant","variant","validateType","type","validateSize","size","validateNativeType","nativeType","canValidateWcagOnRender","delay","validateWcag","classNames","prepareClasses","hasSlot","rootWithIcon","Tag","href","A","BUTTON","undefined","Host","hoverable","class","classes","inverse","ref","el","buttonRef","onClick","onClickHandler","bind","onFocus","onFocusHandler","onBlur","onBlurHandler","onMouseDown","isPressed","onMouseUp","disabled","id","identifier","target","download","hreflang","rel","name","tabindex","focusable","aria-activedescendant","wcagActiveDescendant","aria-describedby","aria-description","wcagDescription","aria-controls","wcagControls","aria-details","wcagDetails","aria-expanded","toBoolAttrIfDefined","wcagExpanded","aria-label","wcagLabel","aria-labelledby","wcagLabelledBy","aria-owns","wcagOwns","aria-haspopup","wcagHasPopup","aria-pressed","toBoolAttr","aria-disabled","aria-current","wcagCurrent","loading","e","stopPropagation","govClick","emit","component","originalEvent","govFocus","govBlur","focus","validateWcagRef","validateWcagLabel"],"mappings":"8bA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Q,KAAKqF,UAAYrF,KAAKC,EAAEwB,QAAQ,eAClCxB,EAAA,WAAA,CAAUwD,KAAK,SAASvB,MAAM,yBAMhCpC,eAAewF,GACtBA,EAAEC,kBACF,GAAIvF,KAAKkD,WAAa,MAAO,CAC5BlD,KAAKwF,SAASC,KAAK,CAClBC,UAAWnF,EAAYC,KACvBmF,cAAeL,EACfjD,IAAKrC,KAAKG,QAKLL,eAAewF,GACtBA,EAAEC,kBACFvF,KAAK4F,SAASH,KAAK,CAClBC,UAAWnF,EAAYC,KACvBmF,cAAeL,EACfjD,IAAKrC,KAAKG,OAIJL,cAAcwF,GACrBA,EAAEC,kBACFvF,KAAK6F,QAAQJ,KAAK,CACjBC,UAAWnF,EAAYC,KACvBmF,cAAeL,EACfjD,IAAKrC,KAAKG,OAQZL,iBACCE,KAAKuC,UAAUuD,QAOhBhG,qBACC,GAAIE,KAAK2D,UAAW,CACnBoC,EAAgB/F,KAAK6D,qBAAsB,wBAAyBtD,EAAYC,MAChFuF,EAAgB/F,KAAKkE,aAAc,gBAAiB3D,EAAYC,MAChEuF,EAAgB/F,KAAKoE,YAAa,eAAgB7D,EAAYC,MAC9DuF,EAAgB/F,KAAK6E,SAAU,YAAatE,EAAYC,MACxDuF,EAAgB/F,KAAK+E,aAAc,gBAAiBxE,EAAYC,MAChEwF,EAAkBhG,KAAKyE,UAAWzE,KAAK2E,eAAgBpE,EAAYC","sourcesContent":["export function toBool(value: any): boolean {\n\tif (typeof value === 'string') {\n\t\treturn ['true', 'True', 'TRUE', '1'].indexOf(value) !== -1\n\t} else if (typeof value === 'number') {\n\t\treturn value > 0\n\t} else if (typeof value === 'boolean') {\n\t\treturn value\n\t} else {\n\t\treturn value ? true : false\n\t}\n}\n","/*\n * Button\n */\n\n// Shared definitions - BUTTON & badge\n@import \"./gov-button-core.scss\";\n\n.gov-button {\n\t@extend %button-core;\n\tdisplay: inline-block;\n\t.element {\n\t\tborder-radius: #{$border-radius};\n\t\tfont-weight: 700 !important;\n\t}\n\n\t&[type=\"link\"] {\n\t\t.element {\n\t\t\tmin-height: inherit;\n\t\t\tpadding: 0 !important;\n\t\t\tline-height: inherit;\n\t\t\ttext-decoration: underline;\n\t\t\t@include hover() {\n\t\t\t\ttext-decoration: none;\n\t\t\t}\n\t\t}\n\t}\n\n\t// STATES\n\t&[loading=\"true\"],\n\t&[loading=\"1\"] {\n\t\t.element {\n\t\t\t> .gov-icon:not(.gov-spin-animation),\n\t\t\t> gov-icon:not(.gov-spin-animation) {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t.gov-icon {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $button-sizes {\n\t\t// Loading state\n\t\t&[loading=\"0\"][size=\"#{$size}\"],\n\t\t&[loading=\"false\"][size=\"#{$size}\"],\n\t\t&[loading=\"\"][size=\"#{$size}\"] {\n\t\t\t.element {\n\t\t\t\tpadding: get(\"padding-y\", $definitions) calc(((get(\"padding-x\", $definitions) * 3) + get(\"icon-size\", $definitions)) / 2);\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport {\n\tButtonSizesType,\n\tNativeTypesType,\n\tTypesType,\n\tButtonVariants,\n\tButtonVariantType,\n\tButtonClass,\n\tType,\n\tNativeType,\n\tButtonTargetType,\n} from \"./constants\"\nimport { govHost, toBoolAttr, toBoolAttrIfDefined, prepareClasses } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { toBool } from \"../../utils/bool.utils\"\nimport { Sizes } from \"../../core/constants/sizes\"\nimport { validateWcagLabel, validateWcagRef } from \"../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../helpers/Dom/win\"\nimport { delay } from \"../../utils/utils\"\nimport { ButtonEvent } from \"./gov-button.types\"\n\nenum Tags {\n\tA = \"a\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-button\",\n\tstyleUrl: \"gov-button.scss\",\n})\nexport class GovButton {\n\tprivate h: GovHost\n\tprivate buttonRef?: HTMLButtonElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovButtonElement\n\n\t/**\n\t * Style variation of the button\n\t */\n\t@Prop({ reflect: true }) readonly variant?: ButtonVariantType\n\t/**\n\t * Button’s size\n\t */\n\t@Prop({ reflect: true }) readonly size?: ButtonSizesType = \"m\"\n\t/**\n\t * Button's type\n\t */\n\t@Prop({ reflect: true }) readonly type?: TypesType = \"solid\"\n\t/**\n\t * Expands the button to fill 100% of the container width\n\t */\n\t@Prop() readonly expanded: boolean = false\n\t/**\n\t * Determine if component should have inversed colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * The name of the button, which gets paired with the button's value when submitted as part of a form. Corresponds with the native HTML name attribute\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Makes the button component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies\n\t */\n\t@Prop({ reflect: true }) readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n\t */\n\t@Prop() readonly nativeType?: NativeTypesType = \"button\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target?: ButtonTargetType\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n\t */\n\t@Prop() readonly download: boolean\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-hreflang\n\t */\n\t@Prop() readonly hreflang: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-referrerpolicy\n\t */\n\t@Prop() readonly referrerpolicy: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-rel\n\t */\n\t@Prop() readonly rel: string\n\t/**\n\t * Indicates whether an asynchronous process is running\n\t */\n\t@Prop() readonly loading: string\n\t/**\n\t * Same as original parametr\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom button identifier\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Indicates the id of a related component’s visually focused element\n\t */\n\t@Prop({ attribute: \"wcag-active-descendant\" }) readonly wcagActiveDescendant: string\n\t/**\n\t * Use this property to add an aria-controls attribute to the button. Use the attribute to point to the unique id of the content that the button manages\n\t */\n\t@Prop({ attribute: \"wcag-controls\" }) readonly wcagControls: string\n\t/**\n\t * Indicates the id of a component that describes the button\n\t */\n\t@Prop({ attribute: \"wcag-described-by\" }) readonly wcagDescribedBy: string\n\t/**\n\t * Aria description the button\n\t */\n\t@Prop({ attribute: \"wcag-description\" }) readonly wcagDescription: string\n\t/**\n\t * Details of the component\n\t */\n\t@Prop({ attribute: \"wcag-details\" }) readonly wcagDetails: string\n\t/**\n\t * If a button expands or collapses adjacent content, then use the ariaExpanded prop to add the aria-expanded attribute to the button\n\t * Set the value to convey the current expanded (true) or collapsed (false) state of the content\n\t */\n\t@Prop({ attribute: \"wcag-expanded\" }) readonly wcagExpanded: boolean\n\t/**\n\t * Adds accessible label for the button that is only shown for screen readers\n\t * Typically, this label text replaces the visible text on the button for users who use assistive technology\n\t */\n\t@Prop({ attribute: \"wcag-label\" }) readonly wcagLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: \"wcag-labelled-by\" }) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component owned by the button\n\t */\n\t@Prop({ attribute: \"wcag-owns\" }) readonly wcagOwns: string\n\t/**\n\t * \tUse this property to add an aria-haspopup attribute to a button, if you are using it as a menu button\n\t */\n\t@Prop({ attribute: \"wcag-has-popup\" }) readonly wcagHasPopup: string\n\t/**\n\t * Tells screen reader the element is pressed\n\t */\n\t@Prop({ attribute: \"wcag-pressed\" }) readonly wcagPressed: string\n\t/**\n\t * Indicates the current item within a container or set of related elements\n\t */\n\t@Prop({ attribute: \"wcag-current\" }) readonly wcagCurrent: string\n\t/**\n\t * Emitted when the button click\n\t */\n\t@Event({ eventName: \"gov-click\" }) govClick: EventEmitter<ButtonEvent>\n\t/**\n\t * Emitted when the button has focus\n\t */\n\t@Event({ eventName: \"gov-focus\" }) govFocus: EventEmitter<ButtonEvent>\n\t/**\n\t * Emitted when the button loses focus\n\t */\n\t@Event({ eventName: \"gov-blur\" }) govBlur: EventEmitter<ButtonEvent>\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(ButtonVariants, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(Type, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"nativeType\")\n\tvalidateNativeType(newValue: string): void {\n\t\tvalidateProp(NativeType, newValue, ButtonClass.root)\n\t}\n\n\t@State() isPressed = false\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateType(this.type)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateNativeType(this.nativeType)\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\tget classNames(): string {\n\t\tconst { h } = this\n\n\t\treturn prepareClasses([ButtonClass.root, h.hasSlot(\"left-icon\") && ButtonClass.rootWithIcon, h.hasSlot(\"right-icon\") && ButtonClass.rootWithIcon])\n\t}\n\n\trender() {\n\t\tconst Tag = this.href ? Tags.A : Tags.BUTTON\n\t\tconst nativeType = Tag === Tags.A ? undefined : this.nativeType\n\n\t\treturn (\n\t\t\t<Host hoverable={true} size={this.size} variant={this.variant} class={this.h.classes(this.classNames)} type={this.type} inverse={this.inverse}>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\tref={el => (this.buttonRef = el as HTMLButtonElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\tonMouseDown={() => (this.isPressed = true)}\n\t\t\t\t\tonMouseUp={() => (this.isPressed = false)}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tid={this.identifier}\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tdownload={this.download}\n\t\t\t\t\threflang={this.hreflang}\n\t\t\t\t\trel={this.rel}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\ttype={nativeType}\n\t\t\t\t\ttabindex={this.focusable ? \"0\" : \"-1\"}\n\t\t\t\t\taria-activedescendant={this.wcagActiveDescendant}\n\t\t\t\t\taria-describedby={this.wcagActiveDescendant}\n\t\t\t\t\taria-description={this.wcagDescription}\n\t\t\t\t\taria-controls={this.wcagControls}\n\t\t\t\t\taria-details={this.wcagDetails}\n\t\t\t\t\taria-expanded={toBoolAttrIfDefined(this.wcagExpanded)}\n\t\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\taria-haspopup={toBoolAttrIfDefined(this.wcagHasPopup)}\n\t\t\t\t\taria-pressed={toBoolAttr(this.isPressed)}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\taria-current={this.wcagCurrent}\n\t\t\t\t>\n\t\t\t\t\t{toBool(this.loading) && !this.h.hasSlot(\"right-icon\") &&\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon name=\"loader\" class=\"gov-spin-animation\"></gov-icon>}\n\t\t\t\t\t{this.h.hasSlot(\"left-icon\") && <slot name=\"left-icon\"></slot>}\n\t\t\t\t\t<slot />\n\t\t\t\t\t{this.h.hasSlot(\"right-icon\") && <slot name=\"right-icon\"></slot>}\n\t\t\t\t\t{toBool(this.loading) && this.h.hasSlot(\"right-icon\") &&\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon name=\"loader\" class=\"gov-spin-animation\"></gov-icon>}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false) {\n\t\t\tthis.govClick.emit({\n\t\t\t\tcomponent: ButtonClass.root,\n\t\t\t\toriginalEvent: e,\n\t\t\t\tref: this.host,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: ButtonClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: ButtonClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.buttonRef.focus()\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tif (this.focusable) {\n\t\t\tvalidateWcagRef(this.wcagActiveDescendant, \"aria-activedescendant\", ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagControls, \"aria-controls\", ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagDetails, \"aria-details\", ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagOwns, \"aria-owns\", ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagHasPopup, \"aria-haspopup\", ButtonClass.root)\n\t\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, ButtonClass.root)\n\t\t}\n\t}\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../packages/core/src/components/gov-accordion/gov-accordion-item.scss?tag=gov-accordion-item","../../../packages/core/src/components/gov-accordion/gov-accordion-item.tsx"],"names":["govAccordionItemCss","GovAccordionItem","[object Object]","hostRef","this","h","govHost","host","triggerId","createID","contentId","newValue","govErrorLog","AccordionItemClass","root","validTags","includes","validateProp","AccordionSizes","AccordionVariants","govChange","emit","open","isExpandedState","component","ref","isExpanded","getPropsFromParents","validateLabel","label","validateTriggerTag","triggerTag","validateSize","size","validateVariant","variant","accordion","getParent","AccordionClass","getAttribute","identifier","TriggerTag","Host","class","classes","no-border","noBorder","role","id","header","aria-expanded","booleanString","aria-controls","disabled","aria-disabled","toBoolAttrIfDefined","onClick","e","stopPropagation","toggle","finally","title","hasSlot","icon","name","annotation","annot","suffix","arrow","content","aria-hidden","hidden","aria-labelledby","emmitChange"],"mappings":"+VAAA,MAAMA,EAAsB,+yWCoBfC,EAAgB,MAK5BC,YAAAC,+FAYwD,qHAqBnB,sBAI8B,sBAID,mBAIH,MA5C9DC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,UAAYC,EAAS,oBAC1BL,KAAKM,UAAYD,EAAS,uBAiD3BP,cAAcS,GACb,IAAKA,EAAU,CACdC,EAAY,IAAIC,EAAmBC,wCAKrCZ,mBAAmBS,GAClB,MAAMI,EAAY,CAAC,KAAM,KAAM,KA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AU,CAACE,MAAO9B,EAAmBgD,OACpCzD,KAAKC,EAAEyD,QAAQ,SACfzD,EAAA,OAAA,CAAMsC,MAAO9B,EAAmBkD,MAC/B1D,EAAA,OAAA,CAAM2D,KAAK,UAIb3D,EAAA,OAAA,CAAMsC,MAAO9B,EAAmBmD,MAC/B3D,EAAA,OAAA,CAAMsC,MAAO9B,EAAmBgB,OAAQA,GACvCzB,KAAK6D,YAAc5D,EAAA,OAAA,CAAMsC,MAAO9B,EAAmBqD,OAAQ9D,KAAK6D,aAGjE7D,KAAKC,EAAEyD,QAAQ,WACfzD,EAAA,OAAA,CAAMsC,MAAO9B,EAAmBsD,QAC/B9D,EAAA,OAAA,CAAM2D,KAAK,aAKd3D,EAAA,WAAA,CAAUsC,MAAO9B,EAAmBuD,MAAOJ,KAAK,kBAEjD3D,EAAA,MAAA,CACCsC,MAAO9B,EAAmBwD,QAC1BrB,GAAItC,EAAS4D,cACAnB,GAAe5B,GAC5BgD,QAAShD,EAAeiD,kBACPhE,GACjBH,EAAA,OAAA,QAUJH,aACCE,KAAKmB,gBAAkB,KACvBnB,KAAKqE,cAONvE,cACCE,KAAKmB,gBAAkB,MACvBnB,KAAKqE,cAONvE,eACCE,KAAKmB,iBAAmBnB,KAAKmB,gBAC7BnB,KAAKqE,cAONvE,qBACC,OAAOE,KAAKmB","sourcesContent":["/*\n * Accordion - Item\n */\n\n$class: \".gov-accordion-item\";\n\n#{$class} {\n\t@include base();\n\t&__header {\n\t\t@include button-core();\n\t\t@include focus-outline();\n\t\tposition: relative;\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\talign-items: center;\n\t\twidth: 100%;\n\t\tborder-radius: 0;\n\t\ttext-align: left;\n\t\ttext-transform: none;\n\t\ttransition: background-color $t ease-in-out;\n\t\t&::before {\n\t\t\t@include pseudo();\n\t\t\tright: 0;\n\t\t\tbottom: -1px;\n\t\t\tleft: 0;\n\t\t\theight: 1px;\n\t\t}\n\n\t\t// STATES\n\t\t&:focus-visible {\n\t\t\t&::before {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t\t@include parameter(\"aria-expanded\") {\n\t\t\t#{$class} {\n\t\t\t\t&__arrow {\n\t\t\t\t\ttransform: scale(-1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t&__arrow {\n\t\tflex: 0 0 auto;\n\t\talign-self: center;\n\t}\n\t&__icon {\n\t\tdisplay: inline-flex;\n\t\tvertical-align: middle;\n\t\tflex: 0 0 auto;\n\t}\n\t&__suffix {\n\t\tdisplay: inline-flex;\n\t\tvertical-align: middle;\n\t\tflex: 0 0 auto;\n\t\talign-self: start;\n\t\tmargin-left: auto;\n\t\tline-height: initial;\n\t}\n\t&__title {\n\t\t@include general;\n\t\tdisplay: flex;\n\t\tflex: 1 1 auto;\n\t\talign-items: flex-start;\n\t}\n\t&__name {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n\t&__annot {\n\t\tcolor: color(\"secondary\");\n\t}\n\t&__content {\n\t\t@include reset-last-margin();\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $accordion-sizes {\n\t\t&[size=\"#{$size}\"],\n\t\t& #{$class}[size=\"#{$size}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__header {\n\t\t\t\t\tgap: get(\"headline-gap\", $definitions);\n\t\t\t\t\tmin-height: get(\"min-height\", $definitions);\n\t\t\t\t\tpadding: get(\"padding-y\", $definitions) get(\"padding-x\", $definitions);\n\t\t\t\t}\n\t\t\t\t&__arrow {\n\t\t\t\t\twidth: get(\"icon-size\", $definitions);\n\t\t\t\t\theight: get(\"icon-size\", $definitions);\n\t\t\t\t}\n\t\t\t\t&__icon {\n\t\t\t\t\twidth: calc(get-font-size(get(\"font\", $definitions)) * 1.2);\n\t\t\t\t\theight: calc(get-font-size(get(\"font\", $definitions)) * 1.2);\n\t\t\t\t\ttransform: translateY(get(\"icon-position\", $definitions));\n\t\t\t\t}\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(get(\"font\", $definitions));\n\t\t\t\t\tgap: get(\"headline-gap\", $definitions);\n\t\t\t\t}\n\t\t\t\t&__annot {\n\t\t\t\t\t@include typography(get(\"font-annot\", $definitions));\n\t\t\t\t}\n\t\t\t\t&__content {\n\t\t\t\t\tpadding: get(\"padding-inner\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@each $variant, $definitions in $accordion-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__header {\n\t\t\t\t\tbackground-color: get(\"background\", $definitions);\n\t\t\t\t\tcolor: get(\"color\", $definitions);\n\t\t\t\t\t&::before {\n\t\t\t\t\t\tbackground-color: get(\"separator\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t\t@include hover() {\n\t\t\t\t\t\tbackground-color: get(\"background-hover\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// STATES\n\t\t\t@include parameter(\"disabled\") {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__header {\n\t\t\t\t\t\tcolor: get(\"disabled-color\", $definitions);\n\t\t\t\t\t\t@include hover() {\n\t\t\t\t\t\t\tbackground: transparent;\n\t\t\t\t\t\t\tcursor: not-allowed;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($until: md) {\n\t\t&__title {\n\t\t\tflex-wrap: wrap;\n\t\t}\n\t\t&__label {\n\t\t\tflex: 0 0 auto;\n\t\t}\n\t}\n}\n","import { Component, Element, h, Prop, State, Watch, Host, Method, Event, EventEmitter } from \"@stencil/core\"\nimport { govErrorLog } from \"../../helpers/Log/gov.log\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport {\n\tAccordionSizeType,\n\tAccordionSizes,\n\tAccordionItemClass,\n\tAccordionVariantType,\n\tAccordionVariants, AccordionClass,\n} from \"./constants\"\nimport { createID } from \"../../utils/string.utils\"\nimport { booleanString, toBoolAttrIfDefined } from \"../../helpers/Dom/template\"\nimport { AccordionItemEvent } from \"./gov-accordion.types\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\n\n@Component({\n\ttag: \"gov-accordion-item\",\n\tstyleUrl: \"gov-accordion-item.scss\",\n})\nexport class GovAccordionItem {\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID(\"GovAccordionItem\")\n\t\tthis.contentId = createID(\"GovAccordionContent\")\n\t}\n\n\t@Element() readonly host: HTMLGovAccordionItemElement\n\t@State() isExpandedState: boolean\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop({mutable: true}) variant?: AccordionVariantType = \"primary\"\n\t/**\n\t * Custom accordion item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Accordion’s size.\n\t */\n\t@Prop({mutable: true}) size?: AccordionSizeType\n\t/**\n\t * Item name of the accordion\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Item annotation of the accordion\n\t */\n\t@Prop() readonly annotation: string\n\t/**\n\t * Makes the button component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Defines whether the accordion is open or closed by default\n\t */\n\t@Prop({ attribute: \"is-expanded\" }) readonly isExpanded: boolean = false\n\t/**\n\t * Used to change the HTML tag in the accordion trigger for correct semantic structure\n\t */\n\t@Prop({ attribute: \"trigger-tag\" }) readonly triggerTag: string = \"h3\"\n\t/**\n\t * To remove the main underline of an item\n\t */\n\t@Prop({ attribute: \"no-border\" }) readonly noBorder: boolean = false\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<AccordionItemEvent>\n\n\t@Watch(\"label\")\n\tvalidateLabel(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${AccordionItemClass.root}]: Parameter label is required.`)\n\t\t}\n\t}\n\n\t@Watch(\"triggerTag\")\n\tvalidateTriggerTag(newValue: string): void {\n\t\tconst validTags = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"span\"]\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${AccordionItemClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(AccordionSizes, newValue, AccordionItemClass.root)\n\t}\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(AccordionVariants, newValue, AccordionItemClass.root)\n\t}\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({\n\t\t\topen: this.isExpandedState,\n\t\t\tcomponent: AccordionItemClass.root,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.isExpandedState = this.isExpanded\n\t\tthis.getPropsFromParents()\n\n\t\tthis.validateLabel(this.label)\n\t\tthis.validateTriggerTag(this.triggerTag)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateVariant(this.variant)\n\n\t}\n\n\tgetPropsFromParents() {\n\t\tconst accordion = this.h.getParent(AccordionClass.root)\n\t\tif(accordion) {\n\t\t\tthis.size = accordion.getAttribute('size') as AccordionSizeType\n\t\t\tthis.variant = accordion.getAttribute('variant') as AccordionVariantType\n\t\t}\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst contentId = this.contentId\n\t\tconst { isExpandedState, label } = this\n\t\tconst TriggerTag = this.triggerTag\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(AccordionItemClass.root)} no-border={this.noBorder} size={this.size} variant={this.variant} role=\"listitem\">\n\t\t\t\t<button\n\t\t\t\t\tid={triggerId}\n\t\t\t\t\tclass={AccordionItemClass.header}\n\t\t\t\t\taria-expanded={booleanString(isExpandedState)}\n\t\t\t\t\taria-controls={contentId}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\tonClick={(e: Event) => {\n\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\tthis.toggle().finally()\n\t\t\t\t\t}}>\n\t\t\t\t\t<TriggerTag class={AccordionItemClass.title}>\n\t\t\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t\t\t<span class={AccordionItemClass.icon}>\n\t\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<span class={AccordionItemClass.name}>\n\t\t\t\t\t\t\t<span class={AccordionItemClass.label}>{label}</span>\n\t\t\t\t\t\t\t{this.annotation && <span class={AccordionItemClass.annot}>{this.annotation}</span>}\n\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t{this.h.hasSlot(\"suffix\") && (\n\t\t\t\t\t\t\t<span class={AccordionItemClass.suffix}>\n\t\t\t\t\t\t\t\t<slot name=\"suffix\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</TriggerTag>\n\n\t\t\t\t\t<gov-icon class={AccordionItemClass.arrow} name=\"chevron-down\"></gov-icon>\n\t\t\t\t</button>\n\t\t\t\t<div\n\t\t\t\t\tclass={AccordionItemClass.content}\n\t\t\t\t\tid={contentId}\n\t\t\t\t\taria-hidden={booleanString(!isExpandedState)}\n\t\t\t\t\thidden={!isExpandedState}\n\t\t\t\t\taria-labelledby={triggerId}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Opening the accordion\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tthis.isExpandedState = true\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Closing the accordion\n\t */\n\t@Method()\n\tasync close(): Promise<void> {\n\t\tthis.isExpandedState = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Accordion switch\n\t */\n\t@Method()\n\tasync toggle(): Promise<void> {\n\t\tthis.isExpandedState = !this.isExpandedState\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync currentState(): Promise<boolean> {\n\t\treturn this.isExpandedState\n\t}\n}\n"]}