@nordhealth/components 1.0.0-beta.18 → 1.0.0-beta.20

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 (85) hide show
  1. package/custom-elements.json +834 -690
  2. package/lib/Avatar.js +1 -1
  3. package/lib/Avatar.js.map +1 -1
  4. package/lib/Badge.js +1 -1
  5. package/lib/Banner.js +1 -1
  6. package/lib/Button.js +1 -1
  7. package/lib/{Calendar-d2da5dc7.js → Calendar-582091ef.js} +2 -2
  8. package/lib/{Calendar-d2da5dc7.js.map → Calendar-582091ef.js.map} +1 -1
  9. package/lib/Calendar.js +1 -1
  10. package/lib/Card.js +1 -1
  11. package/lib/Checkbox.js +1 -1
  12. package/lib/CommandMenu.js +1 -1
  13. package/lib/CommandMenuAction.js +1 -1
  14. package/lib/{Component-6762b5eb.js → Component-9d373ef3.js} +2 -2
  15. package/lib/Component-9d373ef3.js.map +1 -0
  16. package/lib/DatePicker.js +1 -1
  17. package/lib/DatePicker.js.map +1 -1
  18. package/lib/EmptyState.js +1 -1
  19. package/lib/Fieldset.js +1 -1
  20. package/lib/FocusableMixin-ebb67709.js +2 -0
  21. package/lib/{FocusableMixin-ca9d30fa.js.map → FocusableMixin-ebb67709.js.map} +1 -1
  22. package/lib/{FormAssociatedMixin-bfbbe389.js → FormAssociatedMixin-ccae91fd.js} +2 -2
  23. package/lib/{FormAssociatedMixin-bfbbe389.js.map → FormAssociatedMixin-ccae91fd.js.map} +1 -1
  24. package/lib/FormField-50bd73d5.js +2 -0
  25. package/lib/FormField-50bd73d5.js.map +1 -0
  26. package/lib/Header.js +1 -1
  27. package/lib/Icon.js +1 -1
  28. package/lib/Icon.js.map +1 -1
  29. package/lib/Input.js +1 -1
  30. package/lib/Layout.js +1 -1
  31. package/lib/{LightDomController-f56fa1a4.js → LightDomController-011334da.js} +2 -2
  32. package/lib/{LightDomController-f56fa1a4.js.map → LightDomController-011334da.js.map} +1 -1
  33. package/lib/NavGroup.js +1 -1
  34. package/lib/NavItem.js +1 -1
  35. package/lib/Navigation.js +1 -1
  36. package/lib/ProgressBar.js +2 -0
  37. package/lib/ProgressBar.js.map +1 -0
  38. package/lib/Radio.js +1 -1
  39. package/lib/Radio.js.map +1 -1
  40. package/lib/Select.js +1 -1
  41. package/lib/Spinner.js +1 -1
  42. package/lib/Spinner.js.map +1 -1
  43. package/lib/Stack.js +1 -1
  44. package/lib/Table.js +1 -1
  45. package/lib/{TextField-d799db1a.js → TextField-ece1c786.js} +2 -2
  46. package/lib/TextField-ece1c786.js.map +1 -0
  47. package/lib/Textarea.js +1 -1
  48. package/lib/Tooltip.js +1 -1
  49. package/lib/VisuallyHidden.js +1 -1
  50. package/lib/bundle.js +8 -8
  51. package/lib/bundle.js.map +1 -1
  52. package/lib/{class-map-61e9e8c1.js → class-map-87423405.js} +2 -2
  53. package/lib/{class-map-61e9e8c1.js.map → class-map-87423405.js.map} +1 -1
  54. package/lib/if-defined-fe657a02.js +7 -0
  55. package/lib/{if-defined-2a4c6dbc.js.map → if-defined-fe657a02.js.map} +1 -1
  56. package/lib/index.js +1 -1
  57. package/lib/{lit-element-9646ab7e.js → lit-element-74b6bb4b.js} +3 -3
  58. package/lib/{lit-element-9646ab7e.js.map → lit-element-74b6bb4b.js.map} +1 -1
  59. package/lib/month-view.js +1 -1
  60. package/lib/number-3a8ef88a.js +7 -0
  61. package/lib/{number-02c91604.js.map → number-3a8ef88a.js.map} +1 -1
  62. package/lib/{ref-82d2502a.js → ref-7d028e3a.js} +3 -3
  63. package/lib/{ref-82d2502a.js.map → ref-7d028e3a.js.map} +1 -1
  64. package/lib/src/avatar/Avatar.d.ts +1 -1
  65. package/lib/src/avatar/Avatar.test.d.ts +1 -1
  66. package/lib/src/banner/Banner.test.d.ts +3 -0
  67. package/lib/src/date-picker/DatePicker.d.ts +2 -2
  68. package/lib/src/header/Header.test.d.ts +1 -0
  69. package/lib/src/index.d.ts +1 -0
  70. package/lib/src/layout/Layout.test.d.ts +2 -0
  71. package/lib/src/progress-bar/ProgressBar.d.ts +38 -0
  72. package/lib/src/progress-bar/ProgressBar.test.d.ts +3 -0
  73. package/lib/src/spinner/Spinner.d.ts +2 -4
  74. package/lib/src/stack/Stack.test.d.ts +2 -0
  75. package/lib/unsafe-html-989a642b.js +7 -0
  76. package/lib/{unsafe-html-4da54dd2.js.map → unsafe-html-989a642b.js.map} +1 -1
  77. package/package.json +5 -5
  78. package/lib/Component-6762b5eb.js.map +0 -1
  79. package/lib/FocusableMixin-ca9d30fa.js +0 -2
  80. package/lib/FormField-b1c18e6e.js +0 -2
  81. package/lib/FormField-b1c18e6e.js.map +0 -1
  82. package/lib/TextField-d799db1a.js.map +0 -1
  83. package/lib/if-defined-2a4c6dbc.js +0 -7
  84. package/lib/number-02c91604.js +0 -7
  85. package/lib/unsafe-html-4da54dd2.js +0 -7
@@ -222,6 +222,14 @@
222
222
  "name": "default",
223
223
  "module": "\"./avatar/Avatar.js\""
224
224
  }
225
+ },
226
+ {
227
+ "kind": "js",
228
+ "name": "ProgressBar",
229
+ "declaration": {
230
+ "name": "default",
231
+ "module": "\"./progress-bar/ProgressBar.js\""
232
+ }
225
233
  }
226
234
  ]
227
235
  },
@@ -281,7 +289,8 @@
281
289
  },
282
290
  {
283
291
  "kind": "method",
284
- "name": "renderFallback"
292
+ "name": "renderFallback",
293
+ "privacy": "protected"
285
294
  },
286
295
  {
287
296
  "kind": "method",
@@ -422,372 +431,330 @@
422
431
  },
