@nordhealth/components 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -595,152 +595,152 @@
595
595
  },
596
596
  {
597
597
  "kind": "javascript-module",
598
- "path": "src/button/Button.ts",
598
+ "path": "src/calendar/Calendar.ts",
599
599
  "declarations": [
600
600
  {
601
601
  "kind": "class",
602
- "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.",
603
- "name": "Button",
602
+ "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.",
603
+ "name": "Calendar",
604
604
  "cssProperties": [
605
605
  {
606
- "description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
607
- "name": "--n-button-border-radius",
608
- "default": "var(--n-border-radius-s)"
606
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
607
+ "name": "--n-calendar-border-radius",
608
+ "default": "var(--n-border-radius)"
609
609
  },
610
610
  {
611
- "description": "Controls the spacing between items within the button, using our [spacing tokens](/tokens/#space).",
612
- "name": "--n-button-gap",
613
- "default": "var(--n-space-s)"
614
- },
611
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
612
+ "name": "--n-calendar-box-shadow",
613
+ "default": "var(--n-box-shadow-popout)"
614
+ }
615
+ ],
616
+ "members": [
615
617
  {
616
- "description": "Controls the overlayed gradient background on the button.",
617
- "name": "--n-button-gradient",
618
- "default": "linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.013) 100%))"
618
+ "kind": "field",
619
+ "name": "dialogLabelId",
620
+ "type": {
621
+ "text": "string"
622
+ },
623
+ "privacy": "private",
624
+ "default": "\"dialog-header\""
619
625
  },
620
626
  {
621
- "description": "Controls the border color of the button, using [color tokens](/tokens/#color).",
622
- "name": "--n-button-border-color",
623
- "default": "var(--n-color-border-strong)"
627
+ "kind": "field",
628
+ "name": "monthSelectNode",
629
+ "type": {
630
+ "text": "HTMLElement"
631
+ },
632
+ "privacy": "private"
624
633
  },
625
634
  {
626
- "description": "Controls the text alignment for the text in the button.",
627
- "name": "--n-button-text-align",
628
- "default": "center"
629
- }
630
- ],
631
- "slots": [
632
- {
633
- "description": "The button content",
634
- "name": ""
635
+ "kind": "field",
636
+ "name": "focusedDayNode",
637
+ "type": {
638
+ "text": "HTMLButtonElement"
639
+ },
640
+ "privacy": "private"
635
641
  },
636
642
  {
637
- "description": "Used to place content at the start of button text. Typically used for icons.",
638
- "name": "start"
643
+ "kind": "field",
644
+ "name": "direction",
645
+ "privacy": "private",
646
+ "default": "new DirectionController(this)"
639
647
  },
640
648
  {
641
- "description": "Used to place content at the end of button text. Typically used for icons.",
642
- "name": "end"
643
- }
644
- ],
645
- "members": [
649
+ "kind": "field",
650
+ "name": "swipe",
651
+ "privacy": "private",
652
+ "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
653
+ },
646
654
  {
647
655
  "kind": "field",
648
- "name": "buttonRef",
656
+ "name": "shortcuts",
649
657
  "privacy": "private"
650
658
  },
651
659
  {
652
660
  "kind": "field",
653
- "name": "events",
661
+ "name": "localize",
654
662
  "privacy": "private",
655
- "default": "new EventController(this)"
663
+ "default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
656
664
  },
657
665
  {
658
666
  "kind": "field",
659
- "name": "lightDom",
667
+ "name": "dateFormatShort",
668
+ "type": {
669
+ "text": "Intl.DateTimeFormat"
670
+ },
660
671
  "privacy": "private",
661
- "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
672
+ "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"
662
673
  },
663
674
  {
664
675
  "kind": "field",
665
- "name": "variant",
676
+ "name": "monthNames",
666
677
  "type": {
667
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
678
+ "text": "string[]"
668
679
  },
669
- "default": "\"default\"",
670
- "description": "The style variant of the button.",
671
- "attribute": "variant",
672
- "reflects": true
680
+ "privacy": "private"
673
681
  },
674
682
  {
675
683
  "kind": "field",
676
- "name": "type",
684
+ "name": "monthNamesShort",
677
685
  "type": {
678
- "text": "\"button\" | \"submit\" | \"reset\""
686
+ "text": "string[]"
679
687
  },
680
- "default": "\"submit\"",
681
- "description": "The type of the button.",
682
- "attribute": "type",
683
- "reflects": true
688
+ "privacy": "private"
684
689
  },
685
690
  {
686
691
  "kind": "field",
687
- "name": "size",
692
+ "name": "dayNames",
688
693
  "type": {
689
- "text": "\"s\" | \"m\" | \"l\""
694
+ "text": "string[]"
690
695
  },
691
- "default": "\"m\"",
692
- "description": "The size of the button.\nThis affects font-size and padding.",
693
- "attribute": "size",
694
- "reflects": true
696
+ "privacy": "private"
695
697
  },
696
698
  {
697
699
  "kind": "field",
698
- "name": "accessibleExpanded",
700
+ "name": "dayNamesShort",
699
701
  "type": {
700
- "text": "\"true\" | \"false\" | undefined"
702
+ "text": "string[]"
701
703
  },
702
- "privacy": "private",
703
- "attribute": "aria-expanded"
704
+ "privacy": "private"
704
705
  },
705
706
  {
706
707
  "kind": "field",
707
- "name": "accessibleHasPopup",
708
+ "name": "value",
708
709
  "type": {
709
- "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
710
+ "text": "string"
710
711
  },
711
- "privacy": "private",
712
- "attribute": "aria-haspopup"
712
+ "default": "\"\"",
713
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
714
+ "attribute": "value"
713
715
  },
714
716
  {
715
717
  "kind": "field",
716
- "name": "href",
718
+ "name": "firstDayOfWeek",
717
719
  "type": {
718
- "text": "string | undefined"
720
+ "text": "DaysOfWeek"
719
721
  },
720
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
721
- "attribute": "href",
722
- "reflects": true
722
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
723
+ "attribute": "firstDayOfWeek"
723
724
  },
724
725
  {
725
726
  "kind": "field",
726
- "name": "download",
727
+ "name": "min",
727
728
  "type": {
728
- "text": "boolean"
729
+ "text": "string"
729
730
  },
730
- "default": "false",
731
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
732
- "attribute": "download"
731
+ "default": "\"\"",
732
+ "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.",
733
+ "attribute": "min"
733
734
  },
734
735
  {
735
736
  "kind": "field",
736
- "name": "target",
737
+ "name": "max",
737
738
  "type": {
738
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
739
+ "text": "string"
739
740
  },
740
- "default": "\"_self\"",
741
- "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.",
742
- "attribute": "target",
743
- "reflects": true
741
+ "default": "\"\"",
742
+ "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.",
743
+ "attribute": "max"
744
744
  },
745
745
  {
746
746
  "kind": "field",
@@ -749,316 +749,248 @@
749
749
  "text": "boolean"
750
750
  },
751
751
  "default": "false",
752
- "description": "Controls whether the button expands to fill the width of its container.",
752
+ "description": "Controls whether the calendar expands to fill the width of its container.",
753
753
  "attribute": "expand",
754
754
  "reflects": true
755
755
  },
756
756
  {
757
757
  "kind": "field",
758
- "name": "loading",
758
+ "name": "isDateDisabled",
759
+ "type": {
760
+ "text": "DateDisabledPredicate"
761
+ },
762
+ "default": "isDateDisabled",
763
+ "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
764
+ },
765
+ {
766
+ "kind": "field",
767
+ "name": "activeFocus",
759
768
  "type": {
760
769
  "text": "boolean"
761
770
  },
762
- "default": "false",
763
- "description": "Controls whether the button is in loading state. Please note that the spinner\nis hidden from assistive technologies, so you need to make sure to announce\nthe loading state to e.g. screen reader users. We also recommend disabling\nall user interactions on the button itself while in loading state.",
764
- "attribute": "loading",
765
- "reflects": true
771
+ "privacy": "private",
772
+ "default": "false"
766
773
  },
767
774
  {
768
- "kind": "method",
769
- "name": "renderLink",
775
+ "kind": "field",
776
+ "name": "focusedDay",
770
777
  "privacy": "private",
778
+ "default": "new Date()"
779
+ },
780
+ {
781
+ "kind": "method",
782
+ "name": "focus",
771
783
  "parameters": [
772
784
  {
773
- "name": "innards",
785
+ "name": "options",
786
+ "optional": true,
774
787
  "type": {
775
- "text": "TemplateResult"
776
- }
788
+ "text": "FocusOptions & { target: \"day\" | \"month\" }"
789
+ },
790
+ "description": "An object which controls aspects of the focusing process."
777
791
  }
778
792
  ],
779
- "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."
793
+ "description": "Programmatically move focus to the calendar."
780
794
  },
781
795
  {
782
796
  "kind": "method",
783
- "name": "renderButton",
784
- "privacy": "private",
785
- "parameters": [
786
- {
787
- "name": "innards",
788
- "type": {
789
- "text": "TemplateResult"
790
- }
791
- }
792
- ]
797
+ "name": "handleValueChange",
798
+ "privacy": "protected"
793
799
  },
