@digigov/ui 0.10.2 → 0.12.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.
- package/CHANGELOG.md +32 -1
- package/app/Confirmation/index.d.ts +3 -0
- package/app/Confirmation/index.js +44 -0
- package/app/Footer/index.d.ts +15 -0
- package/app/Footer/index.js +200 -0
- package/app/Header/HeaderLogo.d.ts +1 -1
- package/app/Header/HeaderTitle.d.ts +1 -1
- package/app/Header/__snapshots__/index.spec.tsx.snap +63 -1231
- package/app/Header/index.d.ts +3 -1
- package/app/Header/index.js +40 -12
- package/core/Accordion/__snapshots__/index.spec.tsx.snap +61 -711
- package/core/Blockquote/__snapshots__/index.spec.tsx.snap +9 -9
- package/core/Breadcrumbs/index.d.ts +3 -0
- package/core/Breadcrumbs/index.js +44 -0
- package/core/Button/BackButton.d.ts +1 -1
- package/core/Button/ButtonLink.d.ts +1 -1
- package/core/Button/__snapshots__/index.spec.tsx.snap +13 -0
- package/core/Button/index.d.ts +1 -0
- package/core/Button/index.js +14 -0
- package/core/Card/index.d.ts +4 -0
- package/core/Card/index.js +57 -0
- package/core/Details/__snapshots__/index.spec.tsx.snap +20 -28
- package/core/ErrorSummary/__snapshots__/index.spec.tsx.snap +3 -3
- package/core/Hidden/index.d.ts +1 -0
- package/core/Hidden/index.js +18 -0
- package/core/Link/__snapshots__/index.spec.tsx.snap +0 -3
- package/core/Link/index.d.ts +3 -8
- package/core/Link/index.js +3 -26
- package/core/List/__snapshots__/index.spec.tsx.snap +3 -3
- package/core/NavList/__snapshots__/index.spec.tsx.snap +2 -2
- package/core/NotificationBanner/__snapshots__/index.spec.tsx.snap +417 -29
- package/core/NotificationBanner/index.d.ts +9 -8
- package/core/NotificationBanner/index.js +13 -2
- package/core/NotificationBanner/index.spec.js +9 -0
- package/core/ServiceBadge/index.d.ts +1 -0
- package/core/ServiceBadge/index.js +5 -2
- package/core/SummaryList/__snapshots__/index.spec.tsx.snap +47 -1293
- package/core/Table/index.d.ts +7 -0
- package/core/Table/index.js +96 -0
- package/core/VisuallyHidden/index.d.ts +1 -0
- package/core/VisuallyHidden/index.js +18 -0
- package/core/WarningText/__snapshots__/index.spec.tsx.snap +15 -43
- package/es/app/Confirmation/index.js +3 -0
- package/es/app/Footer/index.js +15 -0
- package/es/app/Header/__snapshots__/index.spec.tsx.snap +63 -1231
- package/es/app/Header/index.js +3 -1
- package/es/core/Accordion/__snapshots__/index.spec.tsx.snap +61 -711
- package/es/core/Blockquote/__snapshots__/index.spec.tsx.snap +9 -9
- package/es/core/Breadcrumbs/index.js +3 -0
- package/es/core/Button/__snapshots__/index.spec.tsx.snap +13 -0
- package/es/core/Button/index.js +2 -1
- package/es/core/Card/index.js +4 -0
- package/es/core/Details/__snapshots__/index.spec.tsx.snap +20 -28
- package/es/core/ErrorSummary/__snapshots__/index.spec.tsx.snap +3 -3
- package/es/core/Hidden/index.js +1 -0
- package/es/core/Link/__snapshots__/index.spec.tsx.snap +0 -3
- package/es/core/Link/index.js +3 -26
- package/es/core/List/__snapshots__/index.spec.tsx.snap +3 -3
- package/es/core/NavList/__snapshots__/index.spec.tsx.snap +2 -2
- package/es/core/NotificationBanner/__snapshots__/index.spec.tsx.snap +417 -29
- package/es/core/NotificationBanner/index.js +7 -3
- package/es/core/NotificationBanner/index.spec.js +11 -2
- package/es/core/ServiceBadge/index.js +4 -2
- package/es/core/SummaryList/__snapshots__/index.spec.tsx.snap +47 -1293
- package/es/core/Table/index.js +7 -0
- package/es/core/VisuallyHidden/index.js +1 -0
- package/es/core/WarningText/__snapshots__/index.spec.tsx.snap +15 -43
- package/es/govgr/Footer/Copyright.js +3 -2
- package/es/govgr/Footer/LicenseCCSA.js +2 -1
- package/es/layouts/Basic/__snapshots__/index.spec.tsx.snap +39 -687
- package/es/layouts/Grid/index.js +1 -0
- package/es/locales/el.js +11 -1
- package/es/locales/en.js +11 -1
- package/esm/app/Confirmation/index.js +3 -0
- package/esm/app/Footer/index.js +15 -0
- package/esm/app/Header/__snapshots__/index.spec.tsx.snap +63 -1231
- package/esm/app/Header/index.js +3 -1
- package/esm/core/Accordion/__snapshots__/index.spec.tsx.snap +61 -711
- package/esm/core/Blockquote/__snapshots__/index.spec.tsx.snap +9 -9
- package/esm/core/Breadcrumbs/index.js +3 -0
- package/esm/core/Button/__snapshots__/index.spec.tsx.snap +13 -0
- package/esm/core/Button/index.js +2 -1
- package/esm/core/Card/index.js +4 -0
- package/esm/core/Details/__snapshots__/index.spec.tsx.snap +20 -28
- package/esm/core/ErrorSummary/__snapshots__/index.spec.tsx.snap +3 -3
- package/esm/core/Hidden/index.js +1 -0
- package/esm/core/Link/__snapshots__/index.spec.tsx.snap +0 -3
- package/esm/core/Link/index.js +3 -26
- package/esm/core/List/__snapshots__/index.spec.tsx.snap +3 -3
- package/esm/core/NavList/__snapshots__/index.spec.tsx.snap +2 -2
- package/esm/core/NotificationBanner/__snapshots__/index.spec.tsx.snap +417 -29
- package/esm/core/NotificationBanner/index.js +7 -3
- package/esm/core/NotificationBanner/index.spec.js +11 -2
- package/esm/core/ServiceBadge/index.js +4 -2
- package/esm/core/SummaryList/__snapshots__/index.spec.tsx.snap +47 -1293
- package/esm/core/Table/index.js +7 -0
- package/esm/core/VisuallyHidden/index.js +1 -0
- package/esm/core/WarningText/__snapshots__/index.spec.tsx.snap +15 -43
- package/esm/govgr/Footer/Copyright.js +3 -2
- package/esm/govgr/Footer/LicenseCCSA.js +2 -1
- package/esm/index.js +1 -1
- package/esm/layouts/Basic/__snapshots__/index.spec.tsx.snap +39 -687
- package/esm/layouts/Grid/index.js +1 -0
- package/esm/locales/el.js +11 -1
- package/esm/locales/en.js +11 -1
- package/govgr/Footer/Copyright.js +4 -2
- package/govgr/Footer/LicenseCCSA.js +3 -1
- package/layouts/Basic/__snapshots__/index.spec.tsx.snap +39 -687
- package/layouts/Grid/index.d.ts +1 -0
- package/layouts/Grid/index.js +18 -0
- package/locales/el.d.ts +10 -0
- package/locales/el.js +11 -1
- package/locales/en.d.ts +10 -0
- package/locales/en.js +11 -1
- package/package.json +2 -2
|
@@ -311,39 +311,427 @@ exports[`renders the notification banner 1`] = `
|
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
>
|
|
314
|
-
<
|
|
315
|
-
|
|
316
|
-
|
|
314
|
+
<withDeprecationComponent
|
|
315
|
+
title="Notification Banner Example"
|
|
316
|
+
>
|
|
317
|
+
<Component
|
|
318
|
+
title="Notification Banner Example"
|
|
317
319
|
>
|
|
318
|
-
<
|
|
319
|
-
|
|
320
|
+
<ForwardRef(NotificationBanner)
|
|
321
|
+
success={false}
|
|
320
322
|
>
|
|
321
|
-
<
|
|
322
|
-
|
|
323
|
-
|
|
323
|
+
<div
|
|
324
|
+
aria-labelledby="govgr-notification-banner-title"
|
|
325
|
+
className="govgr-notification-banner"
|
|
326
|
+
data-module="govgr-notification-banner"
|
|
327
|
+
role="region"
|
|
324
328
|
>
|
|
325
|
-
<
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
329
|
+
<ForwardRef(NotificationBannerHeader)>
|
|
330
|
+
<div
|
|
331
|
+
className="govgr-notification-banner__header"
|
|
332
|
+
>
|
|
333
|
+
<h2
|
|
334
|
+
className="govgr-notification-banner__title"
|
|
335
|
+
>
|
|
336
|
+
Notification Banner Example
|
|
337
|
+
</h2>
|
|
338
|
+
</div>
|
|
339
|
+
</ForwardRef(NotificationBannerHeader)>
|
|
340
|
+
<ForwardRef(NotificationBannerContent)>
|
|
341
|
+
<div
|
|
342
|
+
className="govgr-notification-banner__content"
|
|
343
|
+
>
|
|
344
|
+
<ForwardRef(NotificationBannerHeading)>
|
|
345
|
+
<h3
|
|
346
|
+
className="govgr-notification-banner__heading"
|
|
347
|
+
>
|
|
348
|
+
this is a notification
|
|
349
|
+
</h3>
|
|
350
|
+
</ForwardRef(NotificationBannerHeading)>
|
|
351
|
+
</div>
|
|
352
|
+
</ForwardRef(NotificationBannerContent)>
|
|
353
|
+
</div>
|
|
354
|
+
</ForwardRef(NotificationBanner)>
|
|
355
|
+
</Component>
|
|
356
|
+
</withDeprecationComponent>
|
|
357
|
+
</ThemeProvider>
|
|
358
|
+
`;
|
|
359
|
+
|
|
360
|
+
exports[`renders the notification banner with title and link 1`] = `
|
|
361
|
+
<ThemeProvider
|
|
362
|
+
theme={
|
|
363
|
+
Object {
|
|
364
|
+
"breakpoints": Object {
|
|
365
|
+
"between": [Function],
|
|
366
|
+
"down": [Function],
|
|
367
|
+
"keys": Array [
|
|
368
|
+
"xs",
|
|
369
|
+
"sm",
|
|
370
|
+
"md",
|
|
371
|
+
"lg",
|
|
372
|
+
"xl",
|
|
373
|
+
],
|
|
374
|
+
"only": [Function],
|
|
375
|
+
"up": [Function],
|
|
376
|
+
"values": Object {
|
|
377
|
+
"lg": 1280,
|
|
378
|
+
"md": 960,
|
|
379
|
+
"sm": 600,
|
|
380
|
+
"xl": 1920,
|
|
381
|
+
"xs": 0,
|
|
382
|
+
},
|
|
383
|
+
"width": [Function],
|
|
384
|
+
},
|
|
385
|
+
"direction": "ltr",
|
|
386
|
+
"footer": Object {
|
|
387
|
+
"contrastText": "",
|
|
388
|
+
"link": "",
|
|
389
|
+
"main": "",
|
|
390
|
+
},
|
|
391
|
+
"header": Object {
|
|
392
|
+
"border": Object {
|
|
393
|
+
"background": "",
|
|
394
|
+
"height": "",
|
|
395
|
+
"width": "",
|
|
396
|
+
},
|
|
397
|
+
"height": "",
|
|
398
|
+
"logo": Object {
|
|
399
|
+
"component": "",
|
|
400
|
+
"height": "",
|
|
401
|
+
},
|
|
402
|
+
},
|
|
403
|
+
"mixins": Object {
|
|
404
|
+
"gutters": [Function],
|
|
405
|
+
"toolbar": Object {
|
|
406
|
+
"@media (min-width:0px) and (orientation: landscape)": Object {
|
|
407
|
+
"minHeight": 48,
|
|
408
|
+
},
|
|
409
|
+
"@media (min-width:600px)": Object {
|
|
410
|
+
"minHeight": 64,
|
|
411
|
+
},
|
|
412
|
+
"minHeight": 56,
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
"overrides": Object {},
|
|
416
|
+
"palette": Object {
|
|
417
|
+
"action": Object {
|
|
418
|
+
"activatedOpacity": 0.12,
|
|
419
|
+
"active": "rgba(0, 0, 0, 0.54)",
|
|
420
|
+
"disabled": "rgba(0, 0, 0, 0.26)",
|
|
421
|
+
"disabledBackground": "rgba(0, 0, 0, 0.12)",
|
|
422
|
+
"disabledOpacity": 0.38,
|
|
423
|
+
"focus": "rgba(0, 0, 0, 0.12)",
|
|
424
|
+
"focusOpacity": 0.12,
|
|
425
|
+
"hover": "rgba(0, 0, 0, 0.04)",
|
|
426
|
+
"hoverOpacity": 0.04,
|
|
427
|
+
"selected": "rgba(0, 0, 0, 0.08)",
|
|
428
|
+
"selectedOpacity": 0.08,
|
|
429
|
+
},
|
|
430
|
+
"augmentColor": [Function],
|
|
431
|
+
"background": Object {
|
|
432
|
+
"default": "#fafafa",
|
|
433
|
+
"paper": "#fff",
|
|
434
|
+
},
|
|
435
|
+
"common": Object {
|
|
436
|
+
"black": "#000",
|
|
437
|
+
"white": "#fff",
|
|
438
|
+
},
|
|
439
|
+
"contrastThreshold": 3,
|
|
440
|
+
"divider": "rgba(0, 0, 0, 0.12)",
|
|
441
|
+
"error": Object {
|
|
442
|
+
"contrastText": "#fff",
|
|
443
|
+
"dark": "#d32f2f",
|
|
444
|
+
"light": "#e57373",
|
|
445
|
+
"main": "#f44336",
|
|
446
|
+
},
|
|
447
|
+
"getContrastText": [Function],
|
|
448
|
+
"grey": Object {
|
|
449
|
+
"100": "#f5f5f5",
|
|
450
|
+
"200": "#eeeeee",
|
|
451
|
+
"300": "#e0e0e0",
|
|
452
|
+
"400": "#bdbdbd",
|
|
453
|
+
"50": "#fafafa",
|
|
454
|
+
"500": "#9e9e9e",
|
|
455
|
+
"600": "#757575",
|
|
456
|
+
"700": "#616161",
|
|
457
|
+
"800": "#424242",
|
|
458
|
+
"900": "#212121",
|
|
459
|
+
"A100": "#d5d5d5",
|
|
460
|
+
"A200": "#aaaaaa",
|
|
461
|
+
"A400": "#303030",
|
|
462
|
+
"A700": "#616161",
|
|
463
|
+
},
|
|
464
|
+
"info": Object {
|
|
465
|
+
"contrastText": "#fff",
|
|
466
|
+
"dark": "#1976d2",
|
|
467
|
+
"light": "#64b5f6",
|
|
468
|
+
"main": "#2196f3",
|
|
469
|
+
},
|
|
470
|
+
"primary": Object {
|
|
471
|
+
"contrastText": "#fff",
|
|
472
|
+
"dark": "#303f9f",
|
|
473
|
+
"light": "#7986cb",
|
|
474
|
+
"main": "#3f51b5",
|
|
475
|
+
},
|
|
476
|
+
"secondary": Object {
|
|
477
|
+
"contrastText": "#fff",
|
|
478
|
+
"dark": "#c51162",
|
|
479
|
+
"light": "#ff4081",
|
|
480
|
+
"main": "#f50057",
|
|
481
|
+
},
|
|
482
|
+
"success": Object {
|
|
483
|
+
"contrastText": "rgba(0, 0, 0, 0.87)",
|
|
484
|
+
"dark": "#388e3c",
|
|
485
|
+
"light": "#81c784",
|
|
486
|
+
"main": "#4caf50",
|
|
487
|
+
},
|
|
488
|
+
"text": Object {
|
|
489
|
+
"disabled": "rgba(0, 0, 0, 0.38)",
|
|
490
|
+
"hint": "rgba(0, 0, 0, 0.38)",
|
|
491
|
+
"primary": "rgba(0, 0, 0, 0.87)",
|
|
492
|
+
"secondary": "rgba(0, 0, 0, 0.54)",
|
|
493
|
+
},
|
|
494
|
+
"tonalOffset": 0.2,
|
|
495
|
+
"type": "light",
|
|
496
|
+
"warning": Object {
|
|
497
|
+
"contrastText": "rgba(0, 0, 0, 0.87)",
|
|
498
|
+
"dark": "#f57c00",
|
|
499
|
+
"light": "#ffb74d",
|
|
500
|
+
"main": "#ff9800",
|
|
501
|
+
},
|
|
502
|
+
},
|
|
503
|
+
"props": Object {},
|
|
504
|
+
"shadows": Array [
|
|
505
|
+
"none",
|
|
506
|
+
"0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)",
|
|
507
|
+
"0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)",
|
|
508
|
+
"0px 3px 3px -2px rgba(0,0,0,0.2),0px 3px 4px 0px rgba(0,0,0,0.14),0px 1px 8px 0px rgba(0,0,0,0.12)",
|
|
509
|
+
"0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)",
|
|
510
|
+
"0px 3px 5px -1px rgba(0,0,0,0.2),0px 5px 8px 0px rgba(0,0,0,0.14),0px 1px 14px 0px rgba(0,0,0,0.12)",
|
|
511
|
+
"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)",
|
|
512
|
+
"0px 4px 5px -2px rgba(0,0,0,0.2),0px 7px 10px 1px rgba(0,0,0,0.14),0px 2px 16px 1px rgba(0,0,0,0.12)",
|
|
513
|
+
"0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12)",
|
|
514
|
+
"0px 5px 6px -3px rgba(0,0,0,0.2),0px 9px 12px 1px rgba(0,0,0,0.14),0px 3px 16px 2px rgba(0,0,0,0.12)",
|
|
515
|
+
"0px 6px 6px -3px rgba(0,0,0,0.2),0px 10px 14px 1px rgba(0,0,0,0.14),0px 4px 18px 3px rgba(0,0,0,0.12)",
|
|
516
|
+
"0px 6px 7px -4px rgba(0,0,0,0.2),0px 11px 15px 1px rgba(0,0,0,0.14),0px 4px 20px 3px rgba(0,0,0,0.12)",
|
|
517
|
+
"0px 7px 8px -4px rgba(0,0,0,0.2),0px 12px 17px 2px rgba(0,0,0,0.14),0px 5px 22px 4px rgba(0,0,0,0.12)",
|
|
518
|
+
"0px 7px 8px -4px rgba(0,0,0,0.2),0px 13px 19px 2px rgba(0,0,0,0.14),0px 5px 24px 4px rgba(0,0,0,0.12)",
|
|
519
|
+
"0px 7px 9px -4px rgba(0,0,0,0.2),0px 14px 21px 2px rgba(0,0,0,0.14),0px 5px 26px 4px rgba(0,0,0,0.12)",
|
|
520
|
+
"0px 8px 9px -5px rgba(0,0,0,0.2),0px 15px 22px 2px rgba(0,0,0,0.14),0px 6px 28px 5px rgba(0,0,0,0.12)",
|
|
521
|
+
"0px 8px 10px -5px rgba(0,0,0,0.2),0px 16px 24px 2px rgba(0,0,0,0.14),0px 6px 30px 5px rgba(0,0,0,0.12)",
|
|
522
|
+
"0px 8px 11px -5px rgba(0,0,0,0.2),0px 17px 26px 2px rgba(0,0,0,0.14),0px 6px 32px 5px rgba(0,0,0,0.12)",
|
|
523
|
+
"0px 9px 11px -5px rgba(0,0,0,0.2),0px 18px 28px 2px rgba(0,0,0,0.14),0px 7px 34px 6px rgba(0,0,0,0.12)",
|
|
524
|
+
"0px 9px 12px -6px rgba(0,0,0,0.2),0px 19px 29px 2px rgba(0,0,0,0.14),0px 7px 36px 6px rgba(0,0,0,0.12)",
|
|
525
|
+
"0px 10px 13px -6px rgba(0,0,0,0.2),0px 20px 31px 3px rgba(0,0,0,0.14),0px 8px 38px 7px rgba(0,0,0,0.12)",
|
|
526
|
+
"0px 10px 13px -6px rgba(0,0,0,0.2),0px 21px 33px 3px rgba(0,0,0,0.14),0px 8px 40px 7px rgba(0,0,0,0.12)",
|
|
527
|
+
"0px 10px 14px -6px rgba(0,0,0,0.2),0px 22px 35px 3px rgba(0,0,0,0.14),0px 8px 42px 7px rgba(0,0,0,0.12)",
|
|
528
|
+
"0px 11px 14px -7px rgba(0,0,0,0.2),0px 23px 36px 3px rgba(0,0,0,0.14),0px 9px 44px 8px rgba(0,0,0,0.12)",
|
|
529
|
+
"0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12)",
|
|
530
|
+
],
|
|
531
|
+
"shape": Object {
|
|
532
|
+
"borderRadius": 4,
|
|
533
|
+
},
|
|
534
|
+
"spacing": [Function],
|
|
535
|
+
"transitions": Object {
|
|
536
|
+
"create": [Function],
|
|
537
|
+
"duration": Object {
|
|
538
|
+
"complex": 375,
|
|
539
|
+
"enteringScreen": 225,
|
|
540
|
+
"leavingScreen": 195,
|
|
541
|
+
"short": 250,
|
|
542
|
+
"shorter": 200,
|
|
543
|
+
"shortest": 150,
|
|
544
|
+
"standard": 300,
|
|
545
|
+
},
|
|
546
|
+
"easing": Object {
|
|
547
|
+
"easeIn": "cubic-bezier(0.4, 0, 1, 1)",
|
|
548
|
+
"easeInOut": "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
549
|
+
"easeOut": "cubic-bezier(0.0, 0, 0.2, 1)",
|
|
550
|
+
"sharp": "cubic-bezier(0.4, 0, 0.6, 1)",
|
|
551
|
+
},
|
|
552
|
+
"getAutoHeightDuration": [Function],
|
|
553
|
+
},
|
|
554
|
+
"typography": Object {
|
|
555
|
+
"body1": Object {
|
|
556
|
+
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
|
|
557
|
+
"fontSize": "1rem",
|
|
558
|
+
"fontWeight": 400,
|
|
559
|
+
"letterSpacing": "0.00938em",
|
|
560
|
+
"lineHeight": 1.5,
|
|
561
|
+
},
|
|
562
|
+
"body2": Object {
|
|
563
|
+
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
|
|
564
|
+
"fontSize": "0.875rem",
|
|
565
|
+
"fontWeight": 400,
|
|
566
|
+
"letterSpacing": "0.01071em",
|
|
567
|
+
"lineHeight": 1.43,
|
|
568
|
+
},
|
|
569
|
+
"button": Object {
|
|
570
|
+
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
|
|
571
|
+
"fontSize": "0.875rem",
|
|
572
|
+
"fontWeight": 500,
|
|
573
|
+
"letterSpacing": "0.02857em",
|
|
574
|
+
"lineHeight": 1.75,
|
|
575
|
+
"textTransform": "uppercase",
|
|
576
|
+
},
|
|
577
|
+
"caption": Object {
|
|
578
|
+
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
|
|
579
|
+
"fontSize": "0.75rem",
|
|
580
|
+
"fontWeight": 400,
|
|
581
|
+
"letterSpacing": "0.03333em",
|
|
582
|
+
"lineHeight": 1.66,
|
|
583
|
+
},
|
|
584
|
+
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
|
|
585
|
+
"fontSize": 14,
|
|
586
|
+
"fontWeightBold": 700,
|
|
587
|
+
"fontWeightLight": 300,
|
|
588
|
+
"fontWeightMedium": 500,
|
|
589
|
+
"fontWeightRegular": 400,
|
|
590
|
+
"h1": Object {
|
|
591
|
+
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
|
|
592
|
+
"fontSize": "6rem",
|
|
593
|
+
"fontWeight": 300,
|
|
594
|
+
"letterSpacing": "-0.01562em",
|
|
595
|
+
"lineHeight": 1.167,
|
|
596
|
+
},
|
|
597
|
+
"h2": Object {
|
|
598
|
+
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
|
|
599
|
+
"fontSize": "3.75rem",
|
|
600
|
+
"fontWeight": 300,
|
|
601
|
+
"letterSpacing": "-0.00833em",
|
|
602
|
+
"lineHeight": 1.2,
|
|
603
|
+
},
|
|
604
|
+
"h3": Object {
|
|
605
|
+
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
|
|
606
|
+
"fontSize": "3rem",
|
|
607
|
+
"fontWeight": 400,
|
|
608
|
+
"letterSpacing": "0em",
|
|
609
|
+
"lineHeight": 1.167,
|
|
610
|
+
},
|
|
611
|
+
"h4": Object {
|
|
612
|
+
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
|
|
613
|
+
"fontSize": "2.125rem",
|
|
614
|
+
"fontWeight": 400,
|
|
615
|
+
"letterSpacing": "0.00735em",
|
|
616
|
+
"lineHeight": 1.235,
|
|
617
|
+
},
|
|
618
|
+
"h5": Object {
|
|
619
|
+
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
|
|
620
|
+
"fontSize": "1.5rem",
|
|
621
|
+
"fontWeight": 400,
|
|
622
|
+
"letterSpacing": "0em",
|
|
623
|
+
"lineHeight": 1.334,
|
|
624
|
+
},
|
|
625
|
+
"h6": Object {
|
|
626
|
+
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
|
|
627
|
+
"fontSize": "1.25rem",
|
|
628
|
+
"fontWeight": 500,
|
|
629
|
+
"letterSpacing": "0.0075em",
|
|
630
|
+
"lineHeight": 1.6,
|
|
631
|
+
},
|
|
632
|
+
"htmlFontSize": 16,
|
|
633
|
+
"overline": Object {
|
|
634
|
+
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
|
|
635
|
+
"fontSize": "0.75rem",
|
|
636
|
+
"fontWeight": 400,
|
|
637
|
+
"letterSpacing": "0.08333em",
|
|
638
|
+
"lineHeight": 2.66,
|
|
639
|
+
"textTransform": "uppercase",
|
|
640
|
+
},
|
|
641
|
+
"pxToRem": [Function],
|
|
642
|
+
"round": [Function],
|
|
643
|
+
"subtitle1": Object {
|
|
644
|
+
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
|
|
645
|
+
"fontSize": "1rem",
|
|
646
|
+
"fontWeight": 400,
|
|
647
|
+
"letterSpacing": "0.00938em",
|
|
648
|
+
"lineHeight": 1.75,
|
|
649
|
+
},
|
|
650
|
+
"subtitle2": Object {
|
|
651
|
+
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
|
|
652
|
+
"fontSize": "0.875rem",
|
|
653
|
+
"fontWeight": 500,
|
|
654
|
+
"letterSpacing": "0.00714em",
|
|
655
|
+
"lineHeight": 1.57,
|
|
656
|
+
},
|
|
657
|
+
},
|
|
658
|
+
"zIndex": Object {
|
|
659
|
+
"appBar": 1100,
|
|
660
|
+
"drawer": 1200,
|
|
661
|
+
"mobileStepper": 1000,
|
|
662
|
+
"modal": 1300,
|
|
663
|
+
"snackbar": 1400,
|
|
664
|
+
"speedDial": 1050,
|
|
665
|
+
"tooltip": 1500,
|
|
666
|
+
},
|
|
667
|
+
Symbol(mui.nested): false,
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
>
|
|
671
|
+
<withDeprecationComponent
|
|
672
|
+
link={
|
|
673
|
+
Object {
|
|
674
|
+
"label": "This is a label",
|
|
675
|
+
"url": "/",
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
title="Notification Banner Example"
|
|
679
|
+
>
|
|
680
|
+
<Component
|
|
681
|
+
link={
|
|
682
|
+
Object {
|
|
683
|
+
"label": "This is a label",
|
|
684
|
+
"url": "/",
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
title="Notification Banner Example"
|
|
688
|
+
>
|
|
689
|
+
<ForwardRef(NotificationBanner)
|
|
690
|
+
success={false}
|
|
334
691
|
>
|
|
335
|
-
<
|
|
336
|
-
|
|
337
|
-
|
|
692
|
+
<div
|
|
693
|
+
aria-labelledby="govgr-notification-banner-title"
|
|
694
|
+
className="govgr-notification-banner"
|
|
695
|
+
data-module="govgr-notification-banner"
|
|
696
|
+
role="region"
|
|
338
697
|
>
|
|
339
|
-
<
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
698
|
+
<ForwardRef(NotificationBannerHeader)>
|
|
699
|
+
<div
|
|
700
|
+
className="govgr-notification-banner__header"
|
|
701
|
+
>
|
|
702
|
+
<h2
|
|
703
|
+
className="govgr-notification-banner__title"
|
|
704
|
+
>
|
|
705
|
+
Notification Banner Example
|
|
706
|
+
</h2>
|
|
707
|
+
</div>
|
|
708
|
+
</ForwardRef(NotificationBannerHeader)>
|
|
709
|
+
<ForwardRef(NotificationBannerContent)>
|
|
710
|
+
<div
|
|
711
|
+
className="govgr-notification-banner__content"
|
|
712
|
+
>
|
|
713
|
+
<ForwardRef(NotificationBannerHeading)>
|
|
714
|
+
<h3
|
|
715
|
+
className="govgr-notification-banner__heading"
|
|
716
|
+
>
|
|
717
|
+
this is a notification
|
|
718
|
+
</h3>
|
|
719
|
+
</ForwardRef(NotificationBannerHeading)>
|
|
720
|
+
<ForwardRef(NotificationBannerLink)
|
|
721
|
+
href="/"
|
|
722
|
+
>
|
|
723
|
+
<a
|
|
724
|
+
className="govgr-notification-banner__link"
|
|
725
|
+
href="/"
|
|
726
|
+
>
|
|
727
|
+
This is a label
|
|
728
|
+
</a>
|
|
729
|
+
</ForwardRef(NotificationBannerLink)>
|
|
730
|
+
</div>
|
|
731
|
+
</ForwardRef(NotificationBannerContent)>
|
|
732
|
+
</div>
|
|
733
|
+
</ForwardRef(NotificationBanner)>
|
|
734
|
+
</Component>
|
|
735
|
+
</withDeprecationComponent>
|
|
348
736
|
</ThemeProvider>
|
|
349
737
|
`;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { NotificationBannerProps as CoreNotificationBannerProps } from '@digigov/react-core/NotificationBanner';
|
|
3
3
|
import NotificationBannerHeader from '@digigov/react-core/NotificationBannerHeader';
|
|
4
4
|
import NotificationBannerHeading from '@digigov/react-core/NotificationBannerHeading';
|
|
5
5
|
import NotificationBannerContent from '@digigov/react-core/NotificationBannerContent';
|
|
6
|
+
import NotificationBannerLink from '@digigov/react-core/NotificationBannerLink';
|
|
6
7
|
export interface NotificationBannerProps extends CoreNotificationBannerProps {
|
|
7
8
|
variant?: 'important' | 'success';
|
|
8
9
|
title?: string;
|
|
10
|
+
link?: {
|
|
11
|
+
url: string;
|
|
12
|
+
label: string;
|
|
13
|
+
};
|
|
14
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
9
15
|
}
|
|
10
|
-
export declare const NotificationBanner:
|
|
11
|
-
|
|
12
|
-
variant?: string | undefined;
|
|
13
|
-
title: any;
|
|
14
|
-
children: any;
|
|
15
|
-
}) => JSX.Element;
|
|
16
|
-
export { NotificationBannerHeader, NotificationBannerContent, NotificationBannerHeading, };
|
|
16
|
+
export declare const NotificationBanner: React.FC<NotificationBannerProps>;
|
|
17
|
+
export { NotificationBannerHeader, NotificationBannerContent, NotificationBannerHeading, NotificationBannerLink, };
|
|
17
18
|
export default NotificationBanner;
|
|
@@ -24,6 +24,12 @@ Object.defineProperty(exports, "NotificationBannerHeading", {
|
|
|
24
24
|
return _NotificationBannerHeading["default"];
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
+
Object.defineProperty(exports, "NotificationBannerLink", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function get() {
|
|
30
|
+
return _NotificationBannerLink["default"];
|
|
31
|
+
}
|
|
32
|
+
});
|
|
27
33
|
exports["default"] = void 0;
|
|
28
34
|
|
|
29
35
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
@@ -42,18 +48,23 @@ var _NotificationBannerHeading = _interopRequireDefault(require("@digigov/react-
|
|
|
42
48
|
|
|
43
49
|
var _NotificationBannerContent = _interopRequireDefault(require("@digigov/react-core/NotificationBannerContent"));
|
|
44
50
|
|
|
45
|
-
var
|
|
51
|
+
var _NotificationBannerLink = _interopRequireDefault(require("@digigov/react-core/NotificationBannerLink"));
|
|
52
|
+
|
|
53
|
+
var _excluded = ["variant", "title", "link", "children"];
|
|
46
54
|
var NotificationBanner = (0, _withDeprecation["default"])(function (_ref) {
|
|
47
55
|
var _ref$variant = _ref.variant,
|
|
48
56
|
variant = _ref$variant === void 0 ? 'important' : _ref$variant,
|
|
49
57
|
title = _ref.title,
|
|
58
|
+
link = _ref.link,
|
|
50
59
|
children = _ref.children,
|
|
51
60
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
52
61
|
var success = variant === 'success';
|
|
53
62
|
title = title ? title : success ? 'Success' : 'Important';
|
|
54
63
|
return /*#__PURE__*/_react["default"].createElement(_NotificationBanner["default"], (0, _extends2["default"])({
|
|
55
64
|
success: success
|
|
56
|
-
}, props), /*#__PURE__*/_react["default"].createElement(_NotificationBannerHeader["default"], null, title), /*#__PURE__*/_react["default"].createElement(_NotificationBannerContent["default"], null, /*#__PURE__*/_react["default"].createElement(_NotificationBannerHeading["default"], null, children)
|
|
65
|
+
}, props), /*#__PURE__*/_react["default"].createElement(_NotificationBannerHeader["default"], null, title), /*#__PURE__*/_react["default"].createElement(_NotificationBannerContent["default"], null, /*#__PURE__*/_react["default"].createElement(_NotificationBannerHeading["default"], null, children), link && /*#__PURE__*/_react["default"].createElement(_NotificationBannerLink["default"], {
|
|
66
|
+
href: link.url
|
|
67
|
+
}, link.label)));
|
|
57
68
|
}, {
|
|
58
69
|
name: 'NotificationBanner',
|
|
59
70
|
props: {
|
|
@@ -20,4 +20,13 @@ var _ref = /*#__PURE__*/React.createElement(_NotificationBanner["default"], {
|
|
|
20
20
|
|
|
21
21
|
it('renders the notification banner', function () {
|
|
22
22
|
expect((0, _mountWithTheme["default"])(_ref)).toMatchSnapshot();
|
|
23
|
+
});
|
|
24
|
+
it('renders the notification banner with title and link', function () {
|
|
25
|
+
expect((0, _mountWithTheme["default"])( /*#__PURE__*/React.createElement(_NotificationBanner["default"], {
|
|
26
|
+
title: "Notification Banner Example",
|
|
27
|
+
link: {
|
|
28
|
+
url: '/',
|
|
29
|
+
label: 'This is a label'
|
|
30
|
+
}
|
|
31
|
+
}, "this is a notification"))).toMatchSnapshot();
|
|
23
32
|
});
|
|
@@ -3,6 +3,7 @@ import { PhaseBannerProps } from '@digigov/react-core/PhaseBanner';
|
|
|
3
3
|
interface ServiceBadgeProps extends PhaseBannerProps {
|
|
4
4
|
label?: string;
|
|
5
5
|
ref?: React.Ref<HTMLDivElement>;
|
|
6
|
+
text?: string;
|
|
6
7
|
}
|
|
7
8
|
export declare const ServiceBadge: React.FC<ServiceBadgeProps>;
|
|
8
9
|
export default ServiceBadge;
|
|
@@ -17,13 +17,16 @@ var _PhaseBanner = _interopRequireDefault(require("@digigov/react-core/PhaseBann
|
|
|
17
17
|
|
|
18
18
|
var _PhaseBannerTag = _interopRequireDefault(require("@digigov/react-core/PhaseBannerTag"));
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _PhaseBannerText = _interopRequireDefault(require("@digigov/react-core/PhaseBannerText"));
|
|
21
|
+
|
|
22
|
+
var _excluded = ["label", "text", "children"];
|
|
21
23
|
var ServiceBadge = (0, _withDeprecation["default"])(function (_ref) {
|
|
22
24
|
var _ref$label = _ref.label,
|
|
23
25
|
label = _ref$label === void 0 ? 'BETA' : _ref$label,
|
|
26
|
+
text = _ref.text,
|
|
24
27
|
children = _ref.children,
|
|
25
28
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
26
|
-
return /*#__PURE__*/_react["default"].createElement(_PhaseBanner["default"], props, /*#__PURE__*/_react["default"].createElement(
|
|
29
|
+
return /*#__PURE__*/_react["default"].createElement(_PhaseBanner["default"], props, children ? children : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_PhaseBannerTag["default"], null, label), text && /*#__PURE__*/_react["default"].createElement(_PhaseBannerText["default"], null, text)), ";");
|
|
27
30
|
}, {
|
|
28
31
|
name: 'ServiceBadge',
|
|
29
32
|
rename: 'PhaseBanner'
|