423
432
  {
424
433
  "kind": "javascript-module",
425
- "path": "src/button/Button.ts",
434
+ "path": "src/calendar/Calendar.ts",
426
435
  "declarations": [
427
436
  {
428
437
  "kind": "class",
429
- "description": "Buttons are used for interface actions. Primary style should be\nused only once per section for main call-to-action, while other\nstyles can appear more frequently.",
430
- "name": "Button",
431
- "slots": [
438
+ "description": "Calendar allows user to pick a date. It comes with built-in\nfunctionality that allows you to set a minimum and a maximum allowed date.\nPlease note that the date must be passed in ISO-8601 format.",
439
+ "name": "Calendar",
440
+ "members": [
432
441
  {
433
- "description": "The button content",
434
- "name": ""
442
+ "kind": "field",
443
+ "name": "dialogLabelId",
444
+ "type": {
445
+ "text": "string"
446
+ },
447
+ "privacy": "private",
448
+ "default": "\"dialog-header\""
435
449
  },
436
450
  {
437
- "description": "Used to place content before button text. Typically used for icons.",
438
- "name": "before"
451
+ "kind": "field",
452
+ "name": "monthSelectNode",
453
+ "type": {
454
+ "text": "HTMLElement"
455
+ },
456
+ "privacy": "private"
439
457
  },
440
458
  {
441
- "description": "Used to place content after button text. Typically used for icons.",
442
- "name": "after"
443
- }
444
- ],
445
- "members": [
459
+ "kind": "field",
460
+ "name": "focusedDayNode",
461
+ "type": {
462
+ "text": "HTMLButtonElement"
463
+ },
464
+ "privacy": "private"
465
+ },
446
466
  {
447
467
  "kind": "field",
448
- "name": "buttonRef",
468
+ "name": "direction",
469
+ "privacy": "private",
470
+ "default": "new DirectionController(this)"
471
+ },
472
+ {
473
+ "kind": "field",
474
+ "name": "swipe",
475
+ "privacy": "private",
476
+ "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
477
+ },
478
+ {
479
+ "kind": "field",
480
+ "name": "shortcuts",
449
481
  "privacy": "private"
450
482
  },
451
483
  {
452
484
  "kind": "field",
453
- "name": "lightDom",
485
+ "name": "dateFormatShort",
486
+ "type": {
487
+ "text": "Intl.DateTimeFormat"
488
+ },
454
489
  "privacy": "private",
455
- "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
490
+ "description": "Whilst dateAdapter is used for handling the formatting/parsing dates in the input,\nthese are used to format dates exclusively for the benefit of screen readers.\n\nWe prefer DateTimeFormat over date.toLocaleDateString, as the former has\nbetter performance when formatting large number of dates. See:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString#Performance"
456
491
  },
457
492
  {
458
493
  "kind": "field",
459
- "name": "variant",
494
+ "name": "localization",
460
495
  "type": {
461
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
496
+ "text": "CalendarLocalizedText"
462
497
  },
463
- "default": "\"default\"",
464
- "description": "The style variant of the button.",
465
- "attribute": "variant",
466
- "reflects": true
498
+ "default": "localization"
467
499
  },
468
500
  {
469
501
  "kind": "field",
470
- "name": "type",
502
+ "name": "value",
471
503
  "type": {
472
- "text": "\"button\" | \"submit\" | \"reset\""
504
+ "text": "string"
473
505
  },
474
- "default": "\"submit\"",
475
- "description": "The type of the button.",
476
- "attribute": "type",
477
- "reflects": true
506
+ "default": "\"\"",
507
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
508
+ "attribute": "value"
478
509
  },
479
510
  {
480
511
  "kind": "field",
481
- "name": "size",
512
+ "name": "firstDayOfWeek",
482
513
  "type": {
483
- "text": "\"s\" | \"m\" | \"l\""
514
+ "text": "DaysOfWeek"
484
515
  },
485
- "default": "\"m\"",
486
- "description": "The size of the button.\nThis affects font-size and padding.",
487
- "attribute": "size",
488
- "reflects": true
516
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
517
+ "attribute": "firstDayOfWeek"
489
518
  },
490
519
  {
491
520
  "kind": "field",
492
- "name": "href",
521
+ "name": "min",
493
522
  "type": {
494
- "text": "string | undefined"
523
+ "text": "string"
495
524
  },
496
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
497
- "attribute": "href",
498
- "reflects": true
525
+ "default": "\"\"",
526
+ "description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
527
+ "attribute": "min"
499
528
  },
500
529
  {
501
530
  "kind": "field",
502
- "name": "download",
531
+ "name": "max",
503
532
  "type": {
504
- "text": "boolean"
533
+ "text": "string"
505
534
  },
506
- "default": "false",
507
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
508
- "attribute": "download"
535
+ "default": "\"\"",
536
+ "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
537
+ "attribute": "max"
509
538
  },
510
539
  {
511
540
  "kind": "field",
512
- "name": "target",
541
+ "name": "isDateDisabled",
513
542
  "type": {
514
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
543
+ "text": "DateDisabledPredicate"
515
544
  },
516
- "default": "\"_self\"",
517
- "description": "When provided together with a href property, determines where\nto open the linked URL. The keywords have special meanings for\nwhere to load the URL: “_self” means the current browsing context,\n“_blank” usually a new tab but users can configure browsers this to\nopen a new window instead, “_parent” means the parent browsing\ncontext of the current one, but if no parent exists, behaves as\n_self, and finally “top” means the topmost browsing context.",
518
- "attribute": "target",
519
- "reflects": true
545
+ "default": "isDateDisabled",
546
+ "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
520
547
  },
521
548
  {
522
549
  "kind": "field",
523
- "name": "expand",
550
+ "name": "activeFocus",
524
551
  "type": {
525
552
  "text": "boolean"
526
553
  },
527
- "default": "false",
528
- "description": "Controls whether the button expands to fill the width of its container.",
529
- "attribute": "expand",
530
- "reflects": true
554
+ "privacy": "private",
555
+ "default": "false"
556
+ },
557
+ {
558
+ "kind": "field",
559
+ "name": "focusedDay",
560
+ "privacy": "private",
561
+ "default": "new Date()"
531
562
  },
532
563
  {
533
564
  "kind": "method",
534
- "name": "renderLink",
565
+ "name": "focus",
566
+ "parameters": [
567
+ {
568
+ "name": "options",
569
+ "optional": true,
570
+ "type": {
571
+ "text": "FocusOptions & { target: \"day\" | \"month\" }"
572
+ },
573
+ "description": "An object which controls aspects of the focusing process."
574
+ }
575
+ ],
576
+ "description": "Programmatically move focus to the calendar."
577
+ },
578
+ {
579
+ "kind": "method",
580
+ "name": "createDateFormatter",
581
+ "privacy": "private"
582
+ },
583
+ {
584
+ "kind": "field",
585
+ "name": "handleDaySelect",
586
+ "privacy": "private"
587
+ },
588
+ {
589
+ "kind": "method",
590
+ "name": "addDays",
535
591
  "privacy": "private",
536
592
  "parameters": [
537
593
  {
538
- "name": "innards",
594
+ "name": "days",
539
595
  "type": {
540
- "text": "TemplateResult"
596
+ "text": "number"
541
597
  }
542
598
  }
543
- ],
544
- "description": "We jump through some hoops here to ensure the link is treated correctly when \"disabled\".\nLinks cannot be disabled natively, so we need to rely on some aria magic to get the correct semantics.\nAlong with the advice in the article below, we also set tabindex to \"-1\", so it is taken out of tab order."
599
+ ]
545
600
  },
546
601
  {
547
602
  "kind": "method",
548
- "name": "renderButton",
603
+ "name": "addMonths",
549
604
  "privacy": "private",
550
605
  "parameters": [
551
606
  {
552
- "name": "innards",
607
+ "name": "months",
553
608
  "type": {
554
- "text": "TemplateResult"
609
+ "text": "number"
555
610
  }
556
611
  }
557
612
  ]
558
613
  },
559
614
  {
560
615
  "kind": "method",
561
- "name": "renderLightDom",
616
+ "name": "addYears",
617
+ "privacy": "private",
618
+ "parameters": [
619
+ {
620
+ "name": "years",
621
+ "type": {
622
+ "text": "number"
623
+ }
624
+ }
625
+ ]
626
+ },
627
+ {
628
+ "kind": "method",
629
+ "name": "startOfWeek",
562
630
  "privacy": "private"
563
631
  },
564
632
  {
565
- "kind": "field",
566
- "name": "handleOuterClick",
633
+ "kind": "method",
634
+ "name": "endOfWeek",
567
635
  "privacy": "private"
568
636
  },
569
637
  {
570
638
  "kind": "method",
571
- "name": "handleClick",
639
+ "name": "setMonth",
572
640
  "privacy": "private",
573
641
  "parameters": [
574
642
  {
575
- "name": "e",
643
+ "name": "month",
576
644
  "type": {
577
- "text": "Event"
645
+ "text": "number"
646
+ }
647
+ }
648
+ ]
649
+ },
650
+ {
651
+ "kind": "method",
652
+ "name": "setYear",
653
+ "privacy": "private",
654
+ "parameters": [
655
+ {
656
+ "name": "year",
657
+ "type": {
658
+ "text": "number"
659
+ }
660
+ }
661
+ ]
662
+ },
663
+ {
664
+ "kind": "method",
665
+ "name": "setFocusedDay",
666
+ "privacy": "private",
667
+ "parameters": [
668
+ {
669
+ "name": "day",
670
+ "type": {
671
+ "text": "Date"
578
672
  }
579
673
  }
580
674
  ]
581
675
  },
582
676
  {
583
677
  "kind": "field",
584
- "name": "disabled",
585
- "type": {
586
- "text": "boolean"
587
- },
588
- "default": "false",
589
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
590
- "attribute": "disabled",
591
- "reflects": true,
592
- "inheritedFrom": {
593
- "name": "InputMixin",
594
- "module": "src/common/mixins/InputMixin.ts"
595
- }
678
+ "name": "handleMonthSelect",
679
+ "privacy": "private"
596
680
  },
597
681
  {
598
682
  "kind": "field",
599
- "name": "name",
600
- "type": {
601
- "text": "string | undefined"
602
- },
603
- "description": "The name of the form component.",
604
- "attribute": "name",
605
- "inheritedFrom": {
606
- "name": "InputMixin",
607
- "module": "src/common/mixins/InputMixin.ts"
608
- }
683
+ "name": "handleYearSelect",
684
+ "privacy": "private"
609
685
  },
610
686
  {
611
687
  "kind": "field",
612
- "name": "value",
613
- "type": {
614
- "text": "string"
615
- },
616
- "default": "\"\"",
617
- "description": "The value of the form component.",
618
- "attribute": "value",
619
- "inheritedFrom": {
620
- "name": "InputMixin",
621
- "module": "src/common/mixins/InputMixin.ts"
622
- }
688
+ "name": "handleNextMonthClick",
689
+ "privacy": "private"
623
690
  },
624
691
  {
625
692
  "kind": "field",
626
- "name": "form",
627
- "privacy": "protected",
628
- "description": "Gets the form, if any, associated with the form element.",
629
- "inheritedFrom": {
630
- "name": "InputMixin",
631
- "module": "src/common/mixins/InputMixin.ts"
632
- }
693
+ "name": "handlePreviousMonthClick",
694
+ "privacy": "private"
633
695
  },
634
696
  {
635
697
  "kind": "field",
636
- "name": "focusableRef",
637
- "privacy": "protected",
638
- "inheritedFrom": {
639
- "name": "FocusableMixin",
640
- "module": "src/common/mixins/FocusableMixin.ts"
641
- }
642
- },
643
- {
644
- "kind": "method",
645
- "name": "focus",
646
- "parameters": [
647
- {
648
- "name": "options",
649
- "optional": true,
650
- "type": {
651
- "text": "FocusOptions"
652
- },
653
- "description": "An object which controls aspects of the focusing process."
654
- }
655
- ],
656
- "description": "Programmatically move focus to the component.",
657
- "inheritedFrom": {
658
- "name": "FocusableMixin",
659
- "module": "src/common/mixins/FocusableMixin.ts"
660
- }
661
- },
662
- {
663
- "kind": "method",
664
- "name": "blur",
665
- "description": "Programmatically remove focus from the component.",
666
- "inheritedFrom": {
667
- "name": "FocusableMixin",
668
- "module": "src/common/mixins/FocusableMixin.ts"
669
- }
698
+ "name": "enableActiveFocus",
699
+ "privacy": "private"
670
700
  },
671
701
  {
672
- "kind": "method",
673
- "name": "click",
674
- "description": "Programmatically simulates a click on the component.",
675
- "inheritedFrom": {
676
- "name": "FocusableMixin",
677
- "module": "src/common/mixins/FocusableMixin.ts"
678
- }
702
+ "kind": "field",
703
+ "name": "disableActiveFocus",
704
+ "privacy": "private"
679
705
  }
680
706
  ],
681
- "attributes": [
682
- {
683
- "name": "variant",
684
- "type": {
685
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
686
- },
687
- "default": "\"default\"",
688
- "description": "The style variant of the button.",
689
- "fieldName": "variant"
690
- },
691
- {
692
- "name": "type",
693
- "type": {
694
- "text": "\"button\" | \"submit\" | \"reset\""
695
- },
696
- "default": "\"submit\"",
697
- "description": "The type of the button.",
698
- "fieldName": "type"
699
- },
700
- {
701
- "name": "size",
702
- "type": {
703
- "text": "\"s\" | \"m\" | \"l\""
704
- },
705
- "default": "\"m\"",
706
- "description": "The size of the button.\nThis affects font-size and padding.",
707
- "fieldName": "size"
708
- },
709
- {
710
- "name": "href",
711
- "type": {
712
- "text": "string | undefined"
713
- },
714
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
715
- "fieldName": "href"
716
- },
707
+ "events": [
717
708
  {
718
- "name": "download",
709
+ "name": "nord-focus-date",
719
710
  "type": {
720
- "text": "boolean"
711
+ "text": "DateSelectEvent"
721
712
  },
722
- "default": "false",
723
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
724
- "fieldName": "download"
713
+ "description": "Dispatched when the calendar's focused date changes."
725
714
  },
726
715
  {
727
- "name": "target",
728
716
  "type": {
729
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
717
+ "text": "DateSelectEvent"
730
718
  },
731
- "default": "\"_self\"",
732
- "description": "When provided together with a href property, determines where\nto open the linked URL. The keywords have special meanings for\nwhere to load the URL: “_self” means the current browsing context,\n“_blank” usually a new tab but users can configure browsers this to\nopen a new window instead, “_parent” means the parent browsing\ncontext of the current one, but if no parent exists, behaves as\n_self, and finally “top” means the topmost browsing context.",
733
- "fieldName": "target"
734
- },
719
+ "description": "Dispatched when a date is selected and the value changes.",
720
+ "name": "change"
721
+ }
722
+ ],
723
+ "attributes": [
735
724
  {
736
- "name": "expand",
725
+ "name": "value",
737
726
  "type": {
738
- "text": "boolean"
727
+ "text": "string"
739
728
  },
740
- "default": "false",
741
- "description": "Controls whether the button expands to fill the width of its container.",
742
- "fieldName": "expand"
729
+ "default": "\"\"",
730
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
731
+ "fieldName": "value"
743
732
  },
744
733
  {
745
- "name": "disabled",
734
+ "name": "firstDayOfWeek",
746
735
  "type": {
747
- "text": "boolean"
736
+ "text": "DaysOfWeek"
748
737
  },
749
- "default": "false",
750
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
751
- "fieldName": "disabled",
752
- "inheritedFrom": {
753
- "name": "InputMixin",
754
- "module": "src/common/mixins/InputMixin.ts"
755
- }
738
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
739
+ "fieldName": "firstDayOfWeek"
756
740
  },
757
741
  {
758
- "name": "name",
742
+ "name": "min",
759
743
  "type": {
760
- "text": "string | undefined"
744
+ "text": "string"
761
745
  },
762
- "description": "The name of the form component.",
763
- "fieldName": "name",
764
- "inheritedFrom": {
765
- "name": "InputMixin",
766
- "module": "src/common/mixins/InputMixin.ts"
767
- }
746
+ "default": "\"\"",
747
+ "description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
748
+ "fieldName": "min"
768
749
  },
769
750
  {
770
- "name": "value",
751
+ "name": "max",
771
752
  "type": {
772
753
  "text": "string"
773
754
  },
774
755
  "default": "\"\"",
775
- "description": "The value of the form component.",
776
- "fieldName": "value",
777
- "inheritedFrom": {
778
- "name": "InputMixin",
779
- "module": "src/common/mixins/InputMixin.ts"
780
- }
781
- }
782
- ],
783
- "mixins": [
784
- {
785
- "name": "InputMixin",
786
- "module": "/src/common/mixins/InputMixin.js"
787
- },
788
- {
789
- "name": "FocusableMixin",
790
- "module": "/src/common/mixins/FocusableMixin.js"
756
+ "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
757
+ "fieldName": "max"
791
758
  }
792
759
  ],
793
760
  "superclass": {
@@ -795,8 +762,8 @@
795
762
  "package": "lit"
796
763
  },
797
764
  "status": "ready",
798
- "category": "action",
799
- "tagName": "nord-button",
765
+ "category": "list",
766
+ "tagName": "nord-calendar",
800
767
  "customElement": true
801
768
  }
802
769
  ],