794
800
  {
795
801
  "kind": "method",
796
- "name": "renderLightDom",
802
+ "name": "handleFocusedDayChange",
803
+ "privacy": "protected"
804
+ },
805
+ {
806
+ "kind": "method",
807
+ "name": "handleLangChange",
797
808
  "privacy": "private"
798
809
  },
799
810
  {
800
811
  "kind": "field",
801
- "name": "handleOuterClick",
812
+ "name": "handleDaySelect",
802
813
  "privacy": "private"
803
814
  },
804
815
  {
805
816
  "kind": "method",
806
- "name": "handleClick",
817
+ "name": "addDays",
807
818
  "privacy": "private",
808
819
  "parameters": [
809
820
  {
810
- "name": "e",
821
+ "name": "days",
811
822
  "type": {
812
- "text": "Event"
823
+ "text": "number"
813
824
  }
814
825
  }
815
826
  ]
816
827
  },
817
828
  {
818
829
  "kind": "method",
819
- "name": "handleProxyChange",
830
+ "name": "addMonths",
820
831
  "privacy": "private",
821
832
  "parameters": [
822
833
  {
823
- "name": "e",
834
+ "name": "months",
824
835
  "type": {
825
- "text": "Event"
836
+ "text": "number"
826
837
  }
827
838
  }
828
- ],
829
- "description": "React/Vue etc may remove our proxy button when updating button text, since they are unaware of its existence.\nSo we listen for a slotchange event, and if the element is no longer connected to the DOM we add it back in."
839
+ ]
830
840
  },
831
841
  {
832
- "kind": "field",
833
- "name": "disabled",
834
- "type": {
835
- "text": "boolean"
836
- },
837
- "default": "false",
838
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
839
- "attribute": "disabled",
840
- "reflects": true,
841
- "inheritedFrom": {
842
- "name": "InputMixin",
843
- "module": "src/common/mixins/InputMixin.ts"
844
- }
842
+ "kind": "method",
843
+ "name": "addYears",
844
+ "privacy": "private",
845
+ "parameters": [
846
+ {
847
+ "name": "years",
848
+ "type": {
849
+ "text": "number"
850
+ }
851
+ }
852
+ ]
845
853
  },
846
854
  {
847
- "kind": "field",
848
- "name": "name",
849
- "type": {
850
- "text": "string | undefined"
851
- },
852
- "description": "The name of the form component.",
853
- "attribute": "name",
854
- "inheritedFrom": {
855
- "name": "InputMixin",
856
- "module": "src/common/mixins/InputMixin.ts"
857
- }
858
- },
859
- {
860
- "kind": "field",
861
- "name": "value",
862
- "type": {
863
- "text": "string"
864
- },
865
- "default": "\"\"",
866
- "description": "The value of the form component.",
867
- "attribute": "value",
868
- "inheritedFrom": {
869
- "name": "InputMixin",
870
- "module": "src/common/mixins/InputMixin.ts"
871
- }
872
- },
873
- {
874
- "kind": "field",
875
- "name": "form",
876
- "description": "Gets the form, if any, associated with the form element.",
877
- "inheritedFrom": {
878
- "name": "InputMixin",
879
- "module": "src/common/mixins/InputMixin.ts"
880
- }
855
+ "kind": "method",
856
+ "name": "startOfWeek",
857
+ "privacy": "private"
881
858
  },
882
859
  {
883
- "kind": "field",
884
- "name": "focusableRef",
885
- "privacy": "protected",
886
- "inheritedFrom": {
887
- "name": "FocusableMixin",
888
- "module": "src/common/mixins/FocusableMixin.ts"
889
- }
860
+ "kind": "method",
861
+ "name": "endOfWeek",
862
+ "privacy": "private"
890
863
  },
891
864
  {
892
865
  "kind": "method",
893
- "name": "focus",
866
+ "name": "setMonth",
867
+ "privacy": "private",
894
868
  "parameters": [
895
869
  {
896
- "name": "options",
897
- "optional": true,
870
+ "name": "month",
898
871
  "type": {
899
- "text": "FocusOptions"
900
- },
901
- "description": "An object which controls aspects of the focusing process."
872
+ "text": "number"
873
+ }
902
874
  }
903
- ],
904
- "description": "Programmatically move focus to the component.",
905
- "inheritedFrom": {
906
- "name": "FocusableMixin",
907
- "module": "src/common/mixins/FocusableMixin.ts"
908
- }
875
+ ]
909
876
  },
910
877
  {
911
878
  "kind": "method",
912
- "name": "blur",
913
- "description": "Programmatically remove focus from the component.",
914
- "inheritedFrom": {
915
- "name": "FocusableMixin",
916
- "module": "src/common/mixins/FocusableMixin.ts"
917
- }
879
+ "name": "setYear",
880
+ "privacy": "private",
881
+ "parameters": [
882
+ {
883
+ "name": "year",
884
+ "type": {
885
+ "text": "number"
886
+ }
887
+ }
888
+ ]
918
889
  },
919
890
  {
920
891
  "kind": "method",
921
- "name": "click",
922
- "description": "Programmatically simulates a click on the component.",
923
- "inheritedFrom": {
924
- "name": "FocusableMixin",
925
- "module": "src/common/mixins/FocusableMixin.ts"
926
- }
927
- }
928
- ],
929
- "attributes": [
930
- {
931
- "name": "variant",
932
- "type": {
933
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
934
- },
935
- "default": "\"default\"",
936
- "description": "The style variant of the button.",
937
- "fieldName": "variant"
892
+ "name": "setFocusedDay",
893
+ "privacy": "private",
894
+ "parameters": [
895
+ {
896
+ "name": "day",
897
+ "type": {
898
+ "text": "Date"
899
+ }
900
+ }
901
+ ]
938
902
  },
939
903
  {
940
- "name": "type",
941
- "type": {
942
- "text": "\"button\" | \"submit\" | \"reset\""
943
- },
944
- "default": "\"submit\"",
945
- "description": "The type of the button.",
946
- "fieldName": "type"
904
+ "kind": "field",
905
+ "name": "handleMonthSelect",
906
+ "privacy": "private"
947
907
  },
948
908
  {
949
- "name": "size",
950
- "type": {
951
- "text": "\"s\" | \"m\" | \"l\""
952
- },
953
- "default": "\"m\"",
954
- "description": "The size of the button.\nThis affects font-size and padding.",
955
- "fieldName": "size"
909
+ "kind": "field",
910
+ "name": "handleYearSelect",
911
+ "privacy": "private"
956
912
  },
957
913
  {
958
- "name": "aria-expanded",
959
- "type": {
960
- "text": "\"true\" | \"false\" | undefined"
961
- },
962
- "fieldName": "accessibleExpanded"
914
+ "kind": "field",
915
+ "name": "handleNextMonthClick",
916
+ "privacy": "private"
963
917
  },
964
918
  {
965
- "name": "aria-haspopup",
966
- "type": {
967
- "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
968
- },
969
- "fieldName": "accessibleHasPopup"
919
+ "kind": "field",
920
+ "name": "handlePreviousMonthClick",
921
+ "privacy": "private"
970
922
  },
971
923
  {
972
- "name": "href",
973
- "type": {
974
- "text": "string | undefined"
975
- },
976
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
977
- "fieldName": "href"
924
+ "kind": "field",
925
+ "name": "enableActiveFocus",
926
+ "privacy": "private"
978
927
  },
979
928
  {
980
- "name": "download",
981
- "type": {
982
- "text": "boolean"
983
- },
984
- "default": "false",
985
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
986
- "fieldName": "download"
987
- },
929
+ "kind": "field",
930
+ "name": "disableActiveFocus",
931
+ "privacy": "private"
932
+ }
933
+ ],
934
+ "events": [
988
935
  {
989
- "name": "target",
936
+ "name": "nord-focus-date",
990
937
  "type": {
991
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
938
+ "text": "DateSelectEvent"
992
939
  },
993
- "default": "\"_self\"",
994
- "description": "When provided together with a href property, determines where\nto open the linked URL. The keywords have special meanings for\nwhere to load the URL: “_self” means the current browsing context,\n“_blank” usually a new tab but users can configure browsers this to\nopen a new window instead, “_parent” means the parent browsing\ncontext of the current one, but if no parent exists, behaves as\n_self, and finally “top” means the topmost browsing context.",
995
- "fieldName": "target"
940
+ "description": "Dispatched when the calendar's focused date changes."
996
941
  },
997
942
  {
998
- "name": "expand",
999
943
  "type": {
1000
- "text": "boolean"
944
+ "text": "DateSelectEvent"
1001
945
  },
1002
- "default": "false",
1003
- "description": "Controls whether the button expands to fill the width of its container.",
1004
- "fieldName": "expand"
1005
- },
946
+ "description": "Dispatched when a date is selected and the value changes.",
947
+ "name": "change"
948
+ }
949
+ ],
950
+ "attributes": [
1006
951
  {
1007
- "name": "loading",
952
+ "name": "value",
1008
953
  "type": {
1009
- "text": "boolean"
954
+ "text": "string"
1010
955
  },
1011
- "default": "false",
1012
- "description": "Controls whether the button is in loading state. Please note that the spinner\nis hidden from assistive technologies, so you need to make sure to announce\nthe loading state to e.g. screen reader users. We also recommend disabling\nall user interactions on the button itself while in loading state.",
1013
- "fieldName": "loading"
956
+ "default": "\"\"",
957
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
958
+ "fieldName": "value"
1014
959
  },
1015
960
  {
1016
- "name": "disabled",
961
+ "name": "firstDayOfWeek",
1017
962
  "type": {
1018
- "text": "boolean"
963
+ "text": "DaysOfWeek"
1019
964
  },
1020
- "default": "false",
1021
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1022
- "fieldName": "disabled",
1023
- "inheritedFrom": {
1024
- "name": "InputMixin",
1025
- "module": "src/common/mixins/InputMixin.ts"
1026
- }
965
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
966
+ "fieldName": "firstDayOfWeek"
1027
967
  },
1028
968
  {
1029
- "name": "name",
969
+ "name": "min",
1030
970
  "type": {
1031
- "text": "string | undefined"
971
+ "text": "string"
1032
972
  },
1033
- "description": "The name of the form component.",
1034
- "fieldName": "name",
1035
- "inheritedFrom": {
1036
- "name": "InputMixin",
1037
- "module": "src/common/mixins/InputMixin.ts"
1038
- }
973
+ "default": "\"\"",
974
+ "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.",
975
+ "fieldName": "min"
1039
976
  },
1040
977
  {
1041
- "name": "value",
978
+ "name": "max",
1042
979
  "type": {
1043
980
  "text": "string"
1044
981
  },
1045
982
  "default": "\"\"",
1046
- "description": "The value of the form component.",
1047
- "fieldName": "value",
1048
- "inheritedFrom": {
1049
- "name": "InputMixin",
1050
- "module": "src/common/mixins/InputMixin.ts"
1051
- }
1052
- }
1053
- ],
1054
- "mixins": [
1055
- {
1056
- "name": "InputMixin",
1057
- "module": "/src/common/mixins/InputMixin.js"
983
+ "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.",
984
+ "fieldName": "max"
1058
985
  },
1059
986
  {
1060
- "name": "FocusableMixin",
1061
- "module": "/src/common/mixins/FocusableMixin.js"
987
+ "name": "expand",
988
+ "type": {
989
+ "text": "boolean"
990
+ },
991
+ "default": "false",
992
+ "description": "Controls whether the calendar expands to fill the width of its container.",
993
+ "fieldName": "expand"
1062
994
  }
1063
995
  ],
