@nordhealth/components 1.0.0-beta.13 → 1.0.0-beta.16

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.
@@ -422,372 +422,380 @@
422
422
  },
423
423
  {
424
424
  "kind": "javascript-module",
425
- "path": "src/button/Button.ts",
425
+ "path": "src/banner/Banner.ts",
426
426
  "declarations": [
427
427
  {
428
428
  "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",
429
+ "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.",
430
+ "name": "Banner",
431
431
  "slots": [
432
432
  {
433
- "description": "The button content",
433
+ "description": "default slot",
434
434
  "name": ""
435
- },
435
+ }
436
+ ],
437
+ "members": [
436
438
  {
437
- "description": "Used to place content before button text. Typically used for icons.",
438
- "name": "before"
439
- },
439
+ "kind": "field",
440
+ "name": "variant",
441
+ "type": {
442
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
443
+ },
444
+ "default": "\"info\"",
445
+ "description": "The style variant of the banner.",
446
+ "attribute": "variant",
447
+ "reflects": true
448
+ }
449
+ ],
450
+ "attributes": [
440
451
  {
441
- "description": "Used to place content after button text. Typically used for icons.",
442
- "name": "after"
452
+ "name": "variant",
453
+ "type": {
454
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
455
+ },
456
+ "default": "\"info\"",
457
+ "description": "The style variant of the banner.",
458
+ "fieldName": "variant"
443
459
  }
444
460
  ],
461
+ "superclass": {
462
+ "name": "LitElement",
463
+ "package": "lit"
464
+ },
465
+ "status": "new",
466
+ "category": "feedback",
467
+ "tagName": "nord-banner",
468
+ "customElement": true
469
+ }
470
+ ],
471
+ "exports": [
472
+ {
473
+ "kind": "js",
474
+ "name": "default",
475
+ "declaration": {
476
+ "name": "Banner",
477
+ "module": "src/banner/Banner.ts"
478
+ }
479
+ },
480
+ {
481
+ "kind": "custom-element-definition",
482
+ "name": "nord-banner",
483
+ "declaration": {
484
+ "name": "Banner",
485
+ "module": "src/banner/Banner.ts"
486
+ }
487
+ }
488
+ ],
489
+ "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"
490
+ },
491
+ {
492
+ "kind": "javascript-module",
493
+ "path": "src/calendar/Calendar.ts",
494
+ "declarations": [
495
+ {
496
+ "kind": "class",
497
+ "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.",
498
+ "name": "Calendar",
445
499
  "members": [
446
500
  {
447
501
  "kind": "field",
448
- "name": "buttonRef",
502
+ "name": "dialogLabelId",
503
+ "type": {
504
+ "text": "string"
505
+ },
506
+ "privacy": "private",
507
+ "default": "\"dialog-header\""
508
+ },
509
+ {
510
+ "kind": "field",
511
+ "name": "monthSelectNode",
512
+ "type": {
513
+ "text": "HTMLElement"
514
+ },
449
515
  "privacy": "private"
450
516
  },
451
517
  {
452
518
  "kind": "field",
453
- "name": "lightDom",
519
+ "name": "focusedDayNode",
520
+ "type": {
521
+ "text": "HTMLButtonElement"
522
+ },
523
+ "privacy": "private"
524
+ },
525
+ {
526
+ "kind": "field",
527
+ "name": "direction",
454
528
  "privacy": "private",
455
- "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
529
+ "default": "new DirectionController(this)"
456
530
  },
457
531
  {
458
532
  "kind": "field",
459
- "name": "variant",
533
+ "name": "swipe",
534
+ "privacy": "private",
535
+ "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
536
+ },
537
+ {
538
+ "kind": "field",
539
+ "name": "shortcuts",
540
+ "privacy": "private"
541
+ },
542
+ {
543
+ "kind": "field",
544
+ "name": "dateFormatShort",
460
545
  "type": {
461
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
546
+ "text": "Intl.DateTimeFormat"
462
547
  },
463
- "default": "\"default\"",
464
- "description": "The style variant of the button.",
465
- "attribute": "variant",
466
- "reflects": true
548
+ "privacy": "private",
549
+ "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"
467
550
  },
468
551
  {
469
552
  "kind": "field",
470
- "name": "type",
553
+ "name": "localization",
471
554
  "type": {
472
- "text": "\"button\" | \"submit\" | \"reset\""
555
+ "text": "CalendarLocalizedText"
473
556
  },
474
- "default": "\"submit\"",
475
- "description": "The type of the button.",
476
- "attribute": "type",
477
- "reflects": true
557
+ "default": "localization"
478
558
  },
479
559
  {
480
560
  "kind": "field",
481
- "name": "size",
561
+ "name": "value",
482
562
  "type": {
483
- "text": "\"s\" | \"m\" | \"l\""
563
+ "text": "string"
484
564
  },
485
- "default": "\"m\"",
486
- "description": "The size of the button.\nThis affects font-size and padding.",
487
- "attribute": "size",
488
- "reflects": true
565
+ "default": "\"\"",
566
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
567
+ "attribute": "value"
489
568
  },
490
569
  {
491
570
  "kind": "field",
492
- "name": "href",
571
+ "name": "firstDayOfWeek",
493
572
  "type": {
494
- "text": "string | undefined"
573
+ "text": "DaysOfWeek"
495
574
  },
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
575
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
576
+ "attribute": "firstDayOfWeek"
499
577
  },
500
578
  {
501
579
  "kind": "field",
502
- "name": "download",
580
+ "name": "min",
503
581
  "type": {
504
- "text": "boolean"
582
+ "text": "string"
505
583
  },
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"
584
+ "default": "\"\"",
585
+ "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.",
586
+ "attribute": "min"
509
587
  },
510
588
  {
511
589
  "kind": "field",
512
- "name": "target",
590
+ "name": "max",
513
591
  "type": {
514
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
592
+ "text": "string"
515
593
  },
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
594
+ "default": "\"\"",
595
+ "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.",
596
+ "attribute": "max"
520
597
  },
521
598
  {
522
599
  "kind": "field",
523
- "name": "expand",
600
+ "name": "isDateDisabled",
601
+ "type": {
602
+ "text": "DateDisabledPredicate"
603
+ },
604
+ "default": "isDateDisabled",
605
+ "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
606
+ },
607
+ {
608
+ "kind": "field",
609
+ "name": "activeFocus",
524
610
  "type": {
525
611
  "text": "boolean"
526
612
  },
527
- "default": "false",
528
- "description": "Controls whether the button expands to fill the width of its container.",
529
- "attribute": "expand",
530
- "reflects": true
613
+ "privacy": "private",
614
+ "default": "false"
531
615
  },
532
616
  {
533
- "kind": "method",
534
- "name": "renderLink",
617
+ "kind": "field",
618
+ "name": "focusedDay",
535
619
  "privacy": "private",
536
- "parameters": [
537
- {
538
- "name": "innards",
539
- "type": {
540
- "text": "TemplateResult"
541
- }
542
- }
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."
620
+ "default": "new Date()"
545
621
  },
546
622
  {
547
623
  "kind": "method",
548
- "name": "renderButton",
549
- "privacy": "private",
624
+ "name": "focus",
550
625
  "parameters": [
551
626
  {
552
- "name": "innards",
627
+ "name": "options",
628
+ "optional": true,
553
629
  "type": {
554
- "text": "TemplateResult"
630
+ "text": "FocusOptions & { target: \"day\" | \"month\" }"
555
631
  }
556
632
  }
557
633
  ]
558
634
  },
559
635
  {
560
636
  "kind": "method",
561
- "name": "renderLightDom",
637
+ "name": "createDateFormatter",
562
638
  "privacy": "private"
563
639
  },
564
640
  {
565
641
  "kind": "field",
566
- "name": "handleOuterClick",
642
+ "name": "handleDaySelect",
567
643
  "privacy": "private"
568
644
  },
569
645
  {
570
646
  "kind": "method",
571
- "name": "handleClick",
647
+ "name": "addDays",
572
648
  "privacy": "private",
573
649
  "parameters": [
574
650
  {
575
- "name": "e",
651
+ "name": "days",
576
652
  "type": {
577
- "text": "Event"
653
+ "text": "number"
578
654
  }
579
655
  }
580
656
  ]
581
657
  },
582
658
  {
583
- "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
- }
659
+ "kind": "method",
660
+ "name": "addMonths",
661
+ "privacy": "private",
662
+ "parameters": [
663
+ {
664
+ "name": "months",
665
+ "type": {
666
+ "text": "number"
667
+ }
668
+ }
669
+ ]
596
670
  },
597
671
  {
598
- "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
- }
609
- },
610
- {
611
- "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
- }
672
+ "kind": "method",
673
+ "name": "addYears",
674
+ "privacy": "private",
675
+ "parameters": [
676
+ {
677
+ "name": "years",
678
+ "type": {
679
+ "text": "number"
680
+ }
681
+ }
682
+ ]
623
683
  },
624
684
  {
625
- "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
- }
685
+ "kind": "method",
686
+ "name": "startOfWeek",
687
+ "privacy": "private"
633
688
  },
634
689
  {
635
- "kind": "field",
636
- "name": "focusableRef",
637
- "privacy": "protected",
638
- "inheritedFrom": {
639
- "name": "FocusableMixin",
640
- "module": "src/common/mixins/FocusableMixin.ts"
641
- }
690
+ "kind": "method",
691
+ "name": "endOfWeek",
692
+ "privacy": "private"
642
693
  },
643
694
  {
644
695
  "kind": "method",
645
- "name": "focus",
696
+ "name": "setMonth",
697
+ "privacy": "private",
646
698
  "parameters": [
647
699
  {
648
- "name": "options",
649
- "optional": true,
700
+ "name": "month",
650
701
  "type": {
651
- "text": "FocusOptions"
652
- },
653
- "description": "An object which controls aspects of the focusing process."
702
+ "text": "number"
703
+ }
654
704
  }
655
- ],
656
- "description": "Programmatically move focus to the component.",
657
- "inheritedFrom": {
658
- "name": "FocusableMixin",
659
- "module": "src/common/mixins/FocusableMixin.ts"
660
- }
705
+ ]
661
706
  },