@@ -805,415 +772,499 @@
805
772
  "kind": "js",
806
773
  "name": "default",
807
774
  "declaration": {
808
- "name": "Button",
809
- "module": "src/button/Button.ts"
775
+ "name": "Calendar",
776
+ "module": "src/calendar/Calendar.ts"
810
777
  }
811
778
  },
812
779
  {
813
780
  "kind": "custom-element-definition",
814
- "name": "nord-button",
781
+ "name": "nord-calendar",
815
782
  "declaration": {
816
- "name": "Button",
817
- "module": "src/button/Button.ts"
783
+ "name": "Calendar",
784
+ "module": "src/calendar/Calendar.ts"
818
785
  }
819
786
  }
820
787
  ],
821
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use clear and accurate labels.\n- Use established button colors appropriately. For example, only use a danger button style for an action that’s difficult or impossible to undo.\n- Prioritize the most important actions. Too many buttons will cause confusion.\n- Be consistent with positioning of buttons in the user interface.\n- Use strong, actionable verbs in labels such as “Add”, “Close”, “Cancel”, or “Save”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use buttons to link to other pages. Use regular link or a plain style instead where necessary.\n- Don’t use buttons for navigation where the link appears within or following a sentence.\n- Don’t use labels such as “Read more”, “Click here” or “More”.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `default` | Default style is the most common button variant. Only switch to another variant if you need to adjust the visual weight of the element. |\n| `primary` | Primary style is reserved for main call-to-actions. Should be used only once per content area or panel, e.g. for a “Save” action. |\n| `dashed` | Dashed style should be used for actions that trigger filtering. |\n| `danger` | Danger style should be used for actions that delete data or otherwise make it hard to undo the action. |\n| `plain` | Used for less important or less common actions. Can be also used for linking to other pages. |\n| `disabled` | Used for actions that aren’t currently available or not available anymore. Also prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies. |\n\n---\n\n## Additional considerations\n\n- Users of assistive technology expect a button to submit data or do an action. If you need the button to navigate into another view, use the `href` property which will output `<a>` tag instead of a `<button>`.\n- When you need to disable a button, use `disabled` property as it conveys this information correctly to assistive technologies like screen readers.\n- Button component provides 3 size variants; small, medium and large. The large size should only be used for marketing purposes or on areas such as an empty space/content notice.\n"
788
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
822
789
  },
823
790
  {
824
791
  "kind": "javascript-module",
825
- "path": "src/banner/Banner.ts",
792
+ "path": "src/calendar/DateSelectEvent.ts",
826
793
  "declarations": [
827
794
  {
828
795
  "kind": "class",
829
- "description": "Banner informs users about important changes or conditions in the\ninterface. Use this component if you need to communicate to users\nin a prominent way.",
830
- "name": "Banner",
831
- "slots": [
832
- {
833
- "description": "default slot",
834
- "name": ""
835
- }
836
- ],
796
+ "description": "",
797
+ "name": "DateSelectEvent",
837
798
  "members": [
838
799
  {
839
800
  "kind": "field",
840
- "name": "variant",
841
- "type": {
842
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
843
- },
844
- "default": "\"info\"",
845
- "description": "The style variant of the banner.",
846
- "attribute": "variant",
847
- "reflects": true
848
- }
849
- ],
850
- "attributes": [
851
- {
852
- "name": "variant",
801
+ "name": "date",
853
802
  "type": {
854
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
803
+ "text": "Date"
855
804
  },
856
- "default": "\"info\"",
857
- "description": "The style variant of the banner.",
858
- "fieldName": "variant"
805
+ "default": "date"
859
806
  }
860
807
  ],
861
808
  "superclass": {
862
- "name": "LitElement",
863
- "package": "lit"
864
- },
865
- "status": "new",
866
- "category": "feedback",
867
- "tagName": "nord-banner",
868
- "customElement": true
809
+ "name": "NordEvent",
810
+ "module": "/src/common/events.js"
811
+ }
869
812
  }
870
813
  ],
871
814
  "exports": [
872
815
  {
873
816
  "kind": "js",
874
- "name": "default",
875
- "declaration": {
876
- "name": "Banner",
877
- "module": "src/banner/Banner.ts"
878
- }
879
- },
880
- {
881
- "kind": "custom-element-definition",
882
- "name": "nord-banner",
817
+ "name": "DateSelectEvent",
883
818
  "declaration": {
884
- "name": "Banner",
885
- "module": "src/banner/Banner.ts"
819
+ "name": "DateSelectEvent",
820
+ "module": "src/calendar/DateSelectEvent.ts"
886
821
  }
887
822
  }
888
823
  ],
889
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use this component if you need to communicate in a prominent way.\n- Place banner at the top of the section it applies to.\n- Use for highlighting errors and success statuses.\n- Put banner close to the context it’s referring to.\n- Move focus to the banner if it’s relevant to the current workflow.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Move focus to banner if it appears on page load.\n- Use for highlighting general content or as a banner.\n- Use to replace an error page.\n\n</div>\n\n---\n\n## Content guidelines\n\nBanner content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident. Please see our status page for more details.</div>\n<div class=\"n-usage n-usage-dont\">There was an error.</div>\n\nWhen writing banner content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re Experiencing An Incident.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re experiencing an incident</div>\n"
824
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
890
825
  },