1064
996
  "superclass": {
@@ -1066,10 +998,10 @@
1066
998
  "package": "lit"
1067
999
  },
1068
1000
  "status": "ready",
1069
- "category": "action",
1001
+ "category": "list",
1070
1002
  "displayName": null,
1071
1003
  "examples": [],
1072
- "tagName": "nord-button",
1004
+ "tagName": "nord-calendar",
1073
1005
  "customElement": true
1074
1006
  }
1075
1007
  ],
@@ -1078,169 +1010,270 @@
1078
1010
  "kind": "js",
1079
1011
  "name": "default",
1080
1012
  "declaration": {
1081
- "name": "Button",
1082
- "module": "src/button/Button.ts"
1013
+ "name": "Calendar",
1014
+ "module": "src/calendar/Calendar.ts"
1015
+ }
1016
+ },
1017
+ {
1018
+ "kind": "custom-element-definition",
1019
+ "name": "nord-calendar",
1020
+ "declaration": {
1021
+ "name": "Calendar",
1022
+ "module": "src/calendar/Calendar.ts"
1023
+ }
1024
+ }
1025
+ ],
1026
+ "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"
1027
+ },
1028
+ {
1029
+ "kind": "javascript-module",
1030
+ "path": "src/calendar/DateSelectEvent.ts",
1031
+ "declarations": [
1032
+ {
1033
+ "kind": "class",
1034
+ "description": "",
1035
+ "name": "DateSelectEvent",
1036
+ "superclass": {
1037
+ "name": "NordEvent",
1038
+ "module": "/src/common/events.js"
1039
+ },
1040
+ "examples": []
1041
+ }
1042
+ ],
1043
+ "exports": [
1044
+ {
1045
+ "kind": "js",
1046
+ "name": "DateSelectEvent",
1047
+ "declaration": {
1048
+ "name": "DateSelectEvent",
1049
+ "module": "src/calendar/DateSelectEvent.ts"
1050
+ }
1051
+ }
1052
+ ],
1053
+ "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"
1054
+ },
1055
+ {
1056
+ "kind": "javascript-module",
1057
+ "path": "src/calendar/localization.ts",
1058
+ "declarations": [
1059
+ {
1060
+ "kind": "variable",
1061
+ "name": "calendarLocalization",
1062
+ "type": {
1063
+ "text": "object"
1064
+ },
1065
+ "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n}"
1066
+ }
1067
+ ],
1068
+ "exports": [
1069
+ {
1070
+ "kind": "js",
1071
+ "name": "default",
1072
+ "declaration": {
1073
+ "name": "calendarLocalization",
1074
+ "module": "src/calendar/localization.ts"
1075
+ }
1076
+ }
1077
+ ],
1078
+ "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"
1079
+ },
1080
+ {
1081
+ "kind": "javascript-module",
1082
+ "path": "src/calendar/month-view.ts",
1083
+ "declarations": [
1084
+ {
1085
+ "kind": "function",
1086
+ "name": "dayView",
1087
+ "parameters": [
1088
+ {
1089
+ "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
1090
+ "type": {
1091
+ "text": "DatePickerDayProps"
1092
+ }
1093
+ }
1094
+ ]
1095
+ },
1096
+ {
1097
+ "kind": "function",
1098
+ "name": "monthView",
1099
+ "parameters": [
1100
+ {
1101
+ "name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n dayNames,\n dayNamesShort,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
1102
+ "type": {
1103
+ "text": "MonthViewArgs"
1104
+ }
1105
+ }
1106
+ ]
1107
+ }
1108
+ ],
1109
+ "exports": [
1110
+ {
1111
+ "kind": "js",
1112
+ "name": "dayView",
1113
+ "declaration": {
1114
+ "name": "dayView",
1115
+ "module": "src/calendar/month-view.ts"
1083
1116
  }
1084
1117
  },
1085
1118
  {
1086
- "kind": "custom-element-definition",
1087
- "name": "nord-button",
1119
+ "kind": "js",
1120
+ "name": "monthView",
1088
1121
  "declaration": {
1089
- "name": "Button",
1090
- "module": "src/button/Button.ts"
1122
+ "name": "monthView",
1123
+ "module": "src/calendar/month-view.ts"
1091
1124
  }
1092
1125
  }
1093
1126
  ],
1094
- "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- Only use one primary button per section, as a main call-to-action.\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 a primary button in every row of a table.\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| `switch` | Switch style is reserved for the clinic switcher in the top left corner of an application. |\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"
1127
+ "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- Dont 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"
1095
1128
  },
