@nordhealth/components 1.0.0-beta.10 → 1.0.0-beta.11

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,529 +422,508 @@
422
422
  },
423
423
  {
424
424
  "kind": "javascript-module",
425
- "path": "src/banner/Banner.ts",
425
+ "path": "src/calendar/Calendar.ts",
426
426
  "declarations": [
427
427
  {
428
428
  "kind": "class",
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
- "slots": [
432
- {
433
- "description": "default slot",
434
- "name": ""
435
- }
436
- ],
429
+ "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.",
430
+ "name": "Calendar",
437
431
  "members": [
438
432
  {
439
433
  "kind": "field",
440
- "name": "variant",
434
+ "name": "dialogLabelId",
441
435
  "type": {
442
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
436
+ "text": "string"
443
437
  },
444
- "default": "\"info\"",
445
- "description": "The style variant of the banner.",
446
- "attribute": "variant",
447
- "reflects": true
448
- }
449
- ],
450
- "attributes": [
438
+ "privacy": "private",
439
+ "default": "\"dialog-header\""
440
+ },
451
441
  {
452
- "name": "variant",
442
+ "kind": "field",
443
+ "name": "monthSelectNode",
453
444
  "type": {
454
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
445
+ "text": "HTMLElement"
455
446
  },
456
- "default": "\"info\"",
457
- "description": "The style variant of the banner.",
458
- "fieldName": "variant"
459
- }
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/button/Button.ts",
494
- "declarations": [
495
- {
496
- "kind": "class",
497
- "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.",
498
- "name": "Button",
499
- "slots": [
447
+ "privacy": "private"
448
+ },
500
449
  {
501
- "description": "The button content",
502
- "name": ""
450
+ "kind": "field",
451
+ "name": "focusedDayNode",
452
+ "type": {
453
+ "text": "HTMLButtonElement"
454
+ },
455
+ "privacy": "private"
503
456
  },
504
457
  {
505
- "description": "Used to place content before button text. Typically used for icons.",
506
- "name": "before"
458
+ "kind": "field",
459
+ "name": "direction",
460
+ "privacy": "private",
461
+ "default": "new DirectionController(this)"
507
462
  },
508
463
  {
509
- "description": "Used to place content after button text. Typically used for icons.",
510
- "name": "after"
511
- }
512
- ],
513
- "members": [
464
+ "kind": "field",
465
+ "name": "swipe",
466
+ "privacy": "private",
467
+ "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
468
+ },
514
469
  {
515
470
  "kind": "field",
516
- "name": "buttonRef",
471
+ "name": "shortcuts",
517
472
  "privacy": "private"
518
473
  },
519
474
  {
520
475
  "kind": "field",
521
- "name": "lightDom",
476
+ "name": "dateFormatShort",
477
+ "type": {
478
+ "text": "Intl.DateTimeFormat"
479
+ },
522
480
  "privacy": "private",
523
- "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
481
+ "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"
524
482
  },
525
483
  {
526
484
  "kind": "field",
527
- "name": "variant",
485
+ "name": "localization",
528
486
  "type": {
529
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
487
+ "text": "CalendarLocalizedText"
530
488
  },
531
- "default": "\"default\"",
532
- "description": "The style variant of the button.",
533
- "attribute": "variant",
534
- "reflects": true
489
+ "default": "localization"
535
490
  },
536
491
  {
537
492
  "kind": "field",
538
- "name": "type",
493
+ "name": "value",
539
494
  "type": {
540
- "text": "\"button\" | \"submit\" | \"reset\""
495
+ "text": "string"
541
496
  },
542
- "default": "\"submit\"",
543
- "description": "The type of the button.",
544
- "attribute": "type",
545
- "reflects": true
497
+ "default": "\"\"",
498
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
499
+ "attribute": "value"
546
500
  },
547
501
  {
548
502
  "kind": "field",
549
- "name": "size",
503
+ "name": "firstDayOfWeek",
550
504
  "type": {
551
- "text": "\"s\" | \"m\" | \"l\""
505
+ "text": "DaysOfWeek"
552
506
  },
553
- "default": "\"m\"",
554
- "description": "The size of the button.\nThis affects font-size and padding.",
555
- "attribute": "size",
556
- "reflects": true
507
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
508
+ "attribute": "firstDayOfWeek"
557
509
  },
558
510
  {
559
511
  "kind": "field",
560
- "name": "href",
512
+ "name": "min",
561
513
  "type": {
562
- "text": "string | undefined"
514
+ "text": "string"
563
515
  },
564
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
565
- "attribute": "href",
566
- "reflects": true
516
+ "default": "\"\"",
517
+ "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.",
518
+ "attribute": "min"
567
519
  },
568
520
  {
569
521
  "kind": "field",
570
- "name": "download",
522
+ "name": "max",
571
523
  "type": {
572
- "text": "boolean"
524
+ "text": "string"
573
525
  },
574
- "default": "false",
575
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
576
- "attribute": "download"
526
+ "default": "\"\"",
527
+ "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.",
528
+ "attribute": "max"
577
529
  },
578
530
  {
579
531
  "kind": "field",
580
- "name": "target",
532
+ "name": "isDateDisabled",
581
533
  "type": {
582
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
534
+ "text": "DateDisabledPredicate"
583
535
  },
584
- "default": "\"_self\"",
585
- "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.",
586
- "attribute": "target",
587
- "reflects": true
536
+ "default": "isDateDisabled",
537
+ "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
588
538
  },
589
539
  {
590
540
  "kind": "field",
591
- "name": "expand",
541
+ "name": "activeFocus",
592
542
  "type": {
593
543
  "text": "boolean"
594
544
  },
595
- "default": "false",
596
- "description": "Controls whether the button expands to fill the width of its container.",
597
- "attribute": "expand",
598
- "reflects": true
545
+ "privacy": "private",
546
+ "default": "false"
599
547
  },
600
548
  {
601
- "kind": "method",
602
- "name": "renderLink",
549
+ "kind": "field",
550
+ "name": "focusedDay",
603
551
  "privacy": "private",
552
+ "default": "new Date()"
553
+ },
554
+ {
555
+ "kind": "method",
556
+ "name": "focus",
604
557
  "parameters": [
605
558
  {
606
- "name": "innards",
559
+ "name": "options",
560
+ "optional": true,
607
561
  "type": {
608
- "text": "TemplateResult"
562
+ "text": "FocusOptions & { target: \"day\" | \"month\" }"
609
563
  }
610
564
  }
611
- ],
612
- "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."
565
+ ]
613
566
  },
614
567
  {
615
568
  "kind": "method",
616
- "name": "renderButton",
569
+ "name": "createDateFormatter",
570
+ "privacy": "private"
571
+ },
572
+ {
573
+ "kind": "field",
574
+ "name": "handleDaySelect",
575
+ "privacy": "private"
576
+ },
577
+ {
578
+ "kind": "method",
579
+ "name": "addDays",
617
580
  "privacy": "private",
618
581
  "parameters": [
619
582
  {
620
- "name": "innards",
583
+ "name": "days",
621
584
  "type": {
622
- "text": "TemplateResult"
585
+ "text": "number"
623
586
  }
624
587
  }
625
588
  ]
626
589
  },
627
590
  {
628
591
  "kind": "method",
629
- "name": "renderLightDom",
630
- "privacy": "private"
592
+ "name": "addMonths",
593
+ "privacy": "private",
594
+ "parameters": [
595
+ {
596
+ "name": "months",
597
+ "type": {
598
+ "text": "number"
599
+ }
600
+ }
601
+ ]
631
602
  },
632
603
  {
633
- "kind": "field",
634
- "name": "handleOuterClick",
635
- "privacy": "private"
604
+ "kind": "method",
605
+ "name": "addYears",
606
+ "privacy": "private",
607
+ "parameters": [
608
+ {
609
+ "name": "years",
610
+ "type": {
611
+ "text": "number"
612
+ }
613
+ }
614
+ ]
636
615
  },
637
616
  {
638
617
  "kind": "method",
639
- "name": "handleClick",
618
+ "name": "startOfWeek",
640
619
  "privacy": "private"
641
620
  },
642
621
  {
643
- "kind": "field",
644
- "name": "disabled",
645
- "type": {
646
- "text": "boolean"
647
- },
648
- "default": "false",
649
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
650
- "attribute": "disabled",
651
- "reflects": true,
652
- "inheritedFrom": {
653
- "name": "InputMixin",
654
- "module": "src/common/mixins/InputMixin.ts"
655
- }
656
- },
657
- {
658
- "kind": "field",
659
- "name": "name",
660
- "type": {
661
- "text": "string | undefined"
662
- },
663
- "description": "The name of the form component.",
664
- "attribute": "name",
665
- "inheritedFrom": {
666
- "name": "InputMixin",
667
- "module": "src/common/mixins/InputMixin.ts"
668
- }
669
- },
670
- {
671
- "kind": "field",
672
- "name": "value",
673
- "type": {
674
- "text": "string"
675
- },
676
- "default": "\"\"",
677
- "description": "The value of the form component.",
678
- "attribute": "value",
679
- "inheritedFrom": {
680
- "name": "InputMixin",
681
- "module": "src/common/mixins/InputMixin.ts"
682
- }
683
- },
684
- {
685
- "kind": "field",
686
- "name": "form",
687
- "privacy": "protected",
688
- "description": "Gets the form, if any, associated with the form element.",
689
- "inheritedFrom": {
690
- "name": "InputMixin",
691
- "module": "src/common/mixins/InputMixin.ts"
692
- }
693
- },
694
- {
695
- "kind": "field",
696
- "name": "focusableRef",
697
- "privacy": "protected",
698
- "inheritedFrom": {
699
- "name": "FocusableMixin",
700
- "module": "src/common/mixins/FocusableMixin.ts"
701
- }
622
+ "kind": "method",
623
+ "name": "endOfWeek",
624
+ "privacy": "private"
702
625
  },
703
626
  {
704
627
  "kind": "method",
705
- "name": "focus",
628
+ "name": "setMonth",
629
+ "privacy": "private",
706
630
  "parameters": [
707
631
  {
708
- "name": "options",
709
- "optional": true,
632
+ "name": "month",
710
633
  "type": {
711
- "text": "FocusOptions"
712
- },
713
- "description": "An object which controls aspects of the focusing process."
634
+ "text": "number"
635
+ }
714
636
  }
715
- ],
716
- "description": "Programmatically move focus to the component.",
717
- "inheritedFrom": {
718
- "name": "FocusableMixin",
719
- "module": "src/common/mixins/FocusableMixin.ts"
720
- }
637
+ ]
721
638
  },
722
639
  {
723
640
  "kind": "method",
724
- "name": "blur",
725
- "description": "Programmatically remove focus from the component.",
726
- "inheritedFrom": {
727
- "name": "FocusableMixin",
728
- "module": "src/common/mixins/FocusableMixin.ts"
729
- }
641
+ "name": "setYear",
642
+ "privacy": "private",
643
+ "parameters": [
644
+ {
645
+ "name": "year",
646
+ "type": {
647
+ "text": "number"
648
+ }
649
+ }
650
+ ]
730
651
  },
731
652
  {
732
653
  "kind": "method",
733
- "name": "click",
734
- "description": "Programmatically simulates a click on the component.",
735
- "inheritedFrom": {
736
- "name": "FocusableMixin",
737
- "module": "src/common/mixins/FocusableMixin.ts"
738
- }
739
- }
740
- ],
741
- "attributes": [
742
- {
743
- "name": "variant",
744
- "type": {
745
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
746
- },
747
- "default": "\"default\"",
748
- "description": "The style variant of the button.",
749
- "fieldName": "variant"
654
+ "name": "setFocusedDay",
655
+ "privacy": "private",
656
+ "parameters": [
657
+ {
658
+ "name": "day",
659
+ "type": {
660
+ "text": "Date"
661
+ }
662
+ }
663
+ ]
750
664
  },
751
665
  {
752
- "name": "type",
753
- "type": {
754
- "text": "\"button\" | \"submit\" | \"reset\""
755
- },
756
- "default": "\"submit\"",
757
- "description": "The type of the button.",
758
- "fieldName": "type"
666
+ "kind": "field",
667
+ "name": "handleMonthSelect",
668
+ "privacy": "private"
759
669
  },
760
670
  {
761
- "name": "size",
762
- "type": {
763
- "text": "\"s\" | \"m\" | \"l\""
764
- },
765
- "default": "\"m\"",
766
- "description": "The size of the button.\nThis affects font-size and padding.",
767
- "fieldName": "size"
671
+ "kind": "field",
672
+ "name": "handleYearSelect",
673
+ "privacy": "private"
768
674
  },
769
675
  {
770
- "name": "href",
771
- "type": {
772
- "text": "string | undefined"
773
- },
774
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
775
- "fieldName": "href"
676
+ "kind": "field",
677
+ "name": "handleNextMonthClick",
678
+ "privacy": "private"
776
679
  },
777
680
  {
778
- "name": "download",
779
- "type": {
780
- "text": "boolean"
781
- },
782
- "default": "false",
783
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
784
- "fieldName": "download"
681
+ "kind": "field",
682
+ "name": "handlePreviousMonthClick",
683
+ "privacy": "private"
785
684
  },
786
685
  {
787
- "name": "target",
788
- "type": {
789
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
790
- },
791
- "default": "\"_self\"",
792
- "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.",
793
- "fieldName": "target"
686
+ "kind": "field",
687
+ "name": "enableActiveFocus",
688
+ "privacy": "private"
794
689
  },
795
690
  {
796
- "name": "expand",
691
+ "kind": "field",
692
+ "name": "disableActiveFocus",
693
+ "privacy": "private"
694
+ }
695
+ ],
696
+ "attributes": [
697
+ {
698
+ "name": "value",
797
699
  "type": {
798
- "text": "boolean"
700
+ "text": "string"
799
701
  },
800
- "default": "false",
801
- "description": "Controls whether the button expands to fill the width of its container.",
802
- "fieldName": "expand"
702
+ "default": "\"\"",
703
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
704
+ "fieldName": "value"
803
705
  },
804
706
  {
805
- "name": "disabled",
707
+ "name": "firstDayOfWeek",
806
708
  "type": {
807
- "text": "boolean"
709
+ "text": "DaysOfWeek"
808
710
  },
809
- "default": "false",
810
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
811
- "fieldName": "disabled",
812
- "inheritedFrom": {
813
- "name": "InputMixin",
814
- "module": "src/common/mixins/InputMixin.ts"
815
- }
711
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
712
+ "fieldName": "firstDayOfWeek"
816
713
  },
817
714
  {
818
- "name": "name",
715
+ "name": "min",
819
716
  "type": {
820
- "text": "string | undefined"
717
+ "text": "string"
821
718
  },
822
- "description": "The name of the form component.",
823
- "fieldName": "name",
824
- "inheritedFrom": {
825
- "name": "InputMixin",
826
- "module": "src/common/mixins/InputMixin.ts"
827
- }
719
+ "default": "\"\"",
720
+ "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.",
721
+ "fieldName": "min"
828
722
  },
829
723
  {
830
- "name": "value",
724
+ "name": "max",
831
725
  "type": {
832
726
  "text": "string"
833
727
  },
834
728
  "default": "\"\"",
835
- "description": "The value of the form component.",
836
- "fieldName": "value",
837
- "inheritedFrom": {
838
- "name": "InputMixin",
839
- "module": "src/common/mixins/InputMixin.ts"
840
- }
729
+ "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.",
730
+ "fieldName": "max"
841
731
  }
842
732
  ],