891
826
  {
892
827
  "kind": "javascript-module",
893
- "path": "src/calendar/Calendar.ts",
828
+ "path": "src/calendar/calendar-localization.ts",
894
829
  "declarations": [
895
830
  {
896
- "kind": "class",
897
- "description": "Calendar allows user to pick a date. It comes with built-in\nfunctionality that allows you to set a minimum and a maximum allowed date.\nPlease note that the date must be passed in ISO-8601 format.",
898
- "name": "Calendar",
899
- "members": [
831
+ "kind": "variable",
832
+ "name": "localization",
833
+ "type": {
834
+ "text": "CalendarLocalizedText"
835
+ },
836
+ "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n calendarHeading: \"Choose a date\",\n dayNames: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n monthNames: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n monthNamesShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n locale: \"en-GB\",\n}"
837
+ }
838
+ ],
839
+ "exports": [
840
+ {
841
+ "kind": "js",
842
+ "name": "default",
843
+ "declaration": {
844
+ "name": "localization",
845
+ "module": "src/calendar/calendar-localization.ts"
846
+ }
847
+ }
848
+ ],
849
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
850
+ },
851
+ {
852
+ "kind": "javascript-module",
853
+ "path": "src/calendar/month-view.ts",
854
+ "declarations": [
855
+ {
856
+ "kind": "function",
857
+ "name": "dayView",
858
+ "parameters": [
900
859
  {
901
- "kind": "field",
902
- "name": "dialogLabelId",
860
+ "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
903
861
  "type": {
904
- "text": "string"
905
- },
906
- "privacy": "private",
907
- "default": "\"dialog-header\""
908
- },
862
+ "text": "DatePickerDayProps"
863
+ }
864
+ }
865
+ ]
866
+ },
867
+ {
868
+ "kind": "function",
869
+ "name": "monthView",
870
+ "parameters": [
909
871
  {
910
- "kind": "field",
911
- "name": "monthSelectNode",
872
+ "name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n localization,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
912
873
  "type": {
913
- "text": "HTMLElement"
914
- },
915
- "privacy": "private"
916
- },
874
+ "text": "MonthViewArgs"
875
+ }
876
+ }
877
+ ]
878
+ }
879
+ ],
880
+ "exports": [
881
+ {
882
+ "kind": "js",
883
+ "name": "dayView",
884
+ "declaration": {
885
+ "name": "dayView",
886
+ "module": "src/calendar/month-view.ts"
887
+ }
888
+ },
889
+ {
890
+ "kind": "js",
891
+ "name": "monthView",
892
+ "declaration": {
893
+ "name": "monthView",
894
+ "module": "src/calendar/month-view.ts"
895
+ }
896
+ }
897
+ ],
898
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
899
+ },
900
+ {
901
+ "kind": "javascript-module",
902
+ "path": "src/button/Button.ts",
903
+ "declarations": [
904
+ {
905
+ "kind": "class",
906
+ "description": "Buttons are used for interface actions. Primary style should be\nused only once per section for main call-to-action, while other\nstyles can appear more frequently.",
907
+ "name": "Button",
908
+ "slots": [
917
909
  {
918
- "kind": "field",
919
- "name": "focusedDayNode",
920
- "type": {
921
- "text": "HTMLButtonElement"
922
- },
923
- "privacy": "private"
910
+ "description": "The button content",
911
+ "name": ""
924
912
  },
925
913
  {
926
- "kind": "field",
927
- "name": "direction",
928
- "privacy": "private",
929
- "default": "new DirectionController(this)"
914
+ "description": "Used to place content before button text. Typically used for icons.",
915
+ "name": "before"
930
916
  },
931
917
  {
932
- "kind": "field",
933
- "name": "swipe",
934
- "privacy": "private",
935
- "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
936
- },
918
+ "description": "Used to place content after button text. Typically used for icons.",
919
+ "name": "after"
920
+ }
921
+ ],
922
+ "members": [
937
923
  {
938
924
  "kind": "field",
939
- "name": "shortcuts",
925
+ "name": "buttonRef",
940
926
  "privacy": "private"
941
927
  },
942
928
  {
943
929
  "kind": "field",
944
- "name": "dateFormatShort",
945
- "type": {
946
- "text": "Intl.DateTimeFormat"
947
- },
930
+ "name": "lightDom",
948
931
  "privacy": "private",
949
- "description": "Whilst dateAdapter is used for handling the formatting/parsing dates in the input,\nthese are used to format dates exclusively for the benefit of screen readers.\n\nWe prefer DateTimeFormat over date.toLocaleDateString, as the former has\nbetter performance when formatting large number of dates. See:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString#Performance"
932
+ "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
950
933
  },
951
934
  {
952
935
  "kind": "field",
953
- "name": "localization",
936
+ "name": "variant",
954
937
  "type": {
955
- "text": "CalendarLocalizedText"
938
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
956
939
  },
957
- "default": "localization"
940
+ "default": "\"default\"",
941
+ "description": "The style variant of the button.",
942
+ "attribute": "variant",
943
+ "reflects": true
958
944
  },
959
945
  {
960
946
  "kind": "field",
961
- "name": "value",
947
+ "name": "type",
962
948
  "type": {
963
- "text": "string"
949
+ "text": "\"button\" | \"submit\" | \"reset\""
964
950
  },
965
- "default": "\"\"",
966
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
967
- "attribute": "value"
951
+ "default": "\"submit\"",
952
+ "description": "The type of the button.",
953
+ "attribute": "type",
954
+ "reflects": true
968
955
  },
969
956
  {
970
957
  "kind": "field",
971
- "name": "firstDayOfWeek",
958
+ "name": "size",
972
959
  "type": {
973
- "text": "DaysOfWeek"
960
+ "text": "\"s\" | \"m\" | \"l\""
974
961
  },
975
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
976
- "attribute": "firstDayOfWeek"
962
+ "default": "\"m\"",
963
+ "description": "The size of the button.\nThis affects font-size and padding.",
964
+ "attribute": "size",
965
+ "reflects": true
977
966
  },
978
967
  {
979
968
  "kind": "field",
980
- "name": "min",
969
+ "name": "href",
981
970
  "type": {
982
- "text": "string"
971
+ "text": "string | undefined"
983
972
  },
984
- "default": "\"\"",
985
- "description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
986
- "attribute": "min"
973
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
974
+ "attribute": "href",
975
+ "reflects": true
987
976
  },
988
977
  {
989
978
  "kind": "field",
990
- "name": "max",
979
+ "name": "download",
991
980
  "type": {
992
- "text": "string"
981
+ "text": "boolean"
993
982
  },
994
- "default": "\"\"",
995
- "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
996
- "attribute": "max"
983
+ "default": "false",
984
+ "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
985
+ "attribute": "download"
997
986
  },
998
987
  {
999
988
  "kind": "field",
1000
- "name": "isDateDisabled",
989
+ "name": "target",
1001
990
  "type": {
1002
- "text": "DateDisabledPredicate"
991
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
1003
992
  },
1004
- "default": "isDateDisabled",
1005
- "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
993
+ "default": "\"_self\"",
994
+ "description": "When provided together with a href property, determines where\nto open the linked URL. The keywords have special meanings for\nwhere to load the URL: “_self” means the current browsing context,\n“_blank” usually a new tab but users can configure browsers this to\nopen a new window instead, “_parent” means the parent browsing\ncontext of the current one, but if no parent exists, behaves as\n_self, and finally “top” means the topmost browsing context.",
995
+ "attribute": "target",
996
+ "reflects": true
1006
997
  },
1007
998
  {
1008
999
  "kind": "field",
1009
- "name": "activeFocus",
1000
+ "name": "expand",
1010
1001
  "type": {
1011
1002
  "text": "boolean"
1012
1003
  },
1013
- "privacy": "private",
1014
- "default": "false"
1004
+ "default": "false",
1005
+ "description": "Controls whether the button expands to fill the width of its container.",
1006
+ "attribute": "expand",
1007
+ "reflects": true
1015
1008
  },
1016
1009
  {
1017
- "kind": "field",
1018
- "name": "focusedDay",
1010
+ "kind": "method",
1011
+ "name": "renderLink",
1019
1012
  "privacy": "private",
1020
- "default": "new Date()"
1013
+ "parameters": [
1014
+ {
1015
+ "name": "innards",
1016
+ "type": {
1017
+ "text": "TemplateResult"
1018
+ }
1019
+ }
1020
+ ],
1021
+ "description": "We jump through some hoops here to ensure the link is treated correctly when \"disabled\".\nLinks cannot be disabled natively, so we need to rely on some aria magic to get the correct semantics.\nAlong with the advice in the article below, we also set tabindex to \"-1\", so it is taken out of tab order."
1021
1022
  },
1022
1023
  {
1023
1024
  "kind": "method",
1024
- "name": "focus",
1025
+ "name": "renderButton",
1026
+ "privacy": "private",
1025
1027
  "parameters": [
1026
1028
  {
1027
- "name": "options",
1028
- "optional": true,
1029
+ "name": "innards",
1029
1030
  "type": {
1030
- "text": "FocusOptions & { target: \"day\" | \"month\" }"
1031
- },
1032
- "description": "An object which controls aspects of the focusing process."
1031
+ "text": "TemplateResult"
1032
+ }
1033
1033
  }
1034
- ],
1035
- "description": "Programmatically move focus to the calendar."
1034
+ ]
1036
1035
  },
1037
1036
  {
1038
1037
  "kind": "method",
1039
- "name": "createDateFormatter",
1038
+ "name": "renderLightDom",
1040
1039
  "privacy": "private"
1041
1040
  },
1042
1041
  {
1043
1042
  "kind": "field",
1044
- "name": "handleDaySelect",
1043
+ "name": "handleOuterClick",
1045
1044
  "privacy": "private"
1046
1045
  },
1047
1046
  {
1048
1047
  "kind": "method",
1049
- "name": "addDays",
1048
+ "name": "handleClick",
1050
1049
  "privacy": "private",
1051
1050
  "parameters": [
1052
1051
  {
1053
- "name": "days",
1052
+ "name": "e",
1054
1053
  "type": {
1055
- "text": "number"
1054
+ "text": "Event"
1056
1055
  }
1057
1056
  }
1058
1057
  ]
1059
1058
  },
1060
1059
  {
1061
- "kind": "method",
1062
- "name": "addMonths",
1063
- "privacy": "private",
1064
- "parameters": [
1065
- {
1066
- "name": "months",
1067
- "type": {
1068
- "text": "number"
1069
- }
1070
- }
1071
- ]
1060
+ "kind": "field",
1061
+ "name": "disabled",
1062
+ "type": {
1063
+ "text": "boolean"
1064
+ },
1065
+ "default": "false",
1066
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1067
+ "attribute": "disabled",
1068
+ "reflects": true,
1069
+ "inheritedFrom": {
1070
+ "name": "InputMixin",
1071
+ "module": "src/common/mixins/InputMixin.ts"
1072
+ }
1072
1073
  },
1073
1074
  {
1074
- "kind": "method",
1075
- "name": "addYears",
1076
- "privacy": "private",
1077
- "parameters": [
1078
- {
1079
- "name": "years",
1080
- "type": {
1081
- "text": "number"
1082
- }
1083
- }
1084
- ]
1075
+ "kind": "field",
1076
+ "name": "name",
1077
+ "type": {
1078
+ "text": "string | undefined"
1079
+ },
1080
+ "description": "The name of the form component.",
1081
+ "attribute": "name",
1082
+ "inheritedFrom": {
1083
+ "name": "InputMixin",
1084
+ "module": "src/common/mixins/InputMixin.ts"
1085
+ }
1085
1086
  },
1086
1087
  {
1087
- "kind": "method",
1088
- "name": "startOfWeek",
1089
- "privacy": "private"
1088
+ "kind": "field",
1089
+ "name": "value",
1090
+ "type": {
1091
+ "text": "string"
1092
+ },
1093
+ "default": "\"\"",
1094
+ "description": "The value of the form component.",
1095
+ "attribute": "value",
1096
+ "inheritedFrom": {
1097
+ "name": "InputMixin",
1098
+ "module": "src/common/mixins/InputMixin.ts"
1099
+ }
1090
1100
  },
1091
1101
  {
1092
- "kind": "method",
1093
- "name": "endOfWeek",
1094
- "privacy": "private"
1102
+ "kind": "field",
1103
+ "name": "form",
1104
+ "privacy": "protected",
1105
+ "description": "Gets the form, if any, associated with the form element.",
1106
+ "inheritedFrom": {
1107
+ "name": "InputMixin",
1108
+ "module": "src/common/mixins/InputMixin.ts"
1109
+ }
1095
1110
  },
1096
1111
  {
1097
- "kind": "method",
1098
- "name": "setMonth",
1099
- "privacy": "private",
1100
- "parameters": [
1101
- {
1102
- "name": "month",
1103
- "type": {
1104
- "text": "number"
1105
- }
1106
- }
1107
- ]
1112
+ "kind": "field",
1113
+ "name": "focusableRef",
1114
+ "privacy": "protected",
1115
+ "inheritedFrom": {
1116
+ "name": "FocusableMixin",
1117
+ "module": "src/common/mixins/FocusableMixin.ts"
1118
+ }
1108
1119
  },
1109
1120
  {
1110
1121
  "kind": "method",
1111
- "name": "setYear",
1112
- "privacy": "private",
1122
+ "name": "focus",
1113
1123
  "parameters": [
1114
1124
  {
1115
- "name": "year",
1125
+ "name": "options",
1126
+ "optional": true,
1116
1127
  "type": {
1117
- "text": "number"
1118
- }
1128
+ "text": "FocusOptions"
1129
+ },
1130
+ "description": "An object which controls aspects of the focusing process."
1119
1131
  }
1120
- ]
1132
+ ],
1133
+ "description": "Programmatically move focus to the component.",
1134
+ "inheritedFrom": {
1135
+ "name": "FocusableMixin",
1136
+ "module": "src/common/mixins/FocusableMixin.ts"
1137
+ }
1121
1138
  },