1096
1129
  {
1097
1130
  "kind": "javascript-module",
1098
- "path": "src/calendar/Calendar.ts",
1131
+ "path": "src/button/Button.ts",
1099
1132
  "declarations": [
1100
1133
  {
1101
1134
  "kind": "class",
1102
- "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.",
1103
- "name": "Calendar",
1135
+ "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.",
1136
+ "name": "Button",
1104
1137
  "cssProperties": [
1105
1138
  {
1106
- "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
1107
- "name": "--n-calendar-border-radius",
1108
- "default": "var(--n-border-radius)"
1139
+ "description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
1140
+ "name": "--n-button-border-radius",
1141
+ "default": "var(--n-border-radius-s)"
1109
1142
  },
1110
1143
  {
1111
- "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
1112
- "name": "--n-calendar-box-shadow",
1113
- "default": "var(--n-box-shadow-popout)"
1114
- }
1115
- ],
1116
- "members": [
1117
- {
1118
- "kind": "field",
1119
- "name": "dialogLabelId",
1120
- "type": {
1121
- "text": "string"
1122
- },
1123
- "privacy": "private",
1124
- "default": "\"dialog-header\""
1144
+ "description": "Controls the spacing between items within the button, using our [spacing tokens](/tokens/#space).",
1145
+ "name": "--n-button-gap",
1146
+ "default": "var(--n-space-s)"
1125
1147
  },
1126
1148
  {
1127
- "kind": "field",
1128
- "name": "monthSelectNode",
1129
- "type": {
1130
- "text": "HTMLElement"
1131
- },
1132
- "privacy": "private"
1149
+ "description": "Controls the overlayed gradient background on the button.",
1150
+ "name": "--n-button-gradient",
1151
+ "default": "linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.013) 100%))"
1133
1152
  },
1134
1153
  {
1135
- "kind": "field",
1136
- "name": "focusedDayNode",
1137
- "type": {
1138
- "text": "HTMLButtonElement"
1139
- },
1140
- "privacy": "private"
1154
+ "description": "Controls the border color of the button, using [color tokens](/tokens/#color).",
1155
+ "name": "--n-button-border-color",
1156
+ "default": "var(--n-color-border-strong)"
1141
1157
  },
1142
1158
  {
1143
- "kind": "field",
1144
- "name": "direction",
1145
- "privacy": "private",
1146
- "default": "new DirectionController(this)"
1159
+ "description": "Controls the text alignment for the text in the button.",
1160
+ "name": "--n-button-text-align",
1161
+ "default": "center"
1162
+ }
1163
+ ],
1164
+ "slots": [
1165
+ {
1166
+ "description": "The button content",
1167
+ "name": ""
1147
1168
  },
1148
1169
  {
1149
- "kind": "field",
1150
- "name": "swipe",
1151
- "privacy": "private",
1152
- "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
1170
+ "description": "Used to place content at the start of button text. Typically used for icons.",
1171
+ "name": "start"
1153
1172
  },
1173
+ {
1174
+ "description": "Used to place content at the end of button text. Typically used for icons.",
1175
+ "name": "end"
1176
+ }
1177
+ ],
1178
+ "members": [
1154
1179
  {
1155
1180
  "kind": "field",
1156
- "name": "shortcuts",
1181
+ "name": "buttonRef",
1157
1182
  "privacy": "private"
1158
1183
  },
1159
1184
  {
1160
1185
  "kind": "field",
1161
- "name": "localize",
1186
+ "name": "events",
1162
1187
  "privacy": "private",
1163
- "default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
1188
+ "default": "new EventController(this)"
1164
1189
  },
1165
1190
  {
1166
1191
  "kind": "field",
1167
- "name": "dateFormatShort",
1168
- "type": {
1169
- "text": "Intl.DateTimeFormat"
1170
- },
1192
+ "name": "lightDom",
1171
1193
  "privacy": "private",
1172
- "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"
1194
+ "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
1173
1195
  },
1174
1196
  {
1175
1197
  "kind": "field",
1176
- "name": "monthNames",
1198
+ "name": "variant",
1177
1199
  "type": {
1178
- "text": "string[]"
1200
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
1179
1201
  },
1180
- "privacy": "private"
1202
+ "default": "\"default\"",
1203
+ "description": "The style variant of the button.",
1204
+ "attribute": "variant",
1205
+ "reflects": true
1181
1206
  },
1182
1207
  {
1183
1208
  "kind": "field",
1184
- "name": "monthNamesShort",
1209
+ "name": "type",
1185
1210
  "type": {
1186
- "text": "string[]"
1211
+ "text": "\"button\" | \"submit\" | \"reset\""
1187
1212
  },
1188
- "privacy": "private"
1213
+ "default": "\"submit\"",
1214
+ "description": "The type of the button.",
1215
+ "attribute": "type",
1216
+ "reflects": true
1189
1217
  },
1190
1218
  {
1191
1219
  "kind": "field",
1192
- "name": "dayNames",
1220
+ "name": "size",
1193
1221
  "type": {
1194
- "text": "string[]"
1222
+ "text": "\"s\" | \"m\" | \"l\""
1195
1223
  },
1196
- "privacy": "private"
1224
+ "default": "\"m\"",
1225
+ "description": "The size of the button.\nThis affects font-size and padding.",
1226
+ "attribute": "size",
1227
+ "reflects": true
1197
1228
  },
1198
1229
  {
1199
1230
  "kind": "field",
1200
- "name": "dayNamesShort",
1231
+ "name": "accessibleExpanded",
1201
1232
  "type": {
1202
- "text": "string[]"
1233
+ "text": "\"true\" | \"false\" | undefined"
1203
1234
  },
1204
- "privacy": "private"
1235
+ "privacy": "private",
1236
+ "attribute": "aria-expanded"
1205
1237
  },
1206
1238
  {
1207
1239
  "kind": "field",
1208
- "name": "value",
1240
+ "name": "accessibleHasPopup",
1209
1241
  "type": {
1210
- "text": "string"
1242
+ "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
1211
1243
  },
1212
- "default": "\"\"",
1213
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1214
- "attribute": "value"
1244
+ "privacy": "private",
1245
+ "attribute": "aria-haspopup"
1215
1246
  },
1216
1247
  {
1217
1248
  "kind": "field",
1218
- "name": "firstDayOfWeek",
1249
+ "name": "href",
1219
1250
  "type": {
1220
- "text": "DaysOfWeek"
1251
+ "text": "string | undefined"
1221
1252
  },
1222
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1223
- "attribute": "firstDayOfWeek"
1253
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
1254
+ "attribute": "href",
1255
+ "reflects": true
1224
1256
  },
1225
1257
  {
1226
1258
  "kind": "field",
1227
- "name": "min",
1259
+ "name": "download",
1228
1260
  "type": {
1229
- "text": "string"
1261
+ "text": "boolean"
1230
1262
  },
1231
- "default": "\"\"",
1232
- "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.",
1233
- "attribute": "min"
1263
+ "default": "false",
1264
+ "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
1265
+ "attribute": "download"
1234
1266
  },
1235
1267
  {
1236
1268
  "kind": "field",
1237
- "name": "max",
1269
+ "name": "target",
1238
1270
  "type": {
1239
- "text": "string"
1271
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
1240
1272
  },
1241
- "default": "\"\"",
1242
- "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.",
1243
- "attribute": "max"
1273
+ "default": "\"_self\"",
1274
+ "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.",
1275
+ "attribute": "target",
1276
+ "reflects": true
1244
1277
  },
1245
1278
  {
1246
1279
  "kind": "field",
@@ -1249,248 +1282,316 @@
1249
1282
  "text": "boolean"
1250
1283
  },
1251
1284
  "default": "false",
1252
- "description": "Controls whether the calendar expands to fill the width of its container.",
1285
+ "description": "Controls whether the button expands to fill the width of its container.",
1253
1286
  "attribute": "expand",
1254
1287
  "reflects": true
1255
1288
  },
1256
1289
  {
1257
1290
  "kind": "field",
1258
- "name": "isDateDisabled",
1259
- "type": {
1260
- "text": "DateDisabledPredicate"
1261
- },
1262
- "default": "isDateDisabled",
1263
- "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
1264
- },
1265
- {
1266
- "kind": "field",
1267
- "name": "activeFocus",
1291
+ "name": "loading",
1268
1292
  "type": {
1269
1293
  "text": "boolean"
1270
1294
  },
1271
- "privacy": "private",
1272
- "default": "false"
1273
- },
1274
- {
1275
- "kind": "field",
1276
- "name": "focusedDay",
1277
- "privacy": "private",
1278
- "default": "new Date()"
1279
- },
1280
- {
1281
- "kind": "method",
1282
- "name": "focus",
1283
- "parameters": [
1284
- {
1285
- "name": "options",
1286
- "optional": true,
1287
- "type": {
1288
- "text": "FocusOptions & { target: \"day\" | \"month\" }"
1289
- },
1290
- "description": "An object which controls aspects of the focusing process."
1291
- }
1292
- ],
1293
- "description": "Programmatically move focus to the calendar."
1294
- },
1295
- {
1296
- "kind": "method",
1297
- "name": "handleValueChange",
1298
- "privacy": "protected"
1299
- },
1300
- {
1301
- "kind": "method",
1302
- "name": "handleFocusedDayChange",
1303
- "privacy": "protected"
1304
- },
1305
- {
1306
- "kind": "method",
1307
- "name": "handleLangChange",
1308
- "privacy": "private"
1309
- },
1310
- {
1311
- "kind": "field",
1312
- "name": "handleDaySelect",
1313
- "privacy": "private"
1314
- },
1315
- {
1316
- "kind": "method",
1317
- "name": "addDays",
1318
- "privacy": "private",
1319
- "parameters": [
1320
- {
1321
- "name": "days",
1322
- "type": {
1323
- "text": "number"
1324
- }
1325
- }
1326
- ]
1295
+ "default": "false",
1296
+ "description": "Controls whether the button is in loading state. Please note that the spinner\nis hidden from assistive technologies, so you need to make sure to announce\nthe loading state to e.g. screen reader users. We also recommend disabling\nall user interactions on the button itself while in loading state.",
1297
+ "attribute": "loading",
1298
+ "reflects": true
1327
1299
  },
1328
1300
  {
1329
1301
  "kind": "method",
1330
- "name": "addMonths",
1302
+ "name": "renderLink",
1331
1303
  "privacy": "private",
1332
1304
  "parameters": [
1333
1305
  {
1334
- "name": "months",
1306
+ "name": "innards",
1335
1307
  "type": {
1336
- "text": "number"
1308
+ "text": "TemplateResult"
1337
1309
  }
1338
1310
  }
1339
- ]
1311
+ ],
1312
+ "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."
1340
1313
  },
1341
1314
  {
1342
1315
  "kind": "method",
1343
- "name": "addYears",
1316
+ "name": "renderButton",
1344
1317
  "privacy": "private",
1345
1318
  "parameters": [
1346
1319
  {
1347
- "name": "years",
1320
+ "name": "innards",
1348
1321
  "type": {
1349
- "text": "number"
1322
+ "text": "TemplateResult"
1350
1323
  }
1351
1324
  }
1352
1325
  ]
1353
1326
  },
1354
1327
  {
1355
1328
  "kind": "method",
1356
- "name": "startOfWeek",
1329
+ "name": "renderLightDom",
1357
1330
  "privacy": "private"
1358
1331
  },
1359
1332
  {
1360
- "kind": "method",
1361
- "name": "endOfWeek",
1333
+ "kind": "field",
1334
+ "name": "handleOuterClick",
1362
1335
  "privacy": "private"
1363
1336
  },
1364
1337
  {
1365
1338
  "kind": "method",
1366
- "name": "setMonth",
1339
+ "name": "handleClick",
1367
1340
  "privacy": "private",
1368
1341
  "parameters": [
1369
1342
  {
1370
- "name": "month",
1343
+ "name": "e",
1371
1344
  "type": {
1372
- "text": "number"
1345
+ "text": "Event"
1373
1346
  }
1374
1347
  }
1375
1348
  ]
1376
1349
  },
1377
1350
  {
1378
1351
  "kind": "method",
1379
- "name": "setYear",
1352
+ "name": "handleProxyChange",
1380
1353
  "privacy": "private",
1381
1354
  "parameters": [
1382
1355
  {
1383
- "name": "year",
1356
+ "name": "e",
1384
1357
  "type": {
1385
- "text": "number"
1358
+ "text": "Event"
1386
1359
  }
1387
1360
  }
1388
- ]
1361
+ ],
1362
+ "description": "React/Vue etc may remove our proxy button when updating button text, since they are unaware of its existence.\nSo we listen for a slotchange event, and if the element is no longer connected to the DOM we add it back in."
1389
1363
  },
1390
1364
  {
1391
- "kind": "method",
1392
- "name": "setFocusedDay",
1393
- "privacy": "private",
1394
- "parameters": [
1395
- {
1396
- "name": "day",
1397
- "type": {
1398
- "text": "Date"
1399
- }
1400
- }
1401
- ]
1365
+ "kind": "field",
1366
+ "name": "disabled",
1367
+ "type": {
1368
+ "text": "boolean"
1369
+ },
1370
+ "default": "false",
1371
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1372
+ "attribute": "disabled",
1373
+ "reflects": true,
1374
+ "inheritedFrom": {
1375
+ "name": "InputMixin",
1376
+ "module": "src/common/mixins/InputMixin.ts"
1377
+ }
1402
1378
  },
1403
1379
  {
1404
1380
  "kind": "field",
1405
- "name": "handleMonthSelect",
1406
- "privacy": "private"
1381
+ "name": "name",
1382
+ "type": {
1383
+ "text": "string | undefined"
1384
+ },
1385
+ "description": "The name of the form component.",
1386
+ "attribute": "name",
1387
+ "inheritedFrom": {
1388
+ "name": "InputMixin",
1389
+ "module": "src/common/mixins/InputMixin.ts"
1390
+ }
1407
1391
  },
1408
1392
  {
1409
1393
  "kind": "field",
1410
- "name": "handleYearSelect",
1411
- "privacy": "private"
1394
+ "name": "value",
1395
+ "type": {
1396
+ "text": "string"
1397
+ },
1398
+ "default": "\"\"",
1399
+ "description": "The value of the form component.",
1400
+ "attribute": "value",
1401
+ "inheritedFrom": {
1402
+ "name": "InputMixin",
1403
+ "module": "src/common/mixins/InputMixin.ts"
1404
+ }
1412
1405
  },
1413
1406
  {
1414
1407
  "kind": "field",
1415
- "name": "handleNextMonthClick",
1416
- "privacy": "private"
1408
+ "name": "form",
1409
+ "description": "Gets the form, if any, associated with the form element.",
1410
+ "inheritedFrom": {
1411
+ "name": "InputMixin",
1412
+ "module": "src/common/mixins/InputMixin.ts"
1413
+ }
1417
1414
  },
1418
1415
  {
1419
1416
  "kind": "field",
1420
- "name": "handlePreviousMonthClick",
1421
- "privacy": "private"
1417
+ "name": "focusableRef",
1418
+ "privacy": "protected",
1419
+ "inheritedFrom": {
1420
+ "name": "FocusableMixin",
1421
+ "module": "src/common/mixins/FocusableMixin.ts"
1422
+ }
1422
1423
  },
1423
1424
  {
1424
- "kind": "field",
1425
- "name": "enableActiveFocus",
1426
- "privacy": "private"
1425
+ "kind": "method",
1426
+ "name": "focus",
1427
+ "parameters": [
1428
+ {
1429
+ "name": "options",
1430
+ "optional": true,
1431
+ "type": {
1432
+ "text": "FocusOptions"
1433
+ },
1434
+ "description": "An object which controls aspects of the focusing process."
1435
+ }
1436
+ ],
1437
+ "description": "Programmatically move focus to the component.",
1438
+ "inheritedFrom": {
1439
+ "name": "FocusableMixin",
1440
+ "module": "src/common/mixins/FocusableMixin.ts"
1441
+ }
1427
1442
  },
1428
1443
  {
1429
- "kind": "field",
1430
- "name": "disableActiveFocus",
1431
- "privacy": "private"
1444
+ "kind": "method",
1445
+ "name": "blur",
1446
+ "description": "Programmatically remove focus from the component.",
1447
+ "inheritedFrom": {
1448
+ "name": "FocusableMixin",
1449
+ "module": "src/common/mixins/FocusableMixin.ts"
1450
+ }
1451
+ },
1452
+ {
1453
+ "kind": "method",
1454
+ "name": "click",
1455
+ "description": "Programmatically simulates a click on the component.",
1456
+ "inheritedFrom": {
1457
+ "name": "FocusableMixin",
1458
+ "module": "src/common/mixins/FocusableMixin.ts"
1459
+ }
1432
1460
  }
1433
1461
  ],