662
707
  {
663
708
  "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
- }
709
+ "name": "setYear",
710
+ "privacy": "private",
711
+ "parameters": [
712
+ {
713
+ "name": "year",
714
+ "type": {
715
+ "text": "number"
716
+ }
717
+ }
718
+ ]
670
719
  },
671
720
  {
672
721
  "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
- }
679
- }
680
- ],
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"
722
+ "name": "setFocusedDay",
723
+ "privacy": "private",
724
+ "parameters": [
725
+ {
726
+ "name": "day",
727
+ "type": {
728
+ "text": "Date"
729
+ }
730
+ }
731
+ ]
690
732
  },
691
733
  {
692
- "name": "type",
693
- "type": {
694
- "text": "\"button\" | \"submit\" | \"reset\""
695
- },
696
- "default": "\"submit\"",
697
- "description": "The type of the button.",
698
- "fieldName": "type"
734
+ "kind": "field",
735
+ "name": "handleMonthSelect",
736
+ "privacy": "private"
699
737
  },
700
738
  {
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"
739
+ "kind": "field",
740
+ "name": "handleYearSelect",
741
+ "privacy": "private"
708
742
  },
709
743
  {
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"
744
+ "kind": "field",
745
+ "name": "handleNextMonthClick",
746
+ "privacy": "private"
716
747
  },
717
748
  {
718
- "name": "download",
719
- "type": {
720
- "text": "boolean"
721
- },
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"
749
+ "kind": "field",
750
+ "name": "handlePreviousMonthClick",
751
+ "privacy": "private"
725
752
  },
726
753
  {
727
- "name": "target",
728
- "type": {
729
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
730
- },
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"
754
+ "kind": "field",
755
+ "name": "enableActiveFocus",
756
+ "privacy": "private"
734
757
  },
735
758
  {
736
- "name": "expand",
759
+ "kind": "field",
760
+ "name": "disableActiveFocus",
761
+ "privacy": "private"
762
+ }
763
+ ],
764
+ "attributes": [
765
+ {
766
+ "name": "value",
737
767
  "type": {
738
- "text": "boolean"
768
+ "text": "string"
739
769
  },
740
- "default": "false",
741
- "description": "Controls whether the button expands to fill the width of its container.",
742
- "fieldName": "expand"
770
+ "default": "\"\"",
771
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
772
+ "fieldName": "value"
743
773
  },
744
774
  {
745
- "name": "disabled",
775
+ "name": "firstDayOfWeek",
746
776
  "type": {
747
- "text": "boolean"
777
+ "text": "DaysOfWeek"
748
778
  },
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
- }
779
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
780
+ "fieldName": "firstDayOfWeek"
756
781
  },
757
782
  {
758
- "name": "name",
783
+ "name": "min",
759
784
  "type": {
760
- "text": "string | undefined"
785
+ "text": "string"
761
786
  },
762
- "description": "The name of the form component.",
763
- "fieldName": "name",
764
- "inheritedFrom": {
765
- "name": "InputMixin",
766
- "module": "src/common/mixins/InputMixin.ts"
767
- }
787
+ "default": "\"\"",
788
+ "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.",
789
+ "fieldName": "min"
768
790
  },
769
791
  {
770
- "name": "value",
792
+ "name": "max",
771
793
  "type": {
772
794
  "text": "string"
773
795
  },
774
796
  "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"
797
+ "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.",
798
+ "fieldName": "max"
791
799
  }