1122
1139
  {
1123
1140
  "kind": "method",
1124
- "name": "setFocusedDay",
1125
- "privacy": "private",
1126
- "parameters": [
1127
- {
1128
- "name": "day",
1129
- "type": {
1130
- "text": "Date"
1131
- }
1132
- }
1133
- ]
1141
+ "name": "blur",
1142
+ "description": "Programmatically remove focus from the component.",
1143
+ "inheritedFrom": {
1144
+ "name": "FocusableMixin",
1145
+ "module": "src/common/mixins/FocusableMixin.ts"
1146
+ }
1134
1147
  },
1135
1148
  {
1136
- "kind": "field",
1137
- "name": "handleMonthSelect",
1138
- "privacy": "private"
1139
- },
1149
+ "kind": "method",
1150
+ "name": "click",
1151
+ "description": "Programmatically simulates a click on the component.",
1152
+ "inheritedFrom": {
1153
+ "name": "FocusableMixin",
1154
+ "module": "src/common/mixins/FocusableMixin.ts"
1155
+ }
1156
+ }
1157
+ ],
1158
+ "attributes": [
1140
1159
  {
1141
- "kind": "field",
1142
- "name": "handleYearSelect",
1143
- "privacy": "private"
1160
+ "name": "variant",
1161
+ "type": {
1162
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
1163
+ },
1164
+ "default": "\"default\"",
1165
+ "description": "The style variant of the button.",
1166
+ "fieldName": "variant"
1144
1167
  },
1145
1168
  {
1146
- "kind": "field",
1147
- "name": "handleNextMonthClick",
1148
- "privacy": "private"
1169
+ "name": "type",
1170
+ "type": {
1171
+ "text": "\"button\" | \"submit\" | \"reset\""
1172
+ },
1173
+ "default": "\"submit\"",
1174
+ "description": "The type of the button.",
1175
+ "fieldName": "type"
1149
1176
  },
1150
1177
  {
1151
- "kind": "field",
1152
- "name": "handlePreviousMonthClick",
1153
- "privacy": "private"
1178
+ "name": "size",
1179
+ "type": {
1180
+ "text": "\"s\" | \"m\" | \"l\""
1181
+ },
1182
+ "default": "\"m\"",
1183
+ "description": "The size of the button.\nThis affects font-size and padding.",
1184
+ "fieldName": "size"
1154
1185
  },
1155
1186
  {
1156
- "kind": "field",
1157
- "name": "enableActiveFocus",
1158
- "privacy": "private"
1187
+ "name": "href",
1188
+ "type": {
1189
+ "text": "string | undefined"
1190
+ },
1191
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
1192
+ "fieldName": "href"
1159
1193
  },
1160
1194
  {
1161
- "kind": "field",
1162
- "name": "disableActiveFocus",
1163
- "privacy": "private"
1164
- }
1165
- ],
1166
- "events": [
1195
+ "name": "download",
1196
+ "type": {
1197
+ "text": "boolean"
1198
+ },
1199
+ "default": "false",
1200
+ "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
1201
+ "fieldName": "download"
1202
+ },
1167
1203
  {
1168
- "name": "nord-focus-date",
1204
+ "name": "target",
1169
1205
  "type": {
1170
- "text": "DateSelectEvent"
1206
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
1171
1207
  },
1172
- "description": "Dispatched when the calendar's focused date changes."
1208
+ "default": "\"_self\"",
1209
+ "description": "When provided together with a href property, determines where\nto open the linked URL. The keywords have special meanings for\nwhere to load the URL: “_self” means the current browsing context,\n“_blank” usually a new tab but users can configure browsers this to\nopen a new window instead, “_parent” means the parent browsing\ncontext of the current one, but if no parent exists, behaves as\n_self, and finally “top” means the topmost browsing context.",
1210
+ "fieldName": "target"
1173
1211
  },
1174
1212
  {
1213
+ "name": "expand",
1175
1214
  "type": {
1176
- "text": "DateSelectEvent"
1215
+ "text": "boolean"
1177
1216
  },
1178
- "description": "Dispatched when a date is selected and the value changes.",
1179
- "name": "change"
1180
- }
1181
- ],
1182
- "attributes": [
1217
+ "default": "false",
1218
+ "description": "Controls whether the button expands to fill the width of its container.",
1219
+ "fieldName": "expand"
1220
+ },
1183
1221
  {
1184
- "name": "value",
1222
+ "name": "disabled",
1185
1223
  "type": {
1186
- "text": "string"
1224
+ "text": "boolean"
1187
1225
  },
1188
- "default": "\"\"",
1189
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1190
- "fieldName": "value"
1226
+ "default": "false",
1227
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1228
+ "fieldName": "disabled",
1229
+ "inheritedFrom": {
1230
+ "name": "InputMixin",
1231
+ "module": "src/common/mixins/InputMixin.ts"
1232
+ }
1191
1233
  },
1192
1234
  {
1193
- "name": "firstDayOfWeek",
1235
+ "name": "name",
1194
1236
  "type": {
1195
- "text": "DaysOfWeek"
1237
+ "text": "string | undefined"
1196
1238
  },
1197
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1198
- "fieldName": "firstDayOfWeek"
1239
+ "description": "The name of the form component.",
1240
+ "fieldName": "name",
1241
+ "inheritedFrom": {
1242
+ "name": "InputMixin",
1243
+ "module": "src/common/mixins/InputMixin.ts"
1244
+ }
1199
1245
  },
1200
1246
  {
1201
- "name": "min",
1247
+ "name": "value",
1202
1248
  "type": {
1203
1249
  "text": "string"
1204
1250
  },
1205
1251
  "default": "\"\"",
1206
- "description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
1207
- "fieldName": "min"
1252
+ "description": "The value of the form component.",
1253
+ "fieldName": "value",
1254
+ "inheritedFrom": {
1255
+ "name": "InputMixin",
1256
+ "module": "src/common/mixins/InputMixin.ts"
1257
+ }
1258
+ }
1259
+ ],
1260
+ "mixins": [
1261
+ {
1262
+ "name": "InputMixin",
1263
+ "module": "/src/common/mixins/InputMixin.js"
1208
1264
  },
1209
1265
  {
1210
- "name": "max",
1211
- "type": {
1212
- "text": "string"
1213
- },
1214
- "default": "\"\"",
1215
- "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
1216
- "fieldName": "max"
1266
+ "name": "FocusableMixin",
1267
+ "module": "/src/common/mixins/FocusableMixin.js"
1217
1268
  }
1218
1269
  ],
1219
1270
  "superclass": {
@@ -1221,8 +1272,8 @@
1221
1272
  "package": "lit"
1222
1273
  },
1223
1274
  "status": "ready",
1224
- "category": "list",
1225
- "tagName": "nord-calendar",
1275
+ "category": "action",
1276
+ "tagName": "nord-button",
1226
1277
  "customElement": true
1227
1278
  }
1228
1279
  ],
@@ -1231,130 +1282,88 @@
1231
1282
  "kind": "js",
1232
1283
  "name": "default",
1233
1284
  "declaration": {
1234
- "name": "Calendar",
1235
- "module": "src/calendar/Calendar.ts"
1285
+ "name": "Button",
1286
+ "module": "src/button/Button.ts"
1236
1287
  }
1237
1288
  },