1434
- "events": [
1462
+ "attributes": [
1435
1463
  {
1436
- "name": "nord-focus-date",
1464
+ "name": "variant",
1437
1465
  "type": {
1438
- "text": "DateSelectEvent"
1466
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
1439
1467
  },
1440
- "description": "Dispatched when the calendar's focused date changes."
1468
+ "default": "\"default\"",
1469
+ "description": "The style variant of the button.",
1470
+ "fieldName": "variant"
1441
1471
  },
1442
1472
  {
1473
+ "name": "type",
1443
1474
  "type": {
1444
- "text": "DateSelectEvent"
1475
+ "text": "\"button\" | \"submit\" | \"reset\""
1445
1476
  },
1446
- "description": "Dispatched when a date is selected and the value changes.",
1447
- "name": "change"
1448
- }
1449
- ],
1450
- "attributes": [
1477
+ "default": "\"submit\"",
1478
+ "description": "The type of the button.",
1479
+ "fieldName": "type"
1480
+ },
1451
1481
  {
1452
- "name": "value",
1482
+ "name": "size",
1453
1483
  "type": {
1454
- "text": "string"
1484
+ "text": "\"s\" | \"m\" | \"l\""
1455
1485
  },
1456
- "default": "\"\"",
1457
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1458
- "fieldName": "value"
1486
+ "default": "\"m\"",
1487
+ "description": "The size of the button.\nThis affects font-size and padding.",
1488
+ "fieldName": "size"
1459
1489
  },
1460
1490
  {
1461
- "name": "firstDayOfWeek",
1491
+ "name": "aria-expanded",
1462
1492
  "type": {
1463
- "text": "DaysOfWeek"
1493
+ "text": "\"true\" | \"false\" | undefined"
1464
1494
  },
1465
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1466
- "fieldName": "firstDayOfWeek"
1495
+ "fieldName": "accessibleExpanded"
1467
1496
  },
1468
1497
  {
1469
- "name": "min",
1498
+ "name": "aria-haspopup",
1470
1499
  "type": {
1471
- "text": "string"
1500
+ "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
1472
1501
  },
1473
- "default": "\"\"",
1474
- "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.",
1475
- "fieldName": "min"
1502
+ "fieldName": "accessibleHasPopup"
1476
1503
  },
1477
1504
  {
1478
- "name": "max",
1505
+ "name": "href",
1506
+ "type": {
1507
+ "text": "string | undefined"
1508
+ },
1509
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
1510
+ "fieldName": "href"
1511
+ },
1512
+ {
1513
+ "name": "download",
1514
+ "type": {
1515
+ "text": "boolean"
1516
+ },
1517
+ "default": "false",
1518
+ "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
1519
+ "fieldName": "download"
1520
+ },
1521
+ {
1522
+ "name": "target",
1523
+ "type": {
1524
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
1525
+ },
1526
+ "default": "\"_self\"",
1527
+ "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.",
1528
+ "fieldName": "target"
1529
+ },
1530
+ {
1531
+ "name": "expand",
1532
+ "type": {
1533
+ "text": "boolean"
1534
+ },
1535
+ "default": "false",
1536
+ "description": "Controls whether the button expands to fill the width of its container.",
1537
+ "fieldName": "expand"
1538
+ },
1539
+ {
1540
+ "name": "loading",
1541
+ "type": {
1542
+ "text": "boolean"
1543
+ },
1544
+ "default": "false",
1545
+ "description": "Controls whether the button is in loading state. Please note that the spinner\nis hidden from assistive technologies, so you need to make sure to announce\nthe loading state to e.g. screen reader users. We also recommend disabling\nall user interactions on the button itself while in loading state.",
1546
+ "fieldName": "loading"
1547
+ },
1548
+ {
1549
+ "name": "disabled",
1550
+ "type": {
1551
+ "text": "boolean"
1552
+ },
1553
+ "default": "false",
1554
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1555
+ "fieldName": "disabled",
1556
+ "inheritedFrom": {
1557
+ "name": "InputMixin",
1558
+ "module": "src/common/mixins/InputMixin.ts"
1559
+ }
1560
+ },
1561
+ {
1562
+ "name": "name",
1563
+ "type": {
1564
+ "text": "string | undefined"
1565
+ },
1566
+ "description": "The name of the form component.",
1567
+ "fieldName": "name",
1568
+ "inheritedFrom": {
1569
+ "name": "InputMixin",
1570
+ "module": "src/common/mixins/InputMixin.ts"
1571
+ }
1572
+ },
1573
+ {
1574
+ "name": "value",
1479
1575
  "type": {
1480
1576
  "text": "string"
1481
1577
  },
1482
1578
  "default": "\"\"",
1483
- "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.",
1484
- "fieldName": "max"
1579
+ "description": "The value of the form component.",
1580
+ "fieldName": "value",
1581
+ "inheritedFrom": {
1582
+ "name": "InputMixin",
1583
+ "module": "src/common/mixins/InputMixin.ts"
1584
+ }
1585
+ }
1586
+ ],
1587
+ "mixins": [
1588
+ {
1589
+ "name": "InputMixin",
1590
+ "module": "/src/common/mixins/InputMixin.js"
1485
1591
  },
1486
1592
  {
1487
- "name": "expand",
1488
- "type": {
1489
- "text": "boolean"
1490
- },
1491
- "default": "false",
1492
- "description": "Controls whether the calendar expands to fill the width of its container.",
1493
- "fieldName": "expand"
1593
+ "name": "FocusableMixin",
1594
+ "module": "/src/common/mixins/FocusableMixin.js"
1494
1595
  }
1495
1596
  ],
