@gov-design-system-ce/components 0.0.19 → 0.0.21

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/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/gov-alert.cjs.entry.js +39 -7
  3. package/dist/cjs/gov-alert.cjs.entry.js.map +1 -1
  4. package/dist/cjs/gov-app.cjs.entry.js +8 -1
  5. package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
  6. package/dist/cjs/gov-icon.cjs.entry.js +1 -1
  7. package/dist/cjs/gov-modal.cjs.entry.js +9 -11
  8. package/dist/cjs/gov-modal.cjs.entry.js.map +1 -1
  9. package/dist/cjs/gov-prompt.cjs.entry.js +9 -11
  10. package/dist/cjs/gov-prompt.cjs.entry.js.map +1 -1
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/collection/components/gov-alert/constants.js +1 -0
  13. package/dist/collection/components/gov-alert/constants.js.map +1 -1
  14. package/dist/collection/components/gov-alert/gov-alert.css +13 -0
  15. package/dist/collection/components/gov-alert/gov-alert.js +107 -16
  16. package/dist/collection/components/gov-alert/gov-alert.js.map +1 -1
  17. package/dist/collection/components/gov-alert/gov-alert.types.js +2 -0
  18. package/dist/collection/components/gov-alert/gov-alert.types.js.map +1 -0
  19. package/dist/collection/components/gov-modal/gov-modal.js +13 -20
  20. package/dist/collection/components/gov-modal/gov-modal.js.map +1 -1
  21. package/dist/collection/components/gov-promp/gov-prompt.js +13 -20
  22. package/dist/collection/components/gov-promp/gov-prompt.js.map +1 -1
  23. package/dist/collection/pages/Alert.js +8 -1
  24. package/dist/collection/pages/Alert.js.map +1 -1
  25. package/dist/components/gov-alert.js +45 -10
  26. package/dist/components/gov-alert.js.map +1 -1
  27. package/dist/components/gov-app.js +8 -1
  28. package/dist/components/gov-app.js.map +1 -1
  29. package/dist/components/gov-attachments2.js +1 -1
  30. package/dist/components/gov-button2.js +1 -1
  31. package/dist/components/gov-form-checkbox.js +1 -1
  32. package/dist/components/gov-form-file.js +1 -1
  33. package/dist/components/gov-form-input2.js +1 -1
  34. package/dist/components/gov-form-multi-select.js +1 -1
  35. package/dist/components/gov-form-radio.js +1 -1
  36. package/dist/components/gov-form-select2.js +1 -1
  37. package/dist/components/gov-form-switch.js +1 -1
  38. package/dist/components/gov-icon2.js +1 -1
  39. package/dist/components/gov-modal.js +12 -15
  40. package/dist/components/gov-modal.js.map +1 -1
  41. package/dist/components/gov-pagination.js +1 -1
  42. package/dist/components/gov-prompt.js +12 -15
  43. package/dist/components/gov-prompt.js.map +1 -1
  44. package/dist/components/gov-tabs.js +1 -1
  45. package/dist/components/wcag.js +1 -1
  46. package/dist/core/core.esm.js +1 -1
  47. package/dist/core/core.esm.js.map +1 -1
  48. package/dist/core/critial.css +484 -0
  49. package/dist/core/{p-26260897.entry.js → p-034c40ab.entry.js} +2 -2
  50. package/dist/core/p-0800095f.entry.js +2 -0
  51. package/dist/core/p-0800095f.entry.js.map +1 -0
  52. package/dist/core/{p-f0a4439e.entry.js → p-207ba616.entry.js} +2 -2
  53. package/dist/core/{p-429850b9.entry.js → p-3699c1b3.entry.js} +2 -2
  54. package/dist/core/{p-d79d0f7a.entry.js → p-3cd5b6cb.entry.js} +2 -2
  55. package/dist/core/{p-85404e69.entry.js → p-3da88ddb.entry.js} +2 -2
  56. package/dist/core/{p-aba39622.entry.js → p-3e1a1bd4.entry.js} +2 -2
  57. package/dist/core/{p-5a1c8d48.entry.js → p-42db4603.entry.js} +2 -2
  58. package/dist/core/{p-07a2c755.entry.js → p-4ce15026.entry.js} +2 -2
  59. package/dist/core/{p-540e79c4.entry.js → p-54b17f4d.entry.js} +2 -2
  60. package/dist/core/{p-ef393836.entry.js → p-5e865538.entry.js} +2 -2
  61. package/dist/core/{p-364b4792.js → p-670b4f93.js} +2 -2
  62. package/dist/core/{p-f73d482b.entry.js → p-742e37e4.entry.js} +2 -2
  63. package/dist/core/p-742e37e4.entry.js.map +1 -0
  64. package/dist/core/p-75a4c838.entry.js +2 -0
  65. package/dist/core/p-75a4c838.entry.js.map +1 -0
  66. package/dist/core/p-7b890c55.entry.js +2 -0
  67. package/dist/core/{p-8bb1ad43.entry.js.map → p-7b890c55.entry.js.map} +1 -1
  68. package/dist/core/{p-a929f64e.entry.js → p-7c55677b.entry.js} +2 -2
  69. package/dist/core/{p-e409d788.entry.js → p-8925ef42.entry.js} +2 -2
  70. package/dist/core/{p-3ad9cc54.entry.js → p-99f198b9.entry.js} +2 -2
  71. package/dist/core/{p-d8ef1d7a.entry.js → p-a8b628ed.entry.js} +2 -2
  72. package/dist/core/{p-724921e7.entry.js → p-a8ef7292.entry.js} +2 -2
  73. package/dist/core/{p-24877419.entry.js → p-a9c57f72.entry.js} +2 -2
  74. package/dist/core/{p-52f2f67c.entry.js → p-acfd00a2.entry.js} +2 -2
  75. package/dist/core/{p-299f3d3c.entry.js → p-ccb44728.entry.js} +2 -2
  76. package/dist/core/{p-5e5e925d.entry.js → p-f555fce1.entry.js} +2 -2
  77. package/dist/core/p-f555fce1.entry.js.map +1 -0
  78. package/dist/core/{p-f6e2f2f0.entry.js → p-f7275b59.entry.js} +2 -2
  79. package/dist/custom-elements/index.js +1 -1
  80. package/dist/custom-elements/index.js.map +1 -1
  81. package/dist/esm/core.js +1 -1
  82. package/dist/esm/gov-accordion.entry.js +1 -1
  83. package/dist/esm/gov-alert.entry.js +41 -9
  84. package/dist/esm/gov-alert.entry.js.map +1 -1
  85. package/dist/esm/gov-app.entry.js +8 -1
  86. package/dist/esm/gov-app.entry.js.map +1 -1
  87. package/dist/esm/gov-attachments_3.entry.js +1 -1
  88. package/dist/esm/gov-backdrop.entry.js +1 -1
  89. package/dist/esm/gov-breadcrumbs.entry.js +1 -1
  90. package/dist/esm/gov-button.entry.js +1 -1
  91. package/dist/esm/gov-card.entry.js +1 -1
  92. package/dist/esm/gov-form-checkbox.entry.js +1 -1
  93. package/dist/esm/gov-form-file.entry.js +1 -1
  94. package/dist/esm/gov-form-input.entry.js +1 -1
  95. package/dist/esm/gov-form-multi-select.entry.js +1 -1
  96. package/dist/esm/gov-form-radio.entry.js +1 -1
  97. package/dist/esm/gov-form-select.entry.js +1 -1
  98. package/dist/esm/gov-form-switch.entry.js +1 -1
  99. package/dist/esm/gov-icon.entry.js +1 -1
  100. package/dist/esm/gov-modal.entry.js +10 -12
  101. package/dist/esm/gov-modal.entry.js.map +1 -1
  102. package/dist/esm/gov-nav.entry.js +1 -1
  103. package/dist/esm/gov-pagination.entry.js +1 -1
  104. package/dist/esm/gov-prompt.entry.js +10 -12
  105. package/dist/esm/gov-prompt.entry.js.map +1 -1
  106. package/dist/esm/gov-side-nav.entry.js +1 -1
  107. package/dist/esm/gov-skeleton.entry.js +1 -1
  108. package/dist/esm/gov-tabs.entry.js +1 -1
  109. package/dist/esm/gov-wizzard.entry.js +1 -1
  110. package/dist/esm/loader.js +1 -1
  111. package/dist/esm/{wcag-3792d4bb.js → wcag-d588d144.js} +2 -2
  112. package/dist/esm/{wcag-3792d4bb.js.map → wcag-d588d144.js.map} +1 -1
  113. package/dist/hydrate/index.js +72 -39
  114. package/dist/types/components/gov-alert/constants.d.ts +1 -0
  115. package/dist/types/components/gov-alert/gov-alert.d.ts +21 -4
  116. package/dist/types/components/gov-alert/gov-alert.types.d.ts +4 -0
  117. package/dist/types/components/gov-modal/gov-modal.d.ts +3 -4
  118. package/dist/types/components/gov-promp/gov-prompt.d.ts +3 -4
  119. package/dist/types/components.d.ts +34 -13
  120. package/package.json +1 -1
  121. package/dist/core/p-3f92f3bf.entry.js +0 -2
  122. package/dist/core/p-3f92f3bf.entry.js.map +0 -1
  123. package/dist/core/p-5e5e925d.entry.js.map +0 -1
  124. package/dist/core/p-8bb1ad43.entry.js +0 -2
  125. package/dist/core/p-b2d1dd2a.entry.js +0 -2
  126. package/dist/core/p-b2d1dd2a.entry.js.map +0 -1
  127. package/dist/core/p-f73d482b.entry.js.map +0 -1
  128. /package/dist/core/{p-26260897.entry.js.map → p-034c40ab.entry.js.map} +0 -0
  129. /package/dist/core/{p-f0a4439e.entry.js.map → p-207ba616.entry.js.map} +0 -0
  130. /package/dist/core/{p-429850b9.entry.js.map → p-3699c1b3.entry.js.map} +0 -0
  131. /package/dist/core/{p-d79d0f7a.entry.js.map → p-3cd5b6cb.entry.js.map} +0 -0
  132. /package/dist/core/{p-85404e69.entry.js.map → p-3da88ddb.entry.js.map} +0 -0
  133. /package/dist/core/{p-aba39622.entry.js.map → p-3e1a1bd4.entry.js.map} +0 -0
  134. /package/dist/core/{p-5a1c8d48.entry.js.map → p-42db4603.entry.js.map} +0 -0
  135. /package/dist/core/{p-07a2c755.entry.js.map → p-4ce15026.entry.js.map} +0 -0
  136. /package/dist/core/{p-540e79c4.entry.js.map → p-54b17f4d.entry.js.map} +0 -0
  137. /package/dist/core/{p-ef393836.entry.js.map → p-5e865538.entry.js.map} +0 -0
  138. /package/dist/core/{p-364b4792.js.map → p-670b4f93.js.map} +0 -0
  139. /package/dist/core/{p-a929f64e.entry.js.map → p-7c55677b.entry.js.map} +0 -0
  140. /package/dist/core/{p-e409d788.entry.js.map → p-8925ef42.entry.js.map} +0 -0
  141. /package/dist/core/{p-3ad9cc54.entry.js.map → p-99f198b9.entry.js.map} +0 -0
  142. /package/dist/core/{p-d8ef1d7a.entry.js.map → p-a8b628ed.entry.js.map} +0 -0
  143. /package/dist/core/{p-724921e7.entry.js.map → p-a8ef7292.entry.js.map} +0 -0
  144. /package/dist/core/{p-24877419.entry.js.map → p-a9c57f72.entry.js.map} +0 -0
  145. /package/dist/core/{p-52f2f67c.entry.js.map → p-acfd00a2.entry.js.map} +0 -0
  146. /package/dist/core/{p-299f3d3c.entry.js.map → p-ccb44728.entry.js.map} +0 -0
  147. /package/dist/core/{p-f6e2f2f0.entry.js.map → p-f7275b59.entry.js.map} +0 -0