843
- "mixins": [
733
+ "superclass": {
734
+ "name": "LitElement",
735
+ "package": "lit"
736
+ },
737
+ "status": "ready",
738
+ "category": "list",
739
+ "tagName": "nord-calendar",
740
+ "customElement": true
741
+ }
742
+ ],
743
+ "exports": [
744
+ {
745
+ "kind": "js",
746
+ "name": "default",
747
+ "declaration": {
748
+ "name": "Calendar",
749
+ "module": "src/calendar/Calendar.ts"
750
+ }
751
+ },
752
+ {
753
+ "kind": "custom-element-definition",
754
+ "name": "nord-calendar",
755
+ "declaration": {
756
+ "name": "Calendar",
757
+ "module": "src/calendar/Calendar.ts"
758
+ }
759
+ }
760
+ ],
761
+ "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"
762
+ },
763
+ {
764
+ "kind": "javascript-module",
765
+ "path": "src/calendar/DateSelectEvent.ts",
766
+ "declarations": [
767
+ {
768
+ "kind": "class",
769
+ "description": "",
770
+ "name": "DateSelectEvent",
771
+ "members": [
844
772
  {
845
- "name": "InputMixin",
846
- "module": "/src/common/mixins/InputMixin.js"
773
+ "kind": "field",
774
+ "name": "eventName",
775
+ "type": {
776
+ "text": "string"
777
+ },
778
+ "static": true,
779
+ "default": "\"nord-select\""
847
780
  },
848
781
  {
849
- "name": "FocusableMixin",
850
- "module": "/src/common/mixins/FocusableMixin.js"
782
+ "kind": "field",
783
+ "name": "date",
784
+ "type": {
785
+ "text": "Date"
786
+ },
787
+ "default": "date"
851
788
  }
852
789
  ],
853
790
  "superclass": {
854
- "name": "LitElement",
855
- "package": "lit"
791
+ "name": "NordEvent",
792
+ "module": "/src/common/events.js"
793
+ }
794
+ }
795
+ ],
796
+ "exports": [
797
+ {
798
+ "kind": "js",
799
+ "name": "DateSelectEvent",
800
+ "declaration": {
801
+ "name": "DateSelectEvent",
802
+ "module": "src/calendar/DateSelectEvent.ts"
803
+ }
804
+ }
805
+ ],
806
+ "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"
807
+ },
808
+ {
809
+ "kind": "javascript-module",
810
+ "path": "src/calendar/calendar-localization.ts",
811
+ "declarations": [
812
+ {
813
+ "kind": "variable",
814
+ "name": "localization",
815
+ "type": {
816
+ "text": "CalendarLocalizedText"
856
817
  },
857
- "status": "ready",
858
- "category": "action",
859
- "tagName": "nord-button",
860
- "customElement": true
818
+ "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}"
819
+ }
820
+ ],
821
+ "exports": [
822
+ {
823
+ "kind": "js",
824
+ "name": "default",
825
+ "declaration": {
826
+ "name": "localization",
827
+ "module": "src/calendar/calendar-localization.ts"
828
+ }
829
+ }
830
+ ],
831
+ "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"
832
+ },
833
+ {
834
+ "kind": "javascript-module",
835
+ "path": "src/calendar/month-view.ts",
836
+ "declarations": [
837
+ {
838
+ "kind": "function",
839
+ "name": "dayView",
840
+ "parameters": [
841
+ {
842
+ "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
843
+ "type": {
844
+ "text": "DatePickerDayProps"
845
+ }
846
+ }
847
+ ]
848
+ },
849
+ {
850
+ "kind": "function",
851
+ "name": "monthView",
852
+ "parameters": [
853
+ {
854
+ "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}",
855
+ "type": {
856
+ "text": "MonthViewArgs"
857
+ }
858
+ }
859
+ ]
861
860
  }
862
861
  ],
863
862
  "exports": [
864
863
  {
865
864
  "kind": "js",
866
- "name": "default",
865
+ "name": "dayView",
867
866
  "declaration": {
868
- "name": "Button",
869
- "module": "src/button/Button.ts"
867
+ "name": "dayView",
868
+ "module": "src/calendar/month-view.ts"
870
869
  }
871
870
  },
872
871
  {
873
- "kind": "custom-element-definition",
874
- "name": "nord-button",
872
+ "kind": "js",
873
+ "name": "monthView",
875
874
  "declaration": {
876
- "name": "Button",
877
- "module": "src/button/Button.ts"
875
+ "name": "monthView",
876
+ "module": "src/calendar/month-view.ts"
878
877
  }
879
878
  }
880
879
  ],
881
- "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"
880
+ "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"
882
881
  },