1496
1597
  "superclass": {
@@ -1498,10 +1599,10 @@
1498
1599
  "package": "lit"
1499
1600
  },
1500
1601
  "status": "ready",
1501
- "category": "list",
1602
+ "category": "action",
1502
1603
  "displayName": null,
1503
1604
  "examples": [],
1504
- "tagName": "nord-calendar",
1605
+ "tagName": "nord-button",
1505
1606
  "customElement": true
1506
1607
  }
1507
1608
  ],
@@ -1510,121 +1611,107 @@
1510
1611
  "kind": "js",
1511
1612
  "name": "default",
1512
1613
  "declaration": {
1513
- "name": "Calendar",
1514
- "module": "src/calendar/Calendar.ts"
1614
+ "name": "Button",
1615
+ "module": "src/button/Button.ts"
1515
1616
  }
1516
1617
  },
1517
1618
  {
1518
1619
  "kind": "custom-element-definition",
1519
- "name": "nord-calendar",
1620
+ "name": "nord-button",
1520
1621
  "declaration": {
1521
- "name": "Calendar",
1522
- "module": "src/calendar/Calendar.ts"
1622
+ "name": "Button",
1623
+ "module": "src/button/Button.ts"
1523
1624
  }
1524
1625
  }
1525
1626
  ],
1526
- "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- Dont 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"
1627
+ "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- Only use one primary button per section, as a main call-to-action.\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 a primary button in every row of a table.\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| `switch` | Switch style is reserved for the clinic switcher in the top left corner of an application. |\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"
1527
1628
  },
1528
1629
  {
1529
1630
  "kind": "javascript-module",
1530
- "path": "src/calendar/DateSelectEvent.ts",
1631
+ "path": "src/badge/Badge.ts",
1531
1632
  "declarations": [
1532
1633
  {
1533
1634
  "kind": "class",
1534
- "description": "",
1535
- "name": "DateSelectEvent",
1536
- "superclass": {
1537
- "name": "NordEvent",
1538
- "module": "/src/common/events.js"
1539
- },
1540
- "examples": []
1541
- }
1542
- ],
1543
- "exports": [
1544
- {
1545
- "kind": "js",
1546
- "name": "DateSelectEvent",
1547
- "declaration": {
1548
- "name": "DateSelectEvent",
1549
- "module": "src/calendar/DateSelectEvent.ts"
1550
- }
1551
- }
1552
- ],
1553
- "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"
1554
- },
1555
- {
1556
- "kind": "javascript-module",
1557
- "path": "src/calendar/localization.ts",
1558
- "declarations": [
1559
- {
1560
- "kind": "variable",
1561
- "name": "calendarLocalization",
1562
- "type": {
1563
- "text": "object"
1564
- },
1565
- "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n}"
1566
- }
1567
- ],
1568
- "exports": [
1569
- {
1570
- "kind": "js",
1571
- "name": "default",
1572
- "declaration": {
1573
- "name": "calendarLocalization",
1574
- "module": "src/calendar/localization.ts"
1575
- }
1576
- }
1577
- ],
1578
- "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"
1579
- },
1580
- {
1581
- "kind": "javascript-module",
1582
- "path": "src/calendar/month-view.ts",
1583
- "declarations": [
1584
- {
1585
- "kind": "function",
1586
- "name": "dayView",
1587
- "parameters": [
1635
+ "description": "Badges are used to inform users of the status of an object\nor of an action that’s been taken. Commonly used in tabular\ndata to indicate status.",
1636
+ "name": "Badge",
1637
+ "slots": [
1588
1638
  {
1589
- "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
1639
+ "description": "The badge content.",
1640
+ "name": ""
1641
+ }
1642
+ ],
1643
+ "members": [
1644
+ {
1645
+ "kind": "field",
1646
+ "name": "type",
1590
1647
  "type": {
1591
- "text": "DatePickerDayProps"
1592
- }
1648
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1649
+ },
1650
+ "default": "\"neutral\"",
1651
+ "description": "The type of badge.\nDetermines the background color of the badge.",
1652
+ "attribute": "type",
1653
+ "reflects": true
1654
+ },
1655
+ {
1656
+ "kind": "field",
1657
+ "name": "progress",
1658
+ "type": {
1659
+ "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
1660
+ },
1661
+ "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
1662
+ "attribute": "progress"
1593
1663
  }
1594
- ]
1595
- },
1596
- {
1597
- "kind": "function",
1598
- "name": "monthView",
1599
- "parameters": [
1664
+ ],
1665
+ "attributes": [
1600
1666
  {
1601
- "name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n dayNames,\n dayNamesShort,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
1667
+ "name": "type",
1602
1668
  "type": {
1603
- "text": "MonthViewArgs"
1604
- }
1669
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1670
+ },
1671
+ "default": "\"neutral\"",
1672
+ "description": "The type of badge.\nDetermines the background color of the badge.",
1673
+ "fieldName": "type"
1674
+ },
1675
+ {
1676
+ "name": "progress",
1677
+ "type": {
1678
+ "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
1679
+ },
1680
+ "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
1681
+ "fieldName": "progress"
1605
1682
  }
1606
- ]
1683
+ ],
1684
+ "superclass": {
1685
+ "name": "LitElement",
1686
+ "package": "lit"
1687
+ },
1688
+ "status": "ready",
1689
+ "category": "text",
1690
+ "displayName": null,
1691
+ "examples": [],
1692
+ "tagName": "nord-badge",
1693
+ "customElement": true
1607
1694
  }
1608
1695
  ],
1609
1696
  "exports": [
1610
1697
  {
1611
1698
  "kind": "js",
1612
- "name": "dayView",
1699
+ "name": "default",
1613
1700
  "declaration": {
1614
- "name": "dayView",
1615
- "module": "src/calendar/month-view.ts"
1701
+ "name": "Badge",
1702
+ "module": "src/badge/Badge.ts"
1616
1703
  }
1617
1704
  },
1618
1705
  {
1619
- "kind": "js",
1620
- "name": "monthView",
1706
+ "kind": "custom-element-definition",
1707
+ "name": "nord-badge",
1621
1708
  "declaration": {
1622
- "name": "monthView",
1623
- "module": "src/calendar/month-view.ts"
1709
+ "name": "Badge",
1710
+ "module": "src/badge/Badge.ts"
1624
1711
  }
1625
1712
  }
1626
1713
  ],
1627
- "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"
1714
+ "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 established variants and color patterns so that users can clearly identify the importance level.\n- Use to show a status update on a piece of information or action.\n- Use to mark something as a “draft” or “new”.\n- Use when you want to highlight something that has been added recently.\n- Always position badge so that it’s clear to understand what object it’s related to.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make badges clickable. Instead use button component’s small variant.\n- Don’t use alternatives to existing badge variants.\n\n</div>\n\n---\n\n## Content guidelines\n\nBadge labels should use a single word to describe the status of an object. Only use two words if you need to describe a complex state:\n\n<div class=\"n-usage n-usage-do\">Complete</div>\n<div class=\"n-usage n-usage-dont\">Action completed</div>\n\nWhen writing badge 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\">Partially refunded</div>\n<div class=\"n-usage n-usage-dont\">Partially Refunded</div>\n\nAvoid unnecessary words and articles in badge labels, such as “is”, “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Pending</div>\n<div class=\"n-usage n-usage-dont\">Item is pending</div>\n\nAlways describe the status in the past tense:\n\n<div class=\"n-usage n-usage-do\">Refunded</div>\n<div class=\"n-usage n-usage-dont\">Refund</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| `neutral` | The default style variant. |\n| `info` | Used to convey general information that isn’t critical. |\n| `success` | Used to convey success states. For example, you might want to show a badge that tells the user a payment was successful. |\n| `highlight` | Used to highlight specific items in the interface, like notifications. |\n| `danger` | Used to communicate problems that have to be resolved so that user can continue forward. Should always be used for highlighting errors. |\n| `warning` | Used to display information that needs a user’s attention attention and may require further steps. |\n| `progress` | Used to convey something that’s in progress. |\n"
1628
1715
  },