@@ -0,0 +1,484 @@
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-tooltip-content,
410
+ gov-wizzard,
411
+ gov-attachments-item,
412
+ gov-form-autocomplete,
413
+ gov-attachments,
414
+ gov-form-message,
415
+ gov-form-input,
416
+ gov-form-select,
417
+ gov-badge,
418
+ gov-backdrop,
419
+ gov-icon,
420
+ gov-button {
421
+ visibility: hidden;
422
+ }
423
+ gov-form-file.hydrated,
424
+ gov-form-multi-select.hydrated,
425
+ gov-modal.hydrated,
426
+ gov-pagination.hydrated,
427
+ gov-prompt.hydrated,
428
+ gov-tabs.hydrated,
429
+ gov-alert.hydrated,
430
+ gov-loading.hydrated,
431
+ gov-side-nav-item.hydrated,
432
+ gov-toast.hydrated,
433
+ gov-accordion-item.hydrated,
434
+ gov-card.hydrated,
435
+ gov-form-checkbox.hydrated,
436
+ gov-tile.hydrated,
437
+ gov-wizzard-item.hydrated,
438
+ gov-accordion.hydrated,
439
+ gov-app.hydrated,
440
+ gov-breadcrumbs.hydrated,
441
+ gov-container.hydrated,
442
+ gov-cookiebar.hydrated,
443
+ gov-empty.hydrated,
444
+ gov-error-code.hydrated,
445
+ gov-form-control.hydrated,
446
+ gov-form-group.hydrated,
447
+ gov-form-label.hydrated,
448
+ gov-form-password-power.hydrated,
449
+ gov-form-radio.hydrated,
450
+ gov-form-search.hydrated,
451
+ gov-form-switch.hydrated,
452
+ gov-grid.hydrated,
453
+ gov-grid-item.hydrated,
454
+ gov-layout.hydrated,
455
+ gov-layout-column.hydrated,
456
+ gov-message.hydrated,
457
+ gov-nav.hydrated,
458
+ gov-nav-item.hydrated,
459
+ gov-side-nav.hydrated,
460
+ gov-skeleton.hydrated,
461
+ gov-spacer.hydrated,
462
+ gov-statsbar.hydrated,
463
+ gov-statsbar-item.hydrated,
464
+ gov-stepper.hydrated,
465
+ gov-stepper-item.hydrated,
466
+ gov-tabs-item.hydrated,
467
+ gov-tiles.hydrated,
468
+ gov-tooltip.hydrated,
469
+ gov-tooltip-content.hydrated,
470
+ gov-wizzard.hydrated,
471
+ gov-attachments-item.hydrated,
472
+ gov-form-autocomplete.hydrated,
473
+ gov-attachments.hydrated,
474
+ gov-form-message.hydrated,
475
+ gov-form-input.hydrated,
476
+ gov-form-select.hydrated,
477
+ gov-badge.hydrated,
478
+ gov-backdrop.hydrated,
479
+ gov-icon.hydrated,
480
+ gov-button.hydrated {
481
+ visibility: inherit;
482
+ }
483
+
484
+ /*# sourceMappingURL=critial.css.map */
@@ -1,2 +1,2 @@
1
- import{r as e,c as o,h as i,H as l,g as t}from"./p-4af5e4f4.js";import{c as a}from"./p-24636c53.js";import{g as r,t as s}from"./p-3f37ddb6.js";import{a as f,b as n}from"./p-364b4792.js";import{c as m}from"./p-c20102ff.js";import{d as g}from"./p-03990da5.js";import{g as d}from"./p-9cd80b05.js";import"./p-561fa17b.js";import"./p-55500e5a.js";import"./p-ff7365ae.js";import"./p-ef79904e.js";import"./p-6278531b.js";import"./p-f687452c.js";import"./p-3464136c.js";const v={root:"gov-form-file",area:"gov-form-file__area",label:"gov-form-file__label",input:"gov-form-file__input",list:"gov-form-file__list",item:"gov-form-file__item",attachments:"gov-form-file__attachments"};function h(e){const o=["bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let i=0,l=parseInt(e,10)||0;while(l>=1024&&++i){l=l/1024}return l.toFixed(l<10&&i>0?1:0)+" "+o[i]}function _(e,o){if(typeof o==="string"&&o.length){return o.replace(/\s/g,"").split(",").filter((o=>new RegExp(o.replace("*",".*")).test(e.type))).length>0}else{return true}}function b(e,o){const i=Math.round(e.size/1024);return i<=o}const c='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-form-file{position:relative;display:block;width:100%}.gov-form-file__label .gov-form-label__label>*:last-child{margin-bottom:0}.gov-form-file__input{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:0.0001;cursor:pointer}.gov-form-file__attachments{margin-top:1rem 0rem 0rem}.gov-form-file__item{display:flex;gap:1rem;align-items:center}.gov-form-file[disabled=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[disabled=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[disabled="1"] .gov-form-file__label .gov-form-label__label{pointer-events:none}.gov-form-file[disabled=""] .gov-form-file__label .gov-form-label__label *,.gov-form-file[disabled=true i] .gov-form-file__label .gov-form-label__label *,.gov-form-file[disabled="1"] .gov-form-file__label .gov-form-label__label *{color:var(--gov-form-file-disabled-color, var(--gov-color-secondary-600))}.gov-form-file[expanded=""] .gov-form-file__area,.gov-form-file[expanded=true i] .gov-form-file__area,.gov-form-file[expanded="1"] .gov-form-file__area{position:relative;width:100%;padding:2rem 1.375rem 1.375rem;border:var(--gov-form-file-border, 0.0625rem dashed var(--gov-color-secondary-500));text-align:center;transition:background-color 150ms ease-in-out;will-change:background-color}.gov-form-file[expanded=""] .gov-form-file__area.highlight,.gov-form-file[expanded=true i] .gov-form-file__area.highlight,.gov-form-file[expanded="1"] .gov-form-file__area.highlight{background-color:var(--gov-color-primary-200)}.gov-form-file[expanded=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"] .gov-form-file__label .gov-form-label__label{width:100%;padding:1.375rem;border:var(--gov-form-file-border, 0.0625rem dashed var(--gov-color-secondary-500));text-align:center}.gov-form-file[expanded=""] .gov-form-file__attachments,.gov-form-file[expanded=true i] .gov-form-file__attachments,.gov-form-file[expanded="1"] .gov-form-file__attachments{margin:1.5rem 0rem 0rem}.gov-form-file[expanded=""][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=""][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=""][invalid="1"] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid="1"] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid="1"] .gov-form-file__label .gov-form-label__label{border-color:var(--gov-form-state-color-error, var(--gov-color-error))}@media (min-width: 30em){.gov-form-file[expanded=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"] .gov-form-file__label .gov-form-label__label{padding:2rem}}';const p=class{constructor(i){e(this,i);this.govFocus=o(this,"gov-focus",7);this.govBlur=o(this,"gov-blur",7);this.govFiles=o(this,"gov-files",7);this.govAddFile=o(this,"gov-add-file",7);this.govRemoveFile=o(this,"gov-remove-file",7);this.expanded=false;this.required=false;this.disabled=undefined;this.displayAttachments=true;this.name=undefined;this.accept=undefined;this.maxFileSize=-1;this.identifier=undefined;this.invalid=undefined;this.errorSize="Soubor je větší než povolená velikost {FILE_SIZE}";this.errorAccept="Soubor tohoto typu není povolen";this.attachmentsLabel="Přílohy";this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagRemoveLabel="Odebrat soubor {FILE_NAME}";this.wcagAttachmentsLabel="Přílohy";this.files=[];this.fileId=a("GovInputFile");this.h=r(this.host);this.f=d(this.h)}registerListeners(){function e(){this.areaRef.classList.add("highlight")}function o(){this.areaRef.classList.remove("highlight")}this.inputRef.addEventListener("change",(e=>{e.preventDefault();e.stopPropagation();const o=e.target.files;this.validateFiles(o)}),false);if(this.expanded){const i=["dragover","dragleave"];const l=["dragenter","dragover","mouseenter"];const t=["dragleave","drop","mouseleave"];i.map((e=>this.inputRef.addEventListener(e,this.preventDefaults.bind(this),false)));l.map((o=>this.inputRef.addEventListener(o,e.bind(this),false)));t.forEach((e=>this.inputRef.addEventListener(e,o.bind(this),false)));this.areaRef.addEventListener("drop",this.handleDrop.bind(this),false)}}preventDefaults(e){e.preventDefault();e.stopPropagation()}handleDrop(e){const o=e.dataTransfer;this.validateFiles(o.files)}validateFiles(e){Array.from(e).map((e=>{const o=this.files.find((o=>o.file.name===e.name&&o.file.size===e.size))||null;if(o===null){const o=typeof this.maxFileSize==="number"&&this.maxFileSize>0?b(e,this.maxFileSize):true;const i=_(e,this.accept);const l={id:a("GovFormFile"),file:e,acceptValid:i,sizeValid:o};this.files=[...this.files,l];this.govAddFile.emit({component:v.root,file:l})}}));this.govFiles.emit({component:v.root,files:this.files})}componentWillLoad(){this.f.passAttrToControl("type","File");this.f.passAttrToLabel("required",String(this.required))}async componentDidRender(){if(m()){await g(500);await this.validateWcag()}this.registerListeners()}render(){return i(l,{class:this.h.classes([v.root]),invalid:s(this.invalid),expanded:s(this.expanded)},i("div",{class:v.area,ref:e=>this.areaRef=e},i("slot",null),i("input",{class:v.input,ref:e=>this.inputRef=e,id:this.identifier||this.fileId,type:"file",name:this.name,accept:this.accept,onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled,"aria-required":s(this.required),"aria-invalid":s(this.invalid),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-disabled":s(this.disabled)})),this.h.hasSlot("attachments")?i("div",{class:v.attachments},i("slot",{name:"attachments"})):null,this.files.length&&this.displayAttachments?i("div",{class:v.attachments},i("gov-attachments",{label:this.wcagAttachmentsLabel,"wcag-label":this.wcagAttachmentsLabel},this.files.map((e=>i("gov-attachments-item",{"wcag-remove-labelled-by":e.id,"on-gov-remove":()=>this.onRemoveFileHandler(e)},i("span",{class:"sr-only",id:e.id},this.wcagRemoveLabel.replace("{FILE_NAME}",e.file.name)),e.file.name,e.acceptValid===false?i("gov-form-message",{slot:"message",variant:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill"}),e.acceptValid===false?this.errorAccept:null):null,e.sizeValid===false?i("gov-form-message",{slot:"message",variant:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill"}),this.errorSize.replace("{FILE_SIZE}",h(this.maxFileSize*1024))):null,i("span",{slot:"info"},"(",h(e.file.size),")")))))):null)}onRemoveFileHandler(e){const o=this.files.findIndex((o=>o.id===e.id));if(o!==-1){const e=this.files;const i=this.files[o];e.splice(o,1);this.files=[...e];this.govRemoveFile.emit({component:v.root,file:i});this.govFiles.emit({component:v.root,files:e})}}onFocusHandler(e){e.stopPropagation();this.govFocus.emit({component:v.root,originalEvent:e})}onBlurHandler(e){e.stopPropagation();this.govBlur.emit({component:v.root,originalEvent:e})}onChangeHandler(e){e.stopPropagation()}async getRef(){return this.inputRef}async getAreaRef(){return this.areaRef}async validateWcag(){f(this.wcagDescribedBy,"wcag-described-by",v.root);f(this.wcagLabelledBy,"wcag-labelled-by",v.root);n(this.identifier||this.fileId,this.wcagLabelledBy,v.root)}get host(){return t(this)}};p.style=c;export{p as gov_form_file};
2
- //# sourceMappingURL=p-26260897.entry.js.map
1
+ import{r as e,c as o,h as i,H as l,g as t}from"./p-4af5e4f4.js";import{c as a}from"./p-24636c53.js";import{g as r,t as s}from"./p-3f37ddb6.js";import{b as f,c as n}from"./p-670b4f93.js";import{c as m}from"./p-c20102ff.js";import{d as g}from"./p-03990da5.js";import{g as d}from"./p-9cd80b05.js";import"./p-561fa17b.js";import"./p-55500e5a.js";import"./p-ff7365ae.js";import"./p-ef79904e.js";import"./p-6278531b.js";import"./p-f687452c.js";import"./p-3464136c.js";const v={root:"gov-form-file",area:"gov-form-file__area",label:"gov-form-file__label",input:"gov-form-file__input",list:"gov-form-file__list",item:"gov-form-file__item",attachments:"gov-form-file__attachments"};function h(e){const o=["bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let i=0,l=parseInt(e,10)||0;while(l>=1024&&++i){l=l/1024}return l.toFixed(l<10&&i>0?1:0)+" "+o[i]}function _(e,o){if(typeof o==="string"&&o.length){return o.replace(/\s/g,"").split(",").filter((o=>new RegExp(o.replace("*",".*")).test(e.type))).length>0}else{return true}}function c(e,o){const i=Math.round(e.size/1024);return i<=o}const b='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-form-file{position:relative;display:block;width:100%}.gov-form-file__label .gov-form-label__label>*:last-child{margin-bottom:0}.gov-form-file__input{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:0.0001;cursor:pointer}.gov-form-file__attachments{margin-top:1rem 0rem 0rem}.gov-form-file__item{display:flex;gap:1rem;align-items:center}.gov-form-file[disabled=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[disabled=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[disabled="1"] .gov-form-file__label .gov-form-label__label{pointer-events:none}.gov-form-file[disabled=""] .gov-form-file__label .gov-form-label__label *,.gov-form-file[disabled=true i] .gov-form-file__label .gov-form-label__label *,.gov-form-file[disabled="1"] .gov-form-file__label .gov-form-label__label *{color:var(--gov-form-file-disabled-color, var(--gov-color-secondary-600))}.gov-form-file[expanded=""] .gov-form-file__area,.gov-form-file[expanded=true i] .gov-form-file__area,.gov-form-file[expanded="1"] .gov-form-file__area{position:relative;width:100%;padding:2rem 1.375rem 1.375rem;border:var(--gov-form-file-border, 0.0625rem dashed var(--gov-color-secondary-500));text-align:center;transition:background-color 150ms ease-in-out;will-change:background-color}.gov-form-file[expanded=""] .gov-form-file__area.highlight,.gov-form-file[expanded=true i] .gov-form-file__area.highlight,.gov-form-file[expanded="1"] .gov-form-file__area.highlight{background-color:var(--gov-color-primary-200)}.gov-form-file[expanded=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"] .gov-form-file__label .gov-form-label__label{width:100%;padding:1.375rem;border:var(--gov-form-file-border, 0.0625rem dashed var(--gov-color-secondary-500));text-align:center}.gov-form-file[expanded=""] .gov-form-file__attachments,.gov-form-file[expanded=true i] .gov-form-file__attachments,.gov-form-file[expanded="1"] .gov-form-file__attachments{margin:1.5rem 0rem 0rem}.gov-form-file[expanded=""][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=""][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=""][invalid="1"] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid="1"] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid="1"] .gov-form-file__label .gov-form-label__label{border-color:var(--gov-form-state-color-error, var(--gov-color-error))}@media (min-width: 30em){.gov-form-file[expanded=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"] .gov-form-file__label .gov-form-label__label{padding:2rem}}';const p=class{constructor(i){e(this,i);this.govFocus=o(this,"gov-focus",7);this.govBlur=o(this,"gov-blur",7);this.govFiles=o(this,"gov-files",7);this.govAddFile=o(this,"gov-add-file",7);this.govRemoveFile=o(this,"gov-remove-file",7);this.expanded=false;this.required=false;this.disabled=undefined;this.displayAttachments=true;this.name=undefined;this.accept=undefined;this.maxFileSize=-1;this.identifier=undefined;this.invalid=undefined;this.errorSize="Soubor je větší než povolená velikost {FILE_SIZE}";this.errorAccept="Soubor tohoto typu není povolen";this.attachmentsLabel="Přílohy";this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagRemoveLabel="Odebrat soubor {FILE_NAME}";this.wcagAttachmentsLabel="Přílohy";this.files=[];this.fileId=a("GovInputFile");this.h=r(this.host);this.f=d(this.h)}registerListeners(){function e(){this.areaRef.classList.add("highlight")}function o(){this.areaRef.classList.remove("highlight")}this.inputRef.addEventListener("change",(e=>{e.preventDefault();e.stopPropagation();const o=e.target.files;this.validateFiles(o)}),false);if(this.expanded){const i=["dragover","dragleave"];const l=["dragenter","dragover","mouseenter"];const t=["dragleave","drop","mouseleave"];i.map((e=>this.inputRef.addEventListener(e,this.preventDefaults.bind(this),false)));l.map((o=>this.inputRef.addEventListener(o,e.bind(this),false)));t.forEach((e=>this.inputRef.addEventListener(e,o.bind(this),false)));this.areaRef.addEventListener("drop",this.handleDrop.bind(this),false)}}preventDefaults(e){e.preventDefault();e.stopPropagation()}handleDrop(e){const o=e.dataTransfer;this.validateFiles(o.files)}validateFiles(e){Array.from(e).map((e=>{const o=this.files.find((o=>o.file.name===e.name&&o.file.size===e.size))||null;if(o===null){const o=typeof this.maxFileSize==="number"&&this.maxFileSize>0?c(e,this.maxFileSize):true;const i=_(e,this.accept);const l={id:a("GovFormFile"),file:e,acceptValid:i,sizeValid:o};this.files=[...this.files,l];this.govAddFile.emit({component:v.root,file:l})}}));this.govFiles.emit({component:v.root,files:this.files})}componentWillLoad(){this.f.passAttrToControl("type","File");this.f.passAttrToLabel("required",String(this.required))}async componentDidRender(){if(m()){await g(500);await this.validateWcag()}this.registerListeners()}render(){return i(l,{class:this.h.classes([v.root]),invalid:s(this.invalid),expanded:s(this.expanded)},i("div",{class:v.area,ref:e=>this.areaRef=e},i("slot",null),i("input",{class:v.input,ref:e=>this.inputRef=e,id:this.identifier||this.fileId,type:"file",name:this.name,accept:this.accept,onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled,"aria-required":s(this.required),"aria-invalid":s(this.invalid),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-disabled":s(this.disabled)})),this.h.hasSlot("attachments")?i("div",{class:v.attachments},i("slot",{name:"attachments"})):null,this.files.length&&this.displayAttachments?i("div",{class:v.attachments},i("gov-attachments",{label:this.wcagAttachmentsLabel,"wcag-label":this.wcagAttachmentsLabel},this.files.map((e=>i("gov-attachments-item",{"wcag-remove-labelled-by":e.id,"on-gov-remove":()=>this.onRemoveFileHandler(e)},i("span",{class:"sr-only",id:e.id},this.wcagRemoveLabel.replace("{FILE_NAME}",e.file.name)),e.file.name,e.acceptValid===false?i("gov-form-message",{slot:"message",variant:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill"}),e.acceptValid===false?this.errorAccept:null):null,e.sizeValid===false?i("gov-form-message",{slot:"message",variant:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill"}),this.errorSize.replace("{FILE_SIZE}",h(this.maxFileSize*1024))):null,i("span",{slot:"info"},"(",h(e.file.size),")")))))):null)}onRemoveFileHandler(e){const o=this.files.findIndex((o=>o.id===e.id));if(o!==-1){const e=this.files;const i=this.files[o];e.splice(o,1);this.files=[...e];this.govRemoveFile.emit({component:v.root,file:i});this.govFiles.emit({component:v.root,files:e})}}onFocusHandler(e){e.stopPropagation();this.govFocus.emit({component:v.root,originalEvent:e})}onBlurHandler(e){e.stopPropagation();this.govBlur.emit({component:v.root,originalEvent:e})}onChangeHandler(e){e.stopPropagation()}async getRef(){return this.inputRef}async getAreaRef(){return this.areaRef}async validateWcag(){f(this.wcagDescribedBy,"wcag-described-by",v.root);f(this.wcagLabelledBy,"wcag-labelled-by",v.root);n(this.identifier||this.fileId,this.wcagLabelledBy,v.root)}get host(){return t(this)}};p.style=b;export{p as gov_form_file};
2
+ //# sourceMappingURL=p-034c40ab.entry.js.map