1238
1289
  {
1239
1290
  "kind": "custom-element-definition",
1240
- "name": "nord-calendar",
1291
+ "name": "nord-button",
1241
1292
  "declaration": {
1242
- "name": "Calendar",
1243
- "module": "src/calendar/Calendar.ts"
1293
+ "name": "Button",
1294
+ "module": "src/button/Button.ts"
1244
1295
  }
1245
1296
  }
1246
1297
  ],
1247
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
1298
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use clear and accurate labels.\n- Use established button colors appropriately. For example, only use a danger button style for an action that’s difficult or impossible to undo.\n- Prioritize the most important actions. Too many buttons will cause confusion.\n- Be consistent with positioning of buttons in the user interface.\n- Use strong, actionable verbs in labels such as “Add”, “Close”, “Cancel”, or “Save”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use buttons to link to other pages. Use regular link or a plain style instead where necessary.\n- Don’t use buttons for navigation where the link appears within or following a sentence.\n- Don’t use labels such as “Read more”, “Click here” or “More”.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `default` | Default style is the most common button variant. Only switch to another variant if you need to adjust the visual weight of the element. |\n| `primary` | Primary style is reserved for main call-to-actions. Should be used only once per content area or panel, e.g. for a “Save” action. |\n| `dashed` | Dashed style should be used for actions that trigger filtering. |\n| `danger` | Danger style should be used for actions that delete data or otherwise make it hard to undo the action. |\n| `plain` | Used for less important or less common actions. Can be also used for linking to other pages. |\n| `disabled` | Used for actions that aren’t currently available or not available anymore. Also prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies. |\n\n---\n\n## Additional considerations\n\n- Users of assistive technology expect a button to submit data or do an action. If you need the button to navigate into another view, use the `href` property which will output `<a>` tag instead of a `<button>`.\n- When you need to disable a button, use `disabled` property as it conveys this information correctly to assistive technologies like screen readers.\n- Button component provides 3 size variants; small, medium and large. The large size should only be used for marketing purposes or on areas such as an empty space/content notice.\n"
1248
1299
  },
1249
1300
  {
1250
1301
  "kind": "javascript-module",
1251
- "path": "src/calendar/DateSelectEvent.ts",
1302
+ "path": "src/banner/Banner.ts",
1252
1303
  "declarations": [
1253
1304
  {
1254
1305
  "kind": "class",
1255
- "description": "",
1256
- "name": "DateSelectEvent",
1306
+ "description": "Banner informs users about important changes or conditions in the\ninterface. Use this component if you need to communicate to users\nin a prominent way.",
1307
+ "name": "Banner",
1308
+ "slots": [
1309
+ {
1310
+ "description": "default slot",
1311
+ "name": ""
1312
+ }
1313
+ ],
1257
1314
  "members": [
1258
1315
  {
1259
1316
  "kind": "field",
1260
- "name": "date",
1317
+ "name": "variant",
1261
1318
  "type": {
1262
- "text": "Date"
1319
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
1263
1320
  },
1264
- "default": "date"
1321
+ "default": "\"info\"",
1322
+ "description": "The style variant of the banner.",
1323
+ "attribute": "variant",
1324
+ "reflects": true
1265
1325
  }
1266
1326
  ],
1267
- "superclass": {
1268
- "name": "NordEvent",
1269
- "module": "/src/common/events.js"
1270
- }
1271
- }
1272
- ],
1273
- "exports": [
1274
- {
1275
- "kind": "js",
1276
- "name": "DateSelectEvent",
1277
- "declaration": {
1278
- "name": "DateSelectEvent",
1279
- "module": "src/calendar/DateSelectEvent.ts"
1280
- }
1281
- }
1282
- ],
1283
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
1284
- },
1285
- {
1286
- "kind": "javascript-module",
1287
- "path": "src/calendar/calendar-localization.ts",
1288
- "declarations": [
1289
- {
1290
- "kind": "variable",
1291
- "name": "localization",
1292
- "type": {
1293
- "text": "CalendarLocalizedText"
1294
- },
1295
- "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n calendarHeading: \"Choose a date\",\n dayNames: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n monthNames: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n monthNamesShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n locale: \"en-GB\",\n}"
1296
- }
1297
- ],
1298
- "exports": [
1299
- {
1300
- "kind": "js",
1301
- "name": "default",
1302
- "declaration": {
1303
- "name": "localization",
1304
- "module": "src/calendar/calendar-localization.ts"
1305
- }
1306
- }
1307
- ],
1308
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
1309
- },
1310
- {
1311
- "kind": "javascript-module",
1312
- "path": "src/calendar/month-view.ts",
1313
- "declarations": [
1314
- {
1315
- "kind": "function",
1316
- "name": "dayView",
1317
- "parameters": [
1318
- {
1319
- "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
1320
- "type": {
1321
- "text": "DatePickerDayProps"
1322
- }
1323
- }
1324
- ]
1325
- },
1326
- {
1327
- "kind": "function",
1328
- "name": "monthView",
1329
- "parameters": [
1327
+ "attributes": [
1330
1328
  {
1331
- "name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n localization,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
1329
+ "name": "variant",
1332
1330
  "type": {
1333
- "text": "MonthViewArgs"
1334
- }
1331
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
1332
+ },
1333
+ "default": "\"info\"",
1334
+ "description": "The style variant of the banner.",
1335
+ "fieldName": "variant"
1335
1336
  }
1336
- ]
1337
+ ],
1338
+ "superclass": {
1339
+ "name": "LitElement",
1340
+ "package": "lit"
1341
+ },
1342
+ "status": "new",
1343
+ "category": "feedback",
1344
+ "tagName": "nord-banner",
1345
+ "customElement": true
1337
1346
  }
1338
1347
  ],
1339
1348
  "exports": [
1340
1349
  {
1341
1350
  "kind": "js",
1342
- "name": "dayView",
1351
+ "name": "default",
1343
1352
  "declaration": {
1344
- "name": "dayView",
1345
- "module": "src/calendar/month-view.ts"
1353
+ "name": "Banner",
1354
+ "module": "src/banner/Banner.ts"
1346
1355
  }
1347
1356
  },
1348
1357
  {
1349
- "kind": "js",
1350
- "name": "monthView",
1358
+ "kind": "custom-element-definition",
1359
+ "name": "nord-banner",
1351
1360
  "declaration": {
1352
- "name": "monthView",
1353
- "module": "src/calendar/month-view.ts"
1361
+ "name": "Banner",
1362
+ "module": "src/banner/Banner.ts"
1354
1363
  }
1355
1364
  }
1356
1365
  ],
1357
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
1366
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use this component if you need to communicate in a prominent way.\n- Place banner at the top of the section it applies to.\n- Use for highlighting errors and success statuses.\n- Put banner close to the context it’s referring to.\n- Move focus to the banner if it’s relevant to the current workflow.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Move focus to banner if it appears on page load.\n- Use for highlighting general content or as a banner.\n- Use to replace an error page.\n\n</div>\n\n---\n\n## Content guidelines\n\nBanner content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident. Please see our status page for more details.</div>\n<div class=\"n-usage n-usage-dont\">There was an error.</div>\n\nWhen writing banner content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re Experiencing An Incident.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re experiencing an incident</div>\n"
1358
1367
  },
1359
1368
  {
1360
1369
  "kind": "javascript-module",
@@ -3604,51 +3613,6 @@
3604
3613
  }
3605
3614
  ]
3606
3615
  },
3607
- {
3608
- "kind": "javascript-module",
3609
- "path": "src/empty-state/EmptyState.ts",
3610
- "declarations": [
3611
- {
3612
- "kind": "class",
3613
- "description": "Empty state can be used when there is no data to display to\ndescribe what the user can do next. Empty state provides\nexplanation and guidance to help user progress.",
3614
- "name": "EmptyState",
3615
- "slots": [
3616
- {
3617
- "description": "default slot",
3618
- "name": ""
3619
- }
3620
- ],
3621
- "members": [],
3622
- "superclass": {
3623
- "name": "LitElement",
3624
- "package": "lit"
3625
- },
3626
- "status": "new",
3627
- "category": "feedback",
3628
- "tagName": "nord-empty-state",
3629
- "customElement": true
3630
- }
3631
- ],
3632
- "exports": [
3633
- {
3634
- "kind": "js",
3635
- "name": "default",
3636
- "declaration": {
3637
- "name": "EmptyState",
3638
- "module": "src/empty-state/EmptyState.ts"
3639
- }
3640
- },
3641
- {
3642
- "kind": "custom-element-definition",
3643
- "name": "nord-empty-state",
3644
- "declaration": {
3645
- "name": "EmptyState",
3646
- "module": "src/empty-state/EmptyState.ts"
3647
- }
3648
- }
3649
- ],
3650
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when another component or part of UI has no items or data to show.\n- Help users by clearly explaining the benefit and utility of a product or feature.\n- Be encouraging and never make users feel unsuccessful or guilty.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use as a generic banner to highlight specific content.\n\n</div>\n\n---\n\n## Content guidelines\n\nEmpty state headings should state to the user what’s wrong or why there’s no content:\n\n<div class=\"n-usage n-usage-do\">No results found</div>\n<div class=\"n-usage n-usage-dont\">Error</div>\n\nWhen writing empty state headings, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">You don’t have access to this content</div>\n<div class=\"n-usage n-usage-dont\">You Don’t Have Access To This Content</div>\n\nDescriptions in empty states should add useful and relevant additional information:\n\n<div class=\"n-usage n-usage-do\">We were unable to connect to the service. Click Retry to try again or View log to learn what happened.</div>\n<div class=\"n-usage n-usage-dont\">No connection.</div>\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">Clear filters</div>\n<div class=\"n-usage n-usage-dont\">Clear</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">View log</div>\n<div class=\"n-usage n-usage-dont\">View Log</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Request access</div>\n<div class=\"n-usage n-usage-dont\">Request an access</div>\n"
3651
- },
3652
3616
  {
3653
3617
  "kind": "javascript-module",
3654
3618
  "path": "src/date-picker/DatePicker.ts",
@@ -3828,13 +3792,13 @@
3828
3792
  {
3829
3793
  "name": "moveFocusToButton",
3830
3794
  "default": "true",
3831
- "description": "controls whether focus should be returned to the date picker's button",
3795
+ "description": "controls whether focus should be returned to the date picker's button.",
3832
3796
  "type": {
3833
3797
  "text": "boolean"
3834
3798
  }
3835
3799
  }
3836
3800
  ],