792
800
  ],
793
801
  "superclass": {
@@ -795,8 +803,8 @@
795
803
  "package": "lit"
796
804
  },
797
805
  "status": "ready",
798
- "category": "action",
799
- "tagName": "nord-button",
806
+ "category": "list",
807
+ "tagName": "nord-calendar",
800
808
  "customElement": true
801
809
  }
802
810
  ],
@@ -805,329 +813,508 @@
805
813
  "kind": "js",
806
814
  "name": "default",
807
815
  "declaration": {
808
- "name": "Button",
809
- "module": "src/button/Button.ts"
816
+ "name": "Calendar",
817
+ "module": "src/calendar/Calendar.ts"
810
818
  }
811
819
  },
812
820
  {
813
821
  "kind": "custom-element-definition",
814
- "name": "nord-button",
822
+ "name": "nord-calendar",
815
823
  "declaration": {
816
- "name": "Button",
817
- "module": "src/button/Button.ts"
824
+ "name": "Calendar",
825
+ "module": "src/calendar/Calendar.ts"
818
826
  }
819
827
  }
820
828
  ],
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"
829
+ "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
830
  },
823
831
  {
824
832
  "kind": "javascript-module",
825
- "path": "src/calendar/Calendar.ts",
833
+ "path": "src/calendar/DateSelectEvent.ts",
826
834
  "declarations": [
827
835
  {
828
836
  "kind": "class",
829
- "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.",
830
- "name": "Calendar",
837
+ "description": "",
838
+ "name": "DateSelectEvent",
831
839
  "members": [
832
840
  {
833
841
  "kind": "field",
834
- "name": "dialogLabelId",
842
+ "name": "eventName",
835
843
  "type": {
836
844
  "text": "string"
837
845
  },
838
- "privacy": "private",
839
- "default": "\"dialog-header\""
846
+ "static": true,
847
+ "default": "\"nord-select\""
840
848
  },
841
849
  {
842
850
  "kind": "field",
843
- "name": "monthSelectNode",
851
+ "name": "date",
844
852
  "type": {
845
- "text": "HTMLElement"
853
+ "text": "Date"
846
854
  },
847
- "privacy": "private"
848
- },
849
- {
850
- "kind": "field",
851
- "name": "focusedDayNode",
852
- "type": {
853
- "text": "HTMLButtonElement"
854
- },
855
- "privacy": "private"
856
- },
855
+ "default": "date"
856
+ }
857
+ ],
858
+ "superclass": {
859
+ "name": "NordEvent",
860
+ "module": "/src/common/events.js"
861
+ }
862
+ }
863
+ ],
864
+ "exports": [
865
+ {
866
+ "kind": "js",
867
+ "name": "DateSelectEvent",
868
+ "declaration": {
869
+ "name": "DateSelectEvent",
870
+ "module": "src/calendar/DateSelectEvent.ts"
871
+ }
872
+ }
873
+ ],
874
+ "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"
875
+ },
876
+ {
877
+ "kind": "javascript-module",
878
+ "path": "src/calendar/calendar-localization.ts",
879
+ "declarations": [
880
+ {
881
+ "kind": "variable",
882
+ "name": "localization",
883
+ "type": {
884
+ "text": "CalendarLocalizedText"
885
+ },
886
+ "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}"
887
+ }
888
+ ],
889
+ "exports": [
890
+ {
891
+ "kind": "js",
892
+ "name": "default",
893
+ "declaration": {
894
+ "name": "localization",
895
+ "module": "src/calendar/calendar-localization.ts"
896
+ }
897
+ }
898
+ ],
899
+ "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"
900
+ },
901
+ {
902
+ "kind": "javascript-module",
903
+ "path": "src/calendar/month-view.ts",
904
+ "declarations": [
905
+ {
906
+ "kind": "function",
907
+ "name": "dayView",
908
+ "parameters": [
857
909
  {
858
- "kind": "field",
859
- "name": "direction",
860
- "privacy": "private",
861
- "default": "new DirectionController(this)"
910
+ "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
911
+ "type": {
912
+ "text": "DatePickerDayProps"
913
+ }
914
+ }
915
+ ]
916
+ },
917
+ {
918
+ "kind": "function",
919
+ "name": "monthView",
920
+ "parameters": [
921
+ {
922
+ "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}",
923
+ "type": {
924
+ "text": "MonthViewArgs"
925
+ }
926
+ }
927
+ ]
928
+ }
929
+ ],
930
+ "exports": [
931
+ {
932
+ "kind": "js",
933
+ "name": "dayView",
934
+ "declaration": {
935
+ "name": "dayView",
936
+ "module": "src/calendar/month-view.ts"
937
+ }
938
+ },
939
+ {
940
+ "kind": "js",
941
+ "name": "monthView",
942
+ "declaration": {
943
+ "name": "monthView",
944
+ "module": "src/calendar/month-view.ts"
945
+ }
946
+ }
947
+ ],
948
+ "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"
949
+ },
950
+ {
951
+ "kind": "javascript-module",
952
+ "path": "src/button/Button.ts",
953
+ "declarations": [
954
+ {
955
+ "kind": "class",
956
+ "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.",
957
+ "name": "Button",
958
+ "slots": [
959
+ {
960
+ "description": "The button content",
961
+ "name": ""
862
962
  },
863
963
  {
864
- "kind": "field",
865
- "name": "swipe",
866
- "privacy": "private",
867
- "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
964
+ "description": "Used to place content before button text. Typically used for icons.",
965
+ "name": "before"
868
966
  },
967
+ {
968
+ "description": "Used to place content after button text. Typically used for icons.",
969
+ "name": "after"
970
+ }
971
+ ],
972
+ "members": [
869
973
  {
870
974
  "kind": "field",
871
- "name": "shortcuts",
975
+ "name": "buttonRef",
872
976
  "privacy": "private"
873
977
  },
874
978
  {
875
979
  "kind": "field",
876
- "name": "dateFormatShort",
877
- "type": {
878
- "text": "Intl.DateTimeFormat"
879
- },
980
+ "name": "lightDom",
880
981
  "privacy": "private",
881
- "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"
982
+ "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
882
983
  },
883
984
  {
884
985
  "kind": "field",
885
- "name": "localization",
986
+ "name": "variant",
886
987
  "type": {
887
- "text": "CalendarLocalizedText"
988
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
888
989
  },
889
- "default": "localization"
990
+ "default": "\"default\"",
991
+ "description": "The style variant of the button.",
992
+ "attribute": "variant",
993
+ "reflects": true
890
994
  },
891
995
  {
892
996
  "kind": "field",
893
- "name": "value",
997
+ "name": "type",
894
998
  "type": {
895
- "text": "string"
999
+ "text": "\"button\" | \"submit\" | \"reset\""
896
1000
  },
897
- "default": "\"\"",
898
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
899
- "attribute": "value"
1001
+ "default": "\"submit\"",
1002
+ "description": "The type of the button.",
1003
+ "attribute": "type",
1004
+ "reflects": true
900
1005
  },
901
1006
  {
902
1007
  "kind": "field",
903
- "name": "firstDayOfWeek",
1008
+ "name": "size",
904
1009
  "type": {
905
- "text": "DaysOfWeek"
1010
+ "text": "\"s\" | \"m\" | \"l\""
906
1011
  },
907
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
908
- "attribute": "firstDayOfWeek"
1012
+ "default": "\"m\"",
1013
+ "description": "The size of the button.\nThis affects font-size and padding.",
1014
+ "attribute": "size",
1015
+ "reflects": true
909
1016
  },
910
1017
  {
911
1018
  "kind": "field",
912
- "name": "min",
1019
+ "name": "href",
913
1020
  "type": {
914
- "text": "string"
1021
+ "text": "string | undefined"
915
1022
  },
916
- "default": "\"\"",
917
- "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.",
918
- "attribute": "min"
1023
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
1024
+ "attribute": "href",
1025
+ "reflects": true
919
1026
  },
920
1027
  {
921
1028
  "kind": "field",
922
- "name": "max",
1029
+ "name": "download",
923
1030
  "type": {
924
- "text": "string"
1031
+ "text": "boolean"
925
1032
  },
926
- "default": "\"\"",
927
- "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.",
928
- "attribute": "max"
1033
+ "default": "false",
1034
+ "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
1035
+ "attribute": "download"
929
1036
  },
930
1037
  {
931
1038
  "kind": "field",
932
- "name": "isDateDisabled",
1039
+ "name": "target",
933
1040
  "type": {
934
- "text": "DateDisabledPredicate"
1041
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
935
1042
  },
936
- "default": "isDateDisabled",
937
- "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
1043
+ "default": "\"_self\"",
1044
+ "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.",
1045
+ "attribute": "target",
1046
+ "reflects": true
938
1047
  },
939
1048
  {
940
1049
  "kind": "field",
941
- "name": "activeFocus",
1050
+ "name": "expand",
942
1051
  "type": {
943
1052
  "text": "boolean"
944
1053
  },
945
- "privacy": "private",
946
- "default": "false"
1054
+ "default": "false",
1055
+ "description": "Controls whether the button expands to fill the width of its container.",
1056
+ "attribute": "expand",
1057
+ "reflects": true
947
1058
  },
948
1059
  {
949
- "kind": "field",
950
- "name": "focusedDay",
1060
+ "kind": "method",
1061
+ "name": "renderLink",
951
1062
  "privacy": "private",
952
- "default": "new Date()"
1063
+ "parameters": [
1064
+ {
1065
+ "name": "innards",
1066
+ "type": {
1067
+ "text": "TemplateResult"
1068
+ }
1069
+ }
1070
+ ],
1071
+ "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."
953
1072
  },
954
1073
  {
955
1074
  "kind": "method",
956
- "name": "focus",
1075
+ "name": "renderButton",
1076
+ "privacy": "private",
957
1077
  "parameters": [
958
1078
  {
959
- "name": "options",
960
- "optional": true,
1079
+ "name": "innards",
961
1080
  "type": {
962
- "text": "FocusOptions & { target: \"day\" | \"month\" }"
1081
+ "text": "TemplateResult"
963
1082
  }
964
1083
  }
965
1084
  ]
966
1085
  },
967
1086
  {
968
1087
  "kind": "method",
969
- "name": "createDateFormatter",
1088
+ "name": "renderLightDom",
970
1089
  "privacy": "private"
971
1090
  },
972
1091
  {
973
1092
  "kind": "field",
974
- "name": "handleDaySelect",
1093
+ "name": "handleOuterClick",
975
1094
  "privacy": "private"
976
1095
  },
977
1096
  {
978
1097
  "kind": "method",
979
- "name": "addDays",
1098
+ "name": "handleClick",
980
1099
  "privacy": "private",
981
1100
  "parameters": [
982
1101
  {
983
- "name": "days",
1102
+ "name": "e",
984
1103
  "type": {
985
- "text": "number"
1104
+ "text": "Event"
986
1105
  }
987
1106
  }
988
1107
  ]
989
1108
  },
990
1109
  {
991
- "kind": "method",
992
- "name": "addMonths",
993
- "privacy": "private",
994
- "parameters": [
995
- {
996
- "name": "months",
997
- "type": {
998
- "text": "number"
999
- }
1000
- }
1001
- ]
1110
+ "kind": "field",
1111
+ "name": "disabled",
1112
+ "type": {
1113
+ "text": "boolean"
1114
+ },
1115
+ "default": "false",
1116
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1117
+ "attribute": "disabled",
1118
+ "reflects": true,
1119
+ "inheritedFrom": {
1120
+ "name": "InputMixin",
1121
+ "module": "src/common/mixins/InputMixin.ts"
1122
+ }
1002
1123
  },
1003
1124
  {
1004
- "kind": "method",
1005
- "name": "addYears",
1006
- "privacy": "private",
1007
- "parameters": [
1008
- {
1009
- "name": "years",
1010
- "type": {
1011
- "text": "number"
1012
- }
1013
- }
1014
- ]
1125
+ "kind": "field",
1126
+ "name": "name",
1127
+ "type": {
1128
+ "text": "string | undefined"
1129
+ },
1130
+ "description": "The name of the form component.",
1131
+ "attribute": "name",
1132
+ "inheritedFrom": {
1133
+ "name": "InputMixin",
1134
+ "module": "src/common/mixins/InputMixin.ts"
1135
+ }
1015
1136
  },
1016
1137
  {
1017
- "kind": "method",
1018
- "name": "startOfWeek",
1019
- "privacy": "private"
1138
+ "kind": "field",
1139
+ "name": "value",
1140
+ "type": {
1141
+ "text": "string"
1142
+ },
1143
+ "default": "\"\"",
1144
+ "description": "The value of the form component.",
1145
+ "attribute": "value",
1146
+ "inheritedFrom": {
1147
+ "name": "InputMixin",
1148
+ "module": "src/common/mixins/InputMixin.ts"
1149
+ }
1020
1150
  },
1021
1151
  {
1022
- "kind": "method",
1023
- "name": "endOfWeek",
1024
- "privacy": "private"
1152
+ "kind": "field",
1153
+ "name": "form",
1154
+ "privacy": "protected",
1155
+ "description": "Gets the form, if any, associated with the form element.",
1156
+ "inheritedFrom": {
1157
+ "name": "InputMixin",
1158
+ "module": "src/common/mixins/InputMixin.ts"
1159
+ }
1025
1160
  },
1026
1161
  {
1027
- "kind": "method",
1028
- "name": "setMonth",
1029
- "privacy": "private",
1030
- "parameters": [
1031
- {
1032
- "name": "month",
1033
- "type": {
1034
- "text": "number"
1035
- }
1036
- }
1037
- ]
1162
+ "kind": "field",
1163
+ "name": "focusableRef",
1164
+ "privacy": "protected",
1165
+ "inheritedFrom": {
1166
+ "name": "FocusableMixin",
1167
+ "module": "src/common/mixins/FocusableMixin.ts"
1168
+ }
1038
1169
  },
1039
1170
  {
1040
1171
  "kind": "method",
1041
- "name": "setYear",
1042
- "privacy": "private",
1172
+ "name": "focus",
1043
1173
  "parameters": [
1044
1174
  {
1045
- "name": "year",
1175
+ "name": "options",
1176
+ "optional": true,
1046
1177
  "type": {
1047
- "text": "number"
1048
- }
1178
+ "text": "FocusOptions"
1179
+ },
1180
+ "description": "An object which controls aspects of the focusing process."
1049
1181
  }
1050
- ]
1182
+ ],
1183
+ "description": "Programmatically move focus to the component.",
1184
+ "inheritedFrom": {
1185
+ "name": "FocusableMixin",
1186
+ "module": "src/common/mixins/FocusableMixin.ts"
1187
+ }
1051
1188
  },
1052
1189
  {
1053
1190
  "kind": "method",
1054
- "name": "setFocusedDay",
1055
- "privacy": "private",
1056
- "parameters": [
1057
- {
1058
- "name": "day",
1059
- "type": {
1060
- "text": "Date"
1061
- }
1062
- }
1063
- ]
1191
+ "name": "blur",
1192
+ "description": "Programmatically remove focus from the component.",
1193
+ "inheritedFrom": {
1194
+ "name": "FocusableMixin",
1195
+ "module": "src/common/mixins/FocusableMixin.ts"
1196
+ }
1064
1197
  },
1065
1198
  {
1066
- "kind": "field",
1067
- "name": "handleMonthSelect",
1068
- "privacy": "private"
1199
+ "kind": "method",
1200
+ "name": "click",
1201
+ "description": "Programmatically simulates a click on the component.",
1202
+ "inheritedFrom": {
1203
+ "name": "FocusableMixin",
1204
+ "module": "src/common/mixins/FocusableMixin.ts"
1205
+ }
1206
+ }
1207
+ ],
1208
+ "attributes": [
1209
+ {
1210
+ "name": "variant",
1211
+ "type": {
1212
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
1213
+ },
1214
+ "default": "\"default\"",
1215
+ "description": "The style variant of the button.",
1216
+ "fieldName": "variant"
1069
1217
  },
1070
1218
  {
1071
- "kind": "field",
1072
- "name": "handleYearSelect",
1073
- "privacy": "private"
1219
+ "name": "type",
1220
+ "type": {
1221
+ "text": "\"button\" | \"submit\" | \"reset\""
1222
+ },
1223
+ "default": "\"submit\"",
1224
+ "description": "The type of the button.",
1225
+ "fieldName": "type"
1074
1226
  },
1075
1227
  {
1076
- "kind": "field",
1077
- "name": "handleNextMonthClick",
1078
- "privacy": "private"
1228
+ "name": "size",
1229
+ "type": {
1230
+ "text": "\"s\" | \"m\" | \"l\""
1231
+ },
1232
+ "default": "\"m\"",
1233
+ "description": "The size of the button.\nThis affects font-size and padding.",
1234
+ "fieldName": "size"
1079
1235
  },
1080
1236
  {
1081
- "kind": "field",
1082
- "name": "handlePreviousMonthClick",
1083
- "privacy": "private"
1237
+ "name": "href",
1238
+ "type": {
1239
+ "text": "string | undefined"
1240
+ },
1241
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
1242
+ "fieldName": "href"
1084
1243
  },
1085
1244
  {
1086
- "kind": "field",
1087
- "name": "enableActiveFocus",
1088
- "privacy": "private"
1245
+ "name": "download",
1246
+ "type": {
1247
+ "text": "boolean"
1248
+ },
1249
+ "default": "false",
1250
+ "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
1251
+ "fieldName": "download"
1089
1252
  },
1090
1253
  {
1091
- "kind": "field",
1092
- "name": "disableActiveFocus",
1093
- "privacy": "private"
1094
- }
1095
- ],
1096
- "attributes": [
1254
+ "name": "target",
1255
+ "type": {
1256
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
1257
+ },
1258
+ "default": "\"_self\"",
1259
+ "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.",
1260
+ "fieldName": "target"
1261
+ },
1097
1262
  {
1098
- "name": "value",
1263
+ "name": "expand",
1099
1264
  "type": {
1100
- "text": "string"
1265
+ "text": "boolean"
1101
1266
  },
1102
- "default": "\"\"",
1103
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1104
- "fieldName": "value"
1267
+ "default": "false",
1268
+ "description": "Controls whether the button expands to fill the width of its container.",
1269
+ "fieldName": "expand"
1105
1270
  },
1106
1271
  {
1107
- "name": "firstDayOfWeek",
1272
+ "name": "disabled",
1108
1273
  "type": {
1109
- "text": "DaysOfWeek"
1274
+ "text": "boolean"
1110
1275
  },
1111
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1112
- "fieldName": "firstDayOfWeek"
1276
+ "default": "false",
1277
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1278
+ "fieldName": "disabled",
1279
+ "inheritedFrom": {
1280
+ "name": "InputMixin",
1281
+ "module": "src/common/mixins/InputMixin.ts"
1282
+ }
1113
1283
  },
1114
1284
  {
1115
- "name": "min",
1285
+ "name": "name",
1116
1286
  "type": {
1117
- "text": "string"
1287
+ "text": "string | undefined"
1118
1288
  },
1119
- "default": "\"\"",
1120
- "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.",
1121
- "fieldName": "min"
1289
+ "description": "The name of the form component.",
1290
+ "fieldName": "name",
1291
+ "inheritedFrom": {
1292
+ "name": "InputMixin",
1293
+ "module": "src/common/mixins/InputMixin.ts"
1294
+ }
1122
1295
  },
1123
1296
  {
1124
- "name": "max",
1297
+ "name": "value",
1125
1298
  "type": {
1126
1299
  "text": "string"
1127
1300
  },
1128
1301
  "default": "\"\"",
1129
- "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.",
1130
- "fieldName": "max"
1302
+ "description": "The value of the form component.",
1303
+ "fieldName": "value",
1304
+ "inheritedFrom": {
1305
+ "name": "InputMixin",
1306
+ "module": "src/common/mixins/InputMixin.ts"
1307
+ }
1308
+ }
1309
+ ],
1310
+ "mixins": [
1311
+ {
1312
+ "name": "InputMixin",
1313
+ "module": "/src/common/mixins/InputMixin.js"
1314
+ },
1315
+ {
1316
+ "name": "FocusableMixin",
1317
+ "module": "/src/common/mixins/FocusableMixin.js"
1131
1318
  }
1132
1319
  ],