883
882
  {
884
883
  "kind": "javascript-module",
885
- "path": "src/card/Card.ts",
884
+ "path": "src/banner/Banner.ts",
886
885
  "declarations": [
887
886
  {
888
887
  "kind": "class",
889
- "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.",
890
- "name": "Card",
888
+ "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.",
889
+ "name": "Banner",
891
890
  "slots": [
892
891
  {
893
- "description": "The card content.",
892
+ "description": "default slot",
894
893
  "name": ""
895
- },
896
- {
897
- "description": "Optional slot that holds a header for the card.",
898
- "name": "header"
899
- },
900
- {
901
- "description": "Optional slot that holds footer content for the card.",
902
- "name": "footer"
903
894
  }
904
895
  ],
905
896
  "members": [
906
897
  {
907
898
  "kind": "field",
908
- "name": "headerSlot",
909
- "privacy": "private",
910
- "default": "new SlotController(this, \"header\")"
911
- },
912
- {
913
- "kind": "field",
914
- "name": "footerSlot",
915
- "privacy": "private",
916
- "default": "new SlotController(this, \"footer\")"
917
- },
918
- {
919
- "kind": "field",
920
- "name": "padding",
899
+ "name": "variant",
921
900
  "type": {
922
- "text": "\"m\" | \"l\" | \"none\""
901
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
923
902
  },
924
- "default": "\"m\"",
925
- "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
926
- "attribute": "padding",
903
+ "default": "\"info\"",
904
+ "description": "The style variant of the banner.",
905
+ "attribute": "variant",
927
906
  "reflects": true
928
907
  }
929
908
  ],
930
909
  "attributes": [
931
910
  {
932
- "name": "padding",
911
+ "name": "variant",
933
912
  "type": {
934
- "text": "\"m\" | \"l\" | \"none\""
913
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
935
914
  },
936
- "default": "\"m\"",
937
- "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
938
- "fieldName": "padding"
915
+ "default": "\"info\"",
916
+ "description": "The style variant of the banner.",
917
+ "fieldName": "variant"
939
918
  }
940
919
  ],
941
920
  "superclass": {
942
921
  "name": "LitElement",
943
922
  "package": "lit"
944
923
  },
945
- "status": "ready",
946
- "category": "structure",
947
- "tagName": "nord-card",
924
+ "status": "new",
925
+ "category": "feedback",
926
+ "tagName": "nord-banner",
948
927
  "customElement": true
949
928
  }
950
929
  ],
@@ -953,329 +932,389 @@
953
932
  "kind": "js",
954
933
  "name": "default",
955
934
  "declaration": {
956
- "name": "Card",
957
- "module": "src/card/Card.ts"
935
+ "name": "Banner",
936
+ "module": "src/banner/Banner.ts"
958
937
  }
959
938
  },