1629
1716
  {
1630
1717
  "kind": "javascript-module",
@@ -1707,100 +1794,13 @@
1707
1794
  ],
1708
1795
  "attributes": [
1709
1796
  {
1710
- "name": "padding",
1711
- "type": {
1712
- "text": "\"m\" | \"l\" | \"none\""
1713
- },
1714
- "default": "\"m\"",
1715
- "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
1716
- "fieldName": "padding"
1717
- }
1718
- ],
1719
- "superclass": {
1720
- "name": "LitElement",
1721
- "package": "lit"
1722
- },
1723
- "status": "ready",
1724
- "category": "structure",
1725
- "displayName": null,
1726
- "examples": [],
1727
- "tagName": "nord-card",
1728
- "customElement": true
1729
- }
1730
- ],
1731
- "exports": [
1732
- {
1733
- "kind": "js",
1734
- "name": "default",
1735
- "declaration": {
1736
- "name": "Card",
1737
- "module": "src/card/Card.ts"
1738
- }
1739
- },
1740
- {
1741
- "kind": "custom-element-definition",
1742
- "name": "nord-card",
1743
- "declaration": {
1744
- "name": "Card",
1745
- "module": "src/card/Card.ts"
1746
- }
1747
- }
1748
- ],
1749
- "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- Include a header when placing a [Table](/components/table) component inside the card.\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"
1750
- },
1751
- {
1752
- "kind": "javascript-module",
1753
- "path": "src/badge/Badge.ts",
1754
- "declarations": [
1755
- {
1756
- "kind": "class",
1757
- "description": "Badges are used to inform users of the status of an object\nor of an action that’s been taken. Commonly used in tabular\ndata to indicate status.",
1758
- "name": "Badge",
1759
- "slots": [
1760
- {
1761
- "description": "The badge content.",
1762
- "name": ""
1763
- }
1764
- ],
1765
- "members": [
1766
- {
1767
- "kind": "field",
1768
- "name": "type",
1769
- "type": {
1770
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1771
- },
1772
- "default": "\"neutral\"",
1773
- "description": "The type of badge.\nDetermines the background color of the badge.",
1774
- "attribute": "type",
1775
- "reflects": true
1776
- },
1777
- {
1778
- "kind": "field",
1779
- "name": "progress",
1780
- "type": {
1781
- "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
1782
- },
1783
- "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
1784
- "attribute": "progress"
1785
- }
1786
- ],
1787
- "attributes": [
1788
- {
1789
- "name": "type",
1790
- "type": {
1791
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1792
- },
1793
- "default": "\"neutral\"",
1794
- "description": "The type of badge.\nDetermines the background color of the badge.",
1795
- "fieldName": "type"
1796
- },
1797
- {
1798
- "name": "progress",
1797
+ "name": "padding",
1799
1798
  "type": {
1800
- "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
1799
+ "text": "\"m\" | \"l\" | \"none\""
1801
1800
  },
1802
- "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
1803
- "fieldName": "progress"
1801
+ "default": "\"m\"",
1802
+ "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
1803
+ "fieldName": "padding"
1804
1804
  }
1805
1805
  ],
1806
1806
  "superclass": {
@@ -1808,10 +1808,10 @@
1808
1808
  "package": "lit"
1809
1809
  },
1810
1810
  "status": "ready",
1811
- "category": "text",
1811
+ "category": "structure",
1812
1812
  "displayName": null,
1813
1813
  "examples": [],
1814
- "tagName": "nord-badge",
1814
+ "tagName": "nord-card",
1815
1815
  "customElement": true
1816
1816
  }
1817
1817
  ],
@@ -1820,20 +1820,20 @@
1820
1820
  "kind": "js",
1821
1821
  "name": "default",
1822
1822
  "declaration": {
1823
- "name": "Badge",
1824
- "module": "src/badge/Badge.ts"
1823
+ "name": "Card",
1824
+ "module": "src/card/Card.ts"
1825
1825
  }
1826
1826
  },
1827
1827
  {
1828
1828
  "kind": "custom-element-definition",
1829
- "name": "nord-badge",
1829
+ "name": "nord-card",
1830
1830
  "declaration": {
1831
- "name": "Badge",
1832
- "module": "src/badge/Badge.ts"
1831
+ "name": "Card",
1832
+ "module": "src/card/Card.ts"
1833
1833
  }
1834
1834
  }
1835
1835
  ],
1836
- "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 established variants and color patterns so that users can clearly identify the importance level.\n- Use to show a status update on a piece of information or action.\n- Use to mark something as a “draft” or “new”.\n- Use when you want to highlight something that has been added recently.\n- Always position badge so that it’s clear to understand what object it’s related to.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make badges clickable. Instead use button component’s small variant.\n- Don’t use alternatives to existing badge variants.\n\n</div>\n\n---\n\n## Content guidelines\n\nBadge labels should use a single word to describe the status of an object. Only use two words if you need to describe a complex state:\n\n<div class=\"n-usage n-usage-do\">Complete</div>\n<div class=\"n-usage n-usage-dont\">Action completed</div>\n\nWhen writing badge 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\">Partially refunded</div>\n<div class=\"n-usage n-usage-dont\">Partially Refunded</div>\n\nAvoid unnecessary words and articles in badge labels, such as “is”, “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Pending</div>\n<div class=\"n-usage n-usage-dont\">Item is pending</div>\n\nAlways describe the status in the past tense:\n\n<div class=\"n-usage n-usage-do\">Refunded</div>\n<div class=\"n-usage n-usage-dont\">Refund</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| `neutral` | The default style variant. |\n| `info` | Used to convey general information that isn’t critical. |\n| `success` | Used to convey success states. For example, you might want to show a badge that tells the user a payment was successful. |\n| `highlight` | Used to highlight specific items in the interface, like notifications. |\n| `danger` | Used to communicate problems that have to be resolved so that user can continue forward. Should always be used for highlighting errors. |\n| `warning` | Used to display information that needs a user’s attention attention and may require further steps. |\n| `progress` | Used to convey something that’s in progress. |\n"
1836
+ "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- Include a header when placing a [Table](/components/table) component inside the card.\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"
1837
1837
  },
1838
1838
  {
1839
1839
  "kind": "javascript-module",
@@ -6109,7 +6109,7 @@
6109
6109
  "kind": "field",
6110
6110
  "name": "size",
6111
6111
  "type": {
6112
- "text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
6112
+ "text": "\"xxs\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
6113
6113
  },
6114
6114
  "default": "\"m\"",
6115
6115
  "description": "The size of the icon.",
@@ -6164,7 +6164,7 @@
6164
6164
  {
6165
6165
  "name": "size",
6166
6166
  "type": {
6167
- "text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
6167
+ "text": "\"xxs\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
6168
6168
  },
6169
6169
  "default": "\"m\"",
6170
6170
  "description": "The size of the icon.",
@@ -9504,6 +9504,86 @@
9504
9504
  ],
9505
9505
  "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 a radio component when users can only select one option from a list.\n- Favour radios over a select component when there are a small number of options. This reduces the number of clicks a user has to make, increasing efficiency.\n- Radio buttons are grouped by their `name` attribute. Therefore, it is crucial that the same `name` is used for a group of radios.\n- Give each radio within a group a unique `value`.\n- Radios **must** be used in combination with a fieldset component.\n- In most cases, a stack component should be used to layout a group of radio buttons.\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 when a user can select more than one option. In this case, use a checkbox instead.\n- Don’t use for “accepting terms of service” and similar functionality. Use a checkbox instead.\n- When you have more than 10 options to choose from. Consider using a select instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nRadio button labels should be clear, accurate and predictable. It should be possible for the user to understand what they are enabling or disabling:\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 radio 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 ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Blue</div>\n<div class=\"n-usage n-usage-dont\">Blue.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patient</div>\n<div class=\"n-usage n-usage-dont\">Patient;</div>\n\n---\n\n## Additional considerations\n\n- Hint text can be used to offer further information or explanation for an option.\n- Once a radio has been selected, users cannot return to having no radios selected without refreshing their browser window. Therefore, you should include \"None of the above\" or \"I do not know\" if they are valid options.\n- In most cases, radio buttons should be stacked vertically. However, radio buttons can be stacked horizontally when there are only two options with short labels. An example might be a yes/no question.\n"
9506
9506
  },