1133
1320
  "superclass": {
@@ -1135,8 +1322,8 @@
1135
1322
  "package": "lit"
1136
1323
  },
1137
1324
  "status": "ready",
1138
- "category": "list",
1139
- "tagName": "nord-calendar",
1325
+ "category": "action",
1326
+ "tagName": "nord-button",
1140
1327
  "customElement": true
1141
1328
  }
1142
1329
  ],
@@ -1145,185 +1332,86 @@
1145
1332
  "kind": "js",
1146
1333
  "name": "default",
1147
1334
  "declaration": {
1148
- "name": "Calendar",
1149
- "module": "src/calendar/Calendar.ts"
1335
+ "name": "Button",
1336
+ "module": "src/button/Button.ts"
1150
1337
  }
1151
1338
  },
1152
1339
  {
1153
1340
  "kind": "custom-element-definition",
1154
- "name": "nord-calendar",
1341
+ "name": "nord-button",
1155
1342
  "declaration": {
1156
- "name": "Calendar",
1157
- "module": "src/calendar/Calendar.ts"
1343
+ "name": "Button",
1344
+ "module": "src/button/Button.ts"
1158
1345
  }
1159
1346
  }
1160
1347
  ],
1161
- "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"
1348
+ "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"
1162
1349
  },
1163
1350
  {
1164
1351
  "kind": "javascript-module",
1165
- "path": "src/calendar/DateSelectEvent.ts",
1352
+ "path": "src/card/Card.ts",
1166
1353
  "declarations": [
1167
1354
  {
1168
1355
  "kind": "class",
1169
- "description": "",
1170
- "name": "DateSelectEvent",
1171
- "members": [
1356
+ "description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
1357
+ "name": "Card",
1358
+ "slots": [
1172
1359
  {
1173
- "kind": "field",
1174
- "name": "eventName",
1175
- "type": {
1176
- "text": "string"
1177
- },
1178
- "static": true,
1179
- "default": "\"nord-select\""
1360
+ "description": "The card content.",
1361
+ "name": ""
1180
1362
  },
1181
1363
  {
1182
- "kind": "field",
1183
- "name": "date",
1184
- "type": {
1185
- "text": "Date"
1186
- },
1187
- "default": "date"
1188
- }
1189
- ],
1190
- "superclass": {
1191
- "name": "NordEvent",
1192
- "module": "/src/common/events.js"
1193
- }
1194
- }
1195
- ],
1196
- "exports": [
1197
- {
1198
- "kind": "js",
1199
- "name": "DateSelectEvent",
1200
- "declaration": {
1201
- "name": "DateSelectEvent",
1202
- "module": "src/calendar/DateSelectEvent.ts"
1203
- }
1204
- }
1205
- ],
1206
- "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"
1207
- },
1208
- {
1209
- "kind": "javascript-module",
1210
- "path": "src/calendar/calendar-localization.ts",
1211
- "declarations": [
1212
- {
1213
- "kind": "variable",
1214
- "name": "localization",
1215
- "type": {
1216
- "text": "CalendarLocalizedText"
1217
- },
1218
- "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}"
1219
- }
1220
- ],
1221
- "exports": [
1222
- {
1223
- "kind": "js",
1224
- "name": "default",
1225
- "declaration": {
1226
- "name": "localization",
1227
- "module": "src/calendar/calendar-localization.ts"
1228
- }
1229
- }
1230
- ],
1231
- "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"
1232
- },
1233
- {
1234
- "kind": "javascript-module",
1235
- "path": "src/calendar/month-view.ts",
1236
- "declarations": [
1237
- {
1238
- "kind": "function",
1239
- "name": "dayView",
1240
- "parameters": [
1241
- {
1242
- "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
1243
- "type": {
1244
- "text": "DatePickerDayProps"
1245
- }
1246
- }
1247
- ]
1248
- },
1249
- {
1250
- "kind": "function",
1251
- "name": "monthView",
1252
- "parameters": [
1253
- {
1254
- "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}",
1255
- "type": {
1256
- "text": "MonthViewArgs"
1257
- }
1258
- }
1259
- ]
1260
- }
1261
- ],
1262
- "exports": [
1263
- {
1264
- "kind": "js",
1265
- "name": "dayView",
1266
- "declaration": {
1267
- "name": "dayView",
1268
- "module": "src/calendar/month-view.ts"
1269
- }
1270
- },
1271
- {
1272
- "kind": "js",
1273
- "name": "monthView",
1274
- "declaration": {
1275
- "name": "monthView",
1276
- "module": "src/calendar/month-view.ts"
1277
- }
1278
- }
1279
- ],
1280
- "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"
1281
- },
1282
- {
1283
- "kind": "javascript-module",
1284
- "path": "src/banner/Banner.ts",
1285
- "declarations": [
1286
- {
1287
- "kind": "class",
1288
- "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.",
1289
- "name": "Banner",
1290
- "slots": [
1364
+ "description": "Optional slot that holds a header for the card.",
1365
+ "name": "header"
1366
+ },
1291
1367
  {
1292
- "description": "default slot",
1293
- "name": ""
1368
+ "description": "Optional slot that holds footer content for the card.",
1369
+ "name": "footer"
1294
1370
  }
1295
1371
  ],
1296
1372
  "members": [
1297
1373
  {
1298
1374
  "kind": "field",
1299
- "name": "variant",
1375
+ "name": "headerSlot",
1376
+ "privacy": "private",
1377
+ "default": "new SlotController(this, \"header\")"
1378
+ },
1379
+ {
1380
+ "kind": "field",
1381
+ "name": "footerSlot",
1382
+ "privacy": "private",
1383
+ "default": "new SlotController(this, \"footer\")"
1384
+ },
1385
+ {
1386
+ "kind": "field",
1387
+ "name": "padding",
1300
1388
  "type": {
1301
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
1389
+ "text": "\"m\" | \"l\" | \"none\""
1302
1390
  },
1303
- "default": "\"info\"",
1304
- "description": "The style variant of the banner.",
1305
- "attribute": "variant",
1391
+ "default": "\"m\"",
1392
+ "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
1393
+ "attribute": "padding",
1306
1394
  "reflects": true
1307
1395
  }
1308
1396
  ],
1309
1397
  "attributes": [
1310
1398
  {
1311
- "name": "variant",
1399
+ "name": "padding",
1312
1400
  "type": {
1313
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
1401
+ "text": "\"m\" | \"l\" | \"none\""
1314
1402
  },
1315
- "default": "\"info\"",
1316
- "description": "The style variant of the banner.",
1317
- "fieldName": "variant"
1403
+ "default": "\"m\"",
1404
+ "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
1405
+ "fieldName": "padding"
1318
1406
  }
1319
1407
  ],
1320
1408
  "superclass": {
1321
1409
  "name": "LitElement",
1322
1410
  "package": "lit"
1323
1411
  },
1324
- "status": "new",
1325
- "category": "feedback",
1326
- "tagName": "nord-banner",
1412
+ "status": "ready",
1413
+ "category": "structure",
1414
+ "tagName": "nord-card",
1327
1415
  "customElement": true
1328
1416
  }
1329
1417
  ],
@@ -1332,20 +1420,20 @@
1332
1420
  "kind": "js",
1333
1421
  "name": "default",
1334
1422
  "declaration": {
1335
- "name": "Banner",
1336
- "module": "src/banner/Banner.ts"
1423
+ "name": "Card",
1424
+ "module": "src/card/Card.ts"
1337
1425
  }
1338
1426
  },