960
939
  {
961
940
  "kind": "custom-element-definition",
962
- "name": "nord-card",
941
+ "name": "nord-banner",
963
942
  "declaration": {
964
- "name": "Card",
965
- "module": "src/card/Card.ts"
943
+ "name": "Banner",
944
+ "module": "src/banner/Banner.ts"
966
945
  }
967
946
  }
968
947
  ],
969
- "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"
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 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"
970
949
  },
971
950
  {
972
951
  "kind": "javascript-module",
973
- "path": "src/calendar/Calendar.ts",
952
+ "path": "src/button/Button.ts",
974
953
  "declarations": [
975
954
  {
976
955
  "kind": "class",
977
- "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.",
978
- "name": "Calendar",
979
- "members": [
980
- {
981
- "kind": "field",
982
- "name": "dialogLabelId",
983
- "type": {
984
- "text": "string"
985
- },
986
- "privacy": "private",
987
- "default": "\"dialog-header\""
988
- },
989
- {
990
- "kind": "field",
991
- "name": "monthSelectNode",
992
- "type": {
993
- "text": "HTMLElement"
994
- },
995
- "privacy": "private"
996
- },
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": [
997
959
  {
998
- "kind": "field",
999
- "name": "focusedDayNode",
1000
- "type": {
1001
- "text": "HTMLButtonElement"
1002
- },
1003
- "privacy": "private"
960
+ "description": "The button content",
961
+ "name": ""
1004
962
  },
1005
963
  {
1006
- "kind": "field",
1007
- "name": "direction",
1008
- "privacy": "private",
1009
- "default": "new DirectionController(this)"
964
+ "description": "Used to place content before button text. Typically used for icons.",
965
+ "name": "before"
1010
966
  },
1011
967
  {
1012
- "kind": "field",
1013
- "name": "swipe",
1014
- "privacy": "private",
1015
- "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
1016
- },
968
+ "description": "Used to place content after button text. Typically used for icons.",
969
+ "name": "after"
970
+ }
971
+ ],
972
+ "members": [
1017
973
  {
1018
974
  "kind": "field",
1019
- "name": "shortcuts",
975
+ "name": "buttonRef",
1020
976
  "privacy": "private"
1021
977
  },
1022
978
  {
1023
979
  "kind": "field",
1024
- "name": "dateFormatShort",
1025
- "type": {
1026
- "text": "Intl.DateTimeFormat"
1027
- },
980
+ "name": "lightDom",
1028
981
  "privacy": "private",
1029
- "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"
1030
- },
1031
- {
1032
- "kind": "field",
1033
- "name": "localization",
1034
- "type": {
1035
- "text": "CalendarLocalizedText"
1036
- },
1037
- "default": "localization"
982
+ "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
1038
983
  },
1039
984
  {
1040
985
  "kind": "field",
1041
- "name": "value",
986
+ "name": "variant",
1042
987
  "type": {
1043
- "text": "string"
988
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
1044
989
  },
1045
- "default": "\"\"",
1046
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1047
- "attribute": "value"
990
+ "default": "\"default\"",
991
+ "description": "The style variant of the button.",
992
+ "attribute": "variant",
993
+ "reflects": true
1048
994
  },
1049
995
  {
1050
996
  "kind": "field",
1051
- "name": "firstDayOfWeek",
997
+ "name": "type",
1052
998
  "type": {
1053
- "text": "DaysOfWeek"
999
+ "text": "\"button\" | \"submit\" | \"reset\""
1054
1000
  },
1055
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1056
- "attribute": "firstDayOfWeek"
1001
+ "default": "\"submit\"",
1002
+ "description": "The type of the button.",
1003
+ "attribute": "type",
1004
+ "reflects": true
1057
1005
  },
1058
1006
  {
1059
1007
  "kind": "field",
1060
- "name": "min",
1008
+ "name": "size",
1061
1009
  "type": {
1062
- "text": "string"
1010
+ "text": "\"s\" | \"m\" | \"l\""
1063
1011
  },
1064
- "default": "\"\"",
1065
- "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.",
1066
- "attribute": "min"
1012
+ "default": "\"m\"",
1013
+ "description": "The size of the button.\nThis affects font-size and padding.",
1014
+ "attribute": "size",
1015
+ "reflects": true
1067
1016
  },
1068
1017
  {
1069
1018
  "kind": "field",
1070
- "name": "max",
1019
+ "name": "href",
1071
1020
  "type": {
1072
- "text": "string"
1021
+ "text": "string | undefined"
1073
1022
  },
1074
- "default": "\"\"",
1075
- "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.",
1076
- "attribute": "max"
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
1077
1026
  },
1078
1027
  {
1079
1028
  "kind": "field",
1080
- "name": "isDateDisabled",
1029
+ "name": "download",
1081
1030
  "type": {
1082
- "text": "DateDisabledPredicate"
1031
+ "text": "boolean"
1083
1032
  },
1084
- "default": "isDateDisabled",
1085
- "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
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"
1086
1036
  },
1087
1037
  {
1088
1038
  "kind": "field",
1089
- "name": "activeFocus",
1039
+ "name": "target",
1090
1040
  "type": {
1091
- "text": "boolean"
1041
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
1092
1042
  },
1093
- "privacy": "private",
1094
- "default": "false"
1095
- },
1096
- {
1097
- "kind": "field",
1098
- "name": "focusedDay",
1099
- "privacy": "private",
1100
- "default": "new Date()"
1101
- },
1102
- {
1103
- "kind": "method",
1104
- "name": "focus",
1105
- "parameters": [
1106
- {
1107
- "name": "options",
1108
- "optional": true,
1109
- "type": {
1110
- "text": "FocusOptions & { target: \"day\" | \"month\" }"
1111
- }
1112
- }
1113
- ]
1114
- },
1115
- {
1116
- "kind": "method",
1117
- "name": "createDateFormatter",
1118
- "privacy": "private"
1119
- },
1120
- {
1121
- "kind": "field",
1122
- "name": "handleDaySelect",
1123
- "privacy": "private"
1124
- },
1125
- {
1126
- "kind": "method",
1127
- "name": "addDays",
1128
- "privacy": "private",
1129
- "parameters": [
1130
- {
1131
- "name": "days",
1132
- "type": {
1133
- "text": "number"
1134
- }
1135
- }
1136
- ]
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
1047
+ },
1048
+ {
1049
+ "kind": "field",
1050
+ "name": "expand",
1051
+ "type": {
1052
+ "text": "boolean"
1053
+ },
1054
+ "default": "false",
1055
+ "description": "Controls whether the button expands to fill the width of its container.",
1056
+ "attribute": "expand",
1057
+ "reflects": true
1137
1058
  },
1138
1059
  {
1139
1060
  "kind": "method",
1140
- "name": "addMonths",
1061
+ "name": "renderLink",
1141
1062
  "privacy": "private",
1142
1063
  "parameters": [
1143
1064
  {
1144
- "name": "months",
1065
+ "name": "innards",
1145
1066
  "type": {
1146
- "text": "number"
1067
+ "text": "TemplateResult"
1147
1068
  }
1148
1069
  }
1149
- ]
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."
1150
1072
  },
1151
1073
  {
1152
1074
  "kind": "method",
1153
- "name": "addYears",
1075
+ "name": "renderButton",
1154
1076
  "privacy": "private",
1155
1077
  "parameters": [
1156
1078
  {
1157
- "name": "years",
1079
+ "name": "innards",
1158
1080
  "type": {
1159
- "text": "number"
1081
+ "text": "TemplateResult"
1160
1082
  }
1161
1083
  }
1162
1084
  ]
1163
1085
  },
1164
1086
  {
1165
1087
  "kind": "method",
1166
- "name": "startOfWeek",
1088
+ "name": "renderLightDom",
1167
1089
  "privacy": "private"
1168
1090
  },
1169
1091
  {
1170
- "kind": "method",
1171
- "name": "endOfWeek",
1092
+ "kind": "field",
1093
+ "name": "handleOuterClick",
1172
1094
  "privacy": "private"
1173
1095
  },
1174
1096
  {
1175
1097
  "kind": "method",
1176
- "name": "setMonth",
1098
+ "name": "handleClick",
1177
1099
  "privacy": "private",
1178
1100
  "parameters": [
1179
1101
  {
1180
- "name": "month",
1102
+ "name": "e",
1181
1103
  "type": {
1182
- "text": "number"
1104
+ "text": "Event"
1183
1105
  }
1184
1106
  }
1185
1107
  ]
1186
1108
  },
1187
1109
  {
1188
- "kind": "method",
1189
- "name": "setYear",
1190
- "privacy": "private",
1191
- "parameters": [
1192
- {
1193
- "name": "year",
1194
- "type": {
1195
- "text": "number"
1196
- }
1197
- }
1198
- ]
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
+ }
1199
1123
  },
1200
1124
  {
1201
- "kind": "method",
1202
- "name": "setFocusedDay",
1203
- "privacy": "private",
1204
- "parameters": [
1205
- {
1206
- "name": "day",
1207
- "type": {
1208
- "text": "Date"
1209
- }
1210
- }
1211
- ]
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
+ }
1212
1136
  },
1213
1137
  {
1214
1138
  "kind": "field",
1215
- "name": "handleMonthSelect",
1216
- "privacy": "private"
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
+ }
1217
1150
  },