9507
+ {
9508
+ "kind": "javascript-module",
9509
+ "path": "src/skeleton/Skeleton.ts",
9510
+ "declarations": [
9511
+ {
9512
+ "kind": "class",
9513
+ "description": "Skeletons are used to provide a low fidelity representation of content\nbefore it appears in a view. This improves the perceived loading time\nfor our users.",
9514
+ "name": "Skeleton",
9515
+ "cssProperties": [
9516
+ {
9517
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
9518
+ "name": "--n-skeleton-border-radius",
9519
+ "default": "var(--n-border-radius)"
9520
+ },
9521
+ {
9522
+ "description": "Controls the main color of the skeleton, using our [color tokens](/tokens/#color).",
9523
+ "name": "--n-skeleton-color",
9524
+ "default": "var(--n-color-border)"
9525
+ },
9526
+ {
9527
+ "description": "Controls the sheen color of the skeleton, using our [color tokens](/tokens/#color).",
9528
+ "name": "--n-skeleton-sheen-color",
9529
+ "default": "var(--n-color-border-strong)"
9530
+ }
9531
+ ],
9532
+ "members": [
9533
+ {
9534
+ "kind": "field",
9535
+ "name": "effect",
9536
+ "type": {
9537
+ "text": "\"pulse\" | \"sheen\" | \"none\""
9538
+ },
9539
+ "default": "\"none\"",
9540
+ "description": "Determines which animation effect the skeleton will use.",
9541
+ "attribute": "effect"
9542
+ }
9543
+ ],
9544
+ "attributes": [
9545
+ {
9546
+ "name": "effect",
9547
+ "type": {
9548
+ "text": "\"pulse\" | \"sheen\" | \"none\""
9549
+ },
9550
+ "default": "\"none\"",
9551
+ "description": "Determines which animation effect the skeleton will use.",
9552
+ "fieldName": "effect"
9553
+ }
9554
+ ],
9555
+ "superclass": {
9556
+ "name": "LitElement",
9557
+ "package": "lit"
9558
+ },
9559
+ "status": "new",
9560
+ "category": "feedback",
9561
+ "displayName": null,
9562
+ "examples": [],
9563
+ "tagName": "nord-skeleton",
9564
+ "customElement": true
9565
+ }
9566
+ ],
9567
+ "exports": [
9568
+ {
9569
+ "kind": "js",
9570
+ "name": "default",
9571
+ "declaration": {
9572
+ "name": "Skeleton",
9573
+ "module": "src/skeleton/Skeleton.ts"
9574
+ }
9575
+ },
9576
+ {
9577
+ "kind": "custom-element-definition",
9578
+ "name": "nord-skeleton",
9579
+ "declaration": {
9580
+ "name": "Skeleton",
9581
+ "module": "src/skeleton/Skeleton.ts"
9582
+ }
9583
+ }
9584
+ ],
9585
+ "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 skeleton component for dynamic content only.\n- Use to give the user an indication of what the page layout will be like once loaded.\n- Mimick the actual layout using multiple Skeleton components.\n- Use `aria-busy=\"true\"` to indicate which area on the screen is currently loading and remove it or set it to `false` once loaded.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use Skeleton component for static content.\n- Don’t show placeholder content after Skeleton disappears that will change when the page fully loads.\n\n</div>\n"
9586
+ },
9507
9587
  {
9508
9588
  "kind": "javascript-module",
9509
9589
  "path": "src/select/Select.ts",
@@ -10196,86 +10276,6 @@
10196
10276
  ],
10197
10277
  "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 let a user choose one option from an options menu.\n- Use when you have more than 6 options to choose from.\n- Use when you don’t know how many options there will be.\n- Use hint text and placeholder to provide additional, non-critical instructions.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use a select if you have less than 6 options to choose from. Consider using radio components instead, if you have enough space to allow it. \n\n</div>\n\n---\n\n## Content guidelines\n\nSelect labels act as a title for the select field. Labels should typically be short and in noun&nbsp;form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing select 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\">Company name</div>\n<div class=\"n-usage n-usage-dont\">Company Name</div>\n\nDo not use colons in select labels:\n\n<div class=\"n-usage n-usage-do\">Choose organization</div>\n<div class=\"n-usage n-usage-dont\">Choose organization:</div>\n"
10198
10278
  },
10199
- {
10200
- "kind": "javascript-module",
10201
- "path": "src/skeleton/Skeleton.ts",
10202
- "declarations": [
10203
- {
10204
- "kind": "class",
10205
- "description": "Skeletons are used to provide a low fidelity representation of content\nbefore it appears in a view. This improves the perceived loading time\nfor our users.",
10206
- "name": "Skeleton",
10207
- "cssProperties": [
10208
- {
10209
- "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
10210
- "name": "--n-skeleton-border-radius",
10211
- "default": "var(--n-border-radius)"
10212
- },
10213
- {
10214
- "description": "Controls the main color of the skeleton, using our [color tokens](/tokens/#color).",
10215
- "name": "--n-skeleton-color",
10216
- "default": "var(--n-color-border)"
10217
- },
10218
- {
10219
- "description": "Controls the sheen color of the skeleton, using our [color tokens](/tokens/#color).",
10220
- "name": "--n-skeleton-sheen-color",
10221
- "default": "var(--n-color-border-strong)"
10222
- }
10223
- ],
10224
- "members": [
10225
- {
10226
- "kind": "field",
10227
- "name": "effect",
10228
- "type": {
10229
- "text": "\"pulse\" | \"sheen\" | \"none\""
10230
- },
10231
- "default": "\"none\"",
10232
- "description": "Determines which animation effect the skeleton will use.",
10233
- "attribute": "effect"
10234
- }
10235
- ],
10236
- "attributes": [
10237
- {
10238
- "name": "effect",
10239
- "type": {
10240
- "text": "\"pulse\" | \"sheen\" | \"none\""
10241
- },
10242
- "default": "\"none\"",
10243
- "description": "Determines which animation effect the skeleton will use.",
10244
- "fieldName": "effect"
10245
- }
10246
- ],
10247
- "superclass": {
10248
- "name": "LitElement",
10249
- "package": "lit"
10250
- },
10251
- "status": "new",
10252
- "category": "feedback",
10253
- "displayName": null,
10254
- "examples": [],
10255
- "tagName": "nord-skeleton",
10256
- "customElement": true
10257
- }
10258
- ],
10259
- "exports": [
10260
- {
10261
- "kind": "js",
10262
- "name": "default",
10263
- "declaration": {
10264
- "name": "Skeleton",
10265
- "module": "src/skeleton/Skeleton.ts"
10266
- }
10267
- },
10268
- {
10269
- "kind": "custom-element-definition",
10270
- "name": "nord-skeleton",
10271
- "declaration": {
10272
- "name": "Skeleton",
10273
- "module": "src/skeleton/Skeleton.ts"
10274
- }
10275
- }
10276
- ],
10277
- "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 skeleton component for dynamic content only.\n- Use to give the user an indication of what the page layout will be like once loaded.\n- Mimick the actual layout using multiple Skeleton components.\n- Use `aria-busy=\"true\"` to indicate which area on the screen is currently loading and remove it or set it to `false` once loaded.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use Skeleton component for static content.\n- Don’t show placeholder content after Skeleton disappears that will change when the page fully loads.\n\n</div>\n"
10278
- },
10279
10279
  {
10280
10280
  "kind": "javascript-module",
10281
10281
  "path": "src/spinner/Spinner.ts",
@@ -12964,6 +12964,41 @@
12964
12964
  ],
12965
12965
  "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 hide text visually from the screen, but keep it available to assistive technologies, such as screen readers.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding interactive content.\n\n</div>\n"
12966
12966
  },
12967
+ {
12968
+ "kind": "javascript-module",
12969
+ "path": "src/common/decorators/observe.ts",
12970
+ "declarations": [
12971
+ {
12972
+ "kind": "function",
12973
+ "name": "observe",
12974
+ "parameters": [
12975
+ {
12976
+ "name": "propertyName",
12977
+ "type": {
12978
+ "text": "string"
12979
+ }
12980
+ },
12981
+ {
12982
+ "name": "lifecycle",
12983
+ "default": "\"update\"",
12984
+ "type": {
12985
+ "text": "ObserveLifecycle"
12986
+ }
12987
+ }
12988
+ ]
12989
+ }
12990
+ ],
12991
+ "exports": [
12992
+ {
12993
+ "kind": "js",
12994
+ "name": "observe",
12995
+ "declaration": {
12996
+ "name": "observe",
12997
+ "module": "src/common/decorators/observe.ts"
12998
+ }
12999
+ }
13000
+ ]
13001
+ },
12967
13002
  {
12968
13003
  "kind": "javascript-module",
12969
13004
  "path": "src/common/controllers/DirectionController.ts",
@@ -13996,41 +14031,6 @@
13996
14031
  }
13997
14032
  ]
13998
14033
  },
13999
- {
14000
- "kind": "javascript-module",
14001
- "path": "src/common/decorators/observe.ts",
14002
- "declarations": [
14003
- {
14004
- "kind": "function",
14005
- "name": "observe",
14006
- "parameters": [
14007
- {
14008
- "name": "propertyName",
14009
- "type": {
14010
- "text": "string"
14011
- }
14012
- },
14013
- {
14014
- "name": "lifecycle",
14015
- "default": "\"update\"",
14016
- "type": {
14017
- "text": "ObserveLifecycle"
14018
- }
14019
- }
14020
- ]
14021
- }
14022
- ],
14023
- "exports": [
14024
- {
14025
- "kind": "js",
14026
- "name": "observe",
14027
- "declaration": {
14028
- "name": "observe",
14029
- "module": "src/common/decorators/observe.ts"
14030
- }
14031
- }
14032
- ]
14033
- },
14034
14034
  {
14035
14035
  "kind": "javascript-module",
14036
14036
  "path": "src/common/directives/cond.ts",