1339
1427
  {
1340
1428
  "kind": "custom-element-definition",
1341
- "name": "nord-banner",
1429
+ "name": "nord-card",
1342
1430
  "declaration": {
1343
- "name": "Banner",
1344
- "module": "src/banner/Banner.ts"
1431
+ "name": "Card",
1432
+ "module": "src/card/Card.ts"
1345
1433
  }
1346
1434
  }
1347
1435
  ],
1348
- "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\">Were 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"
1436
+ "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 display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Dont use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n"
1349
1437
  },
1350
1438
  {
1351
1439
  "kind": "javascript-module",
@@ -1961,94 +2049,6 @@
1961
2049
  ],
1962
2050
  "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 making it possible to choose one or more options from a limited number of options.\n- Use for “accepting terms of service” and similar functionality.\n- Use in forms to toggle something on or off.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you have more than 10 options to choose from.\n- Don’t change the selection of another checkbox when another one is clicked. Only exception is when a checkbox is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nCheckbox labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing checkbox 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\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n"
1963
2051
  },
1964
- {
1965
- "kind": "javascript-module",
1966
- "path": "src/card/Card.ts",
1967
- "declarations": [
1968
- {
1969
- "kind": "class",
1970
- "description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
1971
- "name": "Card",
1972
- "slots": [
1973
- {
1974
- "description": "The card content.",
1975
- "name": ""
1976
- },
1977
- {
1978
- "description": "Optional slot that holds a header for the card.",
1979
- "name": "header"
1980
- },
1981
- {
1982
- "description": "Optional slot that holds footer content for the card.",
1983
- "name": "footer"
1984
- }
1985
- ],
1986
- "members": [
1987
- {
1988
- "kind": "field",
1989
- "name": "headerSlot",
1990
- "privacy": "private",
1991
- "default": "new SlotController(this, \"header\")"
1992
- },
1993
- {
1994
- "kind": "field",
1995
- "name": "footerSlot",
1996
- "privacy": "private",
1997
- "default": "new SlotController(this, \"footer\")"
1998
- },
1999
- {
2000
- "kind": "field",
2001
- "name": "padding",
2002
- "type": {
2003
- "text": "\"m\" | \"l\" | \"none\""
2004
- },
2005
- "default": "\"m\"",
2006
- "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
2007
- "attribute": "padding",
2008
- "reflects": true
2009
- }
2010
- ],
2011
- "attributes": [
2012
- {
2013
- "name": "padding",
2014
- "type": {
2015
- "text": "\"m\" | \"l\" | \"none\""
2016
- },
2017
- "default": "\"m\"",
2018
- "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
2019
- "fieldName": "padding"
2020
- }
2021
- ],
2022
- "superclass": {
2023
- "name": "LitElement",
2024
- "package": "lit"
2025
- },
2026
- "status": "ready",
2027
- "category": "structure",
2028
- "tagName": "nord-card",
2029
- "customElement": true
2030
- }
2031
- ],
2032
- "exports": [
2033
- {
2034
- "kind": "js",
2035
- "name": "default",
2036
- "declaration": {
2037
- "name": "Card",
2038
- "module": "src/card/Card.ts"
2039
- }
2040
- },
2041
- {
2042
- "kind": "custom-element-definition",
2043
- "name": "nord-card",
2044
- "declaration": {
2045
- "name": "Card",
2046
- "module": "src/card/Card.ts"
2047
- }
2048
- }
2049
- ],
2050
- "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 display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n"
2051
- },
2052
2052
  {
2053
2053
  "kind": "javascript-module",
2054
2054
  "path": "src/command-menu/CommandMenu.ts",
@@ -4660,6 +4660,82 @@
4660
4660
  ],