1218
1151
  {
1219
1152
  "kind": "field",
1220
- "name": "handleYearSelect",
1221
- "privacy": "private"
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
+ }
1222
1160
  },
1223
1161
  {
1224
1162
  "kind": "field",
1225
- "name": "handleNextMonthClick",
1226
- "privacy": "private"
1163
+ "name": "focusableRef",
1164
+ "privacy": "protected",
1165
+ "inheritedFrom": {
1166
+ "name": "FocusableMixin",
1167
+ "module": "src/common/mixins/FocusableMixin.ts"
1168
+ }
1227
1169
  },
1228
1170
  {
1229
- "kind": "field",
1230
- "name": "handlePreviousMonthClick",
1231
- "privacy": "private"
1171
+ "kind": "method",
1172
+ "name": "focus",
1173
+ "parameters": [
1174
+ {
1175
+ "name": "options",
1176
+ "optional": true,
1177
+ "type": {
1178
+ "text": "FocusOptions"
1179
+ },
1180
+ "description": "An object which controls aspects of the focusing process."
1181
+ }
1182
+ ],
1183
+ "description": "Programmatically move focus to the component.",
1184
+ "inheritedFrom": {
1185
+ "name": "FocusableMixin",
1186
+ "module": "src/common/mixins/FocusableMixin.ts"
1187
+ }
1232
1188
  },