3837
- "description": "Hide the calendar modal"
3801
+ "description": "Hide the calendar modal."
3838
3802
  },
3839
3803
  {
3840
3804
  "kind": "method",
@@ -4542,6 +4506,51 @@
4542
4506
  ],
4543
4507
  "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use to choose a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nDate picker is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Choose date button\n\n- `Space, Enter`: Opens the date picker dialog and moves focus to the first select menu in the dialog.\n\n### Date picker dialog\n\n- `Esc`: Closes the date picker dialog and moves focus back to the “choose date” button.\n- `Tab`: Moves focus to the next element in the dialog. Please note since the calendar uses `role=\"grid\"`, only one button in the calendar grid is in the tab sequence. Additionally, if focus is on the last focusable element, focus is next moved back to the first focusable element inside the date picker dialog.\n- `Shift + Tab`: Same as above, but in reverse order.\n\n### Date picker dialog: Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Date picker dialog: Date grid\n\n- `Space, Enter`: Selects a date, closes the dialog, and moves focus back to the “Choose Date” button. Additionally updates the value of the date picker input with the selected date, and adds selected date to “Choose Date” button label.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n\n#### Date picker dialog: Close button\n\n- `Space, Enter`: Closes the dialog, moves focus to “choose date” button, but does not update the date in input.\n"
4544
4508
  },
4509
+ {
4510
+ "kind": "javascript-module",
4511
+ "path": "src/empty-state/EmptyState.ts",
4512
+ "declarations": [
4513
+ {
4514
+ "kind": "class",
4515
+ "description": "Empty state can be used when there is no data to display to\ndescribe what the user can do next. Empty state provides\nexplanation and guidance to help user progress.",
4516
+ "name": "EmptyState",
4517
+ "slots": [
4518
+ {
4519
+ "description": "default slot",
4520
+ "name": ""
4521
+ }
4522
+ ],
4523
+ "members": [],
4524
+ "superclass": {
4525
+ "name": "LitElement",
4526
+ "package": "lit"
4527
+ },
4528
+ "status": "new",
4529
+ "category": "feedback",
4530
+ "tagName": "nord-empty-state",
4531
+ "customElement": true
4532
+ }
4533
+ ],
4534
+ "exports": [
4535
+ {
4536
+ "kind": "js",
4537
+ "name": "default",
4538
+ "declaration": {
4539
+ "name": "EmptyState",
4540
+ "module": "src/empty-state/EmptyState.ts"
4541
+ }
4542
+ },
4543
+ {
4544
+ "kind": "custom-element-definition",
4545
+ "name": "nord-empty-state",
4546
+ "declaration": {
4547
+ "name": "EmptyState",
4548
+ "module": "src/empty-state/EmptyState.ts"
4549
+ }
4550
+ }
4551
+ ],
4552
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when another component or part of UI has no items or data to show.\n- Help users by clearly explaining the benefit and utility of a product or feature.\n- Be encouraging and never make users feel unsuccessful or guilty.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use as a generic banner to highlight specific content.\n\n</div>\n\n---\n\n## Content guidelines\n\nEmpty state headings should state to the user what’s wrong or why there’s no content:\n\n<div class=\"n-usage n-usage-do\">No results found</div>\n<div class=\"n-usage n-usage-dont\">Error</div>\n\nWhen writing empty state headings, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">You don’t have access to this content</div>\n<div class=\"n-usage n-usage-dont\">You Don’t Have Access To This Content</div>\n\nDescriptions in empty states should add useful and relevant additional information:\n\n<div class=\"n-usage n-usage-do\">We were unable to connect to the service. Click Retry to try again or View log to learn what happened.</div>\n<div class=\"n-usage n-usage-dont\">No connection.</div>\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">Clear filters</div>\n<div class=\"n-usage n-usage-dont\">Clear</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">View log</div>\n<div class=\"n-usage n-usage-dont\">View Log</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Request access</div>\n<div class=\"n-usage n-usage-dont\">Request an access</div>\n"
4553
+ },
4545
4554
  {
4546
4555
  "kind": "javascript-module",
4547
4556
  "path": "src/fieldset/Fieldset.ts",
@@ -4845,16 +4854,19 @@
4845
4854
  "name": "iconOrName",
4846
4855
  "type": {
4847
4856
  "text": "string | { title: string; default: string }"
4848
- }
4857
+ },
4858
+ "description": "The name of the icon to be registered or an object representing the icon to be registered, where \"title\" is the icon's name, and \"default\" is the SVG string."
4849
4859
  },
4850
4860
  {
4851
4861
  "name": "icon",
4852
4862
  "optional": true,
4853
4863
  "type": {
4854
4864
  "text": "string"
4855
- }
4865
+ },
4866
+ "description": "The SVG string for the icon."
4856
4867
  }
4857
- ]
4868
+ ],
4869
+ "description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
4858
4870
  },
4859
4871
  {
4860
4872
  "kind": "field",
@@ -5618,28 +5630,27 @@
5618
5630
  },
5619
5631
  {
5620
5632
  "kind": "javascript-module",
5621
- "path": "src/nav-group/NavGroup.ts",
5633
+ "path": "src/layout/Layout.ts",
5622
5634
  "declarations": [
5623
5635
  {
5624
5636
  "kind": "class",
5625
- "description": "Navigation group includes all the actions or items in a single\ngroup and is used for grouping items into related categories.",
5626
- "name": "NavGroup",
5637
+ "description": "Layout component is used to create the main layout of an app. Layout\ncurrently comes with one main configuration: two-column.",
5638
+ "name": "Layout",
5627
5639
  "slots": [
5628
5640
  {
5629
- "description": "The default slot used for the nav items.",
5641
+ "description": "The default main section content.",
5630
5642
  "name": ""
5643
+ },
5644
+ {
5645
+ "description": "Used to place content inside the navigation sidebar.",
5646
+ "name": "nav"
5647
+ },
5648
+ {
5649
+ "description": "Used to place content inside the header section.",
5650
+ "name": "header"
5631
5651
  }
5632
5652
  ],
5633
5653
  "members": [
5634
- {
5635
- "kind": "field",
5636
- "name": "heading",
5637
- "type": {
5638
- "text": "string | undefined"
5639
- },
5640
- "description": "Heading and accessible label for the nav group",
5641
- "attribute": "heading"
5642
- },
5643
5654
  {
5644
5655
  "kind": "field",
5645
5656
  "name": "_warningLogged",
@@ -5655,16 +5666,6 @@
5655
5666
  }
5656
5667
  }
5657
5668
  ],
5658
- "attributes": [
5659
- {
5660
- "name": "heading",
5661
- "type": {
5662
- "text": "string | undefined"
5663
- },
5664
- "description": "Heading and accessible label for the nav group",
5665
- "fieldName": "heading"
5666
- }
5667
- ],
5668
5669
  "mixins": [
5669
5670
  {
5670
5671
  "name": "DraftComponentMixin",
@@ -5676,8 +5677,8 @@
5676
5677
  "package": "lit"
5677
5678
  },
5678
5679
  "status": "draft",
5679
- "category": "navigation",
5680
- "tagName": "nord-nav-group",
5680
+ "category": "structure",
5681
+ "tagName": "nord-layout",
5681
5682
  "customElement": true
5682
5683
  }
5683
5684
  ],
@@ -5686,44 +5687,45 @@
5686
5687
  "kind": "js",
5687
5688
  "name": "default",
5688
5689
  "declaration": {
5689
- "name": "NavGroup",
5690
- "module": "src/nav-group/NavGroup.ts"
5690
+ "name": "Layout",
5691
+ "module": "src/layout/Layout.ts"
5691
5692
  }
5692
5693
  },
5693
5694
  {
5694
5695
  "kind": "custom-element-definition",
5695
- "name": "nord-nav-group",
5696
+ "name": "nord-layout",
5696
5697
  "declaration": {
5697
- "name": "NavGroup",
5698
- "module": "src/nav-group/NavGroup.ts"
5698
+ "name": "Layout",
5699
+ "module": "src/layout/Layout.ts"
5699
5700
  }
5700
5701
  }
5701
5702
  ],
5702
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping other types of content.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in item labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending item labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoud all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n"
5703
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- To visually group content in a layout section, use the Card component.\n- To lay out a set of smaller components, use the Stack component.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Never put layout component inside another HTML landmark.\n- Don’t use when you need a vertical or horizontal layout system. Use Stack component instead.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Layout component uses `<main>` element internally which is an HTML sectioning element which by default defines an ARIA landmark role. For that reason you should never put layout component inside another HTML landmark.\n"
5703
5704
  },
5704
5705
  {
5705
5706
  "kind": "javascript-module",
5706
- "path": "src/layout/Layout.ts",
5707
+ "path": "src/nav-group/NavGroup.ts",
5707
5708
  "declarations": [
5708
5709
  {
5709
5710
  "kind": "class",
5710
- "description": "Layout component is used to create the main layout of an app. Layout\ncurrently comes with one main configuration: two-column.",
5711
- "name": "Layout",
5711
+ "description": "Navigation group includes all the actions or items in a single\ngroup and is used for grouping items into related categories.",
5712
+ "name": "NavGroup",
5712
5713
  "slots": [
5713
5714
  {
5714
- "description": "The default main section content.",
5715
+ "description": "The default slot used for the nav items.",
5715
5716
  "name": ""
5716
- },
5717
- {
5718
- "description": "Used to place content inside the navigation sidebar.",
5719
- "name": "nav"
5720
- },
5721
- {
5722
- "description": "Used to place content inside the header section.",
5723
- "name": "header"
5724
5717
  }
5725
5718
  ],
5726
5719
  "members": [
5720
+ {
5721
+ "kind": "field",
5722
+ "name": "heading",
5723
+ "type": {
5724
+ "text": "string | undefined"
5725
+ },
5726
+ "description": "Heading and accessible label for the nav group",
5727
+ "attribute": "heading"
5728
+ },
5727
5729
  {
5728
5730
  "kind": "field",
5729
5731
  "name": "_warningLogged",
@@ -5739,6 +5741,16 @@
5739
5741
  }
5740
5742
  }
5741
5743
  ],
5744
+ "attributes": [
5745
+ {
5746
+ "name": "heading",
5747
+ "type": {
5748
+ "text": "string | undefined"
5749
+ },
5750
+ "description": "Heading and accessible label for the nav group",
5751
+ "fieldName": "heading"
5752
+ }
5753
+ ],
5742
5754
  "mixins": [
5743
5755
  {
5744
5756
  "name": "DraftComponentMixin",
@@ -5750,8 +5762,8 @@
5750
5762
  "package": "lit"
5751
5763
  },
5752
5764
  "status": "draft",
5753
- "category": "structure",
5754
- "tagName": "nord-layout",
5765
+ "category": "navigation",
5766
+ "tagName": "nord-nav-group",
5755
5767
  "customElement": true
5756
5768
  }
5757
5769
  ],
@@ -5760,20 +5772,20 @@
5760
5772
  "kind": "js",
5761
5773
  "name": "default",
5762
5774
  "declaration": {
5763
- "name": "Layout",
5764
- "module": "src/layout/Layout.ts"
5775
+ "name": "NavGroup",
5776
+ "module": "src/nav-group/NavGroup.ts"
5765
5777
  }
5766
5778
  },