4661
4661
  "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 the fieldset component when you need to create a relationship between multiple form inputs.\n- It is especially important to use with a group of radio components.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place interactive content (buttons, links etc) inside the label.\n- Don’t use with a checkbox component when there is **only one** checkbox. For example, when accepting terms and conditions.\n\n</div>\n\n-------\n\n## Content guidelines\n\nFieldset label should be clear, accurate and predictable. It should help the user to understand how the items in the fieldset are grouped together, or what kind of choice the user is making:\n\n<div class=\"n-usage n-usage-do\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Choose</div>\n\nWhen writing fieldset 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\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Pick A Color</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Pick a color.</div>\n\nDo not use colons in fieldset label:\n\n<div class=\"n-usage n-usage-do\">Payment details</div>\n<div class=\"n-usage n-usage-dont\">Payment details:</div>\n\n-------\n\n## Additional considerations\n\n- A label (which becomes to `<legend>` inside the fieldset) is always required.\n- Hint text can be used to offer further information or explanation for an option.\n"
4662
4662
  },
4663
+ {
4664
+ "kind": "javascript-module",
4665
+ "path": "src/header/Header.ts",
4666
+ "declarations": [
4667
+ {
4668
+ "kind": "class",
4669
+ "description": "The header is a block of designated space for labelling the currently\nviewed context as well as providing primary actions.",
4670
+ "name": "Header",
4671
+ "slots": [
4672
+ {
4673
+ "description": "The header content.",
4674
+ "name": ""
4675
+ },
4676
+ {
4677
+ "description": "Optional slot for buttons, toggles, etc.",
4678
+ "name": "action"
4679
+ }
4680
+ ],
4681
+ "members": [
4682
+ {
4683
+ "kind": "field",
4684
+ "name": "actionSlot",
4685
+ "privacy": "private",
4686
+ "default": "new SlotController(this, \"action\")"
4687
+ },
4688
+ {
4689
+ "kind": "field",
4690
+ "name": "_warningLogged",
4691
+ "type": {
4692
+ "text": "boolean"
4693
+ },
4694
+ "privacy": "private",
4695
+ "static": true,
4696
+ "default": "false",
4697
+ "inheritedFrom": {
4698
+ "name": "DraftComponentMixin",
4699
+ "module": "src/common/mixins/DraftComponentMixin.ts"
4700
+ }
4701
+ }
4702
+ ],
4703
+ "mixins": [
4704
+ {
4705
+ "name": "DraftComponentMixin",
4706
+ "module": "/src/common/mixins/DraftComponentMixin.js"
4707
+ }
4708
+ ],
4709
+ "superclass": {
4710
+ "name": "LitElement",
4711
+ "package": "lit"
4712
+ },
4713
+ "status": "draft",
4714
+ "category": "structure",
4715
+ "tagName": "nord-header",
4716
+ "customElement": true
4717
+ }
4718
+ ],
4719
+ "exports": [
4720
+ {
4721
+ "kind": "js",
4722
+ "name": "default",
4723
+ "declaration": {
4724
+ "name": "Header",
4725
+ "module": "src/header/Header.ts"
4726
+ }
4727
+ },
4728
+ {
4729
+ "kind": "custom-element-definition",
4730
+ "name": "nord-header",
4731
+ "declaration": {
4732
+ "name": "Header",
4733
+ "module": "src/header/Header.ts"
4734
+ }
4735
+ }
4736
+ ],
4737
+ "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 the header component to show a heading to describe the current view.\n- Use the header component to hold primary actions.\n- Use the header component at a visual high position at full width.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t overcrowd the header component with too many actions or information.\n- Don’t nest the header component too deeply and restrict its available space.\n\n</div>\n\n-------\n\n## Content guidelines\n\nThe header component should be a containing element placed high on the page to present high level controls and to describe the page itself. It shouldn’t be overcrowded with controls or information.\n\n<div class=\"n-usage n-usage-do\">[Menu] Dashboard [Account] [Log out]</div>\n<div class=\"n-usage n-usage-dont\">[Menu] Use the cards below to view various information [Export] [Save] [Edit Profile] [Log out] [Preferences]</div>\n"
4738
+ },
4663
4739
  {
4664
4740
  "kind": "javascript-module",
4665
4741
  "path": "src/icon/Icon.ts",
@@ -4895,82 +4971,6 @@
4895
4971
  ],