1233
1189
  {
1234
- "kind": "field",
1235
- "name": "enableActiveFocus",
1236
- "privacy": "private"
1190
+ "kind": "method",
1191
+ "name": "blur",
1192
+ "description": "Programmatically remove focus from the component.",
1193
+ "inheritedFrom": {
1194
+ "name": "FocusableMixin",
1195
+ "module": "src/common/mixins/FocusableMixin.ts"
1196
+ }
1237
1197
  },
1238
1198
  {
1239
- "kind": "field",
1240
- "name": "disableActiveFocus",
1241
- "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
+ }
1242
1206
  }
1243
1207
  ],
1244
1208
  "attributes": [
1245
1209
  {
1246
- "name": "value",
1210
+ "name": "variant",
1247
1211
  "type": {
1248
- "text": "string"
1212
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
1249
1213
  },
1250
- "default": "\"\"",
1251
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1252
- "fieldName": "value"
1214
+ "default": "\"default\"",
1215
+ "description": "The style variant of the button.",
1216
+ "fieldName": "variant"
1253
1217
  },
1254
1218
  {
1255
- "name": "firstDayOfWeek",
1219
+ "name": "type",
1256
1220
  "type": {
1257
- "text": "DaysOfWeek"
1221
+ "text": "\"button\" | \"submit\" | \"reset\""
1258
1222
  },
1259
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1260
- "fieldName": "firstDayOfWeek"
1223
+ "default": "\"submit\"",
1224
+ "description": "The type of the button.",
1225
+ "fieldName": "type"
1261
1226
  },
1262
1227
  {
1263
- "name": "min",
1228
+ "name": "size",
1264
1229
  "type": {
1265
- "text": "string"
1230
+ "text": "\"s\" | \"m\" | \"l\""
1266
1231
  },
1267
- "default": "\"\"",
1268
- "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.",
1269
- "fieldName": "min"
1232
+ "default": "\"m\"",
1233
+ "description": "The size of the button.\nThis affects font-size and padding.",
1234
+ "fieldName": "size"
1270
1235
  },
1271
1236
  {
1272
- "name": "max",
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"
1243
+ },
1244
+ {
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"
1252
+ },
1253
+ {
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
+ },
1262
+ {
1263
+ "name": "expand",
1264
+ "type": {
1265
+ "text": "boolean"
1266
+ },
1267
+ "default": "false",
1268
+ "description": "Controls whether the button expands to fill the width of its container.",
1269
+ "fieldName": "expand"
1270
+ },
1271
+ {
1272
+ "name": "disabled",
1273
+ "type": {
1274
+ "text": "boolean"
1275
+ },
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
+ }
1283
+ },
1284
+ {
1285
+ "name": "name",
1286
+ "type": {
1287
+ "text": "string | undefined"
1288
+ },
1289
+ "description": "The name of the form component.",
1290
+ "fieldName": "name",
1291
+ "inheritedFrom": {
1292
+ "name": "InputMixin",
1293
+ "module": "src/common/mixins/InputMixin.ts"
1294
+ }
1295
+ },
1296
+ {
1297
+ "name": "value",
1273
1298
  "type": {
1274
1299
  "text": "string"
1275
1300
  },
1276
1301
  "default": "\"\"",
1277
- "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.",
1278
- "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"
1279
1318
  }