5767
5779
  {
5768
5780
  "kind": "custom-element-definition",
5769
- "name": "nord-layout",
5781
+ "name": "nord-nav-group",
5770
5782
  "declaration": {
5771
- "name": "Layout",
5772
- "module": "src/layout/Layout.ts"
5783
+ "name": "NavGroup",
5784
+ "module": "src/nav-group/NavGroup.ts"
5773
5785
  }
5774
5786
  }
5775
5787
  ],
5776
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- To visually group content in a layout section, use the Card component.\n- To lay out a set of smaller components, use the Stack component.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Never put layout component inside another HTML landmark.\n- Don’t use when you need a vertical or horizontal layout system. Use Stack component instead.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Layout component uses `<main>` element internally which is an HTML sectioning element which by default defines an ARIA landmark role. For that reason you should never put layout component inside another HTML landmark.\n"
5788
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping other types of content.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in item labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending item labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoud all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n"
5777
5789
  },
5778
5790
  {
5779
5791
  "kind": "javascript-module",
@@ -6126,6 +6138,158 @@
6126
6138
  ],
6127
6139
  "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for primary navigation items that perform an action when clicked. Each action should navigate to a URL or trigger another action like a modal overlay.\n- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place a `<nav>` element inside the navigation component, as it already contains one internally.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in item labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending item labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoud all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n"
6128
6140
  },
6141
+ {
6142
+ "kind": "javascript-module",
6143
+ "path": "src/progress-bar/ProgressBar.ts",
6144
+ "declarations": [
6145
+ {
6146
+ "kind": "class",
6147
+ "description": "Progress Bar is used to visually represent the completion\nof a task or process. It shows how much of the task has\nbeen completed and how much is still left.",
6148
+ "name": "ProgressBar",
6149
+ "members": [
6150
+ {
6151
+ "kind": "field",
6152
+ "name": "value",
6153
+ "type": {
6154
+ "text": "number | undefined"
6155
+ },
6156
+ "description": "Specifies how much of the task has been completed. Must be a valid floating\npoint number between 0 and max, or between 0 and 100 if max is omitted. If\nthere is no value, the progress bar is indeterminate; this indicates that\nan activity is ongoing with no indication of how long it’s expected to take.",
6157
+ "attribute": "value",
6158
+ "reflects": true
6159
+ },
6160
+ {
6161
+ "kind": "field",
6162
+ "name": "max",
6163
+ "type": {
6164
+ "text": "number"
6165
+ },
6166
+ "default": "100",
6167
+ "description": "Describes how much work the task indicated by the progress element requires.\nThe max attribute, if present, must have a value greater than 0 and be a\nvalid floating point number.",
6168
+ "attribute": "max",
6169
+ "reflects": true
6170
+ },
6171
+ {
6172
+ "kind": "field",
6173
+ "name": "label",
6174
+ "type": {
6175
+ "text": "string"
6176
+ },
6177
+ "default": "\"Current progress\"",
6178
+ "description": "Accessible label for the progress indicator. Visually hidden, but shown\nfor assistive technology.",
6179
+ "attribute": "label",
6180
+ "reflects": true
6181
+ },
6182
+ {
6183
+ "kind": "field",
6184
+ "name": "focusableRef",
6185
+ "privacy": "protected",
6186
+ "inheritedFrom": {
6187
+ "name": "FocusableMixin",
6188
+ "module": "src/common/mixins/FocusableMixin.ts"
6189
+ }
6190
+ },
6191
+ {
6192
+ "kind": "method",
6193
+ "name": "focus",
6194
+ "parameters": [
6195
+ {
6196
+ "name": "options",
6197
+ "optional": true,
6198
+ "type": {
6199
+ "text": "FocusOptions"
6200
+ },
6201
+ "description": "An object which controls aspects of the focusing process."
6202
+ }
6203
+ ],
6204
+ "description": "Programmatically move focus to the component.",
6205
+ "inheritedFrom": {
6206
+ "name": "FocusableMixin",
6207
+ "module": "src/common/mixins/FocusableMixin.ts"
6208
+ }
6209
+ },
6210
+ {
6211
+ "kind": "method",
6212
+ "name": "blur",
6213
+ "description": "Programmatically remove focus from the component.",
6214
+ "inheritedFrom": {
6215
+ "name": "FocusableMixin",
6216
+ "module": "src/common/mixins/FocusableMixin.ts"
6217
+ }
6218
+ },
6219
+ {
6220
+ "kind": "method",
6221
+ "name": "click",
6222
+ "description": "Programmatically simulates a click on the component.",
6223
+ "inheritedFrom": {
6224
+ "name": "FocusableMixin",
6225
+ "module": "src/common/mixins/FocusableMixin.ts"
6226
+ }
6227
+ }
6228
+ ],
6229
+ "attributes": [
6230
+ {
6231
+ "name": "value",
6232
+ "type": {
6233
+ "text": "number | undefined"
6234
+ },
6235
+ "description": "Specifies how much of the task has been completed. Must be a valid floating\npoint number between 0 and max, or between 0 and 100 if max is omitted. If\nthere is no value, the progress bar is indeterminate; this indicates that\nan activity is ongoing with no indication of how long it’s expected to take.",
6236
+ "fieldName": "value"
6237
+ },
6238
+ {
6239
+ "name": "max",
6240
+ "type": {
6241
+ "text": "number"
6242
+ },
6243
+ "default": "100",
6244
+ "description": "Describes how much work the task indicated by the progress element requires.\nThe max attribute, if present, must have a value greater than 0 and be a\nvalid floating point number.",
6245
+ "fieldName": "max"
6246
+ },
6247
+ {
6248
+ "name": "label",
6249
+ "type": {
6250
+ "text": "string"
6251
+ },
6252
+ "default": "\"Current progress\"",
6253
+ "description": "Accessible label for the progress indicator. Visually hidden, but shown\nfor assistive technology.",
6254
+ "fieldName": "label"
6255
+ }
6256
+ ],
6257
+ "mixins": [
6258
+ {
6259
+ "name": "FocusableMixin",
6260
+ "module": "/src/common/mixins/FocusableMixin.js"
6261
+ }
6262
+ ],
6263
+ "superclass": {
6264
+ "name": "LitElement",
6265
+ "package": "lit"
6266
+ },
6267
+ "status": "new",
6268
+ "category": "feedback",
6269
+ "tagName": "nord-progress-bar",
6270
+ "customElement": true
6271
+ }
6272
+ ],
6273
+ "exports": [
6274
+ {
6275
+ "kind": "js",
6276
+ "name": "default",
6277
+ "declaration": {
6278
+ "name": "ProgressBar",
6279
+ "module": "src/progress-bar/ProgressBar.ts"
6280
+ }
6281
+ },
6282
+ {
6283
+ "kind": "custom-element-definition",
6284
+ "name": "nord-progress-bar",
6285
+ "declaration": {
6286
+ "name": "ProgressBar",
6287
+ "module": "src/progress-bar/ProgressBar.ts"
6288
+ }
6289
+ }
6290
+ ],
6291
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to show the completion status of an ongoing task.\n- Use progress bar when you can determine the percentage of the completed task at any time.\n- Always provide an accessible label when using Progress Bar.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use in constrained spaces indicating indeterminate loading state, see [Spinner](/components/spinner/) instead.\n\n</div>\n"
6292
+ },
6129
6293
  {
6130
6294
  "kind": "javascript-module",
6131
6295
  "path": "src/radio/Radio.ts",
@@ -7438,20 +7602,6 @@
7438
7602
  "description": "An accessible label for the spinner.\nIf no label is supplied, the spinner is hidden from assistive technology.",
7439
7603
  "attribute": "label",
7440
7604
  "reflects": true
7441
- },
7442
- {
7443
- "kind": "field",
7444
- "name": "_warningLogged",
7445
- "type": {
7446
- "text": "boolean"
7447
- },
7448
- "privacy": "private",
7449
- "static": true,
7450
- "default": "false",
7451
- "inheritedFrom": {
7452
- "name": "DraftComponentMixin",
7453
- "module": "src/common/mixins/DraftComponentMixin.ts"
7454
- }
7455
7605
  }
7456
7606
  ],
7457
7607
  "attributes": [
@@ -7481,17 +7631,11 @@
7481
7631
  "fieldName": "label"
7482
7632
  }
7483
7633
  ],
7484
- "mixins": [
7485
- {
7486
- "name": "DraftComponentMixin",
7487
- "module": "/src/common/mixins/DraftComponentMixin.js"
7488
- }
7489
- ],
7490
7634
  "superclass": {
7491
7635
  "name": "LitElement",
7492
7636
  "package": "lit"
7493
7637
  },
7494
- "status": "draft",
7638
+ "status": "ready",
7495
7639
  "category": "feedback",
7496
7640
  "tagName": "nord-spinner",
7497
7641
  "customElement": true