4896
4972
  "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 provide additional meaning in addition to a text label.\n- Use to help users who have difficulties with reading and attention.\n- Use in places where text label doesn’t fit (remember to add an accessible label for the icon).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for decorative purposes alone.\n- Don’t use when a button’s action is already clear based on the text label.\n- Don’t use the same icon for differing purposes, as users will come to associate icons with specific types of actions.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Icon components are hidden from assistive technologies by default.\n- Use `label` property to give an accessible label for the icon and to make it visible to assistive technologies.\n"
4897
4973
  },
4898
- {
4899
- "kind": "javascript-module",
4900
- "path": "src/header/Header.ts",
4901
- "declarations": [
4902
- {
4903
- "kind": "class",
4904
- "description": "The header is a block of designated space for labelling the currently\nviewed context as well as providing primary actions.",
4905
- "name": "Header",
4906
- "slots": [
4907
- {
4908
- "description": "The header content.",
4909
- "name": ""
4910
- },
4911
- {
4912
- "description": "Optional slot for buttons, toggles, etc.",
4913
- "name": "action"
4914
- }
4915
- ],
4916
- "members": [
4917
- {
4918
- "kind": "field",
4919
- "name": "actionSlot",
4920
- "privacy": "private",
4921
- "default": "new SlotController(this, \"action\")"
4922
- },
4923
- {
4924
- "kind": "field",
4925
- "name": "_warningLogged",
4926
- "type": {
4927
- "text": "boolean"
4928
- },
4929
- "privacy": "private",
4930
- "static": true,
4931
- "default": "false",
4932
- "inheritedFrom": {
4933
- "name": "DraftComponentMixin",
4934
- "module": "src/common/mixins/DraftComponentMixin.ts"
4935
- }
4936
- }
4937
- ],
4938
- "mixins": [
4939
- {
4940
- "name": "DraftComponentMixin",
4941
- "module": "/src/common/mixins/DraftComponentMixin.js"
4942
- }
4943
- ],
4944
- "superclass": {
4945
- "name": "LitElement",
4946
- "package": "lit"
4947
- },
4948
- "status": "draft",
4949
- "category": "structure",
4950
- "tagName": "nord-header",
4951
- "customElement": true
4952
- }
4953
- ],
4954
- "exports": [
4955
- {
4956
- "kind": "js",
4957
- "name": "default",
4958
- "declaration": {
4959
- "name": "Header",
4960
- "module": "src/header/Header.ts"
4961
- }
4962
- },
4963
- {
4964
- "kind": "custom-element-definition",
4965
- "name": "nord-header",
4966
- "declaration": {
4967
- "name": "Header",
4968
- "module": "src/header/Header.ts"
4969
- }
4970
- }
4971
- ],
4972
- "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 the header component to show a heading to describe the current view.\n- Use the header component to hold primary actions.\n- Use the header component at a visual high position at full width.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t overcrowd the header component with too many actions or information.\n- Don’t nest the header component too deeply and restrict its available space.\n\n</div>\n\n-------\n\n## Content guidelines\n\nThe header component should be a containing element placed high on the page to present high level controls and to describe the page itself. It shouldn’t be overcrowded with controls or information.\n\n<div class=\"n-usage n-usage-do\">[Menu] Dashboard [Account] [Log out]</div>\n<div class=\"n-usage n-usage-dont\">[Menu] Use the cards below to view various information [Export] [Save] [Edit Profile] [Log out] [Preferences]</div>\n"
4973
- },
4974
4974
  {
4975
4975
  "kind": "javascript-module",
4976
4976
  "path": "src/input/Input.ts",
@@ -7550,6 +7550,16 @@
7550
7550
  "description": "How to align the child items inside the stack.",
7551
7551
  "attribute": "align-items",
7552
7552
  "reflects": true
7553
+ },
7554
+ {
7555
+ "kind": "field",
7556
+ "name": "justifyContent",
7557
+ "type": {
7558
+ "text": "\"center\" | \"start\" | \"end\" | undefined"
7559
+ },
7560
+ "description": "How to justify the child items inside the stack.",
7561
+ "attribute": "justify-content",
7562
+ "reflects": true
7553
7563
  }
7554
7564
  ],
7555
7565
  "attributes": [
@@ -7578,6 +7588,14 @@
7578
7588
  },
7579
7589
  "description": "How to align the child items inside the stack.",
7580
7590
  "fieldName": "alignItems"
7591
+ },
7592
+ {
7593
+ "name": "justify-content",
7594
+ "type": {
7595
+ "text": "\"center\" | \"start\" | \"end\" | undefined"
7596
+ },
7597
+ "description": "How to justify the child items inside the stack.",
7598
+ "fieldName": "justifyContent"
7581
7599
  }
7582
7600
  ],
7583
7601
  "superclass": {