1280
1319
  ],
1281
1320
  "superclass": {
@@ -1283,8 +1322,8 @@
1283
1322
  "package": "lit"
1284
1323
  },
1285
1324
  "status": "ready",
1286
- "category": "list",
1287
- "tagName": "nord-calendar",
1325
+ "category": "action",
1326
+ "tagName": "nord-button",
1288
1327
  "customElement": true
1289
1328
  }
1290
1329
  ],
@@ -1293,139 +1332,108 @@
1293
1332
  "kind": "js",
1294
1333
  "name": "default",
1295
1334
  "declaration": {
1296
- "name": "Calendar",
1297
- "module": "src/calendar/Calendar.ts"
1335
+ "name": "Button",
1336
+ "module": "src/button/Button.ts"
1298
1337
  }
1299
1338
  },
1300
1339
  {
1301
1340
  "kind": "custom-element-definition",
1302
- "name": "nord-calendar",
1341
+ "name": "nord-button",
1303
1342
  "declaration": {
1304
- "name": "Calendar",
1305
- "module": "src/calendar/Calendar.ts"
1343
+ "name": "Button",
1344
+ "module": "src/button/Button.ts"
1306
1345
  }
1307
1346
  }
1308
1347
  ],
1309
- "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"
1310
1349
  },
1311
1350
  {
1312
1351
  "kind": "javascript-module",
1313
- "path": "src/calendar/DateSelectEvent.ts",
1352
+ "path": "src/card/Card.ts",
1314
1353
  "declarations": [
1315
1354
  {
1316
1355
  "kind": "class",
1317
- "description": "",
1318
- "name": "DateSelectEvent",
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": [
1359
+ {
1360
+ "description": "The card content.",
1361
+ "name": ""
1362
+ },
1363
+ {
1364
+ "description": "Optional slot that holds a header for the card.",
1365
+ "name": "header"
1366
+ },
1367
+ {
1368
+ "description": "Optional slot that holds footer content for the card.",
1369
+ "name": "footer"
1370
+ }
1371
+ ],
1319
1372
  "members": [
1320
1373
  {
1321
1374
  "kind": "field",
1322
- "name": "eventName",
1323
- "type": {
1324
- "text": "string"
1325
- },
1326
- "static": true,
1327
- "default": "\"nord-select\""
1375
+ "name": "headerSlot",
1376
+ "privacy": "private",
1377
+ "default": "new SlotController(this, \"header\")"
1328
1378
  },
1329
1379
  {
1330
1380
  "kind": "field",
1331
- "name": "date",
1381
+ "name": "footerSlot",
1382
+ "privacy": "private",
1383
+ "default": "new SlotController(this, \"footer\")"
1384
+ },
1385
+ {
1386
+ "kind": "field",
1387
+ "name": "padding",
1332
1388
  "type": {
1333
- "text": "Date"
1389
+ "text": "\"m\" | \"l\" | \"none\""
1334
1390
  },
1335
- "default": "date"
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",
1394
+ "reflects": true
1336
1395
  }
1337
1396
  ],
1338
- "superclass": {
1339
- "name": "NordEvent",
1340
- "module": "/src/common/events.js"
1341
- }
1342
- }
1343
- ],
1344
- "exports": [
1345
- {
1346
- "kind": "js",
1347
- "name": "DateSelectEvent",
1348
- "declaration": {
1349
- "name": "DateSelectEvent",
1350
- "module": "src/calendar/DateSelectEvent.ts"
1351
- }
1352
- }
1353
- ],
1354
- "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"
1355
- },
1356
- {
1357
- "kind": "javascript-module",
1358
- "path": "src/calendar/calendar-localization.ts",
1359
- "declarations": [
1360
- {
1361
- "kind": "variable",
1362
- "name": "localization",
1363
- "type": {
1364
- "text": "CalendarLocalizedText"
1365
- },
1366
- "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}"
1367
- }
1368
- ],
1369
- "exports": [
1370
- {
1371
- "kind": "js",
1372
- "name": "default",
1373
- "declaration": {
1374
- "name": "localization",
1375
- "module": "src/calendar/calendar-localization.ts"
1376
- }
1377
- }
1378
- ],
1379
- "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"
1380
- },
1381
- {
1382
- "kind": "javascript-module",
1383
- "path": "src/calendar/month-view.ts",
1384
- "declarations": [
1385
- {
1386
- "kind": "function",
1387
- "name": "dayView",
1388
- "parameters": [
1389
- {
1390
- "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
1391
- "type": {
1392
- "text": "DatePickerDayProps"
1393
- }
1394
- }
1395
- ]
1396
- },
1397
- {
1398
- "kind": "function",
1399
- "name": "monthView",
1400
- "parameters": [
1397
+ "attributes": [
1401
1398
  {
1402
- "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}",
1399
+ "name": "padding",
1403
1400
  "type": {
1404
- "text": "MonthViewArgs"
1405
- }
1401
+ "text": "\"m\" | \"l\" | \"none\""
1402
+ },
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"
1406
1406
  }
1407
- ]
1407
+ ],
1408
+ "superclass": {
1409
+ "name": "LitElement",
1410
+ "package": "lit"
1411
+ },
1412
+ "status": "ready",
1413
+ "category": "structure",
1414
+ "tagName": "nord-card",
1415
+ "customElement": true
1408
1416
  }
1409
1417
  ],
1410
1418
  "exports": [
1411
1419
  {
1412
1420
  "kind": "js",
1413
- "name": "dayView",
1421
+ "name": "default",
1414
1422
  "declaration": {
1415
- "name": "dayView",
1416
- "module": "src/calendar/month-view.ts"
1423
+ "name": "Card",
1424
+ "module": "src/card/Card.ts"
1417
1425
  }
1418
1426
  },
1419
1427
  {
1420
- "kind": "js",
1421
- "name": "monthView",
1428
+ "kind": "custom-element-definition",
1429
+ "name": "nord-card",
1422
1430
  "declaration": {
1423
- "name": "monthView",
1424
- "module": "src/calendar/month-view.ts"
1431
+ "name": "Card",
1432
+ "module": "src/card/Card.ts"
1425
1433
  }
1426
1434
  }
1427
1435
  ],
1428
- "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"
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- 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"
1429
1437
  },
1430
1438
  {
1431
1439
  "kind": "javascript-module",
@@ -3587,51 +3595,6 @@
3587
3595
  }
3588
3596
  ]
3589
3597
  },
3590
- {
3591
- "kind": "javascript-module",
3592
- "path": "src/empty-state/EmptyState.ts",
3593
- "declarations": [
3594
- {
3595
- "kind": "class",
3596
- "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.",
3597
- "name": "EmptyState",
3598
- "slots": [
3599
- {
3600
- "description": "default slot",
3601
- "name": ""
3602
- }
3603
- ],
3604
- "members": [],
3605
- "superclass": {
3606
- "name": "LitElement",
3607
- "package": "lit"
3608
- },
3609
- "status": "new",
3610
- "category": "feedback",
3611
- "tagName": "nord-empty-state",
3612
- "customElement": true
3613
- }
3614
- ],
3615
- "exports": [
3616
- {
3617
- "kind": "js",
3618
- "name": "default",
3619
- "declaration": {
3620
- "name": "EmptyState",
3621
- "module": "src/empty-state/EmptyState.ts"
3622
- }
3623
- },
3624
- {
3625
- "kind": "custom-element-definition",
3626
- "name": "nord-empty-state",
3627
- "declaration": {
3628
- "name": "EmptyState",
3629
- "module": "src/empty-state/EmptyState.ts"
3630
- }
3631
- }
3632
- ],
3633
- "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"
3634
- },
3635
3598
  {
3636
3599
  "kind": "javascript-module",
3637
3600
  "path": "src/date-picker/DatePicker.ts",
@@ -4521,6 +4484,51 @@
4521
4484
  ],
4522
4485
  "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"
4523
4486
  },
4487
+ {
4488
+ "kind": "javascript-module",
4489
+ "path": "src/empty-state/EmptyState.ts",
4490
+ "declarations": [
4491
+ {
4492
+ "kind": "class",
4493
+ "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.",
4494
+ "name": "EmptyState",
4495
+ "slots": [
4496
+ {
4497
+ "description": "default slot",
4498
+ "name": ""
4499
+ }
4500
+ ],
4501
+ "members": [],
4502
+ "superclass": {
4503
+ "name": "LitElement",
4504
+ "package": "lit"
4505
+ },
4506
+ "status": "new",
4507
+ "category": "feedback",
4508
+ "tagName": "nord-empty-state",
4509
+ "customElement": true
4510
+ }
4511
+ ],
4512
+ "exports": [
4513
+ {
4514
+ "kind": "js",
4515
+ "name": "default",
4516
+ "declaration": {
4517
+ "name": "EmptyState",
4518
+ "module": "src/empty-state/EmptyState.ts"
4519
+ }
4520
+ },
4521
+ {
4522
+ "kind": "custom-element-definition",
4523
+ "name": "nord-empty-state",
4524
+ "declaration": {
4525
+ "name": "EmptyState",
4526
+ "module": "src/empty-state/EmptyState.ts"
4527
+ }
4528
+ }
4529
+ ],
4530
+ "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"
4531
+ },
4524
4532
  {
4525
4533
  "kind": "javascript-module",
4526
4534
  "path": "src/fieldset/Fieldset.ts",